JSON schema leaves out the Scene Generation models load_image and usaf_illumination
What happened:
In Pyxel 3.0.2, and on master at 4eee1601, the JSON schema (pyxel/static/pyxel_schema.json) leaves out two Scene Generation models, load_image and usaf_illumination. A configuration that uses either of them is refused by the schema, although Pyxel loads and runs it.
The cause is in continuous_integration/scripts/create_json_schema.py: get_model_info keeps only functions that have a parameter named detector, and generate_model drops a parameter of that name from a model's arguments. Since Pyxel 3.0, these two models take detector_or_focal_plane_array instead, so the generator skips them without a message. load_star_map, which still takes detector, is in the schema.
Separately, the examples for both models in pyxel/models/scene_generation/metadata.yaml leave out the required right_ascension, declination and fov_radius, so a configuration copied from the usaf_illumination example stops with:
TypeError: usaf_illumination() missing 3 required positional arguments: 'right_ascension', 'declination', and 'fov_radius'The load_image example has the same gap.
What is expected to happen:
Both models are in the schema under scene_generation, with their own arguments, and their examples in metadata.yaml give every required argument.
Minimal Complete Verifiable Example:
import inspect
from importlib import resources
import pyxel.models.scene_generation as scene_generation
schema = resources.files("pyxel.static").joinpath("pyxel_schema.json").read_text()
for name in ("load_star_map", "load_image", "usaf_illumination"):
func = getattr(scene_generation, name)
first_parameter = next(iter(inspect.signature(func).parameters))
in_schema = f"pyxel.models.scene_generation.{name}" in schema
print(f"{name:18} first parameter: {first_parameter:30} in JSON schema: {in_schema}")Output with Pyxel 3.0.2:
load_star_map first parameter: detector in JSON schema: True
load_image first parameter: detector_or_focal_plane_array in JSON schema: False
usaf_illumination first parameter: detector_or_focal_plane_array in JSON schema: FalseAnything else we need to know?:
A merge request with a fix follows: the generator accepts either parameter name, the schema is regenerated, both examples get the same sky position as the load_star_map example, and a new test validates every Scene Generation example from metadata.yaml with the schema.
The regenerated entry for load_image has no pixel_scale, because its docstring does not document that parameter. That is the docstring-versus-signature problem of #870, which !1167 addresses, so it is left out of this fix.
Environment:
Output of pyxel.show_versions()
INSTALLED VERSIONS
------------------
commit : caf6de4383e71f0dc2e8b445b5d971e2f300be6d
version : 3.0.2
python : 3.12.15 (main, Oct 1 2026, 21:47:32) [GCC 14.2.0]
python-bits : 64
OS : Linux
OS-release : 6.18.33.2-microsoft-standard-WSL2
machine : x86_64
processor :
byteorder : little
LC_ALL : None
LANG : C.UTF-8
LOCALE : C.UTF-8
pyxel : 3.0.2
astropy : 8.0.1
asdf : 5.4.0
attrs : 26.1.0
bokeh : 3.9.2
cloudpickle : 3.1.2
dask : 2026.8.0
dask_jobqueue : None
datashader : 0.19.1
distributed : 2026.8.0
fsspec : 2026.9.0
h5py : 3.16.0
holoviews : 1.23.2
hvplot : 0.12.2
ipywidgets : None
jupyter : None
jupyterlab : None
matplotlib : 3.11.2
notebook : None
numba : 0.68.0
numpy : 2.5.3
pandas : 3.0.6
panel : 1.9.4
param : 2.4.2
PIL : 12.3.0
poppy : 1.2.0
specutils : 2.4.0
synphot : 1.7.0
lacosmic : None
photutils : None
pygmo : None
pympler : 1.1
scipy : 1.18.1
seaborn : 0.13.2
skimage : 0.26.0
tqdm : 4.70.1
typing-extensions: None
yaml : 6.0.3
xarray : 2026.9.0
xlrd : 2.0.2
openpyxl : 3.1.5
netcdf4 : None
setuptools : None
pip : 25.0.1
conda : None
black : None
blackdoc : None
flake8 : None
isort : None
mypy : None
pytest : 9.1.1
tox : None
sphinx : None