Skip to content

Commit

Permalink
Cleanup CDF dataclass (IMAP-Science-Operations-Center#714)
Browse files Browse the repository at this point in the history
updated remaining CDF for codice, lo, hi, hit, swapi, mag, ultra
  • Loading branch information
tech3371 authored Jul 25, 2024
1 parent 50302ec commit 687354b
Show file tree
Hide file tree
Showing 30 changed files with 350 additions and 1,998 deletions.
5 changes: 5 additions & 0 deletions imap_processing/cdf/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from imap_processing.cdf.imap_cdf_manager import ImapCdfAttributes

# Load Epoch CDF attributes
cdf_manager = ImapCdfAttributes()
epoch_attrs = cdf_manager.get_variable_attributes("epoch")
33 changes: 33 additions & 0 deletions imap_processing/cdf/config/imap_constant_attrs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# By default the time is assumed to correspond to instantaneous time or
# center of accumulation/measurement period. But if, for some good reason,
# time corresponds to the beginning or end or any other part of
# accumulation/measurement period, that has to be stated in CATDESC.
epoch:
CATDESC: Time, number of nanoseconds since J2000 with leap seconds included
FIELDNAM: epoch
LABLAXIS: epoch
FILLVAL: -9223372036854775808
FORMAT: " " # Supposedly not required, fails in xarray_to_cdf
VALIDMIN: -9223372036854775808
VALIDMAX: 9223372036854775807
UNITS: ns
VAR_TYPE: support_data
SCALETYP: linear
MONOTON: INCREASE
TIME_BASE: J2000
TIME_SCALE: Terrestrial Time
REFERENCE_POSITION: Rotating Earth Geoid

# <=== Data Variables ===>
# Default Attrs for all metadata variables unless overridden
metadata_attrs:
DEPEND_0: epoch
DISPLAY_TYPE: 'no_plot'
LABLAXIS: ' '
FILLVAL: -9223372036854775808
FORMAT: I19
UNITS: ' '
VALIDMIN: 0
VALIDMAX: 9223372036854769664
VAR_TYPE: support_data
SCALETYP: linear
6 changes: 6 additions & 0 deletions imap_processing/cdf/config/imap_hi_global_cdf_attrs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ imap_hi_l1b_de_attrs:
Logical_source: imap_hi_l1b_{sensor}-de
Logical_source_description: IMAP-Hi Instrument Level-1B Direct Event Data.

imap_hi_l1a_hk_attrs:
Data_level: 1A
Data_type: L1A_HK>Level-1A Housekeeping
Logical_source: imap_hi_l1a_{sensor}-hk
Logical_source_description: IMAP-Hi Instrument Level-1A Housekeeping Data.

imap_hi_l1b_hk_attrs:
Data_level: 1B
Data_type: L1B_HK>Level-1B Housekeeping
Expand Down
8 changes: 8 additions & 0 deletions imap_processing/cdf/config/imap_ultra_global_cdf_attrs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ instrument_base: &instrument_base
the magnetic field. See https://imap.princeton.edu/instruments/ultra for more details.
Instrument_type: "Particles (space)"

# TODO: revisit this to be more specific
imap_ultra_l1a_sci:
<<: *instrument_base
Data_level: 1A
Data_type: L1A_SCI>Level-1A Science data
Logical_source: imap_ultra_l1a_sci
Logical_source_description: IMAP-Ultra Instrument Level-1A Science Data.

imap_ultra_l1b_45sensor-de:
<<: *instrument_base
Data_level: 1B
Expand Down
52 changes: 52 additions & 0 deletions imap_processing/cdf/config/imap_ultra_l1a_variable_attrs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# <=== Coordinates ===>
# TODO: revisit this whole file
ultra_metadata_attrs:
CATDESC: metadata # TODO: revisit this
FIELDNAM: metadata # TODO: revisit this
FILLVAL: -9223370000000000000
FORMAT: I19
LABLAXIS: Metadata
SCALE_TYP: linear
UNITS: " "
VALIDMIN: -9223372036854775808
VALIDMAX: 9223372036854775807
VAR_TYPE: support_data
DISPLAY_TYPE: time_series

ultra_support_attrs:
CATDESC: Metadata for Ultra data
FIELDNAM: metadata
FILLVAL: -9223370000000000000
FORMAT: I19
LABLAXIS: "none"
SCALE_TYP: linear
UNITS: " "
VALIDMIN: -9223372036854775808
VALIDMAX: 9223372036854775807
VAR_TYPE: support_data
DISPLAY_TYPE: time_series

string_base_attrs:
CATDESC: string metadata
FIELDNAM: string_metadata
FORMAT: A80
VAR_TYPE: metadata
DISPLAY_TYPE: no_plot
DEPEND_0: epoch

packet_data_attrs:
CATDESC: packet data
FIELDNAM: packet_data
FILLVAL: -9223370000000000000
FORMAT: I19
LABLAXIS: "none"
SCALE_TYP: linear
VALIDMIN: -9223372036854775808
VALIDMAX: 9223372036854775807
VAR_TYPE: support_data
DISPLAY_TYPE: time_series
DEPEND_0: epoch
DEPEND_1: sid
DEPEND_2: row
DEPEND_3: column
UNITS: pixels
37 changes: 0 additions & 37 deletions imap_processing/cdf/defaults.py

This file was deleted.

Loading

0 comments on commit 687354b

Please sign in to comment.