#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
#775 renamed
meta.cal_step.imprinttometa.cal_step.imprint_subtractboth using theS_IMPRNTkeyword. 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:meta.cal_step.imprintvalue that matches the value ofS_IMPRINT(since the hash check didn't fail)meta.cal_step.imprint_subtractHowever if the model is modified to invalidate the hash opening the file will:
meta.cal_step.imprintwill have a value matching the priorS_IMPRINTvaluemeta.cal_step.imprint_subtractwill have a value matching the currentS_IMPRINTvalueAre there any places where the pipeline inspects
meta.cal_step.imprint_subtractoutside 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