spacetelescope / roman_datamodels

Datamodel support for the roman calibration pipeline
https://roman-datamodels.readthedocs.io
Other
7 stars 20 forks source link

Expose public API for making test data #299

Open braingram opened 8 months ago

braingram commented 8 months ago

As projects begin to add support for roman data files it would be helpful to have a documented public API for making 'test' data (similar to what is currently done in romancal using the maker_utils).

See https://github.com/spacetelescope/astrocut/pull/105#issuecomment-1867728259 for a specific example where a level 2 file (with complete WCS) would be useful.

And https://github.com/spacetelescope/jdaviz/blob/e8f125ebe375f938ed3a7b2af97e1a1c3dd5b531/jdaviz/configs/imviz/tests/utils.py#L241 for another example.

WilliamJamieson commented 6 months ago

I am not sure what you mean here. There is a Public API, the roman_datamodels.maker_utils which can generate a "valid" (filled with garbage but technically correct) set of data.

braingram commented 6 months ago

Thanks for the reply. If the intention is for the maker_utils to be public shouldn't they be documented? I don't see any mention of them in the roman_datamodels docs: https://roman-datamodels.readthedocs.io/en/latest/search.html?q=maker_utils&check_keywords=yes&area=default

WilliamJamieson commented 6 months ago

They are for testing purposes, and are mostly considered internal to romancal for its testing and setup of data. We don't want to encourage their widespread use as while the are "valid" in the sense of the RAD schemas. They don't produce a datamodel containing anything close to actual data. That is what romancal and romanisim are intended to do. romanisim to simulate observations and romancal to take observation data and calibrate it. The maker_utils are convenience functions only. Thus we do not advertise the feature in order to avoid creating the misconception that they make anything that should be used.