Doby’s ESA Pyxel Logs🌙

🧩 Pyxel Contribution: Scene Generation Models in the JSON Schema

Summary: Adds the Scene Generation models load_image and usaf_illumination to Pyxel's JSON Schema, and completes their catalogue examples.

URL:
https://gitlab.com/esa/pyxel/-/merge_requests/1257

✨ Overview

In Pyxel 3.0.2 the JSON Schema (pyxel/static/pyxel_schema.json) left out two Scene Generation models, load_image and usaf_illumination. A configuration using either one was refused by the schema, although Pyxel loads and runs it.

I reported it first as issue #1061, then opened this merge request to close it.


🔍 Problem Analysis

The schema generator in continuous_integration/scripts/create_json_schema.py kept only functions with a parameter named detector, and dropped that parameter from each model's arguments. Since Pyxel 3.0, these two models take detector_or_focal_plane_array instead, so the generator skipped them.

Their examples in metadata.yaml also lacked right_ascension, declination and fov_radius, so copying them stopped with a TypeError.


🔧 Technical Changes

  • The generator treats either name as the model's detector parameter, in both places.
  • The new schema entries list only the arguments a user sets, with right_ascension, declination and fov_radius required.
  • The two examples use the same field as the load_star_map example (56.75°, 24.1167°, 0.5°).
  • The schema is regenerated with tox -e json_schema. Run unchanged on master, the generator reproduces master's schema byte for byte, so the schema diff is only these two models.

🧪 Validation

  • ✅ A new test validates every Scene Generation example from metadata.yaml against the schema. It fails for these two models without the change and passes with it.
  • ✅ A configuration using the usaf_illumination example runs in Pyxel 3.0.2.
  • ✅ ruff check and ruff format pass.

🦕 Authored by: Doby Baxter
🌌 Contribution for: ESA Pyxel Project

⚙️ Config Lab