PYME.recipes.multiview module

class PYME.recipes.multiview.CalibrateShifts(parent=None, invalidate_parent=True, **kwargs)

Bases: ModuleBase

Generates multiview shiftmaps from (folded) bead-data localizations. Only beads which show up in all channels are used to generate the shiftmaps

Parameters
input_nametraits.Input

localizations as PYME.IO.Tabular types

search_radius_nmtraits.Float

radius within which bead localizations should be clumped if the bead appears in all channels. Units of nm.

Returns
output_nametraits.Output

output is a PYME.IO.tabular type with some relevant information stored in the metadata

execute(namespace)

takes a namespace (a dictionary like object) from which it reads its inputs and into which it writes outputs

NOTE: This was previously the function to define / override to make a module work. To support automatic metadata propagation and reduce the ammount of boiler plate, new modules should override the run() method instead.

input_name = <PYME.recipes.traits.Input object>
output_name = <PYME.recipes.traits.Output object>
search_radius_nm = <PYME.misc.mock_traits.Float object>
class PYME.recipes.multiview.ExtractMultiviewChannel(parent=None, invalidate_parent=True, **kwargs)

Bases: ModuleBase

Extract a single multiview channel

Parameters
input_namePYME.IO.image.ImageStack

input, with multiview metadata

view_numberint

which multiview view to extract for the new ImageStack. Number should match the multiview ROI number, not the number within the subset of active views. By default, 0

output_namePYME.IO.image.ImageStack

image cropped to contain a single multiview channel

Notes

Multiview metadata of the output image will not be updated other than to note which channel has been extracted. All downstream analyses should be not be multiview specific.

execute(namespace)

takes a namespace (a dictionary like object) from which it reads its inputs and into which it writes outputs

NOTE: This was previously the function to define / override to make a module work. To support automatic metadata propagation and reduce the ammount of boiler plate, new modules should override the run() method instead.

input_name = <PYME.recipes.traits.Input object>
output_name = <PYME.recipes.traits.Output object>
view_number = <PYME.misc.mock_traits.CStr object>
class PYME.recipes.multiview.FindClumps(parent=None, invalidate_parent=True, **kwargs)

Bases: ModuleBase

Cluster localizations which, e.g. represent the same fluorophore, with the option to only clump localizations if they are in the same color channel.

Parameters
input_nametraits.Input

localizations as PYME.IO.Tabular types

time_gap_tolerancetraits.Int

Number of frames which a localizations is allowed to be missing and still be considered the same molecule if it reappears

radius_scaletraits.Float

Factor by which the localization precision is multiplied to determine the search radius for clustering. The default of 2 sigma means that we link ~95% of the points which should be linked (if Gaussian statistics hold)

radius_offsettraits.Float

Extra offset (in nanometers) for cases where we want to link localizations despite poor channel alignment

probe_awaretraits.Bool

If False, clumps molecules regardless of probe/colorchannel. If True, the key ‘probe’ should be present in the input datasource in order to determine which color channel a localization resides in.

Returns
output_nametraits.Output

localizations as PYME.IO.Tabular type with clustered localizations typically denoted by the key ‘clumpIndex’

execute(namespace)

takes a namespace (a dictionary like object) from which it reads its inputs and into which it writes outputs

NOTE: This was previously the function to define / override to make a module work. To support automatic metadata propagation and reduce the ammount of boiler plate, new modules should override the run() method instead.

input_name = <PYME.recipes.traits.Input object>
output_name = <PYME.recipes.traits.Output object>
probe_aware = <PYME.misc.mock_traits.CStr object>
radius_offset = <PYME.misc.mock_traits.Float object>
radius_scale = <PYME.misc.mock_traits.Float object>
time_gap_tolerance = <PYME.misc.mock_traits.CStr object>
class PYME.recipes.multiview.Fold(parent=None, invalidate_parent=True, **kwargs)

Bases: ModuleBase

