Skip to content

Commit 250e5e1

Browse files
committed
Some I/O fixes
1 parent 8f35d68 commit 250e5e1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

derotation/analysis/full_derotation_pipeline.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ def get_config(self, config_name: str) -> dict:
100100
dict
101101
Config dictionary.
102102
"""
103-
path_config = "derotation/config/" + config_name + ".yml"
103+
104+
path_config = (
105+
Path(__file__).parent.parent / f"config/{config_name}.yml"
106+
)
104107

105108
with open(Path(path_config), "r") as f:
106109
config = yaml.load(f, Loader=yaml.FullLoader)
@@ -192,6 +195,9 @@ def load_data(self):
192195
self.config["paths_read"]["path_to_tif"]
193196
).stem.split(".")[0]
194197
self.filename = self.config["paths_write"]["saving_name"]
198+
Path(self.config["paths_write"]["derotated_tiff_folder"]).mkdir(
199+
parents=True, exist_ok=True
200+
)
195201
self.file_saving_path_with_name = (
196202
Path(self.config["paths_write"]["derotated_tiff_folder"])
197203
/ self.filename

0 commit comments

Comments
 (0)