From 3083958e5f65ce824307098e0b96fa3eafa81cd6 Mon Sep 17 00:00:00 2001 From: Thomas-Otavio Peulen Date: Tue, 17 Sep 2024 12:41:30 +0200 Subject: [PATCH] Fix test sm file test Set micro_times to defined value --- src/TTTR.cpp | 4 ++++ test/settings.json | 1 + test/test_TTTR.py | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/TTTR.cpp b/src/TTTR.cpp index 9b1b9d4a..c42895ca 100644 --- a/src/TTTR.cpp +++ b/src/TTTR.cpp @@ -327,6 +327,10 @@ int TTTR::read_sm_file(const char *filename){ // Read and interpret the 16-bit detector routing_channels[i] = readBigEndian16(record + 8); + + // Set micro time to default value + micro_times[i] = 0; + } return 0; diff --git a/test/settings.json b/test/settings.json index 8415cb43..447f6d9d 100644 --- a/test/settings.json +++ b/test/settings.json @@ -5,6 +5,7 @@ "ptu_hh_t2_filename" : "./tttr-data/pq/ptu/pq_ptu_hh_t2.ptu", "ptu_hh_t3_filename" : "./tttr-data/pq/ptu/pq_ptu_hh_t3.ptu", "ht3_clsm_filename" : "./tttr-data/imaging/pq/ht3/pq_ht3_clsm.ht3", + "sm_filename" : "./tttr-data/sm/tl_sm.sm", "make_references": false, "test_files": [ ["./tttr-data/bh/bh_spc132.spc", "SPC-130"], diff --git a/test/test_TTTR.py b/test/test_TTTR.py index 5fa12f5d..7caee365 100644 --- a/test/test_TTTR.py +++ b/test/test_TTTR.py @@ -23,7 +23,8 @@ class Tests(unittest.TestCase): (settings["photon_hdf_filename"], 'PHOTON-HDF5'), (settings["ht3_clsm_filename"], 'HT3'), (settings["ptu_hh_t2_filename"], 'PTU'), - (settings["ptu_hh_t3_filename"], 'PTU') + (settings["ptu_hh_t3_filename"], 'PTU'), + (settings["sm_filename"], 'SM') ] def test_append_event(self):