Step Configs & Info
Each pipeline step is driven by a config struct and returns a typed info struct. See The Pipeline Model for how analyze dispatches on these types, and Pipeline Steps: Overview for the per-step reference pages.
Step Configs
Native to SMLMAnalysis:
SMLMAnalysis.DetectFitConfig — Type
DetectFitConfig <: AbstractSMLMConfigCombined detection and fitting step. Detects ROIs via SMLMBoxer and fits localizations via GaussMLE in a single step, with per-dataset processing.
Embedded Configs
boxer::BoxerConfig: Detection parameters (boxsize, minphotons, psfsigma, etc.)fitter::GaussMLEConfig: Fitting parameters (psf_model, iterations, constraints, etc.)
Data Source Keywords (for file-based workflows)
path: Single H5 file pathpaths: Vector of H5 file paths (one per dataset)dataset_frames: Explicit frame ranges per dataseth5_format::auto,:smart, or:mic
Dataset Selection
datasets: OptionalAbstractVector{Int}(e.g.1:19or[1,2,3,5]) selecting a subset of the resolved source slots. Applies uniformly across all source modes: MIC auto-blocks, multi-pathpaths, explicitdataset_frames, and in-memoryVector{Array}input. Selected slots are reindexed to contiguous1:length(datasets)in the output SMLD (original source indices preserved inDetectFitInfo.selected_source_indices). Defaultnothinguses all resolved slots.
SMLMAnalysis.FilterConfig — Type
FilterConfig <: AbstractSMLMConfigQuality-based filtering of localizations. All criteria use (min, max) tuples.
Keywords
photons: Photon count range, e.g.(500.0, Inf)precision: Lateral localization precision range in microns,max(σ_x, σ_y), e.g.(0.0, 0.007)pvalue: Goodness-of-fit p-value range, e.g.(1e-3, 1.0)psf_sigma: PSF width filter.:autouses mode ± 10%, or explicit(min, max)in micronsz: Axial position range in microns (3D fits only), e.g.(-0.4, 0.4). Useful to drop localizations railed to the z-grid edge. No-op on 2D SMLDs.sigma_z: Axial precision range in microns (3D fits only), e.g.(0.0, 0.030). The axial analog ofprecision. No-op on 2D SMLDs.
All filters default to nothing (disabled).
SMLMAnalysis.IntensityFilterConfig — Type
IntensityFilterConfig <: AbstractSMLMConfigIntensity-based multi-emitter rejection. Estimates the spatially-varying expected single-emitter photon rate and rejects localizations whose photon count is statistically inconsistent with single-emitter emission (Poisson upper-tail test).
The rate estimate uses the rate_percentile of the per-bin photon distribution (default: 95th percentile). This captures the upper bound of single-emitter emission at each spatial position, accounting for both excitation field variation and stochastic on-time variance. The Gaussian field fit then smooths across bins.
Keywords
cutoff::Float64: P-value cutoff; emitters with p < cutoff are rejected (default: 0.01)field_mode::Symbol: Excitation field model —:uniform(single global rate) or:gaussian(spatially-varying Gaussian beam fit) (default::gaussian)n_bins::Int: Spatial grid bins per axis for field estimation (default: 10)min_bin_count::Int: Minimum emitters per bin for rate estimation (default: 30)rate_percentile::Float64: Percentile of per-bin photon distribution used as the expected single-emitter rate (default: 0.95). Higher = more permissive.
SMLMAnalysis.DensityFilterConfig — Type
DensityFilterConfig <: AbstractSMLMConfigDensity-based filtering that removes isolated localizations lacking nearby neighbors.
Keywords
n_sigma: Search radius in localization uncertainty units (default: 2.0)min_neighbors: Minimum neighbor count.:autouses valley detection between isolated and clustered populations (default::auto)
Re-exported from upstream packages (the owning package documents the algorithm; SMLMAnalysis dispatches analyze on these types — see The Pipeline Model):
SMLMAnalysis.FrameConnectConfig — Type
FrameConnectConfigConfiguration parameters for frame connection algorithm.
Fields
n_density_neighbors::Int=2: Number of nearest preclusters used for local density estimates (seeestimatedensities)max_sigma_dist::Float64=5.0: Multiplier of localization errors that defines a pre-clustering distance threshold (seeprecluster)max_frame_gap::Int=5: Maximum frame gap between temporally adjacent localizations in a precluster (seeprecluster)max_neighbors::Int=2: Maximum number of nearest-neighbors inspected for precluster membership (seeprecluster)track_length::Union{Tuple{Float64,Float64}, Nothing}=nothing: Inclusive(min, max)range on the number of localizations a track must contain to be emitted as a combined localization (lo <= nperID <= hi). Counts localizations sharing atrack_id, not temporal frame-span.nothing(default) disables filtering. Use(2.0, Inf)to drop single-frame blinks, or(2.0, 50.0)to also drop over-long tracks (e.g. fiducials, sticky docking strands in dense DNA-PAINT). Mirrors the(min, max)filter idiom used elsewhere in the ecosystem. Seecombinelocalizations.calibration::Union{CalibrationConfig, Nothing}=nothing: Optional uncertainty calibration
Example
# Without calibration (default)
(combined, info) = frameconnect(smld)
# With calibration
config = FrameConnectConfig(calibration=CalibrationConfig())
(combined, info) = frameconnect(smld, config)
# With calibration + chi2 filtering
config = FrameConnectConfig(
calibration=CalibrationConfig(filter_high_chi2=true, chi2_filter_threshold=4.0)
)
(combined, info) = frameconnect(smld, config)SMLMAnalysis.CalibrationConfig — Type
CalibrationConfigConfiguration for optional uncertainty calibration within frame connection.
Calibration analyzes frame-to-frame jitter within connected tracks to estimate a motion variance (σ_motion²) and CRLB scale factor (k²), then applies corrected uncertainties before track combination: Σ_corrected = σ_motion² I + k² Σ_CRLB.
Fields
clamp_k_to_one::Bool=true: Clamp k_scale to minimum of 1.0 (CRLB is a lower bound)filter_high_chi2::Bool=false: Filter tracks with high chi² pairs before fittingchi2_filter_threshold::Float64=6.0: Chi² threshold for track filtering (per pair)
SMLMAnalysis.DriftConfig — Type
DriftConfig <: AbstractSMLMConfigConfiguration for drift correction, holding all algorithm parameters. Constructed with keyword arguments; all fields have sensible defaults.
Fields
| Field | Default | Description |
|---|---|---|
quality | :singlepass | Quality tier: :fft, :singlepass, or :iterative |
degree | 2 | Legendre polynomial degree for intra-dataset drift |
dataset_mode | :registered | Multi-dataset handling: :registered or :continuous |
chunk_frames | 0 | Split datasets into chunks of N frames (0 = no chunking) |
n_chunks | 0 | Alternative: number of chunks per dataset (0 = use chunk_frames) |
maxn | 100 | Maximum neighbors for entropy calculation |
max_iterations | 10 | Maximum iterations for :iterative mode |
convergence_tol | 0.001 | Convergence tolerance in μm for :iterative mode |
warm_start | nothing | Previous info.model for warm starting optimization |
verbose | 0 | Verbosity level: 0=quiet, 1=info, 2=debug |
auto_roi | false | Use dense ROI subset for faster estimation |
σ_loc | 0.010 | Typical localization precision (μm) for ROI sizing |
σ_target | 0.001 | Target drift precision (μm) for ROI sizing |
roi_safety_factor | 4.0 | Safety multiplier for required localizations |
Example
julia> config = DriftConfig(quality=:iterative, degree=3);
julia> config.quality
:iterative
julia> config.degree
3
julia> config.convergence_tol
0.001SMLMAnalysis.RenderConfig — Type
RenderConfig <: AbstractSMLMConfigFlat rendering configuration. Fields correspond 1:1 with render() keyword arguments.
Fields
strategy::RenderingStrategy: Rendering algorithm (default:GaussianRender())pixel_size::Union{Float64, Nothing}: Pixel size in nm (data bounds mode)zoom::Union{Float64, Nothing}: Zoom factor (camera FOV mode)roi::Union{Tuple, Nothing}: Camera pixel ROI as(x_range, y_range)target::Union{Image2DTarget, Nothing}: Explicit target specificationcolormap::Union{Symbol, Nothing}: Intensity-based colormap (:inferno,:viridis, etc.)color_by::Union{Symbol, Nothing}: Field for field-based coloring (:z,:photons, etc.)color::Union{RGB, Symbol, Nothing}: Manual colorcategorical::Bool: Use categorical palette for integer fields (default:false)clip_percentile::Union{Float64, Nothing}: Intensity clipping percentile (default:0.99). Usenothingfor saturate mode (no normalization, values can exceed 1.0).field_range::Union{Tuple{Float64,Float64}, Symbol}: Value range or:autofield_clip_percentiles::Union{Tuple{Float64,Float64}, Nothing}: Percentile clippingbackend::Symbol: Computation backend (default::cpu)filename::Union{String, Nothing}: Save to file if providedscalebar::Bool: Enable scale bar overlay (default:false)scalebar_length::Union{Float64, Nothing}: Physical length in μm (nothing= auto)scalebar_position::Symbol: Corner position (:br,:bl,:tr,:tl)scalebar_color::Symbol: Bar color (:whiteor:black)
SMLMAnalysis.BaGoLConfig — Type
BaGoLConfig <: SMLMData.AbstractSMLMConfigConfiguration for BaGoL analysis. All fields correspond 1:1 to run_bagol kwargs.
Count Model
μ=10.0: Mean localizations per emittershape=2.0: Gamma shape (1=exponential/dSTORM, >1=peaked/DNA-PAINT)learn_distribution=true: Learn count params.true=both,false=fix both,:mu=learn μ only,:shape=learn shape onlygamma=nothing: DM concentration.nothing=use shape (default),Float64=fixedlearn_rho=true: Learn Poisson-K emitter density ρ independently of μ/shape. For fully fixed hyperparameters, set bothlearn_distribution=falseandlearn_rho=false.rho=nothing: Initial ρ in emitters per unit area. If provided withlearn_rho=false, hold this fixed for Fazel-style fixed-ρ-over-bounding-box flat Poisson-K runs.
MCMC
n_iterations=4000: Total MCMC iterationsburn_in=2000: Burn-in before accumulatingsync_interval=100: Iterations between global hierarchical updatesallocation_model=:dm::dm(Dirichlet-Multinomial),:decoupled(no partition prior), or:categorical(labeled K^(-N) — Fazel-equivalent when paired withspatial_model=:flat+k_prior=:none)spatial_model=:locmix::locmix(localization mixture) or:flatk_prior=:auto: K-prior gating.:autouses spatial-model default (Poisson(ρA) under:flat, none under:locmix);:poissonalways include (only valid with:flat);:nonealways disablen_restricted_scans=5: Jain-Neal restricted Gibbs scans for split/mergen_bd_substeps=5: Birth/death substeps per BD selection
Partitioning
partition_sigma=3.0: DBSCAN threshold in sigma units (Inf=no partitioning)min_partition_size=0: Minimum locs per partitionmax_partition_size=1000: METIS-split partitions larger than thisskip_partition_size=typemax(Int): Skip partitions larger than thisoverlap=:auto: Overlap width for bisected partitions (:autoor Float64 in μm)bridge_ratio=0.0: Optional bridge refinement strength for DBSCAN clustersmin_split_size=3: Minimum core component size for bridge refinement
Uncertainty Correction (standalone; 0 in the integrated pipeline)
se_adjust=:auto::autoruns the finder (estimate_se_adjust) and uses τ̂ (skipped if the SMLD is already σ-corrected);0.0= no correction; a numeric value = manual τ (μm) added in quadrature to per-loc σ (σ²+τ²) — scalar,(τx,τy)tuple, length-N vector, or(τx_vec,τy_vec).force_se_adjust=false: Apply even if the SMLD is already σ-corrected.
Output
posterior_pixel_size=0.001: Rao-Blackwellized posterior image pixel size in μm (1 nm; 0.0=disable)archive_path=nothing: Mmap chain archive path (nothing=disable)progress_file=nothing: Write progress to file (nothing=disable)verbose=true: Print progress to stdout
CalibrationConfig configures uncertainty calibration inside FrameConnectConfig (via its calibration= field) — it is not a separate pipeline step. CalibrationResult holds its output.
Clustering (re-exported)
The clustering verbs cluster / cluster_statistics and their config types (DBSCANConfig, HDBSCANConfig, HierarchicalConfig, VoronoiConfig, HopkinsConfig, VoronoiDensityConfig) are re-exported from SMLMClustering and dispatched as pipeline steps — see Clustering. Their full API and algorithm reference lives in the SMLMClustering manual; SMLMAnalysis adds only the analyze() dispatch (it does not re-document the upstream API here).
Step Info Types
Each step's analyze() returns a StepInfo whose .info field holds the step's typed info struct.
SMLMAnalysis.DetectFitInfo — Type
DetectFitInfo <: AbstractSMLMInfoInfo from combined detection and fitting step.
selected_source_indices records the original source slot indices when DetectFitConfig.datasets selected a subset (e.g. [1,2,3,5,7] when a corrupted block was skipped). nothing means no selection was applied and the output datasets correspond 1:1 to the resolved source slots.
SMLMAnalysis.FilterInfo — Type
FilterInfo <: AbstractSMLMInfoInfo from quality filtering step.
SMLMAnalysis.IntensityFilterInfo — Type
IntensityFilterInfo <: AbstractSMLMInfoInfo from intensity-based multi-emitter rejection step.
Fields
n_before::Int: Emitter count before filteringn_after::Int: Emitter count after filteringfield_mode::Symbol: Actual field mode used (:uniformor:gaussian, may fallback)lambda_max_global::Float64: Global mode photon countfield_params::Union{NamedTuple, Nothing}: Gaussian field params(A, x0, y0, w, bg)or nothingfield_fit_r2::Float64: R² of field fit (0.0 for uniform)elapsed_s::Float64: Elapsed time (s)p2_estimate::Union{Float64, Nothing}: Estimated double-emitter fractionp2_tail_threshold::Float64: Normalized threshold used for p₂ estimationp2_tail_obs::Union{Float64, Nothing}: Observed tail mass fraction above thresholdp2_tail_f2::Union{Float64, Nothing}: Double-distribution tail mass fraction above threshold
SMLMAnalysis.DensityFilterInfo — Type
DensityFilterInfo <: AbstractSMLMInfoInfo from density-based filtering step.
SMLMAnalysis.BaGoLInfo — Type
BaGoLInfo <: AbstractSMLMInfoInfo from BaGoL grouping step.
Fields
n_locs_in::Int: Input localization countn_emitters::Int: Output emitter countcompression::Float64: Compression ratio (nlocsin / n_emitters)final_μ::Float64: Final mean localizations per emitterfinal_shape::Float64: Final NegBin shape parametern_partitions::Int: Number of spatial partitions useddiagnostics::SMLMBaGoL.BaGoLDiagnostics: Full diagnostics for advanced use
Some steps return their upstream packages' info structs: SMLMFrameConnection.FrameConnectInfo, SMLMDriftCorrection.DriftInfo, SMLMRender.RenderInfo, and the clustering ClusterInfo / ClusterStatisticsInfo — documented in those packages. The connected tracks and drift model are also surfaced on AnalysisResult as smld_connected and drift_model.