Skip to content

Commit c27e747

Browse files
author
Menlo Innovations - CAVA Project
committed
Harrison - LFAR/PMCL - WIP adding lat/lon to glows l3e
1 parent be9d6e2 commit c27e747

5 files changed

Lines changed: 65 additions & 5 deletions

imap_l3_processing/cdf/config/imap_glows_l3e_survival-probability-ul-hf_variable_attrs.yaml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,4 +198,30 @@ elongation_excluded:
198198
FILLVAL: 65535
199199
VALIDMAX: 0
200200
VALIDMIN: 180
201-
RECORD_VARYING: RV
201+
RECORD_VARYING: RV
202+
pixel_longitude:
203+
NAME: pixel_longitude
204+
DATA_TYPE: CDF_FLOAT
205+
CATDESC: longitude of the pixel in ecliptic coordinate
206+
VAR_TYPE: metadata
207+
FIELDNAM: Pixel longitude
208+
LABLAXIS: longitude
209+
RECORD_VARYING: RV
210+
FORMAT: F9.3
211+
FILLVAL: -1.0000E+31
212+
UNITS: degrees
213+
VALIDMIN: 0
214+
VALIDMAX: 360
215+
pixel_latitude:
216+
NAME: pixel_latitude
217+
DATA_TYPE: CDF_FLOAT
218+
CATDESC: latitude of the pixel in ecliptic coordinate
219+
VAR_TYPE: metadata
220+
FIELDNAM: Pixel latitude
221+
LABLAXIS: latitude
222+
RECORD_VARYING: RV
223+
FORMAT: F9.3
224+
FILLVAL: -1.0000E+31
225+
UNITS: degrees
226+
VALIDMIN: -90
227+
VALIDMAX: 90

imap_l3_processing/cdf/config/imap_glows_l3e_survival-probability-ul-sf_variable_attrs.yaml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,4 +198,30 @@ elongation_excluded:
198198
FILLVAL: 65535
199199
VALIDMAX: 0
200200
VALIDMIN: 180
201-
RECORD_VARYING: RV
201+
RECORD_VARYING: RV
202+
pixel_longitude:
203+
NAME: pixel_longitude
204+
DATA_TYPE: CDF_FLOAT
205+
CATDESC: longitude of the pixel in ecliptic coordinate
206+
VAR_TYPE: metadata
207+
FIELDNAM: Pixel longitude
208+
LABLAXIS: longitude
209+
RECORD_VARYING: RV
210+
FORMAT: F9.3
211+
FILLVAL: -1.0000E+31
212+
UNITS: degrees
213+
VALIDMIN: 0
214+
VALIDMAX: 360
215+
pixel_latitude:
216+
NAME: pixel_latitude
217+
DATA_TYPE: CDF_FLOAT
218+
CATDESC: latitude of the pixel in ecliptic coordinate
219+
VAR_TYPE: metadata
220+
FIELDNAM: Pixel latitude
221+
LABLAXIS: latitude
222+
RECORD_VARYING: RV
223+
FORMAT: F9.3
224+
FILLVAL: -1.0000E+31
225+
UNITS: degrees
226+
VALIDMIN: -90
227+
VALIDMAX: 90

imap_l3_processing/glows/l3e/glows_l3e_ultra_model.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ class GlowsL3EUltraData(DataProduct):
4242
spacecraft_velocity_y: np.ndarray
4343
spacecraft_velocity_z: np.ndarray
4444
elongation_excluded: np.ndarray
45+
pixel_latitude: np.ndarray
4546

4647
@classmethod
4748
def convert_dat_to_glows_l3e_ul_product(cls, input_metadata: InputMetadata, file_path: Path,

tests/glows/l3e/test_glows_l3e_ultra_model.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def test_convert_dat_to_glows_l3e_ul_product(self):
7070
25.4914514, 33.1831812, 43.1957952, 56.2295915, 73.1961745, 95.2822137, 124.0324417, 161.4576950,
7171
210.1755551, 273.5934261, 356.1468544])
7272

73-
row_1_probability_of_survival = np.array(
73+
row_0_probability_of_survival = np.array(
7474
[0.84827693E+00, 0.86517360E+00, 0.88086645E+00, 0.89551288E+00, 0.90925039E+00, 0.92211605E+00,
7575
0.93428862E+00, 0.94576000E+00, 0.95660359E+00, 0.96660933E+00, 0.97533752E+00, 0.98226689E+00,
7676
0.98714107E+00, 0.99025210E+00, 0.99218849E+00, 0.99346478E+00, 0.99439230E+00, 0.99512632E+00,
@@ -123,7 +123,7 @@ def test_convert_dat_to_glows_l3e_ul_product(self):
123123
np.testing.assert_equal(expected_heal_pix, l3e_ul_product.healpix_index, strict=True)
124124
np.testing.assert_equal(expected_survival_probability_shape, l3e_ul_product.probability_of_survival.shape,
125125
strict=True)
126-
np.testing.assert_equal(l3e_ul_product.probability_of_survival[0].T[0, :], row_1_probability_of_survival,
126+
np.testing.assert_equal(l3e_ul_product.probability_of_survival[0].T[0, :], row_0_probability_of_survival,
127127
strict=True)
128128
np.testing.assert_equal(l3e_ul_product.probability_of_survival[0].T[804, :],
129129
row_804_probability_of_survival, strict=True)
@@ -144,3 +144,10 @@ def test_convert_dat_to_glows_l3e_ul_product(self):
144144
np.testing.assert_equal(np.array([2.3]), l3e_ul_product.spacecraft_velocity_z, strict=True)
145145

146146
np.testing.assert_equal(np.array([30.0]), l3e_ul_product.elongation_excluded, strict=True)
147+
148+
np.testing.assert_equal(87.07582, l3e_ul_product.pixel_latitude[0])
149+
np.testing.assert_equal(45.00000, l3e_ul_product.pixel_longitude[0])
150+
151+
np.testing.assert_equal(np.nan, l3e_ul_product.pixel_latitude[804])
152+
np.testing.assert_equal(np.nan, l3e_ul_product.pixel_longitude[804])
153+

tests/periodically_run_tests.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"test_l3bcde_first_time_processing": "2026-03-05T09:59:10.392514",
33
"test_spectral_fit_against_validation_data": "2026-01-23T10:39:49.234684",
44
"test_calculate_pickup_ions_with_minimize": "2026-03-05T13:18:02.645143",
5-
"test_ultra_all_sp_maps": "2026-01-26T13:05:08.238429",
5+
"test_ultra_all_sp_maps": "2026-03-06T13:53:31.090028",
66
"test_ultra_combined_maps": null,
77
"test_ultra_combined_nsp_maps": "2026-03-06T09:59:07.820402",
88
"test_ultra_combined_sp_maps": "2026-03-05T15:39:34.795512"

0 commit comments

Comments
 (0)