hypso.processing.capture#
Capture parameters derived from a product tree’s metadata/capture_config - the values io/dispatch.py’s set_hypso_attributes/check_capture_type put on a capture object, computed the same way.
Functions#
|
io/dispatch.py's iso_time: the date_aquired (sic) or timestamp_acquired |
|
Capture parameters (dimensions, binning, timing, sensor profile) from a |
|
The imaging mode ("nominal", "wide", "moon", ...): the first of the |
|
The calibration's FWHM table from |
|
FWHM at |
|
|
|
Samples along the slit when readout keeps every |
Module Contents#
- hypso.processing.capture.acquisition_time(global_attrs)[source]#
io/dispatch.py’s iso_time: the date_aquired (sic) or timestamp_acquired global attribute, as an ISO 8601 UTC string.
- hypso.processing.capture.capture_params(tree)[source]#
Capture parameters (dimensions, binning, timing, sensor profile) from a product tree’s
metadata/capture_configand global attributes.- Parameters:
tree (xarray.DataTree)
- Return type:
CaptureParams
- hypso.processing.capture.classify_capture_type(profile, values)[source]#
The imaging mode (“nominal”, “wide”, “moon”, …): the first of the sensor’s capture_type_thresholds whose attribute (frame_count, image_height, …) has its value in values; “custom” otherwise.
- Parameters:
profile (hypso.sensors.SensorProfile)
values (dict)
- Return type:
- hypso.processing.capture.fwhm_table(tree)[source]#
The calibration’s FWHM table from
metadata/corrections, or None.- Parameters:
tree (xarray.DataTree)
- hypso.processing.capture.interpolate_fwhm(lines, values, wavelengths)[source]#
FWHM at
wavelengthsfrom a table of lines: linear interpolation, constant outside the table (numpy.interp).- Return type:
- hypso.processing.capture.spatial_subsampling(attrs, samples=None)[source]#
(sample_div, detector_rows): the capture’s spatial subsampling and the number of detector rows its AOI spans.Readout keeps every
sample_div-th detector row along the slit, so a 1092-row AOI with subsampling 2 gives 546 samples; sampleiis detector rowaoi_y + i * sample_div. The factor is capture_config’sspatial_subsampling, else the oldersample_div(1 in every file so far; a different value next tospatial_subsamplingis warned about).samples, the cube’s size along the slit, decides whatrow_countcounts: the AOI’s detector rows (1092 -> 546 samples) or the rows read out (546 samples, spanning 1092 detector rows). If the config gives no subsampling (or 1) but the cube is an exact fraction ofrow_count, that fraction is used, with a warning. Any other mismatch is an error.