From b0466ba7eaac777cef5c64581381887bb73ed62a Mon Sep 17 00:00:00 2001 From: Torben Schiz Date: Thu, 11 Jul 2024 09:24:05 +0200 Subject: [PATCH] Move dt to simulation parameters in Snapshot and snapshot specific dt --- examples/snapshot-config.json | 6 ++++-- micro_manager/config.py | 13 ------------- tests/unit/snapshot-config.json | 7 ++++--- 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/examples/snapshot-config.json b/examples/snapshot-config.json index 2ead3eb..f7752c2 100644 --- a/examples/snapshot-config.json +++ b/examples/snapshot-config.json @@ -3,8 +3,10 @@ "coupling_params": { "parameter_file_name": "parameter.hdf5", "read_data_names": {"macro-scalar-data": "scalar", "macro-vector-data": "vector"}, - "write_data_names": {"micro-scalar-data": "scalar", "micro-vector-data": "vector"}, - "micro_dt": 0.1 + "write_data_names": {"micro-scalar-data": "scalar", "micro-vector-data": "vector"} + }, + "simulation_params": { + "micro_dt": 1.0 }, "snapshot_params": { "post_processing_file_name": "snapshot_postprocessing" diff --git a/micro_manager/config.py b/micro_manager/config.py index bde77ae..d6b1a3f 100644 --- a/micro_manager/config.py +++ b/micro_manager/config.py @@ -54,8 +54,6 @@ def __init__(self, logger, config_filename): self._output_micro_sim_time = False - self._dt = 0.01 - self.read_json(config_filename) def read_json(self, config_filename): @@ -529,14 +527,3 @@ def get_postprocessing_file_name(self): Name of post-processing script. """ return self._postprocessing_file_name - - def get_time_step_size(self): - """ - Get user provided time step size for the snapshot computation. - - Returns - ------- - dt : float - time_step_size. - """ - return self._dt diff --git a/tests/unit/snapshot-config.json b/tests/unit/snapshot-config.json index 6d79621..7731cf9 100644 --- a/tests/unit/snapshot-config.json +++ b/tests/unit/snapshot-config.json @@ -3,9 +3,10 @@ "coupling_params": { "parameter_file_name": "test_parameter.hdf5", "read_data_names": {"macro-scalar-data": "scalar", "macro-vector-data": "vector"}, - "write_data_names": {"micro-scalar-data": "scalar", "micro-vector-data": "vector"}, - "postprocessing": "True", - "micro_dt": 0.1 + "write_data_names": {"micro-scalar-data": "scalar", "micro-vector-data": "vector"} + }, + "simulation_params": { + "micro_dt": 1.0 }, "snapshot_params": { "post_processing_file_name": "snapshot_post_processing"