solid_waffle.correlation_run
Routines to run the infrared flat correlations.
Classes
- EmptyClass
Blank, can add attributes later.
- Config
Extracts configuration data from a multiline string.
Functions
- run_ir_all
Runs the IR characterization.
- run_vis_all
Runs the visible characterization.
Classes
Blank, can add attributes later. |
|
Extracts configuration data from a multiline string. |
Functions
|
Runs the IR characterization. |
|
Runs the visible characterization. |
Module Contents
- class Config(cfg, visible_run=False, verbose=False)[source]
Extracts configuration data from a multiline string.
Some attributes may not be present depending on the configuration.
- Parameters:
cfg (str or list) – The configuration (as a single string or list of strings).
visible_run (bool, optional) – Is this configured to run visible light correlations?
verbose (bool, optional) – Whether to specify lots of information when reading the configuration.
- darkfiles[source]
List of the dark exposure file names, same length as lightfiles.
- Type:
list of str
- nx, ny
The number of bins to break the detector array into on the x and y axes.
- Type:
int
- tslicesM2a, tslicesM2b, tslicesM3
Time slices to use for alternative BFE tests. Length 4, ascending.
- Type:
list of int
- sensitivity_spread_cut[source]
The fractional deviation from the median flat at which to cut pixels.
- Type:
float
- hotpix_ADU_range
Hot pixel selection range (length 4:
[Smin, Smax, stability, f_isolation]).- Type:
list of float
- ref_for_hotpix_is_autocorr[source]
Plot hot pixel results relative to autocorrelation results?
- Type:
bool
- maskX, maskY
Super-pixel regions to mask out (can be empty).
- Type:
list of int
- tchar1, tchar2
Time steps for advanced characterization.
- Type:
int
- ncycle
Number of iterations for advanced characterization.
- Type:
int
- ipnltype
Inter-pixel non-linearity model: ‘bfe’ or ‘nlipc’.
- Type:
str
- nlfit_ts, nlfit_te
Range of time stamps for fitting the non-linearity curve.
- Type:
int
- dx, dy
Size of super-pixels.
- Type:
int
- lightref, darkref
Reference pixel corrections for the flats and darks.
- Type:
np.array
- mean_full_info, std_full_info
Array mean and standard deviation of full_info.
- Type:
np.array
- nlfit, nlder
Array of the ramp fit and derivative, shape = (nt, ny, nx).
- Type:
np.array
- used_2a, used_2b, used_3
Whether the alternative methods were implemented.
- Type:
bool
- ntM2a, ntM2b, ntM3
Number of time stamps in each alternative method.
- Type:
int
- Method2a_slopes, Method2b_slopes, Method3_slopes
Alternative gain/IPC calculation slopes, shape = (ny, nx).
- Type:
np.array
- Method2a_vals, Method2b_vals, Method3_vals
Alternative gain/IPC calculation values, shape = (ny, nx, …).
- Type:
np.array
- tfmin, tfmax, tfminB, tfmaxB, tfmin3, tfmax3
Time stamps for Methods 2a, 2b, and 3.
- Type:
int
- slope_2a_BFE, slope_2a_NLIPC
Predicted slopes for the different alternative methods for different sources of IPNL (Method 2a).
- Type:
float
- slope_2b_BFE, slope_2b_NLIPC
Predicted slopes for the different alternative methods for different sources of IPNL (Method 2b).
- Type:
float
- slope_3_beta, slope_3_BFE, slope_3_NLIPC
Predicted slopes for the different alternative methods for different sources of IPNL (Method 3).
- Type:
float
- PV2a, PV2b, PV3
Peak-to-valley errors of alternative method fits.
- Type:
float
- hotX, hotY
Coordinates of the hot pixels; same length.
- Type:
np.array of int
- htsteps
Time steps for the hot pixel analysis.
- Type:
list of int
- hotpix_signal
Signal levels of the hot pixels, shape = (len(hotX), len(htsteps))
- Type:
np.array
- hotpix_alpha
IPC estimated from the hot pixels, shape = (len(hotX), len(htsteps))
- Type:
np.array
- ipcmed_x, ipcmed_y, ipcmed_yerr
Signal, IPC, and IPC error for the hot pixel signal-dependent IPC method. 1D arrays.
- Type:
np.array
- grid_alphaCorr, grid_alphaCorrErr, grid_alphaHot, grid_alphaHotErr
The correlation- and hot pixel-based IPC in each of the 16 hexadecants of the detector array, and their uncertainties.
- Type:
np.array
- ts_vis, te_vis, tchar1_vis, tchar2_vis
The time stamps for visible characterization.
- Type:
int
- has_visbfe
Visible BFE enabled?
- Type:
bool
- tslices_visbfe
Time slices for visible BFE analysis.
- Type:
list of int
- copy_ir_bfe
Assume IR BFE applies to visible? (May improve S/N.)
- Type:
bool
- vis_out_data
The visible characterization data, shape = (ny, nx, 56)
- Type:
np.array
- vis_col
Column mapping for the visible characterization.
- Type:
dict
- method_23_plot()[source]
Method 2 and 3 characterization Multi-panel figure showing basic characterization.
- fit_parameters(verbose=False)[source]
Build general parameters (gain, IPC, NL) and BFE Method 1.
- Parameters:
verbose (bool) – Whether to talk a lot.
- Return type:
None
- generate_nonlinearity(write_to_file=True)[source]
Generates non-linearity data.
- Parameters:
write_to_file (bool, optional) – Write the non-linearity table to a file as well?
- Return type:
None
- alt_methods(verbose=False)[source]
Methods 2a, 2b, and 3 trend computation.
- Parameters:
verbose (bool, optional) – Whether to print a lot to the output.
- Return type:
None
- method_23_plot()[source]
Method 2 and 3 characterization Multi-panel figure showing basic characterization.
- text_output()[source]
Generate a text summary.
- Parameters:
None
- Returns:
The output text table.
- Return type:
str
- hotpix_analysis(verbose=False)[source]
Hot pixel analysis.
- Parameters:
verbose (bool, optional) – Whether to talk a lot.
- Returns:
Hot pixel report.
- Return type:
str
- compute_vis_quantities(ir_output=None, verbose=False)[source]
Computations for the visible light characterization.
- Parameters:
ir_output (str, optional) – The data from the IR output characterization as a string; if not specified, tries to load from the file.
verbose (bool, optional) – Whether to talk a lot.
- Return type:
None