From 60caae26b71cebd8263b1954f6d4075bd0dbc841 Mon Sep 17 00:00:00 2001 From: gadorlhiac Date: Mon, 8 Apr 2024 14:14:17 -0700 Subject: [PATCH 1/2] MNT IndexCrystFEL checks for Psocake output as well --- lute/io/models/sfx_index.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lute/io/models/sfx_index.py b/lute/io/models/sfx_index.py index 738f4445..d0c32a96 100644 --- a/lute/io/models/sfx_index.py +++ b/lute/io/models/sfx_index.py @@ -391,6 +391,10 @@ def validate_in_file(cls, in_file: str, values: Dict[str, Any]) -> str: filename: Optional[str] = read_latest_db_entry( f"{values['lute_config'].work_dir}", "FindPeaksPyAlgos", "out_file" ) + if filename is None: + filename = read_latest_db_entry( + f"{values['lute_config'].work_dir}", "FindPeaksPsocake", "out_file" + ) if filename is not None: return filename return in_file From 7a97afad9936c93c24ae458f50920c29a2e787d6 Mon Sep 17 00:00:00 2001 From: gadorlhiac Date: Mon, 8 Apr 2024 15:15:21 -0700 Subject: [PATCH 2/2] MNT Change IndexCrystFEL validator for hacked Psocake lst writing --- lute/io/models/sfx_index.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/lute/io/models/sfx_index.py b/lute/io/models/sfx_index.py index d0c32a96..3b71cba6 100644 --- a/lute/io/models/sfx_index.py +++ b/lute/io/models/sfx_index.py @@ -392,10 +392,20 @@ def validate_in_file(cls, in_file: str, values: Dict[str, Any]) -> str: f"{values['lute_config'].work_dir}", "FindPeaksPyAlgos", "out_file" ) if filename is None: - filename = read_latest_db_entry( - f"{values['lute_config'].work_dir}", "FindPeaksPsocake", "out_file" + exp: str = values["lute_config"].experiment + run: int = int(values["lute_config"].run) + tag: Optional[str] = read_latest_db_entry( + f"{values['lute_config'].work_dir}", "FindPeaksPsocake", "tag" ) - if filename is not None: + out_dir: Optional[str] = read_latest_db_entry( + f"{values['lute_config'].work_dir}", "FindPeaksPsocake", "outDir" + ) + if out_dir is not None: + fname: str = f"{out_dir}/{exp}_{run:04d}" + if tag is not None: + fname = f"{fname}_{tag}" + return f"{fname}.lst" + else: return filename return in_file