Skip to content

Commit 97dc936

Browse files
committed
Ignore supplied models that have already been rescaled
1 parent 6d8c35d commit 97dc936

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/murfey/server/__init__.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,11 +1562,13 @@ def _find_initial_model(visit: str, machine_config: MachineConfig) -> Path | Non
15621562
/ str(datetime.now().year)
15631563
/ visit
15641564
)
1565-
possible_models = list(
1566-
(visit_directory / machine_config.initial_model_search_directory).glob(
1567-
"*.mrc"
1568-
)
1569-
)
1565+
possible_models = [
1566+
p
1567+
for p in (
1568+
visit_directory / machine_config.initial_model_search_directory
1569+
).glob("*.mrc")
1570+
if "rescaled" not in p.name
1571+
]
15701572
if possible_models:
15711573
return sorted(possible_models, key=lambda x: x.stat().st_ctime)[-1]
15721574
return None

0 commit comments

Comments
 (0)