Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Initial IDEX L2 implementation #751

Draft
wants to merge 11 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 10 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
161 changes: 161 additions & 0 deletions imap_processing/cdf/config/imap_idex_l2_variable_attrs.yaml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without knowing how accurate the values/contents of these are, the structure and organization of the file looks good to me!

Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
# Level 2 variable base dictionaries
model_base: &model_base
DEPEND_0: epoch
DISPLAY_TYPE: time_series
FILLVAL: -1.0e+31
FORMAT: E12.2
VALIDMIN: -1.0e+31
VALIDMAX: -1.0e+31
VAR_TYPE: data
SCALETYP: linear

tof_model_base: &tof_model_base
<<: *model_base
DEPEND_1: mass_number

model_amplitude_base: &model_amplitude_base
<<: *model_base
UNITS: dN

model_time_base: &model_time_base
<<: *model_base
UNITS: s

model_dimensionless_base: &model_dimensionless_base
<<: *model_base
UNITS: ' '

tof_model_amplitude_base: &tof_model_amplitude_base
<<: *tof_model_base
UNITS: dN

tof_model_time_base: &tof_model_time_base
<<: *tof_model_base
UNITS: s

tof_model_dimensionless_base: &tof_model_dimensionless_base
<<: *tof_model_base
UNITS: ' '

mass_number_attrs:
CATDESC: Mass number
DISPLAY_TYPE: no_plot
FIELDNAM: mass_number
FILLVAL: ''
FORMAT: E12.2
LABLAXIS: mass_number
UNITS: ''
VALIDMIN: 1
VALIDMAX: 50
VAR_TYPE: support_data
VAR_NOTES: These represent the peaks of the TOF waveform

target_high_model_amplitude:
<<: *model_amplitude_base
CATDESC: target_high_model_amplitude
FIELDNAM: target_high_model_amplitude
LABLAXIS: target_high_model_amplitude
VAR_NOTES: The amplitude of the response for target_high

ion_grid_model_amplitude:
<<: *model_amplitude_base
CATDESC: ion_grid_model_amplitude
FIELDNAM: ion_grid_model_amplitude
LABLAXIS: ion_grid_model_amplitude
VAR_NOTES: The amplitude of the response for ion_grid

target_high_model_uncertainty:
<<: *model_dimensionless_base
CATDESC: target_high_model_uncertainty
FIELDNAM: target_high_model_uncertainty
LABLAXIS: target_high_model_uncertainty
VAR_NOTES: The uncertainty in the model of the response for target_high

ion_grid_model_uncertainty:
<<: *model_dimensionless_base
CATDESC: ion_grid_model_uncertainty
FIELDNAM: ion_grid_model_uncertainty
LABLAXIS: ion_grid_model_uncertainty
VAR_NOTES: The uncertainty in the model of the response for ion_grid

target_high_model_constant_offset:
<<: *model_amplitude_base
CATDESC: target_high_model_constant_offset
FIELDNAM: target_high_model_constant_offset
VAR_NOTES: The constant offset of the response for target_high

ion_grid_model_constant_offset:
<<: *model_amplitude_base
CATDESC: ion_grid_model_constant_offset
FIELDNAM: ion_grid_model_constant_offset
VAR_NOTES: The constant offset of the response for ion grid

target_high_model_time_of_impact:
<<: *model_time_base
CATDESC: target_high_model_time_of_impact
FIELDNAM: target_high_model_time_of_impact
LABLAXIS: target_high_model_time_of_impact
VAR_NOTES: The time of impact for target_high

ion_grid_model_time_of_impact:
<<: *model_time_base
CATDESC: ion_grid_model_time_of_impact
FIELDNAM: ion_grid_model_time_of_impact
LABLAXIS: ion_grid_model_time_of_impact
VAR_NOTES: The time of impact for ion_grid

target_high_model_rise_time:
<<: *model_time_base
CATDESC: target_high_model_rise_time
FIELDNAM: target_high_model_rise_time
LABLAXIS: target_high_model_rise_time
VAR_NOTES: The rise time of the response for target_high

ion_grid_model_rise_time:
<<: *model_time_base
CATDESC: ion_grid_model_rise_time
FIELDNAM: ion_grid_model_rise_time
LABLAXIS: ion_grid_model_rise_time
VAR_NOTES: The rise time of the response for ion_grid

target_high_model_discharge_time:
<<: *model_time_base
CATDESC: target_high_model_discharge_time
FIELDNAM: target_high_model_discharge_time
LABLAXIS: target_high_model_discharge_time
VAR_NOTES: The discharge time of the response for target_high

ion_grid_model_discharge_time:
<<: *model_time_base
CATDESC: ion_grid_model_discharge_time
FIELDNAM: ion_grid_model_discharge_time
LABLAXIS: ion_grid_model_discharge_time
VAR_NOTES: The discharge time of the response for ion_grid

tof_low_model_masses_amplitude:
<<: *tof_model_amplitude_base
CATDESC: tof_low_model_masses_amplitude
FIELDNAM: tof_low_model_masses_amplitude
LABLAXIS: tof_low_model_masses_amplitude
VAR_NOTES: The amplitude of the first 50 peaks in tof_low

tof_low_model_masses_center:
<<: *tof_model_amplitude_base
CATDESC: tof_low_model_masses_center
FIELDNAM: tof_low_model_masses_center
LABLAXIS: tof_low_model_masses_center
VAR_NOTES: The center of the first 50 peaks in tof_low

tof_low_model_masses_sigma:
<<: *tof_model_dimensionless_base
CATDESC: tof_low_model_masses_sigma
FIELDNAM: tof_low_model_masses_sigma
LABLAXIS: tof_low_model_masses_sigma
VAR_NOTES: The sigma of the fitted exponentially modified gaussian to the first 50 peaks in tof_low

tof_low_model_masses_gamma:
<<: *tof_model_dimensionless_base
CATDESC: tof_low_model_masses_gamma
FIELDNAM: tof_low_model_masses_gamma
LABLAXIS: tof_low_model_masses_gamma
VAR_NOTES: The gamma of the fitted exponentially modified gaussian to the first 50 peaks in tof_low
10 changes: 10 additions & 0 deletions imap_processing/idex/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""Contains dataclasses to support IDEX processing."""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"""Contains dataclasses to support IDEX processing."""
"""Contains constants to support IDEX processing."""


TARGET_HIGH_CALIBRATION = 0.00135597
ION_GRID_CALIBRATION = 0.00026148
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this one being used anywhere in the code. Perhaps that part just isn't implemented yet? Otherwise it could be removed if it is not used.

time_of_impact_init = 20
constant_offset_init = 0.0
rise_time_init = 3.71
discharge_time_init = 37.1
FILLVAL = -1.0e31
TOF_Low_Peak_Prominence = 7
Comment on lines +5 to +10
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
time_of_impact_init = 20
constant_offset_init = 0.0
rise_time_init = 3.71
discharge_time_init = 37.1
FILLVAL = -1.0e31
TOF_Low_Peak_Prominence = 7
TIME_OF_IMPACT_INIT = 20
CONSTANT_OFFSET_INIT = 0.0
RISE_TIME_INIT = 3.71
DISCHARGE_TIME_INIT = 37.1
FILLVAL = -1.0e31
TOF_LOW_PEAK_PROMINENCE = 7

Suggest to change this in order to be consistently using capitalized variables for constants (which is also suggested by PEP8)

Empty file.
Loading
Loading