solid_waffle.flat_simulator.simulate_flat
Flat simulator.
Notes
Long description:
Start with a realization of a perfect detector plus some BFE effect to
the charge in a given pixel
1. The mean charge <Q_a(i,j)> = It_a + 0.5*Sigma_a*I^2*t_a^2 (Eqn 36)
2. Realization of a 4096 x 4096 pixel^2 grid with 66 time samples
This final result data cube will then be [4k, 4k, 66] in dimensions
and will require some kind of identifying header, currently taken
from one of the DCL flats. This is charge.
3. Convert to ADU/DN via gain ~ number(e-)/counts; set ~ FWD/2^16
Run tests with 128x128 or something small...
current I is per pixel (units: e/s)
time t (units: s)
time step for read from t_a to t_a+1 (will need to check # for convergence)
NOTE: to run some modes, one needs:
** a copy of a DCL flat file with the name set below
Classes
Run a flat field simulation. |
Functions
|
Build distribution of pairs of points. |
|
Runs a configuration from a file name. |
Module Contents
- PairPoisson(myMean, myShape, QY_offset, QY_p2, RNG)[source]
Build distribution of pairs of points.
- Parameters:
myMean (float) – mean number of photons per pixel (number of e is 2x larger).
myShape ((int, int)) – Shape of numpy array to generate.
QY_offset (int) – Maximum offset of the “other” electron to consider (usually 2 is enough).
QY_p2 (np.array) – The pairwise probability array.
RNG (numpy.random.Generator or numpy.random.RandomState) – The random number generator.
- Returns:
Pair-Poisson random array, including both Poisson photon generation and then the electron pairs being collected into pixels; shape = myShape..
- Return type:
np.array