imap_processing.swe.l1b.swe_l1b.apply_in_flight_calibration#

imap_processing.swe.l1b.swe_l1b.apply_in_flight_calibration(corrected_counts: ndarray, acquisition_time: ndarray, in_flight_cal_files: list) tuple[ndarray[tuple[int, ...], dtype[_ScalarType_co]], ndarray[tuple[int, ...], dtype[_ScalarType_co]]]#

Apply in flight calibration to full cycle data.

These factors are used to account for changes in gain with time.

They are derived from the weekly electron calibration data.

Parameters:
  • corrected_counts (numpy.ndarray) – Corrected count of full cycle data. Data shape is (n_epochs, N_ESA_STEPS, N_ANGLE_SECTORS, N_CEMS).

  • acquisition_time (numpy.ndarray) – Acquisition time of full cycle data. Data shape is (n_epochs, N_ESA_STEPS, N_ANGLE_SECTORS).

  • in_flight_cal_files (list) – List of in-flight calibration files.

Returns:

  • corrected_counts (numpy.ndarray) – Corrected count of full cycle data after applying in-flight calibration. Array shape is (n_epochs, N_ESA_STEPS, N_ANGLE_SECTORS, N_CEMS).

  • flags (numpy.ndarray) – Per-epoch quality flags of shape (n_epochs,). The LAST_CAL_INTERVAL bit is set for any epoch where at least one acquisition time falls in the interval between the second-to-last and last calibration entries.