Skip to content

Commit 9b52fa6

Browse files
authored
Add logic to correctly register '_Lng_SVCC' denoised datasets as well (#813)
The file name pattern '_Lng_SVCC' indicates that the dataset has been denoised using another of the algorithms supported by Leica, and should be handled in the same way as the '_Lng_LVCC' string pattern: if they're present, they should overwrite the existing raw dataset entries for the same position.
1 parent 85081c4 commit 9b52fa6

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/murfey/workflows/clem/register_preprocessing_results.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,13 @@ class CLEMPreprocessingResult(BaseModel):
5959
@cached_property
6060
def is_denoised(self) -> bool:
6161
"""
62-
The "_Lng_LVCC" suffix appended to a CLEM dataset's position name indicates
63-
that it's a denoised image set of the same position. These results should
64-
override or supersede the original ones once they're available.
62+
The "_Lng_LVCC" and "_Lng_SVCC" suffixes appended to a CLEM dataset's position
63+
name indicate that it's a denoised image set of the same position. They should
64+
override or supersede the original ones if they're present
6565
"""
66-
return "_Lng_LVCC" in self.series_name
66+
return any(
67+
pattern in self.series_name for pattern in ("_Lng_LVCC", "_Lng_SVCC")
68+
)
6769

6870
# Valid Pydantic decorator not supported by MyPy
6971
@computed_field # type: ignore
@@ -73,7 +75,7 @@ def site_name(self) -> str:
7375
Extract just the name of the site by removing the "_Lng_LVCC" suffix from
7476
the series name.
7577
"""
76-
return self.series_name.replace("_Lng_LVCC", "")
78+
return self.series_name.replace("_Lng_LVCC", "").replace("_Lng_SVCC", "")
7779

7880
# Valid Pydantic decorator not supported by MyPy
7981
@computed_field # type: ignore

0 commit comments

Comments
 (0)