Light Beads Microscopy#
This guide describes the data aquired on the optimized or high-res light-beads microscopy (LBM) module.
Current LBM data is aquired with ScanImage aquisition software.
Example Dataset
Example dataset collected by Kevin Barber with Dr. Alipasha Vaziri @ Rockefeller University.
Field |
Value |
---|---|
Animal |
mk301 |
Date |
2025-03-01 |
Virus |
jGCaMP8s |
Framerate |
17 Hz |
FOV |
900 µm × 900 µm |
Resolution |
2 µm × 2 µm × 16 µm |
Raw Data#
ScanImage Multi Region Of Interest (mROI) outputs raw .tiff
files made up of individual Regions of Interest (ROI's)
.
In its raw form, data is saved as a 3-dimensional multi-page tiff file with each ROI stacked vertically relative to the fast-galvo scan direction.
Each 2D image within this tiff file represents a page of the original document.
The location of each ROI is stored as a pixel coordinate used internally by the respective pipeline to orient each strip.
Frame Ordering#
ScanImage saves raw tiffs with each z-depth and timepoint interleaved [zT]:
frame0 = time0_plane1
frame1 = time0_plane2
frame2 = time0_plane3
frame3 = time1_plane1
frame4 = time1_plane2
Data organized this way is generally incompatible with downstream processing libraries like suite2p, CaImAn and EXTRACT.
For compatibility, we reorganize the frames as follows:
frame0 = time0_plane1
frame1 = time1_plane1
frame2 = time2_plane1
frame3 = time0_plane2
frame4 = time1_plane2
Raw data are stored first by z-plane, for each timepoint (1) before being deinterleaved (2). This example shows a session with 2 ROI’s shown vertically stacked with a black bar of ~14 pixels in between.#
Note on Frames
Before beginning the recording session, users have the option to split frames in the recording across multiple .tiff
files. This option is helpful as it requires less work in post-processing to ensure there isn’t too much computer memory being used.
Metadata#
The primary distinction between Light-Beads Microscopy datasets and standard 2p datasets are how the data is organized on disk.
This information is stored in the ScanImage Metadata.
Overview#
ScanImage stores metadata about image size, frame rate, resolution, and regions of interest within the raw .tiff
file.
Each pipeline handles this metadata for you, and provides an interface to use these values throughout the pipeline.
There is primary metadata, intended for use in a typical processing run. Many of these values are derived from less-pertinent (secondary) metadata shown below.
Note: With multi-ROI tiffs, the size of your tiff given by
image_size
will be different from the number of pixels in x and y. This is due to the time it takes the scanner to move onto subsequent ROI’s not being accounted for innum_pixel_xy
. Internally, each pipeline checks for these metadata attributes and adjusts the final image accordingly.
Usage#
Each pipeline comes stocked with methods to retrieve imaging metadata.
Python metadata is can be accessed with mbo_utilities.get_metadata()
.
objective_resolution: 157.5000
center_xy: [-15.2381 0]
size_xy: [3.8095 38.0952]
num_pixel_xy: [144 1200]
image_length: 2478
image_width: 145
num_planes: 30
num_rois: 4
num_frames: 1730
frame_rate: 9.608
fov: [600 600]
pixel_resolution: 1.0208
sample_format: 'int16'
MATLAB metadata can be retrieved with the get_metadata() utility funciton.
num_planes: 14
num_rois: 2
num_frames: 381
frame_rate: 17.0670
fov: [896 896]
pixel_resolution: 2
sample_format: 'int16'
roi_width_px: 224
roi_height_px: 448
tiff_length: 912
tiff_width: 224
raw_filename: "file.tif"
raw_filepath: "D:\Demo"
raw_fullfile: "D:\Demo\file.tif"
num_lines_between_scanfields: 16
center_xy: [2×1 double]
line_period: 6.3139e-05
scan_frame_period: 0.0586
size_xy: [2×1 double]
objective_resolution: 61
Array Terminology#
Light-beads microscopy is a 2-photon imaging paradigm based on ScanImage acquisition software.
Dimension |
Description |
---|---|
[X, Y] |
2D plane |
[X, Y, Z] |
z-stack |
[X, Y, T] |
2D timeseries |
[X, Y, Z, T] |
3D timeseries |