roiextractors.example_datasets package#
Submodules#
roiextractors.example_datasets.toy_example module#
Toy example ImagingExtractor and SegmentationExtractor for testing.
Functions#
- toy_example
Create a toy example of an ImagingExtractor and a SegmentationExtractor.
- _generate_rois(num_units=10, size_x=100, size_y=100, roi_size=4, min_dist=5, mode='uniform')[source]#
Generate ROIs with given parameters.
- Parameters:
num_units (int) – Number of ROIs
size_x (int) – Size of x dimension (pixels)
size_y (int) – Size of y dimension (pixels)
roi_size (int) – Siz of ROI in x and y dimension (pixels)
min_dist (int) – Minimum distance between ROI centers (pixels)
mode (str) – ‘uniform’ or ‘gaussian’. If ‘uniform’, ROI values are uniform and equal to 1. If ‘gaussian’, ROI values are gaussian modulated
- Returns:
roi_pixels (list) – List of pixel coordinates for each ROI
image (np.ndarray) – Image with ROIs
means (list) – List of mean coordinates for each ROI
- toy_example(duration=10, num_rois=10, size_x=100, size_y=100, roi_size=4, min_dist=5, mode='uniform', sampling_frequency=30.0, decay_time=0.5, noise_std=0.05)[source]#
Create a toy example of an ImagingExtractor and a SegmentationExtractor.
- Parameters:
duration (float) – Duration in s
num_rois (int) – Number of ROIs
size_x (int) – Size of x dimension (pixels)
size_y (int) – Size of y dimension (pixels)
roi_size (int) – Size of ROI in x and y dimension (pixels)
min_dist (int) – Minimum distance between ROI centers (pixels)
mode (str) – ‘uniform’ or ‘gaussian’. If ‘uniform’, ROI values are uniform and equal to 1. If ‘gaussian’, ROI values are gaussian modulated
sampling_frequency (float) – The sampling rate
decay_time (float) – Decay time of fluorescence reponse
noise_std (float) – Standard deviation of added gaussian noise
- Returns:
imag (NumpyImagingExtractor) – The output imaging extractor
seg (NumpySegmentationExtractor) – The output segmentation extractor
Module contents#
Toy example ImagingExtractor and SegmentationExtractor for testing.
Modules#
- toy_example
Create a toy example of an ImagingExtractor and a SegmentationExtractor.
Functions#
- toy_example
Create a toy example of an ImagingExtractor and a SegmentationExtractor.