From e7ffb673b52065a7b6681c8213f285997aa66f0e Mon Sep 17 00:00:00 2001 From: knikolaou Date: Sat, 8 Jun 2024 23:04:17 +0200 Subject: [PATCH] Save recorder names properly --- CI/unit_tests/recorders/test_base_recorder.py | 2 +- papyrus/recorders/base_recorder.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CI/unit_tests/recorders/test_base_recorder.py b/CI/unit_tests/recorders/test_base_recorder.py index b08988f..59c8729 100644 --- a/CI/unit_tests/recorders/test_base_recorder.py +++ b/CI/unit_tests/recorders/test_base_recorder.py @@ -110,7 +110,7 @@ def test_init(self): assert recorder.measurements == [self.measurement_1, self.measurement_2] assert recorder.chunk_size == 10 assert recorder.overwrite is False - assert recorder._data_storage.database_path == f"{storage_path}{name}.h5" + assert recorder._data_storage.database_path == f"{storage_path}/{name}.h5" def test_neural_state_keys(self): """ diff --git a/papyrus/recorders/base_recorder.py b/papyrus/recorders/base_recorder.py index 04c4088..7af39d3 100644 --- a/papyrus/recorders/base_recorder.py +++ b/papyrus/recorders/base_recorder.py @@ -94,7 +94,7 @@ def __init__( self.overwrite = overwrite # Initialize the data storage - self._data_storage = DataStorage(self.storage_path + self.name) + self._data_storage = DataStorage(f"{self.storage_path}/{self.name}") # Read in neural state keys from measurements self.neural_state_keys = self._read_neural_state_keys() @@ -183,7 +183,7 @@ def store(self, ignore_chunk_size=True): def gather(self): """ Gather the results from the temporary storage and the database. - + Returns ------- data : dict