Closed rmandelb closed 6 months ago
Maybe
euclidlike.getSkyLevel(galsim.roman.getBandpasses()['H158'], pos)
galsim.roman.getSkyLevel(galsim.roman.getBandpasses()['H158'], world_pos=pos, exptime=euclidlike.long_exptime)*euclidlike.collecting_area/galsim.roman.collecting_area*euclidlike.gain
can be used in the unit test?
Yes, we should use that test for a few different positions on the sky.
LGTM!
This PR includes sky level calculations. As an illustration of its performance, if you install the version of the code on this branch, then you can run the following code snippet:
The first number is the sky level for Euclid VIS given the Euclid exposure time and collecting area and gain, in e-/arcsec^2, at the given position. The second is the same thing calculated using our code, but for the Roman H158 bandpass, still with all other parameters set to the Euclid ones. The third is what GalSim gives (based on a lookup table) for the Roman H158 bandpass and otherwise a Euclid setup. The 2nd and 3rd agree to <0.1%, which is expected; it isn't an exact match because GalSim is doing a lookup table while we're doing an exact calculation.