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

Enable cross-dichroics in cube_build #5722

Merged
merged 3 commits into from
Feb 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ associations
- Added new Lvl2 rule, Asn_Lv2NRSLAMPImage, to run Image2 pipeline for NRSLAMP
exposures with OPMODE=image [#5740]

cube_build
----------

- Added support for cross-dichroic configurations [#5722]

datamodels
----------

Expand Down
3 changes: 2 additions & 1 deletion jwst/cube_build/cube_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ def determine_band_coverage(self, master_table):
# loop over the file names
if self.instrument == 'MIRI':
valid_channel = ['1', '2', '3', '4']
valid_subchannel = ['short', 'medium', 'long']
valid_subchannel = ['short', 'medium', 'long', 'short-medium', 'short-long',
'medium-short', 'medium-long', 'long-short', 'long-medium']

nchannels = len(valid_channel)
nsubchannels = len(valid_subchannel)
Expand Down
3 changes: 2 additions & 1 deletion jwst/cube_build/cube_build_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,8 @@ def read_user_input(self):
"""

valid_channel = ['1', '2', '3', '4', 'all']
valid_subchannel = ['short', 'medium', 'long', 'all']
valid_subchannel = ['short', 'medium', 'long', 'all', 'short-medium', 'short-long',
'medium-short', 'medium-long', 'long-short', 'long-medium']

valid_fwa = ['f070lp', 'f100lp',
'g170lp', 'f290lp', 'clear', 'all']
Expand Down
24 changes: 24 additions & 0 deletions jwst/cube_build/file_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,45 @@ def __init__(self):
self.FileMap['MIRI']['1']['short'] = []
self.FileMap['MIRI']['1']['medium'] = []
self.FileMap['MIRI']['1']['long'] = []
self.FileMap['MIRI']['1']['short-medium'] = []
self.FileMap['MIRI']['1']['short-long'] = []
self.FileMap['MIRI']['1']['medium-short'] = []
self.FileMap['MIRI']['1']['medium-long'] = []
self.FileMap['MIRI']['1']['long-short'] = []
self.FileMap['MIRI']['1']['long-medium'] = []

self.FileMap['MIRI']['2'] = {}
self.FileMap['MIRI']['2']['short'] = []
self.FileMap['MIRI']['2']['medium'] = []
self.FileMap['MIRI']['2']['long'] = []
self.FileMap['MIRI']['2']['short-medium'] = []
self.FileMap['MIRI']['2']['short-long'] = []
self.FileMap['MIRI']['2']['medium-short'] = []
self.FileMap['MIRI']['2']['medium-long'] = []
self.FileMap['MIRI']['2']['long-short'] = []
self.FileMap['MIRI']['2']['long-medium'] = []

self.FileMap['MIRI']['3'] = {}
self.FileMap['MIRI']['3']['short'] = []
self.FileMap['MIRI']['3']['medium'] = []
self.FileMap['MIRI']['3']['long'] = []
self.FileMap['MIRI']['3']['short-medium'] = []
self.FileMap['MIRI']['3']['short-long'] = []
self.FileMap['MIRI']['3']['medium-short'] = []
self.FileMap['MIRI']['3']['medium-long'] = []
self.FileMap['MIRI']['3']['long-short'] = []
self.FileMap['MIRI']['3']['long-medium'] = []

self.FileMap['MIRI']['4'] = {}
self.FileMap['MIRI']['4']['short'] = []
self.FileMap['MIRI']['4']['medium'] = []
self.FileMap['MIRI']['4']['long'] = []
self.FileMap['MIRI']['4']['short-medium'] = []
self.FileMap['MIRI']['4']['short-long'] = []
self.FileMap['MIRI']['4']['medium-short'] = []
self.FileMap['MIRI']['4']['medium-long'] = []
self.FileMap['MIRI']['4']['long-short'] = []
self.FileMap['MIRI']['4']['long-medium'] = []

self.FileMap['NIRSPEC'] = {}
self.FileMap['NIRSPEC']['prism'] = {}
Expand Down
78 changes: 78 additions & 0 deletions jwst/cube_build/ifu_cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -2345,6 +2345,84 @@ def setup_final_ifucube_model(self, model_ref):
ifucube_model.meta.wcsinfo.ctype1 = 'MRSAL4C'
ifucube_model.meta.wcsinfo.ctype2 = 'MRSBE4C'

if self.list_par1[0] == '1' and self.list_par2[0] == 'short-medium':
ifucube_model.meta.wcsinfo.ctype1 = 'MRSAL1A'
ifucube_model.meta.wcsinfo.ctype2 = 'MRSBE1A'
if self.list_par1[0] == '2' and self.list_par2[0] == 'short-medium':
ifucube_model.meta.wcsinfo.ctype1 = 'MRSAL2B'
ifucube_model.meta.wcsinfo.ctype2 = 'MRSBE2B'
if self.list_par1[0] == '3' and self.list_par2[0] == 'short-medium':
ifucube_model.meta.wcsinfo.ctype1 = 'MRSAL3B'
ifucube_model.meta.wcsinfo.ctype2 = 'MRSBE3B'
if self.list_par1[0] == '4' and self.list_par2[0] == 'short-medium':
ifucube_model.meta.wcsinfo.ctype1 = 'MRSAL4A'
ifucube_model.meta.wcsinfo.ctype2 = 'MRSBE4A'

if self.list_par1[0] == '1' and self.list_par2[0] == 'short-long':
ifucube_model.meta.wcsinfo.ctype1 = 'MRSAL1A'
ifucube_model.meta.wcsinfo.ctype2 = 'MRSBE1A'
if self.list_par1[0] == '2' and self.list_par2[0] == 'short-long':
ifucube_model.meta.wcsinfo.ctype1 = 'MRSAL2C'
ifucube_model.meta.wcsinfo.ctype2 = 'MRSBE2C'
if self.list_par1[0] == '3' and self.list_par2[0] == 'short-long':
ifucube_model.meta.wcsinfo.ctype1 = 'MRSAL3C'
ifucube_model.meta.wcsinfo.ctype2 = 'MRSBE3C'
if self.list_par1[0] == '4' and self.list_par2[0] == 'short-long':
ifucube_model.meta.wcsinfo.ctype1 = 'MRSAL4A'
ifucube_model.meta.wcsinfo.ctype2 = 'MRSBE4A'

if self.list_par1[0] == '1' and self.list_par2[0] == 'medium-short':
ifucube_model.meta.wcsinfo.ctype1 = 'MRSAL1B'
ifucube_model.meta.wcsinfo.ctype2 = 'MRSBE1B'
if self.list_par1[0] == '2' and self.list_par2[0] == 'medium-short':
ifucube_model.meta.wcsinfo.ctype1 = 'MRSAL2A'
ifucube_model.meta.wcsinfo.ctype2 = 'MRSBE2A'
if self.list_par1[0] == '3' and self.list_par2[0] == 'medium-short':
ifucube_model.meta.wcsinfo.ctype1 = 'MRSAL3A'
ifucube_model.meta.wcsinfo.ctype2 = 'MRSBE3A'
if self.list_par1[0] == '4' and self.list_par2[0] == 'medium-short':
ifucube_model.meta.wcsinfo.ctype1 = 'MRSAL4B'
ifucube_model.meta.wcsinfo.ctype2 = 'MRSBE4B'

if self.list_par1[0] == '1' and self.list_par2[0] == 'medium-long':
ifucube_model.meta.wcsinfo.ctype1 = 'MRSAL1B'
ifucube_model.meta.wcsinfo.ctype2 = 'MRSBE1B'
if self.list_par1[0] == '2' and self.list_par2[0] == 'medium-long':
ifucube_model.meta.wcsinfo.ctype1 = 'MRSAL2C'
ifucube_model.meta.wcsinfo.ctype2 = 'MRSBE2C'
if self.list_par1[0] == '3' and self.list_par2[0] == 'medium-long':
ifucube_model.meta.wcsinfo.ctype1 = 'MRSAL3C'
ifucube_model.meta.wcsinfo.ctype2 = 'MRSBE3C'
if self.list_par1[0] == '4' and self.list_par2[0] == 'medium-long':
ifucube_model.meta.wcsinfo.ctype1 = 'MRSAL4B'
ifucube_model.meta.wcsinfo.ctype2 = 'MRSBE4B'

if self.list_par1[0] == '1' and self.list_par2[0] == 'long-short':
ifucube_model.meta.wcsinfo.ctype1 = 'MRSAL1C'
ifucube_model.meta.wcsinfo.ctype2 = 'MRSBE1C'
if self.list_par1[0] == '2' and self.list_par2[0] == 'long-short':
ifucube_model.meta.wcsinfo.ctype1 = 'MRSAL2A'
ifucube_model.meta.wcsinfo.ctype2 = 'MRSBE2A'
if self.list_par1[0] == '3' and self.list_par2[0] == 'long-short':
ifucube_model.meta.wcsinfo.ctype1 = 'MRSAL3A'
ifucube_model.meta.wcsinfo.ctype2 = 'MRSBE3A'
if self.list_par1[0] == '4' and self.list_par2[0] == 'long-short':
ifucube_model.meta.wcsinfo.ctype1 = 'MRSAL4C'
ifucube_model.meta.wcsinfo.ctype2 = 'MRSBE4C'

if self.list_par1[0] == '1' and self.list_par2[0] == 'long-medium':
ifucube_model.meta.wcsinfo.ctype1 = 'MRSAL1C'
ifucube_model.meta.wcsinfo.ctype2 = 'MRSBE1C'
if self.list_par1[0] == '2' and self.list_par2[0] == 'long-medium':
ifucube_model.meta.wcsinfo.ctype1 = 'MRSAL2B'
ifucube_model.meta.wcsinfo.ctype2 = 'MRSBE2B'
if self.list_par1[0] == '3' and self.list_par2[0] == 'long-medium':
ifucube_model.meta.wcsinfo.ctype1 = 'MRSAL3B'
ifucube_model.meta.wcsinfo.ctype2 = 'MRSBE3B'
if self.list_par1[0] == '4' and self.list_par2[0] == 'long-medium':
ifucube_model.meta.wcsinfo.ctype1 = 'MRSAL4C'
ifucube_model.meta.wcsinfo.ctype2 = 'MRSBE4C'

if self.instrument == 'NIRSPEC':
ifucube_model.meta.wcsinfo.cunit1 = 'meter'
ifucube_model.meta.wcsinfo.cunit2 = 'meter'
Expand Down
Loading