Skip to content

Commit 95e5ba9

Browse files
authored
Ultra l1c pset - add energy interval (IMAP-Science-Operations-Center#1562)
* adding energy interval for pset and other minor changes
1 parent bbc055e commit 95e5ba9

5 files changed

Lines changed: 11 additions & 16 deletions

File tree

imap_processing/cdf/config/imap_ultra_l1b_variable_attrs.yaml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -236,20 +236,6 @@ path_length:
236236
LABLAXIS: path_length
237237
UNITS: mm / 100
238238

239-
azimuth:
240-
<<: *default_float32
241-
CATDESC: Azimuth.
242-
FIELDNAM: azimuth
243-
LABLAXIS: azimuth
244-
UNITS: radians
245-
246-
elevation:
247-
<<: *default_float32
248-
CATDESC: Elevation.
249-
FIELDNAM: elevation
250-
LABLAXIS: elevation
251-
UNITS: radians
252-
253239
phi:
254240
<<: *default_float32
255241
CATDESC: Ultra instrument frame event phi (azimuth with range -90 -> 90).

imap_processing/cdf/config/imap_ultra_l1c_variable_attrs.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,11 @@ packetdata:
134134
LABLAXIS: packet data
135135
# TODO: come back to format
136136
UNITS: " "
137+
138+
energy_bin_delta:
139+
<<: *default_float32
140+
CATDESC: Difference between the energy bin edges.
141+
DEPEND_0: energy_bin_geometric_mean
142+
FIELDNAM: energy_bin_delta
143+
LABLAXIS: energy bin delta
144+
UNITS: keV

imap_processing/ultra/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,4 @@ class UltraConstants:
8080
CULLING_RPM_MAX = 6.0
8181

8282
# Thresholds for culling based on counts.
83-
CULLING_ENERGY_BIN_EDGES: ClassVar[list] = [-1e5, 0, 10, 20, 1e5]
83+
CULLING_ENERGY_BIN_EDGES: ClassVar[list] = [0, 10, 20, 1e5]

imap_processing/ultra/l1c/spacecraft_pset.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ def calculate_spacecraft_pset(
8080
pset_dict["background_rates"] = background_rates
8181
pset_dict["exposure_factor"] = exposure_pointing
8282
pset_dict["healpix"] = healpix
83+
pset_dict["energy_bin_delta"] = np.diff(intervals, axis=1).squeeze()
8384

8485
dataset = create_dataset(pset_dict, name, "l1c", data_version)
8586

imap_processing/ultra/utils/ultra_l1_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def create_dataset(
9696
dims=["epoch", "component"],
9797
attrs=cdf_manager.get_variable_attributes(key),
9898
)
99-
elif key == "ena_rates_threshold":
99+
elif key in ("ena_rates_threshold", "energy_bin_delta"):
100100
dataset[key] = xr.DataArray(
101101
data_dict[key],
102102
dims=["energy_bin_geometric_mean"],

0 commit comments

Comments
 (0)