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

Warning with using TMTRampModel #21

Closed arunsurya77 closed 4 years ago

arunsurya77 commented 4 years ago

Hi, I have been trying to use the TMTRampModel for the ROP Pipeline. When I run the pipeline I get the following error. Have you encountered any such warnings with the new datamodels?

/home/arun/asurya_dev/iris_pipeline_april/iris_pipeline/iris_pipeline/__init__.py
2020-04-22 14:46:43,533 - stpipe.rop - INFO - ROPPipeline instance created.
2020-04-22 14:46:43,535 - stpipe.rop.nonlincorr - INFO - NonlincorrStep instance created.
2020-04-22 14:46:43,536 - stpipe.rop.readoutsamp - INFO - ReadoutsampStep instance created.
2020-04-22 14:46:43,571 - stpipe.rop - INFO - Step rop running with args ('sample_ramp_new.fits',).
2020-04-22 14:46:43,744 - stpipe.rop - WARNING - 'newspec' data loader provided for Spectrum1D without explicit identifier or list of compatible extensions
2020-04-22 14:46:43,748 - stpipe.rop - WARNING - 'kaka.py' data loader provided for Spectrum1D without explicit identifier or list of compatible extensions
2020-04-22 14:46:44,357 - stpipe.rop - INFO - Prefetching reference files for dataset: 'sample_ramp_new.fits' reftypes = ['nonlincoeff']
2020-04-22 14:46:44,805 - stpipe.rop - INFO - Prefetch for NONLINCOEFF reference file is '/home/arun/crds_cache/references/tmt/iris/tmt_iris_coeff_1.fits'.
2020-04-22 14:46:44,806 - stpipe.rop - INFO - Starting ROP Pipeline ...
2020-04-22 14:46:44,930 - stpipe.rop - WARNING - /home/arun/anaconda3/envs/jwst_april/lib/python3.6/site-packages/jwst/datamodels/validate.py:35: ValidationWarning: While validating meta.instrument.name the following error occurred:
'IRIS' is not one of ['NIRCAM', 'NIRSPEC', 'MIRI', 'TFI', 'FGS', 'NIRISS', 'ANY', 'N/A']

Failed validating 'enum' in schema:
    {'$schema': 'http://stsci.edu/schemas/asdf-schema/0.1.0/asdf-schema',
     'blend_table': True,
     'enum': ['NIRCAM',
              'NIRSPEC',
              'MIRI',
              'TFI',
              'FGS',
              'NIRISS',
              'ANY',
              'N/A'],
     'fits_keyword': 'INSTRUME',
     'title': 'Instrument used to acquire the data',
     'type': 'string'}
zonca commented 4 years ago

this happens when something goes wrong with the monkeypatching. have you run the monkeypatch?

arunsurya77 commented 4 years ago

I am calling the pipeline like this. Do I have to do some other thing in the setup?

import iris_pipeline iris_pipeline.monkeypatch_jwst_datamodels() iris_pipeline.pipeline.ROPPipeline.call('sample_ramp_new.fits', config_file="sampling.cfg")

zonca commented 4 years ago

That should be fine I think it is easier if you do a pull request so I can directly test your code

zonca commented 4 years ago

closing this, I'll wait for the updated pull request with the code, even if broken.