Skip to content

Commit

Permalink
Updating l3.py to use the default_sca in parameters.py
Browse files Browse the repository at this point in the history
  • Loading branch information
eunkyuh committed Dec 5, 2024
1 parent c02bc14 commit eb35d22
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions romanisim/l3.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def inject_sources_into_l3(model, cat, x=None, y=None, psf=None, rng=None,
if (pixscalefrac > 1) or (pixscalefrac < 0):
raise ValueError('weird pixscale!')
psf = l3_psf(filter_name, pixscalefrac, webbpsf=True, chromatic=False)
sca = int(model.meta.basic.detector[-2:])
sca = romanisim.parameters.default_sca
maggytoes = romanisim.bandpass.get_abflux(filter_name, sca)
etomjysr = romanisim.bandpass.etomjysr(filter_name, sca) / pixscalefrac ** 2

Expand Down Expand Up @@ -357,7 +357,7 @@ def simulate(shape, wcs, efftimes, filter_name, catalog, nexposures=1,
xmin=0, ymin=0)

# Using the default SCA
sca = int(romanisim.parameters.default_parameters_dictionary['instrument']['detector'][3:])
sca = romanisim.parameters.default_sca
pixscalefrac = get_pixscalefrac(image.wcs, shape)
etomjysr = romanisim.bandpass.etomjysr(filter_name, sca) / pixscalefrac ** 2
# this should really be per-pixel to deal with small distortions,
Expand Down Expand Up @@ -512,7 +512,7 @@ def simulate_cps(image, filter_name, efftimes, objlist=None, psf=None,
catalog of simulated objects in image, noise, and misc. debug
"""
# Using the default SCA
sca = int(romanisim.parameters.default_parameters_dictionary['instrument']['detector'][3:])
sca = romanisim.parameters.default_sca

if rng is None and seed is None:
seed = 144
Expand Down

0 comments on commit eb35d22

Please sign in to comment.