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
However, when reading in a file, the meta.filename in the data model continues to match what is on disk.
That makes sense but can lead to confusion in the pipeline. The usual issue is that someone takes a file and copies it elsewhere with a new name. In the new file, meta.filename and the actual filename are different. Then when many romancal steps are run on the new file, meta.filename is used as the hint for the output filename, rather than the actual on-disk filename, leading to potentially confusingly-named products.
The proposal here is to update meta.filename when roman_datamodels reads a file, so that meta.filename always reflects the on-disk filename. Then romancal will do the right thing. This is also the approach that has been taken in the Webb pipeline. This presumably involves changes to rdm.datamodels.open(...).
This has the obviously downside that it is surprising if asdf.open(filename)['roman']['meta']['filename'] is different from rdm.open(filename).meta.filename. But it's also surprising if we have a different policy than Webb, and it would fix the immediate issue in romancal.
The text was updated successfully, but these errors were encountered:
In romancal we often use meta.filename as a default or a hint to determine what the output filename for a product should be.
When writing a file via roman_datamodels we make sure that the meta.filename of the output object matches where it was written out to:
roman_datamodels/src/roman_datamodels/datamodels/_core.py
Line 228 in 3afecbf
However, when reading in a file, the meta.filename in the data model continues to match what is on disk.
That makes sense but can lead to confusion in the pipeline. The usual issue is that someone takes a file and copies it elsewhere with a new name. In the new file, meta.filename and the actual filename are different. Then when many romancal steps are run on the new file, meta.filename is used as the hint for the output filename, rather than the actual on-disk filename, leading to potentially confusingly-named products.
The proposal here is to update meta.filename when roman_datamodels reads a file, so that meta.filename always reflects the on-disk filename. Then romancal will do the right thing. This is also the approach that has been taken in the Webb pipeline. This presumably involves changes to rdm.datamodels.open(...).
This has the obviously downside that it is surprising if asdf.open(filename)['roman']['meta']['filename'] is different from rdm.open(filename).meta.filename. But it's also surprising if we have a different policy than Webb, and it would fix the immediate issue in romancal.
The text was updated successfully, but these errors were encountered: