lumicks.pylake.scan.Scan¶
-
class
Scan
(name, file, start, stop, json)¶ A confocal scan exported from Bluelake
Parameters: - name : str
Scan 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 scan-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. export_video_blue
(file_name[, start_frame, …])Export multi-frame scan as video. export_video_green
(file_name[, start_frame, …])Export multi-frame scan as video. export_video_red
(file_name[, start_frame, …])Export multi-frame scan as video. export_video_rgb
(file_name[, start_frame, …])Export multi-frame scan as video. 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 save_tiff
(filename[, dtype, clip])Save the RGB photon counts to a TIFF image Attributes
blue_image
blue_photon_count
blue_power
center_point_um
Returns a dictionary of the x/y/z center coordinates of the scan (w.r.t. fast_axis
green_image
green_photon_count
green_power
has_fluorescence
Deprecated since version 0.8.0.
has_force
Deprecated since version 0.8.0.
infowave
json
Deprecated since version 0.8.0.
lines_per_frame
num_frames
pixels_per_line
pixelsize_um
Returns a List
of axes dimensions in um.red_image
red_photon_count
red_power
rgb_image
scan_width_um
Returns a List
of scan widths as configured in the Bluelake UI. The length of the listsize_um
Returns a List
of scan sizes in um along axes.sted_power
timestamps
Timestamps for image pixels, not for samples -
export_video_blue
(file_name, start_frame=None, end_frame=None, fps=15, **kwargs)¶ Export multi-frame scan as video.
Parameters: - file_name : str
File name to export to.
- start_frame : int
Initial frame.
- end_frame : int
Last frame.
- fps : int
Frames per second.
- **kwargs
Forwarded to
matplotlib.pyplot.imshow()
.
-
export_video_green
(file_name, start_frame=None, end_frame=None, fps=15, **kwargs)¶ Export multi-frame scan as video.
Parameters: - file_name : str
File name to export to.
- start_frame : int
Initial frame.
- end_frame : int
Last frame.
- fps : int
Frames per second.
- **kwargs
Forwarded to
matplotlib.pyplot.imshow()
.
-
export_video_red
(file_name, start_frame=None, end_frame=None, fps=15, **kwargs)¶ Export multi-frame scan as video.
Parameters: - file_name : str
File name to export to.
- start_frame : int
Initial frame.
- end_frame : int
Last frame.
- fps : int
Frames per second.
- **kwargs
Forwarded to
matplotlib.pyplot.imshow()
.
-
export_video_rgb
(file_name, start_frame=None, end_frame=None, fps=15, **kwargs)¶ Export multi-frame scan as video.
Parameters: - file_name : str
File name to export to.
- start_frame : int
Initial frame.
- end_frame : int
Last frame.
- fps : int
Frames per second.
- **kwargs
Forwarded to
matplotlib.pyplot.imshow()
.
-
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()
.
-
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)
-
pixelsize_um
¶ Returns a
List
of axes dimensions in um. The length of the list corresponds to the number of scan axes.
-
scan_width_um
¶ - Returns a
List
of 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_um
has been deprecated. Usesize_um
to 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
List
of 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
*_image
arrays.