Fold localizations from images which have been taken with an image splitting device but analysed without channel awareness. Images taken in this fashion will have the channels side by side. This module folds the x co-ordinate to overlay the different channels, using the image metadata to determine the appropriate ROI boundaries.

The current implementation is somewhat limited as it only handles folding along the x axis, and assumes that ROI sizes and spacings are completely uniform.

Parameters
input_nametraits.Input

localizations as PYME.IO.Tabular types

Returns
output_nametraits.Output

localizations as PYME.IO.Tabular type with localizations folded

execute(namespace)

takes a namespace (a dictionary like object) from which it reads its inputs and into which it writes outputs

NOTE: This was previously the function to define / override to make a module work. To support automatic metadata propagation and reduce the ammount of boiler plate, new modules should override the run() method instead.

input_name = <PYME.recipes.traits.Input object>
output_name = <PYME.recipes.traits.Output object>
class PYME.recipes.multiview.MapAstigZ(parent=None, invalidate_parent=True, **kwargs)

Bases: ModuleBase

Uses astigmatism calibration (widths of PSF along each dimension as a function of z) to determine the z-position of localizations relative to the focal plane of the frame during which it was imaged.

Parameters
input_nametraits.Input

localizations as PYME.IO.Tabular types

astigmatism_calibration_locationtraits.File

file path or URL to astigmatism calibration file

Returns
output_nametraits.Output

output is a json wrapped by PYME.IO.ragged.RaggedCache

astigmatism_calibration_location = <PYME.recipes.traits.FileOrURI object>
execute(namespace)

takes a namespace (a dictionary like object) from which it reads its inputs and into which it writes outputs

NOTE: This was previously the function to define / override to make a module work. To support automatic metadata propagation and reduce the ammount of boiler plate, new modules should override the run() method instead.

input_name = <PYME.recipes.traits.Input object>
output_name = <PYME.recipes.traits.Output object>
rough_knot_spacing = <PYME.misc.mock_traits.Float object>
class PYME.recipes.multiview.MergeClumps(parent=None, invalidate_parent=True, **kwargs)

Bases: ModuleBase

Coalesces paired localizations that appeared on the same frame as determined by multiview.FindClumps

Parameters
input_nametraits.Input

localizations as PYME.IO.Tabular types

labelKeytraits.CStr

key to column of tabular input which contains clump ID of each localization. Localizations sharing the same clump ID will be coalesced.

Returns
output_nametraits.Output

localizations as PYME.IO.Tabular type with clustered localizations coalesced into individual localizations

execute(namespace)

takes a namespace (a dictionary like object) from which it reads its inputs and into which it writes outputs

NOTE: This was previously the function to define / override to make a module work. To support automatic metadata propagation and reduce the ammount of boiler plate, new modules should override the run() method instead.

input_name = <PYME.recipes.traits.Input object>
labelKey = <PYME.misc.mock_traits.CStr object>
output_name = <PYME.recipes.traits.Output object>
class PYME.recipes.multiview.ShiftCorrect(parent=None, invalidate_parent=True, **kwargs)

Bases: ModuleBase

Applies chromatic shift correction to folded localization data that was acquired with an image splitting device, but localized without splitter awareness.

Parameters
input_nametraits.Input

localizations as PYME.IO.Tabular types

shift_map_pathtraits.File

file path or URL of shift map to be applied

Returns
output_nametraits.Output

localizations as PYME.IO.Tabular type with clustered localizations typically denoted by the key ‘clumpIndex’

execute(namespace)

takes a namespace (a dictionary like object) from which it reads its inputs and into which it writes outputs

NOTE: This was previously the function to define / override to make a module work. To support automatic metadata propagation and reduce the ammount of boiler plate, new modules should override the run() method instead.

input_name = <PYME.recipes.traits.Input object>
output_name = <PYME.recipes.traits.Output object>
shift_map_path = <PYME.recipes.traits.FileOrURI object>