Analysis¶
basic ¶
Basic calibrated image operations.
stats ¶
Intensity statistics and an estimate of the noise (Gaussian sigma) and SNR.
calibrate ¶
Set or correct the pixel size (e.g. from a calibration standard); the reason is kept.
denoise ¶
'nlm' (non-local means), 'gaussian' or 'median'.
subtract_background ¶
subtract_background(ds: Dataset, sigma_nm: Optional[float] = None, sigma_px: float = 50.0) -> Dataset
Remove slow shading by subtracting a wide Gaussian blur.
fft ¶
Power spectrum with reciprocal-space axes in 1/nm (1/px when uncalibrated).
radial_profile ¶
Azimuthal average around the centre; on a power spectrum, peaks give lattice or feature periodicities.
line_profile ¶
line_profile(ds: Dataset, start: tuple[float, float], end: tuple[float, float], width: int = 1) -> pd.DataFrame
Intensity along a line between (y, x) pixel positions, averaged over width pixels.
particles ¶
Particle / feature analysis in physical units.
threshold ¶
threshold(ds: Dataset, method: str = 'otsu', value: Optional[float] = None, dark: bool = False) -> Dataset
Binary mask: features brighter (or darker, dark=True) than the threshold.
particles ¶
particles(ds: Dataset, method: str = 'otsu', dark: bool = False, min_area_nm2: float = 0.0, exclude_border: bool = True, separate: bool = False, min_distance_nm: Optional[float] = None) -> pd.DataFrame
One row per particle: area, equivalent diameter, Feret, aspect ratio, circularity,
orientation and mean intensity, in nm. Accepts an image (thresholded with method)
or a mask; separate splits touching particles with a distance-transform watershed.