imap_processing.swe.l1b.swe_l1b.calculate_calibration_factor#

imap_processing.swe.l1b.swe_l1b.calculate_calibration_factor(acquisition_times: ndarray, cal_times: ndarray, cal_data: ndarray) ndarray[tuple[int, ...], dtype[_ScalarType_co]]#

Calculate calibration factor using linear interpolation.

Steps to calculate calibration factor:
  1. Convert input time to match time format in the calibration data file. Both times should be in S/C MET time.

  2. Find the nearest in time calibration data point.

  3. Linear interpolate between those two nearest time and get factor for input time.

Parameters:
  • acquisition_times (numpy.ndarray) – Data points to interpolate. Shape is (N_ESA_STEPS, N_ANGLE_SECTORS).

  • cal_times (numpy.ndarray) – X-coordinates data points. Calibration times. Shape is (n,).

  • cal_data (numpy.ndarray) – Y-coordinates data points. Calibration data of corresponding cal_times. Shape is (n, N_CEMS).

Returns:

calibration_factor – Calibration factor for each CEM detector. Shape is (N_ESA_STEPS, N_ANGLE_SECTORS, N_CEMS) where last 7 dimension contains calibration factor for each CEM detector.

Return type:

numpy.ndarray