Skip to content

Commit

Permalink
Updates for galsim 2.5. (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
schlafly authored Oct 19, 2023
1 parent 41022bf commit a2b6ca8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies = [
'astropy >=5.3',
'crds >=10.3.1',
'defusedxml >=0.5.0',
'galsim >=2.3.5',
'galsim >=2.5.0',
'rad >=0.17.1',
'roman_datamodels >=0.17.1',
'gwcs >=0.18.1',
Expand Down
6 changes: 2 additions & 4 deletions romanisim/bandpass.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,10 @@
# provide some translation dictionaries for the mapping from
# the galsim bandpass names to the Roman bandpass names and vice versa.
# it would be nice to be agnostic about which one we use.
galsim_bandpasses = ['Z087', 'Y106', 'J129', 'H158', 'F184', 'W149']
galsim_bandpasses = [
'R062', 'Z087', 'Y106', 'J129', 'H158', 'F184', 'K213', 'W146']
galsim2roman_bandpass = {x: 'F' + x[1:] for x in galsim_bandpasses}
roman2galsim_bandpass = {v: k for k, v in galsim2roman_bandpass.items()}
# we should add some support for F213 (K) and F062. That would require getting
# zodiacal light estimates and maybe making a bandpass.
# W149 is probably the same as F146 but we should compare.

# provide some no-ops if we are given a key in the right bandpass
galsim2roman_bandpass.update(**{k: k for k in roman2galsim_bandpass})
Expand Down
5 changes: 2 additions & 3 deletions romanisim/tests/test_psf.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,5 @@ def test_make_psf():
assert totsum > 0.9
# assert that image catches no more than 100% and no less than 90%
# of flux?
assert np.min(im) > np.max(im) * (-1e-4)
# ideally nothing negative, though we could loosen this to, say,
# > -1e-3 * peak and I wouldn't feel too bad.
assert np.min(im) > np.max(im) * (-1e-3)
# ideally nothing negative

0 comments on commit a2b6ca8

Please sign in to comment.