Subpixel fitting

Function to detect individual spot coordinate with a subpixel accuracy, fitting a gaussian signal.

bigfish.detection.fit_subpixel(image, spots, voxel_size, spot_radius)

Fit gaussian signal on every spot to find a subpixel coordinates.

Parameters:
imagenp.ndarray

Image with shape (z, y, x) or (y, x).

spotsnp.ndarray

Coordinate of the spots detected, with shape (nb_spots, 3) or (nb_spots, 2). One coordinate per dimension (zyx or yx coordinates).

voxel_sizeint, float, Tuple(int, float) or List(int, float)

Size of a voxel, in nanometer. One value per spatial dimension (zyx or yx dimensions). If it’s a scalar, the same value is applied to every dimensions.

spot_radiusint, float, Tuple(int, float) or List(int, float)

Radius of the spot, in nanometer. One value per spatial dimension (zyx or yx dimensions). If it’s a scalar, the same radius is applied to every dimensions.

Returns:
spots_subpixelnp.ndarray

Coordinate of the spots detected, with shape (nb_spots, 3) or (nb_spots, 2). One coordinate per dimension (zyx or yx coordinates).