Skip to content

Commit

Permalink
with barebones attrs this indeed does :
Browse files Browse the repository at this point in the history
this write separate records with their code and single records with mine
  • Loading branch information
rstrub committed Nov 28, 2023
1 parent cb2a7f3 commit 4087636
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions hermes_eea/calibration/calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,25 +260,24 @@ def l0_sci_data_to_cdf(data: dict, original_filename: Path) -> Path:
accumSkymaps = NDData( data=np.array(myEEA.ACCUM))
epochs = NDData( data=np.array(myEEA.Epoch))

input_attrs= retrieve_canned_attributes()
#input_attrs = HermesData.global_attribute_template("eea", "l1", "1.0.0")
#input_attrs= retrieve_canned_attributes()
input_attrs = HermesData.global_attribute_template("eea", "l1", "1.0.0")
ts = TimeSeries( time=iso_times )
#'stats': u.Quantity(np.array(myEEA.stats), 'cm', dtype=np.uint16),
support_data = {
'energies' : energyLabels,
'pulse_a' : counterA,
'pulse_b' : counterB,
'ACCUM' : accumSkymaps

}
hermes_eea_data = HermesData(timeseries=ts, meta=input_attrs, support=support_data)
ts = TimeSeries(
ts2 = TimeSeries(
time_start="2016-03-22T12:30:31",
time_delta=3 * u.s,
data={"Bx": u.Quantity([1, 2, 3, 4], "gauss", dtype=np.uint16)}
)
input_attrs = HermesData.global_attribute_template("eea", "l1", "1.0.0")
hermes_data = HermesData(timeseries=ts, meta=input_attrs)
hermes_data = HermesData(timeseries=ts2, meta=input_attrs)
hermes_data.timeseries['Bx'].meta.update({"CATDESC": "X component of the Magnetic field measured by HERMES"})
try:

Expand Down

0 comments on commit 4087636

Please sign in to comment.