lumicks.pylake.kymo.Kymo¶
-
class
Kymo(name, file, start, stop, json)¶ A Kymograph exported from Bluelake
Parameters: - name : str
Kymograph name
- file : lumicks.pylake.File
Parent file. Contains the channel data.
- start : int
Start point in the relevant info wave.
- stop : int
End point in the relevant info wave.
- json : dict
Dictionary containing kymograph-specific metadata.
-
__init__(name, file, start, stop, json)¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(name, file, start, stop, json)Initialize self. from_dataset(h5py_dset, file)Construct a confocal class from dataset. plot_blue(**kwargs)Plot an image of the blue photon channel plot_green(**kwargs)Plot an image of the green photon channel plot_red(**kwargs)Plot an image of the red photon channel plot_rgb(**kwargs)Plot a full rbg kymograph image plot_with_force(force_channel, color_channel)Plot kymo with force channel downsampled over scan lines plot_with_position_histogram(color_channel)Plot kymo with histogram along position axis plot_with_time_histogram(color_channel[, …])Plot kymo with histogram along time axis save_tiff(filename[, dtype, clip])Save the RGB photon counts to a TIFF image Attributes
blue_imageblue_photon_countblue_powercenter_point_umReturns a dictionary of the x/y/z center coordinates of the scan (w.r.t. fast_axisgreen_imagegreen_photon_countgreen_powerhas_fluorescenceDeprecated since version 0.8.0.
has_forceDeprecated since version 0.8.0.
infowavejsonDeprecated since version 0.8.0.
line_time_secondsLine time in seconds pixels_per_linepixelsize_umReturns a Listof axes dimensions in um.red_imagered_photon_countred_powerrgb_imagescan_width_umReturns a Listof scan widths as configured in the Bluelake UI. The length of the listsize_umReturns a Listof scan sizes in um along axes.sted_powertimestampsTimestamps for image pixels, not for samples -
__getitem__(item)¶ All indexing is in timestamp units (ns)
-
classmethod
from_dataset(h5py_dset, file)¶ Construct a confocal class from dataset.
Parameters: - h5py_dset : h5py.Dataset
The original HDF5 dataset containing confocal scan information
- file : lumicks.pylake.File
The parent file. Used to loop up channel data
-
plot_blue(**kwargs)¶ Plot an image of the blue photon channel
Parameters: - **kwargs
Forwarded to
matplotlib.pyplot.imshow().
-
plot_green(**kwargs)¶ Plot an image of the green photon channel
Parameters: - **kwargs
Forwarded to
matplotlib.pyplot.imshow().
-
plot_red(**kwargs)¶ Plot an image of the red photon channel
Parameters: - **kwargs
Forwarded to
matplotlib.pyplot.imshow().
-
plot_rgb(**kwargs)¶ Plot a full rbg kymograph image
Parameters: - **kwargs
Forwarded to
matplotlib.pyplot.imshow().
-
plot_with_force(force_channel, color_channel, aspect_ratio=0.25, reduce=<function mean>, **kwargs)¶ Plot kymo with force channel downsampled over scan lines
Parameters: - force_channel: str
name of force channel to downsample and plot
- color_channel: str
color channel of kymo to plot (‘red’, ‘green’, ‘blue’, ‘rgb’)
- aspect_ratio: float
aspect ratio of the axes (i.e. ratio of y-unit to x-unit)
- reduce : callable
The
numpyfunction which is going to reduce multiple samples into one. Forwarded toSlice.downsampled_over()- **kwargs
Forwarded to
Slice.plot().
-
plot_with_position_histogram(color_channel, pixels_per_bin=1, hist_ratio=0.25, **kwargs)¶ Plot kymo with histogram along position axis
Parameters: - color_channel: str
color channel of kymo to plot (‘red’, ‘green’, ‘blue’, ‘rgb’).
- pixels_per_bin: int
number of pixels along position axis to bin together.
- hist_ratio: float
width of the histogram with respect to the kymo image.
- **kwargs
Forwarded to histogram bar plot.
-
plot_with_time_histogram(color_channel, pixels_per_bin=1, hist_ratio=0.25, **kwargs)¶ Plot kymo with histogram along time axis
Parameters: - color_channel: str
color channel of kymo to plot (‘red’, ‘green’, ‘blue’, ‘rgb’).
- pixels_per_bin: int
number of pixels along time axis to bin together.
- hist_ratio: float
height of the histogram with respect to the kymo image.
- **kwargs
Forwarded to histogram bar plot.
-
save_tiff(filename, dtype=<class 'numpy.float32'>, clip=False)¶ Save the RGB photon counts to a TIFF image
Parameters: - filename : str
The name of the TIFF file where the image will be saved.
- dtype : np.dtype
The data type of a single color channel in the resulting image.
- clip : bool
If enabled, the photon count data will be clipped to fit into the desired
dtype. This option is disabled by default: an error will be raise if the data does not fit.
-
center_point_um¶ Returns a dictionary of the x/y/z center coordinates of the scan (w.r.t. brightfield field of view)
-
has_fluorescence¶ Deprecated since version 0.8.0: By definition, confocal images always have fluorescence data.
-
has_force¶ Deprecated since version 0.8.0: This property is always False and therefore not needed.
-
json¶ Deprecated since version 0.8.0: Access to raw metadata will be removed in a future release. Use accessor properties instead. (see docs)
-
line_time_seconds¶ Line time in seconds
-
pixelsize_um¶ Returns a
Listof axes dimensions in um. The length of the list corresponds to the number of scan axes.
-
scan_width_um¶ - Returns a
Listof scan widths as configured in the Bluelake UI. The length of the list - corresponds to the number of scan axes. Note that these widths can deviate from the actual scan widths performed in practice
Deprecated since version 0.8.2: The property
scan_width_umhas been deprecated. Usesize_umto get the actual size of the scan. When performing a scan, Bluelake determines an appropriate scan width based on the desired pixel size and the desired scan width. This means that the size of the performed scan could deviate from the width provided in this property.- Returns a
-
size_um¶ Returns a
Listof scan sizes in um along axes. The length of the list corresponds to the number of scan axes.
-
timestamps¶ Timestamps for image pixels, not for samples
The returned array has the same shape as the
*_imagearrays.