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#

acquisition_time(global_attrs)

io/dispatch.py's iso_time: the date_aquired (sic) or timestamp_acquired

capture_params(tree)

Capture parameters (dimensions, binning, timing, sensor profile) from a

classify_capture_type(profile, values)

The imaging mode ("nominal", "wide", "moon", ...): the first of the

fwhm_table(tree)

The calibration's FWHM table from metadata/corrections, or None.

interpolate_fwhm(lines, values, wavelengths)

FWHM at wavelengths from a table of lines: linear interpolation,

spatial_subsampling(attrs[, samples])

(sample_div, detector_rows): the capture's spatial subsampling and

subsampled_rows(row_count, sample_div)

Samples along the slit when readout keeps every sample_div-th of

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.

Parameters:

global_attrs (dict)

Return type:

str

hypso.processing.capture.capture_params(tree)[source]#

Capture parameters (dimensions, binning, timing, sensor profile) from a product tree’s metadata/capture_config and 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:
Return type:

str

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 wavelengths from a table of lines: linear interpolation, constant outside the table (numpy.interp).

Return type:

numpy.ndarray

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; sample i is detector row aoi_y + i * sample_div. The factor is capture_config’s spatial_subsampling, else the older sample_div (1 in every file so far; a different value next to spatial_subsampling is warned about).

samples, the cube’s size along the slit, decides what row_count counts: 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 of row_count, that fraction is used, with a warning. Any other mismatch is an error.

Parameters:
Return type:

tuple

hypso.processing.capture.subsampled_rows(row_count, sample_div)[source]#

Samples along the slit when readout keeps every sample_div-th of row_count detector rows (the first, the (1 + sample_div)-th, …).

Parameters:
  • row_count (int)

  • sample_div (int)

Return type:

int