Incorrect group count for multi-exposure observations for CMOS/sequence detectors

Issue #58 resolved
Landon Gelman created an issue

Background: The Scorpio/Gemini instrument uses similar H2RG detectors as NIRCam/JWST uses. I have recently been testing the JWST multiaccum support in PhoSim with the nframes and nskip parameters in my instance file and I am using PhoSim 5.5.4.

I believe the issue is that the number of groups calculated by PhoSim does not reflect the time per exposure/sequence in the observation, but instead is based off the total observation time regardless of the number of exposures in the observation.

For example, take two observations that use:
vistime 15.0 (also obstime)
nframes 2
nskip 3
Observation A uses "nsnap 1" (also numexp) and Observation B uses "nsnap 2".

Result:
In the electron file headers for Obs. A, the EXPTIME keyword reports 15. seconds.
In the electron file headers for Obs. B, the EXPTIME keyword reports 7.5 seconds and the image is visually dimmer than it is in Obs. A. This sounds correct to me.

Issue:
Both Obs. A and Obs. B generate 9 groups in their sequence despite Obs. B's exposure time being half that of Obs. A.

Looking at the group calculation in e2adc.cpp, I think the issue might be with using “vistime” instead of something like “vistime/nsnap”, although I am not sure if this is calculated elsewhere in the code.
ngroups = ceil((vistime + devvalue*nskip)/(devvalue*nsamples));

And so in this example Obs. B should actually generate 5 groups instead of 9.

Comments (4)

  1. John Peterson

    yeah, the problem was exactly what you said. with more than one snap, then the CMOS calculation didn’t work properly.

    This is fixed now in v5.5.5. Please try it out!

  2. John Peterson
    • Version 5.6.7 further fixes this issue, by now allowing the read sequences (set by nframes and nskip) to happen multiple times before a reset (which are determined by taking the total visit time and dividing by the nsnap). Furthermore, it does nominal comic ray filtering and extrapolation for saturated stars by using the multiple reads.

  3. Log in to comment