diff --git a/imap_processing/cdf/config/imap_lo_l1a_variable_attrs.yaml b/imap_processing/cdf/config/imap_lo_l1a_variable_attrs.yaml index b9f79f841..994221c2a 100644 --- a/imap_processing/cdf/config/imap_lo_l1a_variable_attrs.yaml +++ b/imap_processing/cdf/config/imap_lo_l1a_variable_attrs.yaml @@ -21,21 +21,20 @@ de_default_attrs: &de_default # Re-used Coordinate esa_step_label: - FILLVAL: 255 - CATDESC: ESA Steps - FIELDNAM: ESA Steps - FORMAT: A1 - VAR_TYPE: metadata + CATDESC: ESA Steps + FIELDNAM: ESA Steps + FORMAT: A1 + VAR_TYPE: metadata esa_step: VALIDMIN: 1 VALIDMAX: 7 - FILLVAL: -9223372036854775808 + FILLVAL: 255 CATDESC: Energy Step DEPEND_1: esa_step FIELDNAM: Energy Step UNITS: ' ' - FORMAT: I1 + FORMAT: I3 VAR_TYPE: support_data LABLAXIS: ESA LABL_PTR_1: esa_step_label @@ -170,18 +169,18 @@ de_count: azimuth_6_label: CATDESC: azimuth spin bins (, 6 degrees) FIELDNAM: Azimuth bins - FORMAT: A2 + FORMAT: A3 VAR_TYPE: metadata azimuth_6: VALIDMIN: 0 VALIDMAX: 59 - FILLVAL: -9223372036854775808 + FILLVAL: 255 CATDESC: azimuth spin bins (, 6 degrees) FIELDNAM: Azimuth bins DEPEND_1: azimuth_6 UNITS: ' ' - FORMAT: I2 + FORMAT: I3 VAR_TYPE: support_data LABLAXIS: Az bins LABL_PTR_1: azimuth_6_label @@ -189,17 +188,17 @@ azimuth_6: azimuth_60_label: CATDESC: azimuth spin bins (, 60 degrees) FIELDNAM: Azimuth bins - FORMAT: A1 + FORMAT: A3 VAR_TYPE: metadata azimuth_60: VALIDMIN: 0 VALIDMAX: 5 - FILLVAL: -9223372036854775808 + FILLVAL: 255 CATDESC: azimuth spin bins (, 60 degrees) FIELDNAM: Azimuth bins DEPEND_1: azimuth_60 - FORMAT: I1 + FORMAT: I3 UNITS: ' ' VAR_TYPE: support_data LABLAXIS: Az bins @@ -384,7 +383,7 @@ pos1: DEPEND_2: esa_step FIELDNAM: Position 1 count FORMAT: I12 - LABLAXIS: position 1 coun + LABLAXIS: position 1 count pos2: <<: *default diff --git a/imap_processing/lo/l1a/lo_l1a.py b/imap_processing/lo/l1a/lo_l1a.py index 520ce802b..9e870dfb6 100644 --- a/imap_processing/lo/l1a/lo_l1a.py +++ b/imap_processing/lo/l1a/lo_l1a.py @@ -1,5 +1,6 @@ """IMAP-Lo L1A Data Processing.""" +import logging from pathlib import Path import numpy as np @@ -11,6 +12,9 @@ from imap_processing.lo.l0.lo_science import parse_histogram from imap_processing.utils import packet_file_to_datasets +logger = logging.getLogger(__name__) +logger.setLevel(logging.INFO) + def lo_l1a(dependency: Path, data_version: str) -> list[xr.Dataset]: """ @@ -30,6 +34,8 @@ def lo_l1a(dependency: Path, data_version: str) -> list[xr.Dataset]: Location of created CDF files. """ xtce_file = imap_module_directory / "lo/packet_definitions/lo_xtce.xml" + + logger.info("\nDecommutating packets and converting to dataset") datasets_by_apid = packet_file_to_datasets( packet_file=dependency.resolve(), xtce_packet_definition=xtce_file.resolve(), @@ -42,6 +48,10 @@ def lo_l1a(dependency: Path, data_version: str) -> list[xr.Dataset]: attr_mgr.add_instrument_variable_attrs(instrument="lo", level="l1a") attr_mgr.add_global_attribute("Data_version", data_version) + logger.info( + f"\nProcessing {LoAPID(LoAPID.ILO_SCI_CNT).name} " + f"packet (APID: {LoAPID.ILO_SCI_CNT.value})" + ) if LoAPID.ILO_SCI_CNT in datasets_by_apid: logical_source = "imap_lo_l1a_histogram" datasets_by_apid[LoAPID.ILO_SCI_CNT] = parse_histogram( @@ -52,6 +62,7 @@ def lo_l1a(dependency: Path, data_version: str) -> list[xr.Dataset]: ) good_apids = [LoAPID.ILO_SCI_CNT] + logger.info(f"\nReturning datasets: {[LoAPID(apid) for apid in good_apids]}") return [datasets_by_apid[good_apid] for good_apid in good_apids]