acdc.utils.utils
Functions
Given a list of coordinates in X & Y, transform them into the superdark's binned (and possibly offset) coordinate system. |
|
For a given superdark, return the binning information in the spatial directions and PHA. |
|
Determine the rows that correspond to the PSA and WCA apertures for a given segment, cenwave, and lifetime position. |
|
Decorator to wrap and time functions. |
|
Given a list of binned coordinates in X & Y, transform them into the the unbinned, native coordinate system. |
|
- bin_coords(xs, ys, bin_x, bin_y, xstart=0, ystart=0, make_int=False, as_float=False)[source]
Given a list of coordinates in X & Y, transform them into the superdark’s binned (and possibly offset) coordinate system.
- get_binning_pars(af)[source]
For a given superdark, return the binning information in the spatial directions and PHA.
- get_psa_wca(segment, cenwave, lp, binning, pad_psa=[0, 0], pad_wca=[0, 0])[source]
Determine the rows that correspond to the PSA and WCA apertures for a given segment, cenwave, and lifetime position. Return the row indices in the binned superdark coordinate system.
- Parameters:
segment (str) – Get PSA/WCA regions for this segment.
cenwave (str) – Get PSA/WCA regions for this cenwave.
lp (str) – Get PSA/WCA regions for this lifetime position.
binning (dict) – Dictionary that describes the binning information in both the spatial and PHA dimensions.
- Returns:
excluded_rows (array) – List of rows to exclude. Corresponds to the PSA and WCA regions.
apertures (dict) – The excluded rows for each aperture, PSA and WCA.