Skip to content

imprint_subract renaming combined with fits_hash results in de-sync of ASDF and FITS #809

Description

@braingram

#775 renamed meta.cal_step.imprint to meta.cal_step.imprint_subtract both using the S_IMPRNT keyword. This can result in desync of the ASDF and FITS data when opening a file written prior to that PR. If we assume the file hasn't been modified in some way to invalidate the FITS_HASH (the user hasn't manually modified the fits contents) opening the file will:

  • skip mapping FITS to ASDF (since the hash matches)
  • the datamodel will have a meta.cal_step.imprint value that matches the value of S_IMPRINT (since the hash check didn't fail)
  • the datamodel will not have a meta.cal_step.imprint_subtract

However if the model is modified to invalidate the hash opening the file will:

  • map FITS to ASDF
  • meta.cal_step.imprint will have a value matching the prior S_IMPRINT value
  • meta.cal_step.imprint_subtract will have a value matching the current S_IMPRINT value

Are there any places where the pipeline inspects meta.cal_step.imprint_subtract outside of test code? If not, this is a likely inconsequential issue.

FWIW the issue was found when testing different options for mapping FITS to ASDF contents. I think this issue is also further motivation for removing the use of FITS_HASH (which might be practical with the improvements to this mapping). However removing FITS_HASH will be complicated by #381 as noted in #271

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions