FilFinderPPP

class fil_finder.FilFinderPPP(image, wcs=None, mask=None, distance=None, save_name='FilFinderPPP_output')[source]

Bases: BaseInfoMixin, Skeleton3D

Extract and analyze filamentary structure from a 3D dataset.

Parameters:
image: `~numpy.ndarray`

A 3D array of the data to be analyzed.

mask: numpy.ndarray, optional

A pre-made, boolean mask may be supplied to skip the segmentation process. The algorithm will skeletonize and run the analysis portions only.

save_name: str, optional

Sets the prefix name that is used for output files.

Methods Summary

analyze_skeletons([compute_longest_path, ...])

create_mask([adapt_thresh, glob_thresh, ...])

Runs the segmentation process and returns a mask of the filaments found.

preprocess_image([skip_flatten, flatten_percent])

Preprocess and flatten the dataset before running the masking process.

Methods Documentation

analyze_skeletons(compute_longest_path=True, do_prune=True, verbose=False, save_png=False, save_name=None, prune_criteria='all', relintens_thresh=0.2, max_prune_iter=10, branch_thresh=<Quantity 0. pix>, test_print=False)[source]
create_mask(adapt_thresh=9, glob_thresh=0.0, ball_radius=2, min_object_size=81, max_hole_size=100, verbose=False, save_png=False, use_existing_mask=False, **adapt_kwargs)[source]

Runs the segmentation process and returns a mask of the filaments found.

Parameters:
glob_threshfloat, optional

Minimum value to keep in mask. Default is None.

verbosebool, optional

Enables plotting. Default is False.

save_pngbool, optional

Saves the plot in verbose mode. Default is False.

use_existing_maskbool, optional

If mask is already specified, enabling this skips recomputing the mask.

Attributes:
masknumpy.ndarray

The mask of the filaments.

preprocess_image(skip_flatten=False, flatten_percent=None)[source]

Preprocess and flatten the dataset before running the masking process.

Parameters:
skip_flattenbool, optional

Skip the flattening process and use the original image to construct the mask. Default is False.

flatten_percentint, optional

The percentile of the data (0-100) to set the normalization. Default is None.