imap_processing.codice.codice_l1a.calculate_epoch_values#

imap_processing.codice.codice_l1a.calculate_epoch_values(acq_start_seconds: DataArray, acq_start_subseconds: DataArray) tuple[ndarray[tuple[int, ...], dtype[int]], ndarray[tuple[int, ...], dtype[int]], ndarray[tuple[int, ...], dtype[int]]]#

Calculate and return the values to be used for epoch.

On CoDICE, the epoch values are derived from the acq_start_seconds and acq_start_subseconds fields in the packet.

Note that the acq_start_subseconds field needs to be converted from microseconds to seconds.

Parameters:
  • acq_start_seconds (xarray.DataArray) – The acquisition times to calculate the epoch values from.

  • acq_start_subseconds (xarray.DataArray) – The subseconds portion of the acquisition times.

Returns:

  • epoch (NDArray[int]) – List of centered epoch values.

  • epoch_delta_minus (NDArray[int]) – List of values that represent the length of time from acquisition start to the center of the acquisition time bin.

  • epoch_delta_plus (NDArray[int]) – List of values that represent the length of time from the center of the acquisition time bin to the end of acquisition.