Skip to content

Commit

Permalink
Add to SIT-3 data variables (IMAP-Science-Operations-Center#589)
Browse files Browse the repository at this point in the history
* Add to SIT-3 data variables
  • Loading branch information
laspsandoval authored Jun 17, 2024
1 parent 4171239 commit 883e454
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 2 deletions.
28 changes: 26 additions & 2 deletions imap_processing/ultra/l1b/de.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,32 @@ def calculate_de(de_dataset, name):
# Placeholder for calculations
epoch = de_dataset.coords["epoch"].values

de_dict["epoch"] = epoch
de_dict["x_front"] = np.zeros(len(epoch), dtype=np.uint64)
de_dict["epoch"] = de_dataset["epoch"]
de_dict["x_front"] = np.zeros(len(epoch), dtype=np.float64)
de_dict["y_front"] = np.zeros(len(epoch), dtype=np.float64)
de_dict["x_back"] = np.zeros(len(epoch), dtype=np.float64)
de_dict["y_back"] = np.zeros(len(epoch), dtype=np.float64)
de_dict["x_coin"] = np.zeros(len(epoch), dtype=np.float64)
de_dict["tof_start_stop"] = np.zeros(len(epoch), dtype=np.float64)
de_dict["tof_stop_coin"] = np.zeros(len(epoch), dtype=np.float64)
de_dict["tof_corrected"] = np.zeros(len(epoch), dtype=np.float64)
de_dict["eventtype"] = np.zeros(len(epoch), dtype=np.uint64)
de_dict["vx_ultra"] = np.zeros(len(epoch), dtype=np.float64)
de_dict["vy_ultra"] = np.zeros(len(epoch), dtype=np.float64)
de_dict["vz_ultra"] = np.zeros(len(epoch), dtype=np.float64)
de_dict["energy"] = np.zeros(len(epoch), dtype=np.float64)
de_dict["species"] = np.zeros(len(epoch), dtype=np.uint64)
de_dict["event_efficiency"] = np.zeros(len(epoch), dtype=np.float64)
de_dict["vx_sc"] = np.zeros(len(epoch), dtype=np.float64)
de_dict["vy_sc"] = np.zeros(len(epoch), dtype=np.float64)
de_dict["vz_sc"] = np.zeros(len(epoch), dtype=np.float64)
de_dict["vx_dps_sc"] = np.zeros(len(epoch), dtype=np.float64)
de_dict["vy_dps_sc"] = np.zeros(len(epoch), dtype=np.float64)
de_dict["vz_dps_sc"] = np.zeros(len(epoch), dtype=np.float64)
de_dict["vx_dps_helio"] = np.zeros(len(epoch), dtype=np.float64)
de_dict["vy_dps_helio"] = np.zeros(len(epoch), dtype=np.float64)
de_dict["vz_dps_helio"] = np.zeros(len(epoch), dtype=np.float64)
de_dict["eventtimes"] = np.zeros(len(epoch), dtype=np.float64)

dataset = create_dataset(de_dict, name, "l1b")

Expand Down
10 changes: 10 additions & 0 deletions imap_processing/ultra/l1b/extendedspin.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ def calculate_extendedspin(rates_dataset, name):
# Placeholder for calculations
extendedspin_dict["epoch"] = epoch
extendedspin_dict["spin_number"] = np.zeros(len(epoch), dtype=np.uint64)
extendedspin_dict["spin_start_time"] = np.zeros(len(epoch), dtype=np.float64)
extendedspin_dict["avg_spin_period"] = np.zeros(len(epoch), dtype=np.float64)
extendedspin_dict["rate_start_pulses"] = np.zeros(len(epoch), dtype=np.float64)
extendedspin_dict["rate_stop_pulses"] = np.zeros(len(epoch), dtype=np.float64)
extendedspin_dict["rate_coin_pulses"] = np.zeros(len(epoch), dtype=np.float64)
extendedspin_dict["rate_processed_events"] = np.zeros(len(epoch), dtype=np.float64)
extendedspin_dict["rate_rejected_events"] = np.zeros(len(epoch), dtype=np.float64)
extendedspin_dict["quality_hk"] = np.zeros(len(epoch), dtype=np.uint16)
extendedspin_dict["quality_attitude"] = np.zeros(len(epoch), dtype=np.uint16)
extendedspin_dict["quality_instruments"] = np.zeros(len(epoch), dtype=np.uint16)

extendedspin_dataset = create_dataset(extendedspin_dict, name, "l1b")

Expand Down
1 change: 1 addition & 0 deletions imap_processing/ultra/l1c/histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def calculate_histogram(histogram_dataset, name):
histogram_dict = {}

# Placeholder for calculations
# TODO: come back and update this data structure.
epoch = histogram_dataset.coords["epoch"].values

histogram_dict["epoch"] = epoch
Expand Down
1 change: 1 addition & 0 deletions imap_processing/ultra/l1c/pset.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def calculate_pset(pset_dataset, name):
pset_dict = {}

# Placeholder for calculations
# TODO: come back and update this data structure.
epoch = pset_dataset.coords["epoch"].values

pset_dict["epoch"] = epoch
Expand Down

0 comments on commit 883e454

Please sign in to comment.