From 6f4ba8b8db43238d4e4e70bde7c58112af1fa0c5 Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Fri, 16 Aug 2024 17:47:52 -0400 Subject: [PATCH] Define and use non_imaging_bands --- galsim/roman/__init__.py | 5 +++-- galsim/roman/roman_bandpass.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/galsim/roman/__init__.py b/galsim/roman/__init__.py index e22880403a..8468b62601 100644 --- a/galsim/roman/__init__.py +++ b/galsim/roman/__init__.py @@ -70,8 +70,9 @@ longwave_bands = ['F184', 'K213'] # R062, Z087, Y106, J129, H158, W146, SNPrism, Grism_0thOrder, Grism_1stOrder. # Note that the last three are not imaging bands. -shortwave_bands = ['R062', 'Z087', 'Y106', 'J129', 'H158', 'W146', - 'SNPrism', 'Grism_0thOrder', 'Grism_1stOrder'] +non_imaging_bands = ['Grism_0thOrder', 'Grism_1stOrder', 'SNPrism'] +shortwave_bands = ['R062', 'Z087', 'Y106', 'J129', 'H158', 'W146'] \ + + non_imaging_bands stray_light_fraction = 0.1 diff --git a/galsim/roman/roman_bandpass.py b/galsim/roman/roman_bandpass.py index 1cb8a96693..9ff664bc20 100644 --- a/galsim/roman/roman_bandpass.py +++ b/galsim/roman/roman_bandpass.py @@ -101,7 +101,7 @@ def getBandpasses(AB_zeropoint=True, default_thin_trunc=True, include_all_bands= @returns A dictionary containing bandpasses for all Roman imaging filters. """ - from . import collecting_area + from . import collecting_area, non_imaging_bands # Begin by reading in the file containing the info. datafile = os.path.join(meta_data.share_dir, "roman", "Roman_effarea_20210614.txt") @@ -139,7 +139,7 @@ def getBandpasses(AB_zeropoint=True, default_thin_trunc=True, include_all_bands= bandpass_dict = {} # Loop over the bands. for index, bp_name in enumerate(data.dtype.names[1:]): - if include_all_bands is False and bp_name in ('Grism_0thOrder', 'Grism_1stOrder', 'SNPrism'): + if include_all_bands is False and bp_name in non_imaging_bands: continue # Initialize the bandpass object.