Workflows¶
The command reference describes CLI usage. These entries document the corresponding Python calculations and workflow parameters.
Process an OPM acquisition using its recorded scan and camera calibration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root_path
|
Path
|
Raw acquisition store, or its containing directory for live processing. |
required |
deconvolve
|
bool
|
Apply Richardson–Lucy gradient-consensus deconvolution before saving. |
False
|
save_float32
|
bool
|
Preserve float32 intensities; False clips and casts final output to uint16. |
False
|
skip_empty_below
|
float or None
|
Calibrated signal cutoff for skipping empty channels; None disables skipping. |
None
|
skip_empty_min_signal_fraction
|
float
|
Minimum fraction of channel-volume pixels required above the cutoff. |
0.01
|
max_projection
|
bool
|
Write per-tile maximum-Z images; False also disables their fused mosaic. |
True
|
flatfield_correction
|
bool
|
Estimate or reuse illumination fields and divide calibrated data by them. |
False
|
create_fused_max_projection
|
bool
|
Fuse per-tile maximum-Z images using nominal stage placements. |
True
|
write_fused_max_projection_tiff
|
bool
|
Export the stage-placed maximum projection as OME-TIFF. |
False
|
z_downsample_level
|
int
|
Integer reduction factor along deskewed Z. |
2
|
crop_after_deskew
|
bool
|
Crop deskewed Y to the region with support across the complete Z range. |
False
|
time_range
|
tuple[int, int] or None
|
Start-inclusive, stop-exclusive time selection; None processes all times. |
None
|
pos_range
|
tuple[int, int] or None
|
Start-inclusive, stop-exclusive position selection; None processes all positions. |
None
|
eager_mode
|
bool
|
Use eager stopping for planar deconvolution; unused for skewed volumes. |
False
|
decon_crop_scan
|
int or None
|
Retained scan-plane chunk size for 3D deconvolution; None calibrates it automatically. |
None
|
decon_gpu_id
|
int
|
Zero-based CUDA device index used by the deconvolution solver. |
0
|
decon_verbose
|
int
|
Solver diagnostic verbosity, with zero suppressing iteration reports. |
1
|
decon_fallback_step_scan
|
int or None
|
Scan planes removed from a chunk after GPU allocation failure; None uses the solver default. |
None
|
decon_psf_paths
|
list[Path] or None
|
Channel-ordered PSF files; None generates theoretical PSFs. Planar processing uses a central Z slice of 3D PSFs. |
None
|
decon_scan_upsample
|
int or None
|
Experimental integer scan upsampling factor; None uses the standard solver. Requires 3D deconvolution and a full GPU volume. |
None
|
resume
|
bool
|
Reuse compatible output checkpoints; False overwrites this output run. |
False
|
output
|
Path or None
|
Output directory to create; None uses the acquisition directory. |
None
|
live
|
Path or None
|
Supplied CYX illumination TIFF enabling live processing; None processes offline. |
None
|
Returns:
| Type | Description |
|---|---|
None
|
Processed images and durable checkpoints are written to the output directory. |
Process a napari-selected world-space ROI and fuse its cropped tiles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root_path
|
Path
|
Raw acquisition path or directory containing its processing state. |
required |
roi_json
|
Path or None
|
ROI exported by display; None uses the input directory's default ROI. |
None
|
deconvolve
|
bool
|
Deconvolve the selected raw regions before deskewing. |
True
|
flatfield_correction
|
bool
|
Estimate or reuse illumination fields for camera-calibrated images. |
False
|
save_float32
|
bool
|
Save float32 intensities; False clips final output to uint16. |
False
|
z_downsample_level
|
int
|
Integer reduction factor along deskewed Z. |
2
|
crop_after_deskew
|
bool
|
General deskew crop option, which must be False for physical ROI crops. |
False
|
decon_crop_scan
|
int or None
|
Retained scan planes per deconvolution chunk; None selects automatically. |
None
|
decon_gpu_id
|
int
|
Zero-based CUDA device used for deconvolution. |
0
|
decon_verbose
|
int
|
Deconvolution diagnostic verbosity. |
1
|
decon_psf_paths
|
list[Path] or None
|
Channel-ordered PSF files; None generates theoretical PSFs. |
None
|
registration_channel
|
int
|
Channel used to align cropped tiles during fusion. |
0
|
resume
|
bool
|
Continue completed tile and channel checkpoints; False overwrites output. |
True
|
output
|
Path or None
|
Output directory; None uses |
None
|
Returns:
| Type | Description |
|---|---|
None
|
Cropped tiles and checkpoints are saved, with fused outputs when the ROI spans multiple positions. |
Register processed OPM tiles, fuse them, and save a maximum projection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root_path
|
Path
|
Raw acquisition path, processed tile store, or processing output directory. |
required |
registration_channel
|
int
|
Zero-based channel used to align overlapping tiles. |
0
|
blend_pixels
|
tuple[int, int, int]
|
Feathering widths in Z, Y, and X pixels at each tile edge. |
(20, 600, 400)
|
downsample_factors
|
tuple[int, int, int]
|
Z, Y, and X sampling factors used during overlap registration. |
(3, 5, 5)
|
ssim_window
|
int
|
Window width used to score registered overlaps with structural similarity. |
15
|
registration_threshold
|
float
|
Minimum structural similarity required to accept a pairwise registration. |
0.7
|
chunk_shape_yx
|
tuple[int, int]
|
Y and X dimensions of output fusion blocks. |
(1024, 1024)
|
fusion_ram_fraction
|
float
|
Fraction of available host RAM used to size concurrent fusion blocks. |
0.4
|
max_workers
|
int or None
|
CPU fusion workers; None uses up to eight physical cores. |
None
|
max_in_flight_writes
|
int
|
Maximum queued fusion-block writes before waiting for disk output. |
2
|
optimization_rel_threshold
|
float
|
Median-residual multiplier used to reject registration outliers. |
0.5
|
optimization_abs_threshold
|
float
|
Minimum residual cutoff in effective registration sampling bins. |
1.5
|
max_registration_shift_zyx
|
tuple[int, int, int] or None
|
Maximum ZYX corrections in pixels; None derives limits from stage spacing and scan geometry for each overlap. |
None
|
normalize_depth_intensity
|
bool
|
Match registered depth layers using channel gains shared across XY tiles at each depth and timepoint. Save the gains alongside the fused image. |
True
|
require_gpu
|
bool
|
Require CUDA registration instead of allowing the CPU backend. |
False
|
regenerate_max_z
|
bool
|
Regenerate all maximum-Z pyramid levels from the existing fused image without registering or fusing tiles again. |
False
|
roi
|
Path or None
|
Display-exported ROI restricting positions and fused YX bounds while retaining every Z plane; None fuses the full acquisition. |
None
|
Returns:
| Type | Description |
|---|---|
None
|
Registered fused data and its maximum-Z pyramid are written to disk. |
Write one fused image as tiled OME-BigTIFF without changing its pixels.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
Path
|
Fused volume or fused maximum-Z OME-Zarr Image group. |
required |
output
|
Path
|
Destination OME-TIFF file, replaced after a successful export. |
required |
template
|
OME
|
Source OME metadata containing available channels, instrument details, acquisition date, timing, and annotations. Its image geometry is replaced with the fused level-zero NGFF geometry. |
required |
provenance
|
dict[str, str]
|
JSON-encoded acquisition and processing records for OME annotations. |
required |
workers
|
int
|
Number of TIFF compression workers; reads and buffering remain bounded. |
4
|