You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In writing tests and other development, inconsistencies in how model.meta.filename is set have been seen.
A particular example is the given data model:
>>> from roman_datamodels import datamodels as rdm >>> model = rdm.open('r0000101001001001001_01101_0001_WFI01_rampfit.asdf') >>> model.meta.filename 'r0000101001001001001_01101_0001_WFI01_uncal.asdf'
The meta value is not updated to represent the filename the model has just been read from, but retains the value given to it in some way(?).
Investigate usage and use cases for this meta and resolve inconsistencies.
The text was updated successfully, but these errors were encountered:
I have had a look at this, and can confirm this occurs when outputting any step file (rampfit, saturation, refpix, etc), but does not occur when one runs the entire pipeline. The reason for the exception for the entire pipeline case is that the last thing done in that case is to manually update the model.meta.filename, see here.
Everywhere else the difference between the model.meta.filename is induced by a combination of stpipe and roman_datamodels. In particular, when stpipe is commanded to write the output of a particular step, it modifies the input file's name to use the suffix mapped to the step (if there is one). This means that the actual (on disk) file names are "correct". However, stpipe calls into the roman_datamodels.datamodels.DataModel.save method, which calls down into ASDF to actually save the file. No modifications to the model.meta.filename field occur as part of this. Thus since the model.meta contents are either unchanged or copied from one step to the next, the model.meta.filename is never updated except by manual calls.
I believe the solution is to add conditional logic in roman_datamodels.datamodels.DataModel.save which sets the model.meta.filename to the indicated file name for the save, provided the model.meta.filename field is present in the data model being saved.
Issue RCAL-723 was created on JIRA by Jonathan Eisenhamer:
In writing tests and other development, inconsistencies in how
model.meta.filename
is set have been seen.A particular example is the given data model:
>>> from roman_datamodels import datamodels as rdm
>>> model = rdm.open('r0000101001001001001_01101_0001_WFI01_rampfit.asdf')
>>> model.meta.filename
'r0000101001001001001_01101_0001_WFI01_uncal.asdf'
The meta value is not updated to represent the filename the model has just been read from, but retains the value given to it in some way(?).
Investigate usage and use cases for this meta and resolve inconsistencies.
The text was updated successfully, but these errors were encountered: