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

[WIP]: Fix NIRISS WFSS extra bright 0th order #712

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
7 changes: 7 additions & 0 deletions mirage/ghosts/niriss_ghosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,13 @@ def source_mags_to_ghost_mags(row, flux_cal_file, magnitude_system, gap_summary_
else:
raise ValueError('Unsupported magnitude column name for ghost conversion: {}'.format(mag_col))

# Also skip columns for NIRISS filters that are not supported by
# the ghost gap file
tab_gap = ascii.read(gap_summary_file)
match = np.where((tab_gap['filt'] == filt.upper()) | (tab_gap['pupil'] == filt.upper()))
if len(match[0]) == 0:
continue

wave = int(filt[1:4])
if wave > 200:
filter_value = filt
Expand Down
3 changes: 1 addition & 2 deletions mirage/reference_files/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,12 @@ def get_transmission_file(parameter_dict):
# POM transmission file is not grism orientation dependent. The file is the
# same for GR150R as GR150C, so we can just use R here
instrument = parameter_dict['INSTRUME'].lower()
dmode = 'GR150R'
filt = parameter_dict['PUPIL'].upper()

loc = os.path.join(datadir, "{}/GRISM_{}/current".format(instrument.lower(),
instrument.upper()))

configuration_file = find_wfss_config_filename(loc, 'niriss', filt, dmode)
configuration_file = find_wfss_config_filename(loc, 'niriss', filt, parameter_dict['FILTER'])
c = grismconf.Config(configuration_file)
transmission_filename = c.POM

Expand Down