oirlab / liger_iris_pipeline

Data Reduction System (DRS) for the Thirty Meter Telescope IRIS imager/spectrograph
https://oirlab.github.io/iris-pipeline
0 stars 3 forks source link

datamodels.open does not work on a datamodel #60

Open zonca opened 1 week ago

zonca commented 1 week ago

The workaround is this commit:

https://github.com/oirlab/liger_iris_pipeline/pull/58/commits/701a431a0ed01e138776ab4098ed29cb513c353f

this is triggered by get_reference_file, see below for more details. It seems like JWST has no issues passing a Data model to get_reference_file, however, it seems we can only pass a string. We need to understand where this issue is coming from.

  • 701a431 I see how this stems from an assumption that get_reference_file expects a filename, not a DataModel. Should we override get_reference_file to accept both?

There is something I do not understand here, maybe you can track it down, see here: https://github.com/spacetelescope/jwst/blob/10501f22def0460b15df65cd5261601c6a71d7cf/jwst/dark_current/dark_current_step.py#L32

they are doing the same, feeding the input model to get_reference_file, why does it work for them and not for us? I think that at some point in the class hierarchy we are using different classes but have not understood where.

_Originally posted by @zonca in https://github.com/oirlab/liger_iris_pipeline/issues/58#issuecomment-2181593872_