Skip to content

Commit 021ccd4

Browse files
committed
Use getBandpass instead of getBandpasses when appropriate
1 parent b28c346 commit 021ccd4

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

galsim/roman/roman_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from . import n_pix, exptime, dark_current, read_noise, gain
2121
from . import stray_light_fraction, thermal_backgrounds
2222
from .roman_psfs import getPSF
23-
from .roman_bandpass import getBandpasses
23+
from .roman_bandpass import getBandpass, getBandpasses
2424
from .roman_wcs import getWCS
2525
from .roman_backgrounds import getSkyLevel
2626
from ..config import ParseAberrations, BandpassBuilder, GetAllParams, GetRNG
@@ -112,7 +112,7 @@ def buildBandpass(self, config, base, logger):
112112
from ..deprecated import depr
113113
depr('W149', 2.5, 'W146', 'Note: this is to match current Roman filter naming schemes')
114114
name = 'W146'
115-
bandpass = getBandpasses(include_all_bands=True)[name]
115+
bandpass = getBandpass(name)
116116

117117
return bandpass, safe
118118

galsim/roman/roman_psfs.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from . import pixel_scale, n_pix, pixel_scale_mm
2323
from . import n_pix, n_sca, longwave_bands, shortwave_bands
2424
from . import diameter, obscuration
25-
from .roman_bandpass import getBandpasses
25+
from .roman_bandpass import getBandpass
2626

2727
from ..utilities import LRU_Cache
2828
from ..position import PositionD
@@ -335,8 +335,7 @@ def _get_single_PSF(SCA, bandpass, SCA_pos, pupil_bin,
335335
aper=aper, gsparams=gsparams)
336336
if n_waves is not None:
337337
# To decide the range of wavelengths to use, check the bandpass.
338-
bp_dict = getBandpasses(include_all_bands=True)
339-
bp = bp_dict[bandpass]
338+
bp = getBandpass(bandpass)
340339
PSF = PSF.interpolate(waves=np.linspace(bp.blue_limit, bp.red_limit, n_waves),
341340
oversample_fac=1.5)
342341
else:

0 commit comments

Comments
 (0)