Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simspec files do not have a well-defined data model #336

Open
weaverba137 opened this issue Mar 13, 2018 · 3 comments
Open

simspec files do not have a well-defined data model #336

weaverba137 opened this issue Mar 13, 2018 · 3 comments
Labels
documentation/data model Issues related to Sphinx documentation or data model inconsistencies.

Comments

@weaverba137
Copy link
Member

The existing data model for simspec files does not reflect the actual simspec files produced in recent reference runs. Depending on the flavor of the exposure, simspec files

  • Have sets of header keywords that differ from the data model.
  • May or may not have EXTNAME set for all HDUs.
  • May have different number of HDUs!

This last point makes it especially difficult to validate simspec files against the data model.

@weaverba137 weaverba137 added this to the 18.3 milestone Mar 13, 2018
@sbailey
Copy link
Contributor

sbailey commented Mar 19, 2018

Indeed, I can see how this can be a pain for datamodel validation. The current state requires different HDUs depending upon the FLAVOR in the FIBERMAP HDU:

Required by all flavors ('arc', 'flat', 'science'):

  • FIBERMAP, WAVE_[BRZ], PHOT_[BRZ]

Additional HDUs required by FLAVOR='flat' and 'science':

  • WAVE, FLUX

Additional HDUs required only by FLAVOR='science':

  • SKYFLUX, SKYPHOT_[BRZ], TRUTH, OBSCONDITIONS

Additionally, as of desisim 0.26.0,

  • FLAVOR='flat' incorrectly have meaningless SKYFLUX and SKYPHOT_[BRZ] HDUs
  • FLAVOR='arc' has a blank primary HDU with no EXTNAME while the others do not

For the purposes of the 18.3 release, let's document this by hand in the datamodel and recognize that they will fail automated validation, and consider automation options for a later release.

@sbailey
Copy link
Contributor

sbailey commented Mar 19, 2018

Thinking "aloud" about options:

  1. Only include the HDUs that are required / meaningful for a given flavor, and handle differences on the data model validation side.
    • This is straighforward for humans reading a data model ("this HDU is only required for flavors 'flat' and 'science' but not 'arc'...") but would be a pain for automated tools.
    • a partially automated solution would be to support optional HDUs: if they exist they should follow this data model, but don't worry if they don't exist, and don't try to map which HDUs should exist for which FLAVORs.
  2. Require all flavors to include all HDUs with at least dummy values, and then define in the docs which ones are actually used based upon FLAVOR.
    • this is most friendly to the automated tools, but least friendly to a human looking at a simspec file since it is ambiguous which headers are actually used without separately reading the datamodel docs.
  3. Split them out into completely different names and formats for arc vs. flat vs. science simspec files.

@weaverba137 weaverba137 added the documentation/data model Issues related to Sphinx documentation or data model inconsistencies. label Mar 28, 2018
@sbailey sbailey removed this from the 18.3 milestone Mar 28, 2018
@sbailey
Copy link
Contributor

sbailey commented Mar 28, 2018

Punting to 18.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation/data model Issues related to Sphinx documentation or data model inconsistencies.
Projects
None yet
Development

No branches or pull requests

2 participants