From 588d244224881580137e08547995ebf6c93cf73f Mon Sep 17 00:00:00 2001 From: rstrub Date: Wed, 6 Dec 2023 10:45:15 -0500 Subject: [PATCH] =?UTF-8?q?removing=20=C2=B5Epoch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hermes_eea/SkymapFactory.py | 6 +++--- hermes_eea/__init__.py | 3 +-- hermes_eea/calibration/build_spectra.py | 2 +- hermes_eea/calibration/calibration.py | 2 +- hermes_eea/io/EEA.py | 4 ++-- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/hermes_eea/SkymapFactory.py b/hermes_eea/SkymapFactory.py index cb964a2..2f6d49b 100644 --- a/hermes_eea/SkymapFactory.py +++ b/hermes_eea/SkymapFactory.py @@ -66,7 +66,7 @@ def do_eea_packet( stepperTableCounter, pulse_b = np.zeros((41,4), dtype=np.uint16) counter1 = np.zeros((41,4), dtype=np.uint16) counter2 = np.zeros((41,4), dtype=np.uint16) - µepoch = np.zeros((41,4), dtype=np.uint16) + usec = np.zeros((41,4), dtype=np.uint16) skymap = np.zeros((41, 4, 32), dtype=np.uint16) @@ -80,7 +80,7 @@ def do_eea_packet( stepperTableCounter, pulse_b[dim0, dim1] = counts[row][33] counter1[dim0, dim1] = cnt1[row] counter2[dim0, dim1] = cnt2[row] - µepoch[dim0, dim1] = epoch[row] + usec[dim0, dim1] = epoch[row] # if len(stepperTableCounter) != 64: @@ -89,7 +89,7 @@ def do_eea_packet( stepperTableCounter, return_package['pulse_a'] = pulse_a return_package['pulse_b'] = list(pulse_b) return_package['counts'] = skymap - return_package['µEpoch'] = µepoch + return_package['usec'] = usec return_package['Epoch'] = epoch[0] return_package['stats'] = np.sum(skymap) return_package['energies'] = voltages diff --git a/hermes_eea/__init__.py b/hermes_eea/__init__.py index 2a09808..d5f493d 100644 --- a/hermes_eea/__init__.py +++ b/hermes_eea/__init__.py @@ -21,13 +21,12 @@ INST_TO_TARGETNAME = {INST_NAME: INST_TARGETNAME} _package_directory = os.path.dirname(os.path.abspath(__file__)) - _data_directory = os.path.abspath(os.path.join(_package_directory, "data")) +_calibration_directory = os.path.abspath(os.path.join(_data_directory, "calibration")) log.info(f"hermes_eea version: {__version__}") -skeleton = str( os.path.join(_data_directory, "masterSkeletons", "hermes_eea_l0_00000000000000_v0.0.0.cdf") ) stepper_table = "flight_stepper.txt" diff --git a/hermes_eea/calibration/build_spectra.py b/hermes_eea/calibration/build_spectra.py index c2b23c3..8135e41 100644 --- a/hermes_eea/calibration/build_spectra.py +++ b/hermes_eea/calibration/build_spectra.py @@ -32,7 +32,7 @@ def _hermes_eea_spectra(self): self.multiple_spectra = NDCollection( [ ("hermes_eea_settle_step_times", - NDCube(data=np.array(self.EEA.µEpoch), wcs=WCS(naxis=2), meta={"CATDESC": "Settle for Each Step"}, + NDCube(data=np.array(self.EEA.usec), wcs=WCS(naxis=2), meta={"CATDESC": "Settle for Each Step"}, unit="s", )), ("hermes_eea_energy_profile", NDCube(data=np.array(self.EEA.EnergyLabels), wcs=WCS(naxis=2), meta={"CATDESC": "Energy Profile"}, diff --git a/hermes_eea/calibration/calibration.py b/hermes_eea/calibration/calibration.py index 50ed256..90f9f84 100644 --- a/hermes_eea/calibration/calibration.py +++ b/hermes_eea/calibration/calibration.py @@ -272,7 +272,7 @@ def get_calibration_file(data_filename: Path, time=None) -> Path: Examples -------- """ - return os.path.join(hermes_eea._data_directory, data_filename) + return os.path.join(hermes_eea._calibration_directory, data_filename) def read_calibration_file(calib_filename: Path): diff --git a/hermes_eea/io/EEA.py b/hermes_eea/io/EEA.py index bcb9777..cb2fca0 100644 --- a/hermes_eea/io/EEA.py +++ b/hermes_eea/io/EEA.py @@ -7,7 +7,7 @@ def __init__(self, conf): self.Logical_file_id = None self.Data_version = None # ener, defl - self.µEpoch = [] #[ 41, 4 ] each of the 164 times, whenever hermes_eea_intgr_or_stepper == 1 + self.usec = [] #[ 41, 4 ] each of the 164 times, whenever hermes_eea_intgr_or_stepper == 1 self.PulseA = [] # [41, 4] overflow[0],accum[33] self.PulseB = [] # [41, 4] overflow[1], accum[34] self.Counter1 = [] @@ -30,7 +30,7 @@ def populate(self, myEEA, skymap): packet = 0 for record in skymap: - myEEA.µEpoch.append(record['µEpoch']) + myEEA.usec.append(record['usec']) myEEA.Epoch.append(record['Epoch']) myEEA.ACCUM.append(record['counts']) myEEA.PulseA.append(record['pulse_a'])