PYME.LMVis.Extras.multiviewMapping module¶
- class PYME.LMVis.Extras.multiviewMapping.MultiviewMapper(visFr)¶
Bases:
object
multiviewMapper provides methods for registering multiview channels as acquired in multicolor or biplane imaging. Image frames for multiview data should have channels concatenated horizontally, such that the x-dimension is the only dimension that needs to be folded into the first channel. The shiftmaps are functions that interface like bivariate splines, but can be recreated from a dictionary of their fit-model parameters, which are stored in a dictionary in the shiftmap object. In the multiviewMapper class, shiftmaps for multiview data sources are stored in a dictionary of dictionaries. Each shiftmap is stored as a dictionary so that it can be easily written into a human-readable json file.
- OnAstigQualityControl(event=None)¶
- OnCalibrateShifts(event)¶
Generates multiview shiftmaps on bead-data. Only beads which show up in all channels are used to generate the shiftmap.
- Parameters
- searchRadius: Radius within which to clump bead localizations that appear in all channels. Units of pixels.
- OnCheckAstigmatismCalibration(event=None)¶
For use with dyes on a coverslip. NB localizations from transient frames should be filtered prior to calling this function
- Parameters
- event: GUI event
- Returns
- OnFindClumps(event=None)¶
Determines which localizations are likely to be the same molecule and assigns them the same label.
- Parameters
- gap_tolerance: number of frames acceptable for a molecule to go MIA and still be called the same molecule
when it returns
- radius_scale: multiplicative factor applied to the error_x term in deciding search radius for pairing
- radius_offset: term added to radius_scale*error_x to set search radius
- probeAwareClumping: boolean flag to tell FindClumps recipe module to cluster each probe separately
- OnFold(event=None)¶
See multiview.foldX. At this point the origin of x should be the corner of the concatenated frame. Note that a probe key will be mapped into the data source to designate colour channel, but the colour channel will not be selectable in the GUI until after mergeClumps is called (due to the possibility of using this module with ratio-metric data).
- Parameters
- None, but requires metadata.
- OnMapAstigmaticZ(event=None, useMD=True)¶
Uses sigmax and sigmay values from astigmatic fits to look up a z-position using calibration curves. See Analysis.points.astigmatism.astigTools.lookup_astig_z
- Parameters
- None
- OnMergeClumps(event=None)¶
Coalesces clusters of localization data considered to be the same molecule. See recipes.localizations.MergeClumps. Additionally, this function updates the colour filter after the merge, and updates the GUI to allow for selecting individual colour channels.
- Parameters
- None
- OnShiftCorrectFolded(event=None)¶
Applies chromatic shift correction to folded localization data that was acquired with an image splitting device, but localized without splitter awareness. See recipes.localizations.MultiviewShiftCorrect.
- Parameters
- None
- PYME.LMVis.Extras.multiviewMapping.Plug(visFr)¶
Plugs this module into the gui
- PYME.LMVis.Extras.multiviewMapping.plotFolded(X, Y, multiviewChannels, title='')¶
Plots localizations with color based on multiview channel Args:
X: array of localization x-positions Y: array of localization y-positions multiviewChannels: array of channel assignment of localizations title: title of plot
Returns: nothing