diff --git a/liger_iris_pipeline/dark_current/dark_current_step.py b/liger_iris_pipeline/dark_current/dark_current_step.py index ebca3fd..d7d13f1 100644 --- a/liger_iris_pipeline/dark_current/dark_current_step.py +++ b/liger_iris_pipeline/dark_current/dark_current_step.py @@ -22,19 +22,6 @@ class DarkCurrentStep(Step): reference_file_types = ["dark"] - #FIXME - This will need to be ported to a new LigerIrisStep class - # I do not understand why this is necessary, in JWST it seems like - # this is not needed and works out of the box. - # Without this, the pipeline tries to call `datamodes.open` on a - # file that is already open, which gives the error: - # expected str, bytes or os.PathLike object, not LigerIrisDataModel - @classmethod - def _datamodels_open(cls, init, **kwargs): - if issubclass(init.__class__, stdatamodels.model_base.DataModel): - return init - else: - return datamodels.open(init, **kwargs) - def process(self, input): # Open the input data model diff --git a/liger_iris_pipeline/datamodels/model_base.py b/liger_iris_pipeline/datamodels/model_base.py index 2593cf8..ad13468 100644 --- a/liger_iris_pipeline/datamodels/model_base.py +++ b/liger_iris_pipeline/datamodels/model_base.py @@ -1,6 +1,6 @@ from astropy.time import Time -from stdatamodels import DataModel as _DataModel +from stdatamodels.jwst.datamodels import JwstDataModel as _DataModel __all__ = ["LigerIrisDataModel"] @@ -30,7 +30,8 @@ def get_crds_parameters(self): dict """ return { - key: val for key, val in self.to_flat_dict(include_arrays=False).items() + key: val + for key, val in self.to_flat_dict(include_arrays=False).items() if isinstance(val, (str, int, float, complex, bool)) } @@ -51,4 +52,4 @@ def on_save(self, init): """ super().on_save(init) - self.meta.date = Time.now().isot \ No newline at end of file + self.meta.date = Time.now().isot