scopesim.detector.nghxrg.HXRGNoise#
- class scopesim.detector.nghxrg.HXRGNoise(shape: tuple[int, int, int] = (1, 2048, 2048), n_out: int = 4, n_roh: int = 12, n_foh: int = 1, reference_pixel_border_width: int = 4, pca0_file: str = None, reverse_scan_direction: bool = False)#
Bases:
objectSimulate Teledyne HxRG+SIDECAR ASIC system noise.
HXRGNoise is a class for making realistic Teledyne HxRG system noise. The noise model includes correlated, uncorrelated, stationary, and non-stationary components. The default parameters make noise that resembles Channel 1 of JWST NIRSpec. NIRSpec uses H2RG detectors. They are read out using four video outputs at 100.000 pix/s/output.
The following parameters define the default HxRG clocking pattern. The parameters that define the default noise model are defined in the mknoise() method. Default clocking pattern is JWST NIRSpec.
- Parameters:
shape (tuple[int, int, int]) – Shape of the FITS cube [Z, Y, X] (Z…number of up-the-ramp samples).
n_out (int) – Number of detector outputs
n_foh (int) – New frame overhead in rows. This allows for a short wait at the end of a frame before starting the next one.
n_roh (int) – New row overhead in pixels. This allows for a short wait at the end of a row before starting the next one.
pca0_file (str) – Name of a FITS file that contains PCA-zero
reference_pixel_border_width (int) – Width of reference pixel border around image area
reverse_scan_direction (bool) – Enable this to reverse the fast scanner readout directions. This capability was added to support Teledyne’s programmable fast scan readout directions. The default setting =False corresponds to what HxRG detectors default to upon power up.
- __init__(shape: tuple[int, int, int] = (1, 2048, 2048), n_out: int = 4, n_roh: int = 12, n_foh: int = 1, reference_pixel_border_width: int = 4, pca0_file: str = None, reverse_scan_direction: bool = False) None#
Methods
__init__([shape, n_out, n_roh, n_foh, ...])mknoise(o_file[, rd_noise, c_pink, u_pink, ...])Generate a FITS cube containing only noise.
pink_noise(mode)Generate a vector of non-periodic pink noise.
white_noise(nstep)Generate white noise for an HxRG including all time steps.
Attributes
n_fohn_outn_rohpca0_filereference_pixel_border_widthreverse_scan_directionshape- mknoise(o_file: str, rd_noise: float = 5.2, c_pink: float = 3.0, u_pink: float = 1.0, acn: float = 0.5, pca0_amp: float = 0.2, ref_px_noise_ratio: float = 0.8, ktc_noise: float = 29.0, bias_offset: float = 5000.0, bias_amp: float = 500.0)#
Generate a FITS cube containing only noise.
- Parameters:
o_file (str) – Output filename
rd_noise (float) – Standard deviation of read noise in electrons
c_pink (float) – Standard deviation of correlated pink noise in electrons
u_pink (float) – Standard deviation of uncorrelated pink noise in electrons
acn (float) – Standard deviation of alterating column noise in electrons
pca0 (float) – Standard deviation of pca0 in electrons
ref_px_noise_ratio (float) – Ratio of the standard deviation of the reference pixels to the regular pixels. Reference pixels are usually a little lower noise. Change this only if you know that your detector is different from a typical H2RG.
ktc_noise (float) – kTC noise in electrons. Set this equal to sqrt(k*T*C_pixel)/q_e, where k is Boltzmann’s constant, T is detector temperature, and C_pixel is pixel capacitance. For an H2RG, the pixel capacitance is typically about 40 fF.
bias_offset (float) – On average, integrations stare here in electrons. Set this so that all pixels are in range.
bias_amp (float) – A multiplicative factor that we multiply PCA-zero by to simulate a bias pattern. This is completely independent from adding in “picture frame” noise.
Notes
Because of the noise correlations, there is no simple way to predict the noise of the simulated images. However, to a crude first approximation, these components add in quadrature.
The units in the above are mostly “electrons”. This follows convention in the astronomical community. From a physics perspective, holes are actually the physical entity that is collected in Teledyne’s p-on-n (p-type implants in n-type bulk) HgCdTe architecture.
The parameters ktc_noise, bias_offset and bias_amp are used only when generating cubes. They are completely removed when the data are calibrated to correlated double sampling or slope images. We include them in here to make more realistic looking raw cubes.