Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem running exoplanet example script #780

Open
youngr1960 opened this issue Mar 31, 2022 · 7 comments
Open

Problem running exoplanet example script #780

youngr1960 opened this issue Mar 31, 2022 · 7 comments

Comments

@youngr1960
Copy link

I have installed Mirage inside a singularity container with all its dependencies, I believe, and the required references files. The container is using the latest stable Debian with Python 3.9. Installation of the Python environment was done using Conda and the installed version of Mirage is 2.2.1. When I run the example script NIRISS_SOSS_exoplanet_example.ipynb to test the installation and/or configuration I continuously get the error(s) below. Has anybody seen this error(s) before and can provide a hint on how to fix it?

2022-03-31 15:06:31,431 - stpipe - INFO - Working on dark file: /opt/data/mirage_data/niriss/darks/raw/NISNIRISSDARK-153451235_11_496_SE_2015-12-11T16h05m20_dms_uncal.fits
2022-03-31 15:06:33,210 - mirage.utils.read_fits.read_datamodel - INFO - Zeroframe in /opt/data/mirage_data/niriss/darks/raw/NISNIRISSDARK-153451235_11_496_SE_2015-12-11T16h05m20_dms_uncal.fits is all zeros. Returning None.
2022-03-31 15:06:33,210 - stpipe - INFO - Zeroframe in /opt/data/mirage_data/niriss/darks/raw/NISNIRISSDARK-153451235_11_496_SE_2015-12-11T16h05m20_dms_uncal.fits is all zeros. Returning None.
2022-03-31 15:06:33,657 - mirage.dark.dark_prep - ERROR - WARNING: cannot transform input None integration into output NISRAPID integration.
2022-03-31 15:06:33,657 - stpipe - ERROR - WARNING: cannot transform input None integration into output NISRAPID integration.
2022-03-31 15:06:33,659 - root - CRITICAL - Traceback (most recent call last):
File "/opt/miniconda3/lib/python3.9/site-packages/mirage/logging/logging_functions.py", line 111, in wrapped
func(*args, **kwargs)
File "/opt/miniconda3/lib/python3.9/site-packages/mirage/dark/dark_prep.py", line 836, in prepare
self.get_base_dark(filename)
File "/opt/miniconda3/lib/python3.9/site-packages/mirage/dark/dark_prep.py", line 454, in get_base_dark
raise ValueError(("Only RAPID, NISRAPID, or FGSRAPID inputs can be translated to a "
ValueError: Only RAPID, NISRAPID, or FGSRAPID inputs can be translated to a different readout pattern

2022-03-31 15:06:33,659 - stpipe - CRITICAL - Traceback (most recent call last):
File "/opt/miniconda3/lib/python3.9/site-packages/mirage/logging/logging_functions.py", line 111, in wrapped
func(*args, **kwargs)
File "/opt/miniconda3/lib/python3.9/site-packages/mirage/dark/dark_prep.py", line 836, in prepare
self.get_base_dark(filename)
File "/opt/miniconda3/lib/python3.9/site-packages/mirage/dark/dark_prep.py", line 454, in get_base_dark
raise ValueError(("Only RAPID, NISRAPID, or FGSRAPID inputs can be translated to a "
ValueError: Only RAPID, NISRAPID, or FGSRAPID inputs can be translated to a different readout pattern

2022-03-31 15:06:33,659 - root - CRITICAL - CRASHED
2022-03-31 15:06:33,659 - stpipe - CRITICAL - CRASHED

Thank you
Richard Young
HPC Systems Engineer
USQ

@hover2pi
Copy link
Collaborator

Double check the yaml file has a valid readout pattern. If it's empty or invalid it may return None, which is what your error says.

If that doesn't work, I can take a look. Any thoughts on this @bhilbert4 ?

@bhilbert4
Copy link
Collaborator

That seems right to me. Also check that either the dark or linearized_darkfile entry is pointing to a valid dark current file.

@youngr1960
Copy link
Author

I will apologise but my knowledge of Mirage is very limited, basically I am attempting to get it running for other users. After following the installation instructions, I have download NIRISS_SOSS_exoplanet_example.ipynb and then the example files from niriss_soss_example_data directory, i.e. niriss_soss_substrip256_clear.yaml and WASP-43_Jmag_8.npy. Checking the niriss_soss_substrip256_clear.yaml file there is the following:

Readout:
readpatt: NISRAPID #Readout pattern (RAPID, BRIGHT2, etc)
ngroup: 6 #Number of groups in integration
nint: 320 #Number of integrations per exposure
nframe: 1
nskip: 0
resets_bet_ints: 1 #Number of detector resets between integrations
array_name: NIS_SUBSTRIP256 #Name of array from pysiaf (NIS_SOSSFULL, NIS_SUBSTRIP256, NIS_SUBSTRIP96)
filter: CLEAR #Filter of simulated data (F090W, F322W2, etc)
pupil: GR700XD #Pupil element for simulated data (CLEAR, GRISMC, etc)

The file mentioned in the yaml file and the error message both do exist in the required paths. The error message was only the last part of the output from running the ipynb file, except for a message about exoctk version unknown but it is installed. The paths in the ipynb file where changed to look for files in the current working directory. As I am working inside a container I have confirmed all the required paths have been set correctly, e.g. MIRAGE_DATA. The next two lines in the yaml file does mention:

Reffiles: #Set to None or leave blank if you wish to skip that step
dark: $MIRAGE_DATA/niriss/darks/raw/NISNIRISSDARK-172500017_15_496_SE_2017-09-07T05h28m22_dms_uncal.fits #Dark current integration used as the base
linearized_darkfile: None # Linearized dark ramp to use as input. Supercedes dark above

Thanks

@hover2pi
Copy link
Collaborator

hover2pi commented Apr 4, 2022

I'll take a look and get back to you ASAP.

@hover2pi
Copy link
Collaborator

Hmm @youngr1960 , I'm having trouble reproducing the issue as it runs fine on my machine. Did you install from source or did you use pip? Perhaps try reinstalling? Do you have the same trouble when you use an environment with Python 3.8?

@youngr1960
Copy link
Author

youngr1960 commented Apr 11, 2022 via email

@hover2pi
Copy link
Collaborator

Yeah, actually exoctk could be the problem. Let me check it out. Thanks for your patience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants