Coverage for ezstitcher/core/config.py: 100%

18 statements  

« prev     ^ index     » next       coverage.py v7.3.2, created at 2025-04-30 13:20 +0000

1""" 

2Configuration classes for ezstitcher. 

3 

4This module contains dataclasses for configuration of different components. 

5""" 

6 

7from dataclasses import dataclass, field 

8from typing import List, Optional 

9import logging 

10 

11logger = logging.getLogger(__name__) 

12 

13 

14@dataclass 

15class StitcherConfig: 

16 """Configuration for the Stitcher class.""" 

17 tile_overlap: float = 10.0 

18 max_shift: int = 50 

19 margin_ratio: float = 0.1 

20 pixel_size: float = 1.0 

21 

22 

23# FocusAnalyzerConfig has been removed in favor of direct parameters to FocusAnalyzer 

24 

25 

26@dataclass 

27class PipelineConfig: 

28 """Configuration for the pipeline orchestrator.""" 

29 # Directory configuration 

30 out_dir_suffix: str = "_out" # Default suffix for processing steps 

31 positions_dir_suffix: str = "_positions" # Suffix for position generation step 

32 stitched_dir_suffix: str = "_stitched" # Suffix for stitching step 

33 

34 # Processing configuration 

35 num_workers: int = 1 

36 well_filter: Optional[List[str]] = None 

37 

38 # Stitching configuration 

39 stitcher: StitcherConfig = field(default_factory=StitcherConfig)