From 23e726c3f18183a5db754b432db57203ccddcd67 Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Mon, 30 Dec 2024 11:11:48 +0100 Subject: [PATCH] Set correct getter function name in the Config class and create the output dir before setting it in the handler --- micro_manager/adaptivity/adaptivity.py | 4 +++- micro_manager/config.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/micro_manager/adaptivity/adaptivity.py b/micro_manager/adaptivity/adaptivity.py index b61e008..bcf156e 100644 --- a/micro_manager/adaptivity/adaptivity.py +++ b/micro_manager/adaptivity/adaptivity.py @@ -5,6 +5,7 @@ from math import exp from typing import Callable from warnings import warn +import subprocess from micro_manager.tools.logging_wrapper import Logger import numpy as np @@ -40,8 +41,9 @@ def __init__(self, configurator, rank) -> None: output_dir = configurator.get_output_dir() if output_dir is not None: + subprocess.run(["mkdir", "-p", output_dir]) # Create output directory self._metrics_logger = Logger( - __name__, output_dir + "adaptivity-metrics.csv", rank, csv_logger=True + __name__, output_dir + "/adaptivity-metrics.csv", rank, csv_logger=True ) else: self._metrics_logger = Logger( diff --git a/micro_manager/config.py b/micro_manager/config.py index deb0729..1b31bdc 100644 --- a/micro_manager/config.py +++ b/micro_manager/config.py @@ -650,7 +650,7 @@ def create_single_sim_object(self): """ return self._initialize_once - def get_output_dir_name(self): + def get_output_dir(self): """ Get the name of the output directory.