Skip to content
Snippets Groups Projects
Commit ab7ea648 authored by Aurelien Chauvigne's avatar Aurelien Chauvigne
Browse files

Merge branch 'main' into aurelien-dev

parents c3f7e517 67cb4410
No related branches found
No related tags found
No related merge requests found
......@@ -32,10 +32,14 @@ class ptrms_lib:
self.cache_dir = cache_dir
if not isinstance(self.cache_dir, Path):
self.cache_dir = Path(self.cache_dir)
if not self.cache_dir.exists():
self.cache_dir.mkdir(parents=True, exist_ok=True)
self.output_dir = output_dir
if not isinstance(self.output_dir, Path):
self.output_dir = Path(self.output_dir)
if not self.output_dir.exists():
self.output_dir.mkdir(parents=True, exist_ok=True)
# read configuration file
# ---------------------------------------------------------------------------------
......@@ -99,6 +103,16 @@ class ptrms_lib:
self.valve_position_meanings[p] for p in valve_data.position
]
# check if required info available to run code
# ------------------------------------------------------------------------------
# background
if not self.bck_save.exists():
# if no cache background, we need to have blank in data
if not any(valve_data["meaning"] == "BLANK"):
raise RuntimeError(
"No background data and no blank data in file. Impossible to process file."
)
# processing to NCPS
# ------------------------------------------------------------------------------
ncps_data = ptrms.cps_to_ncps(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment