derotation.analysis.metrics#
This module contains functions to calculate metrics for the derotation
analysis. The ptd_of_most_detected_blob
function calculates the peak to
peak distance of the centers of the most detected blob in the derotated stack
across all frames. The function uses the blob_log
function from the
skimage.feature
module to detect the blobs and the DBSCAN algorithm from
the sklearn.cluster
module to cluster the blobs based on proximity. The
function returns the peak to peak distance of the centers of the most detected
blob.
Functions
|
Calculate the peak to peak distance of the centers of the most detected blob in the derotated stack across all frames. |
- derotation.analysis.metrics.ptd_of_most_detected_blob(mean_images_by_angle, plot=True, blob_log_kwargs={'max_sigma': 10, 'min_sigma': 7, 'overlap': 0, 'threshold': 0.95}, debug_plots_folder=PosixPath('/debug_plots'), image_names=['detected_blobs.png', 'most_detected_blob_centers.png'], DBSCAN_max_distance=10.0, clipping_percentiles=[99.0, 99.99])[source]#
Calculate the peak to peak distance of the centers of the most detected blob in the derotated stack across all frames.
- Parameters:
mean_images_by_angle (np.ndarray) – The derotated stack of images.
plot (bool, optional) – Whether to plot the detected blobs, by default True
blob_log_kwargs (_type_, optional) – The parameters for the blob detection algorithm, by default { “min_sigma”: 7, “max_sigma”: 10, “threshold”: 0.95, “overlap”: 0, }
debug_plots_folder (str, optional) – The folder to save the debugging plots, by default “/debug_plots”
image_names (List[str], optional) – The names of the images to save if plot is True, by default [“detected_blobs.png”, “most_detected_blob_centers.png”]
DBSCAN_max_distance (float, optional) – The maximum distance between two samples for one to be considered as in the neighborhood of the other, by default 10.0
clipping_percentiles (List[float], optional) – The percentiles to clip the images to, by default [99.0, 99.99]
- Returns:
The peak to peak distance of the centers of the most detected blob.
- Return type:
float