Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ data_quality:
FIELDNAM: Data Quality
FILLVAL: *uint8_fillval
FORMAT: I3
LABLAXIS: Data Quality
LABL_PTR_1: priority_label
SCALETYP: linear
UNITS: " "
Expand Down Expand Up @@ -324,6 +323,7 @@ esa_step:
VALIDMAX: 127
VALIDMIN: 0
VAR_TYPE: data

# ------------------------------- labels -------------------------------

event_num_label:
Expand Down
17 changes: 5 additions & 12 deletions imap_processing/codice/codice_l2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1321,24 +1321,17 @@ def process_lo_direct_events(dependencies: ProcessingInputCollection) -> xr.Data
kev.astype(np.float32).reshape(l2_dataset["energy_step"].shape),
)
# Drop unused variables
vars_to_drop = [
"spare",
"sw_bias_gain_mode",
"st_bias_gain_mode",
"k_factor",
"rgfo_esa_step",
"rgfo_spin_sector",
"rgfo_half_spin",
"nso_esa_step",
"nso_spin_sector",
"nso_half_spin",
]
vars_to_drop = ["spare", "sw_bias_gain_mode", "st_bias_gain_mode", "k_factor"]
l2_dataset = l2_dataset.drop_vars(vars_to_drop)
# Update variable attributes
l2_dataset.attrs.update(
cdf_attrs.get_global_attributes("imap_codice_l2_lo-direct-events")
)
for var in l2_dataset.data_vars:
if "nso" in var or "rgfo" in var:
# skip adding attributes for these variables. They should already
# have attrs carried over from l1a.
continue
l2_dataset[var].attrs.update(cdf_attrs.get_variable_attributes(var))
# Update coord attributes
l2_dataset["priority"].attrs.update(
Expand Down
Loading