From 069188eda672ac3fb16f021343b4aaf0dcd48659 Mon Sep 17 00:00:00 2001 From: Artur Glavic Date: Thu, 9 Jul 2026 09:00:12 +0200 Subject: [PATCH] Fix small bugs from amor version --- eos/event_data_types.py | 2 +- eos/file_reader.py | 2 +- tests/test_event_handling.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eos/event_data_types.py b/eos/event_data_types.py index ff22ffb..27c682c 100644 --- a/eos/event_data_types.py +++ b/eos/event_data_types.py @@ -39,7 +39,7 @@ EVENT_TYPE = np.dtype([('tof', np.float64), ('pixelID', np.uint32), ('mask', np. PACKET_TYPE = np.dtype([('start_index', np.uint32), ('time', np.int64)]) PULSE_TYPE = np.dtype([('time', np.int64), ('monitor', np.float32)]) PC_TYPE = np.dtype([('current', np.float32), ('time', np.int64)]) -BM_TYPE = np.dtype([('value', np.int64), ('time', np.int64)]) +BM_TYPE = np.dtype([('value', np.int32), ('time', np.int64)]) LOG_TYPE = np.dtype([('value', np.float32), ('time', np.int64)]) # define the bitmask for individual event filters diff --git a/eos/file_reader.py b/eos/file_reader.py index 4a30ad8..7826671 100644 --- a/eos/file_reader.py +++ b/eos/file_reader.py @@ -509,7 +509,7 @@ class AmorEventData(AmorHeader): self.instrument_settings.polarization = fileio.Polarization(const.polarizationConfigs[value]) elif key in sample_keys: param = key.split('_', 1)[1] - self.sample.sample_parameters[param].magnitue = value + self.sample.sample_parameters[param].magnitude = value def read_chopper_trigger_stream(self, packets): diff --git a/tests/test_event_handling.py b/tests/test_event_handling.py index e81c778..f9e8f63 100644 --- a/tests/test_event_handling.py +++ b/tests/test_event_handling.py @@ -101,9 +101,9 @@ class MockEventData: if key == 'polarization_config_label': self.instrument_settings.polarization = Polarization(const.polarizationConfigs[value]) elif key == 'sample_temperature': - self.sample.sample_parameters['temperature'].magnitue = value + self.sample.sample_parameters['temperature'].magnitude = value elif key == 'sample_magnetic_field': - self.sample.sample_parameters['magnetic_field'].magnitue = value + self.sample.sample_parameters['magnetic_field'].magnitude = value class TestActionClass(TestCase):