Skip to content

Commit 38107a8

Browse files
committed
Renamed 'CLEMAlignaAndMergeParameters' to 'CLEMProcessingParameters', and added the threshold at which a dataset is considered an Atlas database entry to it
1 parent a708188 commit 38107a8

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/murfey/util/processing_params.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,18 @@ def cryolo_model_path(visit: str, instrument_name: str) -> Path:
5454
return machine_config.default_model
5555

5656

57-
class CLEMAlignAndMergeParameters(BaseModel):
57+
class CLEMProcessingParameters(BaseModel):
58+
# Atlas vs GridSquare registration threshold
59+
atlas_threshold: float = 0.0015 # in m
60+
61+
# Image alignment and merging-specific parameters
5862
crop_to_n_frames: Optional[int] = 50
5963
align_self: Literal["enabled", ""] = "enabled"
6064
flatten: Literal["mean", "min", "max", ""] = "mean"
6165
align_across: Literal["enabled", ""] = "enabled"
6266

6367

64-
default_clem_align_and_merge_parameters = CLEMAlignAndMergeParameters()
68+
default_clem_processing_parameters = CLEMProcessingParameters()
6569

6670

6771
class SPAParameters(BaseModel):

src/murfey/workflows/clem/register_preprocessing_results.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from murfey.server import _transport_object
2323
from murfey.util.models import GridSquareParameters
2424
from murfey.util.processing_params import (
25-
default_clem_align_and_merge_parameters as processing_params,
25+
default_clem_processing_parameters as processing_params,
2626
)
2727
from murfey.workflows.clem import get_db_entry
2828
from murfey.workflows.clem.align_and_merge import submit_cluster_request
@@ -55,7 +55,7 @@ def _is_clem_atlas(result: CLEMPreprocessingResult):
5555
# If an image has a width/height of at least 1.5 mm, it should qualify as an atlas
5656
return (
5757
max(result.pixels_x * result.pixel_size, result.pixels_y * result.pixel_size)
58-
>= 0.0015 # In metres
58+
>= processing_params.atlas_threshold
5959
)
6060

6161

0 commit comments

Comments
 (0)