imap_processing.codice.codice_l2.compute_geometric_factors#
- imap_processing.codice.codice_l2.compute_geometric_factors(dataset: Dataset, geometric_factor_lookup: dict, angular_product: bool = False) DataArray#
Calculate geometric factors needed for intensity calculations.
Geometric factors are determined by comparing the half-spin values per esa_step in the HALF_SPIN_LUT to the rgfo_half_spin values in the provided L2 dataset.
If the half-spin value is less than the corresponding rgfo_half_spin value, the geometric factor is set to 0.75 (full mode); otherwise, it is set to 0.5 (reduced mode). If the data is from after November 24th 2025, then reduced mode is no longer applied and the geometric factor is always set to full mode.
NOTE: Half spin values are associated with ESA steps which corresponds to the index of the energy_per_charge dimension that is between 0 and 127.
NOTE: If packet_version = 2, the Lo L1B product now contains variables that indicate the esa step and spin sector during which the RGFO or NSO limits are triggered. The spin sector variable ranges from 0-11 and is the instrument reported spin sector. In the following algorithm, spin_angle refers to the L1B angular bin (0 – 23) which is despun and spin_sector refers to the non-despun spin sector reported from the instrument (0-11).
- Parameters:
dataset (xarray.Dataset) – The L2 dataset containing rgfo_half_spin data variable.
geometric_factor_lookup (dict) – A dict with a full and reduced mode array with shape (esa_steps, position).
angular_product (bool) – Whether the product being processed is an angular product. If True, then the geometric factor calculation has additional steps to determine the exact rgfo boundary.
- Returns:
geometric_factors – A 3D array of geometric factors with shape (epoch, esa_steps, positions).
- Return type: