pysted.raster
Cython implementations of the raster functions
This module contains the Cython implementations of the raster functions. These functions are used to simulate the acquisition of a STED microscopy image. The Cython implementation is used to speed up the calculation of the raster function.
Functions
|
Raster and photobleaching implementation of a STED microscope acquisition. |
|
Implements the raster scanning and photobleaching of DyMIN microscopy |
|
Implements the raster scanning and photobleaching of RESCue microscopy |
|
Resets the probability of survival of the fluorophores in the mask to 1.0 |
- pysted.raster.raster_func_c_self_bleach_split_g(self, datamap, acquired_intensity, pixel_list, ratio, rows_pad, cols_pad, laser_pad, prob_ex, prob_sted, pdt_roi, p_ex_roi, p_sted_roi, bleach, bleached_sub_datamaps_dict, seed, bleach_func, sample_func, steps)
Raster and photobleaching implementation of a STED microscope acquisition.
raster_func_c_self_bleach
executes the simultaneous acquisition and bleaching routine for the case where the excitation power (p_ex) AND/OR sted power (p_sted) AND/OR pixel dwell time vary through the sample. This function thus requires these parameters to be passed as arrays of floats the same size as the ROI being imaged.Additionally, this function seperately bleaches the different parts composing the datamap (i.e. the base and flash components of the datamap are bleached separately).
To speed up the calculation, the position of the emitters are kept in memory and only those positions are updated by the bleaching method.
- Parameters:
datamap – The datamap on which the acquisition is done, either a Datamap object or TemporalDatamap
acquired_intensity – 2D array to store the acquired intensity
pixel_list – 2D array with the position of the pixels to be acquired
ratio – The ratio of the pixel size to the datamap pixel size
rows_pad – The number of rows to pad the datamap
cols_pad – The number of columns to pad the datamap
laser_pad – The number of pixels to pad the laser
prob_ex – 2D array with the probability of survival of the fluorophores under excitation
prob_sted – 2D array with the probability of survival of the fluorophores under sted
pdt_roi – 2D array with the pixel dwell time
p_ex_roi – 2D array with the excitation power
p_sted_roi – 2D array with the sted power
bleach – Boolean to indicate if the sample should be bleached
bleached_sub_datamaps_dict – Dictionary with the different parts of the datamap to be bleached
seed – Seed for the random number generator
bleach_func – Function to bleach the sample
sample_func – Function to sample the sample
steps – List with the different steps of the acquisition
- pysted.raster.raster_func_dymin(self, datamap, acquired_intensity, pixel_list, ratio, rows_pad, cols_pad, laser_pad, prob_ex, prob_sted, returned_photons, scaled_power, pdt_roi, p_ex_roi, p_sted_roi, bleach, bleached_sub_datamaps_dict, seed, bleach_func, sample_func, steps)
Implements the raster scanning and photobleaching of DyMIN microscopy
- Parameters:
datamap – The datamap on which the acquisition is done, either a Datamap object or TemporalDatamap
acquired_intensity – 2D array to store the acquired intensity
pixel_list – 2D array with the position of the pixels to be acquired
ratio – The ratio of the pixel size to the datamap pixel size
rows_pad – The number of rows to pad the datamap
cols_pad – The number of columns to pad the datamap
laser_pad – The number of pixels to pad the laser
prob_ex – 2D array with the probability of survival of the fluorophores under excitation
prob_sted – 2D array with the probability of survival of the fluorophores under sted
pdt_roi – 2D array with the pixel dwell time
p_ex_roi – 2D array with the excitation power
p_sted_roi – 2D array with the sted power
bleach – Boolean to indicate if the sample should be bleached
bleached_sub_datamaps_dict – Dictionary with the different parts of the datamap to be bleached
seed – Seed for the random number generator
bleach_func – Function to bleach the sample
sample_func – Function to sample the sample
steps – List with the different steps of the acquisition
- pysted.raster.raster_func_rescue(self, datamap, acquired_intensity, pixel_list, ratio, rows_pad, cols_pad, laser_pad, prob_ex, prob_sted, returned_photons, thresholds, pdt_roi, p_ex_roi, p_sted_roi, bleach, bleached_sub_datamaps_dict, seed, bleach_func, sample_func, steps)
Implements the raster scanning and photobleaching of RESCue microscopy
- Parameters:
datamap – The datamap on which the acquisition is done, either a Datamap object or TemporalDatamap
acquired_intensity – 2D array to store the acquired intensity
pixel_list – 2D array with the position of the pixels to be acquired
ratio – The ratio of the pixel size to the datamap pixel size
rows_pad – The number of rows to pad the datamap
cols_pad – The number of columns to pad the datamap
laser_pad – The number of pixels to pad the laser
prob_ex – 2D array with the probability of survival of the fluorophores under excitation
prob_sted – 2D array with the probability of survival of the fluorophores under sted
pdt_roi – 2D array with the pixel dwell time
p_ex_roi – 2D array with the excitation power
p_sted_roi – 2D array with the sted power
bleach – Boolean to indicate if the sample should be bleached
bleached_sub_datamaps_dict – Dictionary with the different parts of the datamap to be bleached
seed – Seed for the random number generator
bleach_func – Function to bleach the sample
sample_func – Function to sample the sample
steps – List with the different steps of the acquisition
- pysted.raster.reset_prob(mask, prob_ex, prob_sted)
Resets the probability of survival of the fluorophores in the mask to 1.0
- Parameters:
mask – list of tuples with the position of the fluorophores
prob_ex – 2D array with the probability of survival of the fluorophores under excitation
prob_sted – 2D array with the probability of survival of the fluorophores under sted