spacetelescope / romancal

Python library to process science observations from the Nancy Grace Roman Space Telescope
https://roman-pipeline.readthedocs.io/en/latest/
Other
32 stars 28 forks source link

Update meta.filename to on-disk filename on read #1439

Open schlafly opened 1 month ago

schlafly commented 1 month ago

meta.filename is used as a default file name in many places in the pipeline. Currently it is possible for meta.filename to fail to match the actual file name on disk when a file is copied and renamed, changing the actual filename but not the value of the meta.filename metadata.

We decided to follow Webb's example and limit how often this causes problems by:

  1. setting meta.filename to the actual filename when we read a file in roman_datamodels
  2. setting meta.filename to the actual filename when we write a file using roman_datamodels.

I believe we already do (2) but do not actually do (1). We should do both of these.

schlafly commented 1 month ago

@stscijgbot-rstdms