Open In Colab

Installing requirements¶

The cell below installs every Python package needed to run this notebook, at fully pinned versions, using uv for fast resolution. In Colab the cell is collapsed by default — click the ▶ button to run it.

In [1]:
# install cell skipped during CI (deps preinstalled into system Python)

⚠️ Restart runtime after install

The install may upgrade packages already loaded in the kernel. Go to Runtime → Restart session, then Run all cells below (skip this install cell on re-run).

Azcorra 2023 demo¶

This tutorial demonstrates how to access an NWB file from the DANDI:001038 dandiset using pynwb and dandi.

This session contains fiber photometry recordings from head-fixed mice running on a treadmill while receiving rewards and aversive air puffs in order to analyze differences or similarities in functional responses of different subtypes of striatonigral dopamine neurons.

Contents:

  • Streaming an NWB file
  • Access Subject Metadata
  • Access raw fiber photometry data
  • Access processed fiber photometry data
  • Access behavior
  • View NWB file

Streaming an NWB file ¶

This section demonstrates how to access the files on the DANDI Archive without downloading them. Based on the Streaming NWB files tutorial from PyNWB.

An NWBFile represents a single session of an experiment. Each NWBFile must have a session description, identifier, and session start time.

The dandi.dandiapi.DandiAPIClient can be used to get the S3 URL of the NWB file stored in the DANDI Archive.

In [2]:
from dandi.dandiapi import DandiAPIClient

client = DandiAPIClient.for_dandi_instance("dandi")

dandiset_id = "001038"
file_path = "sub-VGlut-A997/sub-VGlut-A997_ses-20200205-0001.nwb"

with DandiAPIClient() as client:
    asset = client.get_dandiset(dandiset_id, 'draft').get_asset_by_path(file_path)
    s3_url = asset.get_content_url(follow_redirects=1, strip_query=True)

We will use remfile for streaming the file. You can read more about remfile at this tutorial section.

In [3]:
import h5py
from pynwb import NWBHDF5IO
import remfile

# We stream the file using remfile and open it with h5py and pynwb
file = remfile.File(s3_url)
h5_file = h5py.File(file, "r")

io = NWBHDF5IO(file=h5_file, load_namespaces=True)
nwbfile = io.read()
nwbfile
/opt/hostedtoolcache/Python/3.13.15/x64/lib/python3.13/site-packages/hdmf/spec/namespace.py:620: UserWarning: Ignoring the following cached namespace(s) because another version is already loaded:
core - cached version: 2.7.0, loaded version: 2.8.0
The loaded extension(s) may not be compatible with the cached extension(s) in the file. Please check the extension documentation and ignore this warning if these versions are compatible.
  self.warn_for_ignored_namespaces(ignored_namespaces)
Out[3]:

root (NWBFile)

session_description: This session contains fiber photometry recordings from head-fixed mice running on a treadmill while receiving rewards and aversive air puffs in order to analyze differences or similarities in functional responses of different subtypes of striatonigral dopamine neurons.
identifier: d621fd32-9ad0-4120-a90e-6cc9ed546069
session_start_time2020-02-05 00:00:00-06:00
timestamps_reference_time2020-02-05 00:00:00-06:00
file_create_date
02024-07-11 16:37:31.836613+02:00
experimenter('Azcorra, Maite',)
related_publications('https://doi.org/10.1038/s41593-023-01401-9',)
acquisition
AirPuff (TimeSeries)
starting_time: 0.0
rate: 4000.2000543686745
resolution: -1.0
comments: no comments
description: The raw voltage trace from the air puff stimulus sensor collected at 4000 Hz by Picoscope.
conversion: 1.0
offset: 0.0
unit: Volts
data
HDF5 dataset
Data typefloat32
Shape(6761014,)
Array size25.79 MiB
Chunk shape(2500000,)
Compressiongzip
Compression opts4
Uncompressed size (bytes)27044056
Compressed size (bytes)8128605
Compression ratio3.327023025476081
starting_time_unit: seconds
FiberPhotometryResponseSeries (FiberPhotometryResponseSeries)
starting_time: 0.0
rate: 100.0
resolution: -1.0
comments: no comments
description: Raw green fluorescence collected during 470 nm illumination re-binned to 100 Hz and acquired with one or two optical fibers.
conversion: 1.0
offset: 0.0
unit: n.a.
data
HDF5 dataset
Data typefloat64
Shape(169024, 2)
Array size2.58 MiB
Chunk shape(169024, 2)
Compressiongzip
Compression opts4
Uncompressed size (bytes)2704384
Compressed size (bytes)1137393
Compression ratio2.377704100517587
starting_time_unit: seconds
fiber_photometry_table_region (DynamicTableRegion)
description: source fibers
table (FiberPhotometryTable)
description: Contains the metadata for the fiber photometry experiment.
columns
location
Location of fiber.
indicator
Link to the indicator object.
optical_fiber
Link to the optical fiber device.
excitation_source
Link to the excitation source device.
photodetector
Link to the photodetector device.
dichroic_mirror
Link to the dichroic mirror device.
fiber_depth_in_mm
The depth of the optical fiber in the unit of millimeters.
baseline_fluorescence
The baseline fluorescence value for each fiber.
normalized_fluorescence
The normalized fluorescence value for each fiber.
recording_target_type
Defines whether recordings are made in axons vs cell bodies.
signal_to_noise_ratio
The signal to noise ratio for each fiber.
cross_correlation_with_acceleration
The cross-correlation between ΔF/F and acceleration.
coordinates
Fiber placement in stereotactic coordinates (AP, ML, DV) mm relative to Bregma.
emission_filter
Link to the emission filter device.
excitation_filter
Link to the excitation filter device.
table
location indicator optical_fiber excitation_source photodetector dichroic_mirror fiber_depth_in_mm baseline_fluorescence normalized_fluorescence recording_target_type signal_to_noise_ratio cross_correlation_with_acceleration coordinates emission_filter excitation_filter
id
0 SNc GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber1 abc.OpticalFiber at 0x139836832922464\nFields:\n core_diameter_in_um: 200.0\n description: The optical fiber used to record the GCaMP fluorescence from the SNc brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource470 abc.ExcitationSource at 0x139836830370064\nFields:\n description: Blue excitation light (470 nm LED, Thorlabs, M70F3) and violet excitation light (for the isosbestic control)\nwere coupled into the optic fiber such that a power of 0.75 mW was delivered to the fiber tip.\nThen, 470 nm and 405 nm excitation were alternated at 100 Hz using a waveform generator,\neach filtered with a corresponding filter.\n\n excitation_wavelength_in_nm: 470.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M70F3\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 3.6 1.041767 0.686421 cell bodies in SNc 18.898114 0.067393 [nan, nan, nan] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter470 abc.BandOpticalFilter at 0x139836830371024\nFields:\n bandwidth_in_nm: 30.0\n center_wavelength_in_nm: 472.0\n description: The band-pass filter used to isolate the 470 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF02-472/30-25\n
1 TS GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber2 abc.OpticalFiber at 0x139836830370384\nFields:\n core_diameter_in_um: 200.0\n description: The second optical fiber used to record the GCaMP fluorescence from the TS brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource470 abc.ExcitationSource at 0x139836830370064\nFields:\n description: Blue excitation light (470 nm LED, Thorlabs, M70F3) and violet excitation light (for the isosbestic control)\nwere coupled into the optic fiber such that a power of 0.75 mW was delivered to the fiber tip.\nThen, 470 nm and 405 nm excitation were alternated at 100 Hz using a waveform generator,\neach filtered with a corresponding filter.\n\n excitation_wavelength_in_nm: 470.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M70F3\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 1.0 1.050157 0.053596 axons in striatum 0.000000 0.014802 [3.0748749730962577, -0.58, 2.1599445426572172] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter470 abc.BandOpticalFilter at 0x139836830371024\nFields:\n bandwidth_in_nm: 30.0\n center_wavelength_in_nm: 472.0\n description: The band-pass filter used to isolate the 470 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF02-472/30-25\n
2 SNc GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber1 abc.OpticalFiber at 0x139836832922464\nFields:\n core_diameter_in_um: 200.0\n description: The optical fiber used to record the GCaMP fluorescence from the SNc brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource405 abc.ExcitationSource at 0x139836832922128\nFields:\n description: Violet LED (405 nm, Thorlabs, M405FP1) for the isosbestic control.\n excitation_wavelength_in_nm: 405.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M405FP1\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 3.6 1.041767 0.686421 cell bodies in SNc 18.898114 0.067393 [nan, nan, nan] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter405 abc.BandOpticalFilter at 0x139836830370704\nFields:\n bandwidth_in_nm: 15.0\n center_wavelength_in_nm: 406.0\n description: The band-pass filter used to isolate the 405 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-406/15-25\n
3 TS GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber2 abc.OpticalFiber at 0x139836830370384\nFields:\n core_diameter_in_um: 200.0\n description: The second optical fiber used to record the GCaMP fluorescence from the TS brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource405 abc.ExcitationSource at 0x139836832922128\nFields:\n description: Violet LED (405 nm, Thorlabs, M405FP1) for the isosbestic control.\n excitation_wavelength_in_nm: 405.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M405FP1\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 1.0 1.050157 0.053596 axons in striatum 0.000000 0.014802 [3.0748749730962577, -0.58, 2.1599445426572172] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter405 abc.BandOpticalFilter at 0x139836830370704\nFields:\n bandwidth_in_nm: 15.0\n center_wavelength_in_nm: 406.0\n description: The band-pass filter used to isolate the 405 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-406/15-25\n
FiberPhotometryResponseSeriesIsosbestic (FiberPhotometryResponseSeries)
starting_time: 0.0
rate: 100.0
resolution: -1.0
comments: no comments
description: Raw green fluorescence collected at its isosbestic wavelength (405 nm) re-binned to 100 Hz and acquired with one or two optical fibers.
conversion: 1.0
offset: 0.0
unit: n.a.
data
HDF5 dataset
Data typefloat64
Shape(169024, 2)
Array size2.58 MiB
Chunk shape(169024, 2)
Compressiongzip
Compression opts4
Uncompressed size (bytes)2704384
Compressed size (bytes)1134038
Compression ratio2.3847384302818777
starting_time_unit: seconds
fiber_photometry_table_region (DynamicTableRegion)
description: source fibers
table (FiberPhotometryTable)
description: Contains the metadata for the fiber photometry experiment.
columns
location
Location of fiber.
indicator
Link to the indicator object.
optical_fiber
Link to the optical fiber device.
excitation_source
Link to the excitation source device.
photodetector
Link to the photodetector device.
dichroic_mirror
Link to the dichroic mirror device.
fiber_depth_in_mm
The depth of the optical fiber in the unit of millimeters.
baseline_fluorescence
The baseline fluorescence value for each fiber.
normalized_fluorescence
The normalized fluorescence value for each fiber.
recording_target_type
Defines whether recordings are made in axons vs cell bodies.
signal_to_noise_ratio
The signal to noise ratio for each fiber.
cross_correlation_with_acceleration
The cross-correlation between ΔF/F and acceleration.
coordinates
Fiber placement in stereotactic coordinates (AP, ML, DV) mm relative to Bregma.
emission_filter
Link to the emission filter device.
excitation_filter
Link to the excitation filter device.
table
location indicator optical_fiber excitation_source photodetector dichroic_mirror fiber_depth_in_mm baseline_fluorescence normalized_fluorescence recording_target_type signal_to_noise_ratio cross_correlation_with_acceleration coordinates emission_filter excitation_filter
id
0 SNc GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber1 abc.OpticalFiber at 0x139836832922464\nFields:\n core_diameter_in_um: 200.0\n description: The optical fiber used to record the GCaMP fluorescence from the SNc brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource470 abc.ExcitationSource at 0x139836830370064\nFields:\n description: Blue excitation light (470 nm LED, Thorlabs, M70F3) and violet excitation light (for the isosbestic control)\nwere coupled into the optic fiber such that a power of 0.75 mW was delivered to the fiber tip.\nThen, 470 nm and 405 nm excitation were alternated at 100 Hz using a waveform generator,\neach filtered with a corresponding filter.\n\n excitation_wavelength_in_nm: 470.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M70F3\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 3.6 1.041767 0.686421 cell bodies in SNc 18.898114 0.067393 [nan, nan, nan] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter470 abc.BandOpticalFilter at 0x139836830371024\nFields:\n bandwidth_in_nm: 30.0\n center_wavelength_in_nm: 472.0\n description: The band-pass filter used to isolate the 470 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF02-472/30-25\n
1 TS GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber2 abc.OpticalFiber at 0x139836830370384\nFields:\n core_diameter_in_um: 200.0\n description: The second optical fiber used to record the GCaMP fluorescence from the TS brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource470 abc.ExcitationSource at 0x139836830370064\nFields:\n description: Blue excitation light (470 nm LED, Thorlabs, M70F3) and violet excitation light (for the isosbestic control)\nwere coupled into the optic fiber such that a power of 0.75 mW was delivered to the fiber tip.\nThen, 470 nm and 405 nm excitation were alternated at 100 Hz using a waveform generator,\neach filtered with a corresponding filter.\n\n excitation_wavelength_in_nm: 470.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M70F3\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 1.0 1.050157 0.053596 axons in striatum 0.000000 0.014802 [3.0748749730962577, -0.58, 2.1599445426572172] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter470 abc.BandOpticalFilter at 0x139836830371024\nFields:\n bandwidth_in_nm: 30.0\n center_wavelength_in_nm: 472.0\n description: The band-pass filter used to isolate the 470 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF02-472/30-25\n
2 SNc GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber1 abc.OpticalFiber at 0x139836832922464\nFields:\n core_diameter_in_um: 200.0\n description: The optical fiber used to record the GCaMP fluorescence from the SNc brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource405 abc.ExcitationSource at 0x139836832922128\nFields:\n description: Violet LED (405 nm, Thorlabs, M405FP1) for the isosbestic control.\n excitation_wavelength_in_nm: 405.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M405FP1\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 3.6 1.041767 0.686421 cell bodies in SNc 18.898114 0.067393 [nan, nan, nan] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter405 abc.BandOpticalFilter at 0x139836830370704\nFields:\n bandwidth_in_nm: 15.0\n center_wavelength_in_nm: 406.0\n description: The band-pass filter used to isolate the 405 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-406/15-25\n
3 TS GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber2 abc.OpticalFiber at 0x139836830370384\nFields:\n core_diameter_in_um: 200.0\n description: The second optical fiber used to record the GCaMP fluorescence from the TS brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource405 abc.ExcitationSource at 0x139836832922128\nFields:\n description: Violet LED (405 nm, Thorlabs, M405FP1) for the isosbestic control.\n excitation_wavelength_in_nm: 405.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M405FP1\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 1.0 1.050157 0.053596 axons in striatum 0.000000 0.014802 [3.0748749730962577, -0.58, 2.1599445426572172] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter405 abc.BandOpticalFilter at 0x139836830370704\nFields:\n bandwidth_in_nm: 15.0\n center_wavelength_in_nm: 406.0\n description: The band-pass filter used to isolate the 405 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-406/15-25\n
Fluorescence (TimeSeries)
starting_time: 0.0
rate: 4000.2000543686745
resolution: -1.0
comments: no comments
description: The fluorescence traces from one or two optical fibers during 405 nm and 470 nm illumination collected at 4000 Hz by Picoscope.
conversion: 1.0
offset: 0.0
unit: Volts
data
HDF5 dataset
Data typefloat32
Shape(6761014, 2)
Array size51.58 MiB
Chunk shape(1581, 2)
Compressiongzip
Compression opts4
Uncompressed size (bytes)54088112
Compressed size (bytes)15206372
Compression ratio3.5569373154885335
starting_time_unit: seconds
Licking (TimeSeries)
starting_time: 0.0
rate: 4000.2000543686745
resolution: -1.0
comments: no comments
description: The raw voltage trace from the licking sensor collected at 4000 Hz by Picoscope.
conversion: 1.0
offset: 0.0
unit: Volts
data
HDF5 dataset
Data typefloat32
Shape(6761014,)
Array size25.79 MiB
Chunk shape(2500000,)
Compressiongzip
Compression opts4
Uncompressed size (bytes)27044056
Compressed size (bytes)5891877
Compression ratio4.590057803311237
starting_time_unit: seconds
Light (TimeSeries)
starting_time: 0.0
rate: 4000.2000543686745
resolution: -1.0
comments: no comments
description: The raw voltage trace from the light stimulus sensor collected at 4000 Hz by Picoscope.
conversion: 1.0
offset: 0.0
unit: Volts
data
HDF5 dataset
Data typefloat32
Shape(6761014,)
Array size25.79 MiB
Chunk shape(2500000,)
Compressiongzip
Compression opts4
Uncompressed size (bytes)27044056
Compressed size (bytes)5958281
Compression ratio4.538902411618385
starting_time_unit: seconds
Reward (TimeSeries)
starting_time: 0.0
rate: 4000.2000543686745
resolution: -1.0
comments: no comments
description: The raw voltage trace from the reward delivery trigger collected at 4000 Hz by Picoscope.
conversion: 1.0
offset: 0.0
unit: Volts
data
HDF5 dataset
Data typefloat32
Shape(6761014,)
Array size25.79 MiB
Chunk shape(2500000,)
Compressiongzip
Compression opts4
Uncompressed size (bytes)27044056
Compressed size (bytes)5626973
Compression ratio4.806146395228838
starting_time_unit: seconds
Velocity (TimeSeries)
starting_time: 0.0
rate: 4000.2000543686745
resolution: -1.0
comments: no comments
description: Velocity from rotary encoder collected at 4000 Hz by Picoscope.
conversion: 1.0
offset: 0.0
unit: Volts
data
HDF5 dataset
Data typefloat32
Shape(6761014,)
Array size25.79 MiB
Chunk shape(2500000,)
Compressiongzip
Compression opts4
Uncompressed size (bytes)27044056
Compressed size (bytes)8672698
Compression ratio3.1182979045275183
starting_time_unit: seconds
TtlTypesTable (TtlTypesTable)
description: Contains the TTL event types from PicoScope.
columns
event_name
Name of each event type.
event_type_description
Description of each event type.
pulse_value
TTL pulse value for each event type.
duration
The duration of the TTL pulse.
table
event_name event_type_description pulse_value duration
id
0 Ch405 The times when the 405 nm LED was on. 1 0.005
1 Ch470 The times when the 470 nm LED was on. 1 0.005
TtlsTable (TtlsTable)
description: Contains the 405 nm and 470 nm illumination onset times.
columns
timestamp
The time that each event occurred, in seconds, from the session start time.
ttl_type
The type of TTL that occurred. This is represented as a reference to a row of the TtlTypesTable.
table
timestamp ttl_type
id
0 0.001000 1
1 0.006000 0
2 0.010999 1
3 0.015999 0

... and 338095 more row(s).

analysis
PeakFluorescenceEventTypes (EventTypesTable)
description: Contains the type of events.
columns
event_name
Name of each event type.
event_type_description
Description of each event type.
table
event_name event_type_description
id
0 peaksG Large transient peaks for Fiber 1 fluorescence
1 peaksGRun Large transient peaks occurring during running periods for Fiber 1 fluorescence
PeakFluorescenceEvents (EventsTable)
description: Contains the onset times of large fluorescence peaks.
columns
timestamp
The time that each event occurred, in seconds, from the session start time.
event_type
The type of event that occurred. This is represented as a reference to a row of the EventTypesTable.
peak_fluorescence
The value of the large transient peaks.
table
timestamp event_type peak_fluorescence
id
0 14.09 0 0.068825
1 16.97 0 0.235765
2 18.69 0 0.075402
3 20.71 0 0.119960

... and 1102 more row(s).

keywords
HDF5 dataset
Data typeobject
Shape(3,)
Array size24.00 bytes
Chunk shapeNone
CompressionNone
Compression optsNone
Uncompressed size (bytes)24
Compressed size (bytes)48
Compression ratio0.5

['Fiber photometry' 'GCaMP6f' 'Dopamine']
processing
behavior (ProcessingModule)
description: Contains velocity and acceleration measured over time.
Acceleration (TimeSeries)
starting_time: 13.91
rate: 100.0
resolution: -1.0
comments: no comments
description: The acceleration measured in the unit of m/s2.
conversion: 1.0
offset: 0.0
unit: m/s2
data
HDF5 dataset
Data typefloat64
Shape(167634,)
Array size1.28 MiB
Chunk shape(167634,)
Compressiongzip
Compression opts4
Uncompressed size (bytes)1341072
Compressed size (bytes)1286127
Compression ratio1.042721286467044
starting_time_unit: seconds
Velocity (TimeSeries)
starting_time: 13.91
rate: 100.0
resolution: -1.0
comments: no comments
description: The velocity from rotary encoder converted to m/s.
conversion: 1.0
offset: 0.0
unit: m/s
data
HDF5 dataset
Data typefloat64
Shape(167634,)
Array size1.28 MiB
Chunk shape(167634,)
Compressiongzip
Compression opts4
Uncompressed size (bytes)1341072
Compressed size (bytes)1219633
Compression ratio1.099570116584251
starting_time_unit: seconds
Events (TimeIntervals)
description: Contains the times when the mouse was moving and the reward, air puff, light, and licking event times.
columns
start_time
Start time of epoch, in seconds
stop_time
Stop time of epoch, in seconds
event_type
The type of event (licking, air puff, light or reward delivery).
tags
user-defined tags
timeseries
index into a TimeSeries object
table
start_time stop_time event_type tags timeseries
id
0 13.91 201.82 MovOnOff [] [(55642, 751678, Velocity pynwb.base.TimeSeries at 0x139836829980368\nFields:\n comments: no comments\n conversion: 1.0\n data: <HDF5 dataset "data": shape (6761014,), type "<f4">\n description: Velocity from rotary encoder collected at 4000 Hz by Picoscope.\n offset: 0.0\n rate: 4000.2000543686745\n resolution: -1.0\n starting_time: 0.0\n starting_time_unit: seconds\n unit: Volts\n)]
1 28.59 28.67 Reward [long] [(114365, 320, Reward pynwb.base.TimeSeries at 0x139836834804272\nFields:\n comments: no comments\n conversion: 1.0\n data: <HDF5 dataset "data": shape (6761014,), type "<f4">\n description: The raw voltage trace from the reward delivery trigger collected at 4000 Hz by Picoscope.\n offset: 0.0\n rate: 4000.2000543686745\n resolution: -1.0\n starting_time: 0.0\n starting_time_unit: seconds\n unit: Volts\n)]
2 28.85 32.24 Licking [] [(115405, 13561, Licking pynwb.base.TimeSeries at 0x139836836246416\nFields:\n comments: no comments\n conversion: 1.0\n data: <HDF5 dataset "data": shape (6761014,), type "<f4">\n description: The raw voltage trace from the licking sensor collected at 4000 Hz by Picoscope.\n offset: 0.0\n rate: 4000.2000543686745\n resolution: -1.0\n starting_time: 0.0\n starting_time_unit: seconds\n unit: Volts\n)]
3 32.42 32.52 Licking [] [(129686, 400, Licking pynwb.base.TimeSeries at 0x139836836246416\nFields:\n comments: no comments\n conversion: 1.0\n data: <HDF5 dataset "data": shape (6761014,), type "<f4">\n description: The raw voltage trace from the licking sensor collected at 4000 Hz by Picoscope.\n offset: 0.0\n rate: 4000.2000543686745\n resolution: -1.0\n starting_time: 0.0\n starting_time_unit: seconds\n unit: Volts\n)]

... and 1879 more row(s).

WheelEventTypes (EventTypesTable)
description: Contains the type of wheel events.
columns
event_name
Name of each event type.
event_type_description
Description of each event type.
table
event_name event_type_description
id
0 Acceleration onset The times of the Acceleration onset event.
1 Deceleration onset The times of the Deceleration onset event.
WheelEvents (EventsTable)
description: Contains the accelerations, decelerations times.
columns
timestamp
The time that each event occurred, in seconds, from the session start time.
event_type
The type of event that occurred. This is represented as a reference to a row of the EventTypesTable.
table
timestamp event_type
id
0 13.95 0
1 16.93 0
2 21.87 0
3 27.46 1

... and 466 more row(s).

ophys (ProcessingModule)
description: Processed fiber photometry data.
DfOverFFiberPhotometryResponseSeries (FiberPhotometryResponseSeries)
starting_time: 13.91
rate: 100.0
resolution: -1.0
comments: no comments
description: DF/F calculated from green fluorescence collected during 470 nm illumination re-binned to 100 Hz and acquired with one or two optical fibers.
conversion: 1.0
offset: 0.0
unit: n.a.
data
HDF5 dataset
Data typefloat64
Shape(167634, 2)
Array size2.56 MiB
Chunk shape(167634, 2)
Compressiongzip
Compression opts4
Uncompressed size (bytes)2682144
Compressed size (bytes)2436481
Compression ratio1.1008269713574619
starting_time_unit: seconds
fiber_photometry_table_region (DynamicTableRegion)
description: source fibers
table (FiberPhotometryTable)
description: Contains the metadata for the fiber photometry experiment.
columns
location
Location of fiber.
indicator
Link to the indicator object.
optical_fiber
Link to the optical fiber device.
excitation_source
Link to the excitation source device.
photodetector
Link to the photodetector device.
dichroic_mirror
Link to the dichroic mirror device.
fiber_depth_in_mm
The depth of the optical fiber in the unit of millimeters.
baseline_fluorescence
The baseline fluorescence value for each fiber.
normalized_fluorescence
The normalized fluorescence value for each fiber.
recording_target_type
Defines whether recordings are made in axons vs cell bodies.
signal_to_noise_ratio
The signal to noise ratio for each fiber.
cross_correlation_with_acceleration
The cross-correlation between ΔF/F and acceleration.
coordinates
Fiber placement in stereotactic coordinates (AP, ML, DV) mm relative to Bregma.
emission_filter
Link to the emission filter device.
excitation_filter
Link to the excitation filter device.
table
location indicator optical_fiber excitation_source photodetector dichroic_mirror fiber_depth_in_mm baseline_fluorescence normalized_fluorescence recording_target_type signal_to_noise_ratio cross_correlation_with_acceleration coordinates emission_filter excitation_filter
id
0 SNc GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber1 abc.OpticalFiber at 0x139836832922464\nFields:\n core_diameter_in_um: 200.0\n description: The optical fiber used to record the GCaMP fluorescence from the SNc brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource470 abc.ExcitationSource at 0x139836830370064\nFields:\n description: Blue excitation light (470 nm LED, Thorlabs, M70F3) and violet excitation light (for the isosbestic control)\nwere coupled into the optic fiber such that a power of 0.75 mW was delivered to the fiber tip.\nThen, 470 nm and 405 nm excitation were alternated at 100 Hz using a waveform generator,\neach filtered with a corresponding filter.\n\n excitation_wavelength_in_nm: 470.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M70F3\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 3.6 1.041767 0.686421 cell bodies in SNc 18.898114 0.067393 [nan, nan, nan] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter470 abc.BandOpticalFilter at 0x139836830371024\nFields:\n bandwidth_in_nm: 30.0\n center_wavelength_in_nm: 472.0\n description: The band-pass filter used to isolate the 470 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF02-472/30-25\n
1 TS GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber2 abc.OpticalFiber at 0x139836830370384\nFields:\n core_diameter_in_um: 200.0\n description: The second optical fiber used to record the GCaMP fluorescence from the TS brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource470 abc.ExcitationSource at 0x139836830370064\nFields:\n description: Blue excitation light (470 nm LED, Thorlabs, M70F3) and violet excitation light (for the isosbestic control)\nwere coupled into the optic fiber such that a power of 0.75 mW was delivered to the fiber tip.\nThen, 470 nm and 405 nm excitation were alternated at 100 Hz using a waveform generator,\neach filtered with a corresponding filter.\n\n excitation_wavelength_in_nm: 470.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M70F3\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 1.0 1.050157 0.053596 axons in striatum 0.000000 0.014802 [3.0748749730962577, -0.58, 2.1599445426572172] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter470 abc.BandOpticalFilter at 0x139836830371024\nFields:\n bandwidth_in_nm: 30.0\n center_wavelength_in_nm: 472.0\n description: The band-pass filter used to isolate the 470 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF02-472/30-25\n
2 SNc GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber1 abc.OpticalFiber at 0x139836832922464\nFields:\n core_diameter_in_um: 200.0\n description: The optical fiber used to record the GCaMP fluorescence from the SNc brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource405 abc.ExcitationSource at 0x139836832922128\nFields:\n description: Violet LED (405 nm, Thorlabs, M405FP1) for the isosbestic control.\n excitation_wavelength_in_nm: 405.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M405FP1\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 3.6 1.041767 0.686421 cell bodies in SNc 18.898114 0.067393 [nan, nan, nan] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter405 abc.BandOpticalFilter at 0x139836830370704\nFields:\n bandwidth_in_nm: 15.0\n center_wavelength_in_nm: 406.0\n description: The band-pass filter used to isolate the 405 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-406/15-25\n
3 TS GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber2 abc.OpticalFiber at 0x139836830370384\nFields:\n core_diameter_in_um: 200.0\n description: The second optical fiber used to record the GCaMP fluorescence from the TS brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource405 abc.ExcitationSource at 0x139836832922128\nFields:\n description: Violet LED (405 nm, Thorlabs, M405FP1) for the isosbestic control.\n excitation_wavelength_in_nm: 405.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M405FP1\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 1.0 1.050157 0.053596 axons in striatum 0.000000 0.014802 [3.0748749730962577, -0.58, 2.1599445426572172] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter405 abc.BandOpticalFilter at 0x139836830370704\nFields:\n bandwidth_in_nm: 15.0\n center_wavelength_in_nm: 406.0\n description: The band-pass filter used to isolate the 405 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-406/15-25\n
DfOverFFiberPhotometryResponseSeriesIsosbestic (FiberPhotometryResponseSeries)
starting_time: 13.91
rate: 100.0
resolution: -1.0
comments: no comments
description: DF/F calculated from green fluorescence collected at its isosbestic wavelength (405 nm) re-binned to 100 Hz and acquired with one or two optical fibers.
conversion: 1.0
offset: 0.0
unit: n.a.
data
HDF5 dataset
Data typefloat64
Shape(167634, 2)
Array size2.56 MiB
Chunk shape(167634, 2)
Compressiongzip
Compression opts4
Uncompressed size (bytes)2682144
Compressed size (bytes)2544179
Compression ratio1.0542277096069106
starting_time_unit: seconds
fiber_photometry_table_region (DynamicTableRegion)
description: source fibers
table (FiberPhotometryTable)
description: Contains the metadata for the fiber photometry experiment.
columns
location
Location of fiber.
indicator
Link to the indicator object.
optical_fiber
Link to the optical fiber device.
excitation_source
Link to the excitation source device.
photodetector
Link to the photodetector device.
dichroic_mirror
Link to the dichroic mirror device.
fiber_depth_in_mm
The depth of the optical fiber in the unit of millimeters.
baseline_fluorescence
The baseline fluorescence value for each fiber.
normalized_fluorescence
The normalized fluorescence value for each fiber.
recording_target_type
Defines whether recordings are made in axons vs cell bodies.
signal_to_noise_ratio
The signal to noise ratio for each fiber.
cross_correlation_with_acceleration
The cross-correlation between ΔF/F and acceleration.
coordinates
Fiber placement in stereotactic coordinates (AP, ML, DV) mm relative to Bregma.
emission_filter
Link to the emission filter device.
excitation_filter
Link to the excitation filter device.
table
location indicator optical_fiber excitation_source photodetector dichroic_mirror fiber_depth_in_mm baseline_fluorescence normalized_fluorescence recording_target_type signal_to_noise_ratio cross_correlation_with_acceleration coordinates emission_filter excitation_filter
id
0 SNc GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber1 abc.OpticalFiber at 0x139836832922464\nFields:\n core_diameter_in_um: 200.0\n description: The optical fiber used to record the GCaMP fluorescence from the SNc brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource470 abc.ExcitationSource at 0x139836830370064\nFields:\n description: Blue excitation light (470 nm LED, Thorlabs, M70F3) and violet excitation light (for the isosbestic control)\nwere coupled into the optic fiber such that a power of 0.75 mW was delivered to the fiber tip.\nThen, 470 nm and 405 nm excitation were alternated at 100 Hz using a waveform generator,\neach filtered with a corresponding filter.\n\n excitation_wavelength_in_nm: 470.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M70F3\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 3.6 1.041767 0.686421 cell bodies in SNc 18.898114 0.067393 [nan, nan, nan] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter470 abc.BandOpticalFilter at 0x139836830371024\nFields:\n bandwidth_in_nm: 30.0\n center_wavelength_in_nm: 472.0\n description: The band-pass filter used to isolate the 470 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF02-472/30-25\n
1 TS GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber2 abc.OpticalFiber at 0x139836830370384\nFields:\n core_diameter_in_um: 200.0\n description: The second optical fiber used to record the GCaMP fluorescence from the TS brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource470 abc.ExcitationSource at 0x139836830370064\nFields:\n description: Blue excitation light (470 nm LED, Thorlabs, M70F3) and violet excitation light (for the isosbestic control)\nwere coupled into the optic fiber such that a power of 0.75 mW was delivered to the fiber tip.\nThen, 470 nm and 405 nm excitation were alternated at 100 Hz using a waveform generator,\neach filtered with a corresponding filter.\n\n excitation_wavelength_in_nm: 470.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M70F3\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 1.0 1.050157 0.053596 axons in striatum 0.000000 0.014802 [3.0748749730962577, -0.58, 2.1599445426572172] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter470 abc.BandOpticalFilter at 0x139836830371024\nFields:\n bandwidth_in_nm: 30.0\n center_wavelength_in_nm: 472.0\n description: The band-pass filter used to isolate the 470 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF02-472/30-25\n
2 SNc GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber1 abc.OpticalFiber at 0x139836832922464\nFields:\n core_diameter_in_um: 200.0\n description: The optical fiber used to record the GCaMP fluorescence from the SNc brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource405 abc.ExcitationSource at 0x139836832922128\nFields:\n description: Violet LED (405 nm, Thorlabs, M405FP1) for the isosbestic control.\n excitation_wavelength_in_nm: 405.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M405FP1\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 3.6 1.041767 0.686421 cell bodies in SNc 18.898114 0.067393 [nan, nan, nan] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter405 abc.BandOpticalFilter at 0x139836830370704\nFields:\n bandwidth_in_nm: 15.0\n center_wavelength_in_nm: 406.0\n description: The band-pass filter used to isolate the 405 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-406/15-25\n
3 TS GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber2 abc.OpticalFiber at 0x139836830370384\nFields:\n core_diameter_in_um: 200.0\n description: The second optical fiber used to record the GCaMP fluorescence from the TS brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource405 abc.ExcitationSource at 0x139836832922128\nFields:\n description: Violet LED (405 nm, Thorlabs, M405FP1) for the isosbestic control.\n excitation_wavelength_in_nm: 405.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M405FP1\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 1.0 1.050157 0.053596 axons in striatum 0.000000 0.014802 [3.0748749730962577, -0.58, 2.1599445426572172] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter405 abc.BandOpticalFilter at 0x139836830370704\nFields:\n bandwidth_in_nm: 15.0\n center_wavelength_in_nm: 406.0\n description: The band-pass filter used to isolate the 405 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-406/15-25\n
devices
DichroicMirror (DichroicMirror)
description: The dichroic mirror used to separate green fluorescence from the excitation light.
manufacturer: Chroma Tech Corp
cut_on_wavelength_in_nm: 505.0
transmission_band_in_nm
NumPy array
Data typefloat64
Shape(2,)
Array size16.00 bytes

[505. 750.]
model: T505lpxr
EmissionFilter (BandOpticalFilter)
description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.
manufacturer: Semrock
center_wavelength_in_nm: 540.0
bandwidth_in_nm: 50.0
filter_type: Bandpass
model: FF01-540/50-25
ExcitationSource405 (ExcitationSource)
description: Violet LED (405 nm, Thorlabs, M405FP1) for the isosbestic control.
manufacturer: Thorlabs
model: M405FP1
illumination_type: LED
excitation_wavelength_in_nm: 405.0
ExcitationSource470 (ExcitationSource)
description: Blue excitation light (470 nm LED, Thorlabs, M70F3) and violet excitation light (for the isosbestic control) were coupled into the optic fiber such that a power of 0.75 mW was delivered to the fiber tip. Then, 470 nm and 405 nm excitation were alternated at 100 Hz using a waveform generator, each filtered with a corresponding filter.
manufacturer: Thorlabs
model: M70F3
illumination_type: LED
excitation_wavelength_in_nm: 470.0
Fiber1 (OpticalFiber)
description: The optical fiber used to record the GCaMP fluorescence from the SNc brain region.
manufacturer: Doric
model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF
numerical_aperture: 0.57
core_diameter_in_um: 200.0
Fiber2 (OpticalFiber)
description: The second optical fiber used to record the GCaMP fluorescence from the TS brain region.
manufacturer: Doric
model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF
numerical_aperture: 0.57
core_diameter_in_um: 200.0
GCaMP6f (Indicator)
label: AAV-GCaMP6f
injection_location: SNc
injection_coordinates_in_mm
NumPy array
Data typefloat64
Shape(3,)
Array size24.00 bytes

[-3.25 1.55 -3.8 ]
OpticalFilter405 (BandOpticalFilter)
description: The band-pass filter used to isolate the 405 nm excitation light.
manufacturer: Semrock
center_wavelength_in_nm: 406.0
bandwidth_in_nm: 15.0
filter_type: Bandpass
model: FF01-406/15-25
OpticalFilter470 (BandOpticalFilter)
description: The band-pass filter used to isolate the 470 nm excitation light.
manufacturer: Semrock
center_wavelength_in_nm: 472.0
bandwidth_in_nm: 30.0
filter_type: Bandpass
model: FF02-472/30-25
PhotodetectorPMT (Photodetector)
description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).
manufacturer: Hamamatsu Photonics
model: H10770PA-40
detector_type: PMT
detected_wavelength_in_nm: 520.0
subject (Subject)
age: P8W/P16W
age__reference: birth
genotype: Vglut2-IRES-Cre/Th-Flpo (RRID, IMSR_JAX:016963)
sex: F
species: Mus musculus
subject_id: VGlut-A997
strain: C57BL6
lab_meta_data
FiberPhotometry (FiberPhotometry)
fiber_photometry_table (FiberPhotometryTable)
description: Contains the metadata for the fiber photometry experiment.
columns
location
Location of fiber.
indicator
Link to the indicator object.
optical_fiber
Link to the optical fiber device.
excitation_source
Link to the excitation source device.
photodetector
Link to the photodetector device.
dichroic_mirror
Link to the dichroic mirror device.
fiber_depth_in_mm
The depth of the optical fiber in the unit of millimeters.
baseline_fluorescence
The baseline fluorescence value for each fiber.
normalized_fluorescence
The normalized fluorescence value for each fiber.
recording_target_type
Defines whether recordings are made in axons vs cell bodies.
signal_to_noise_ratio
The signal to noise ratio for each fiber.
cross_correlation_with_acceleration
The cross-correlation between ΔF/F and acceleration.
coordinates
Fiber placement in stereotactic coordinates (AP, ML, DV) mm relative to Bregma.
emission_filter
Link to the emission filter device.
excitation_filter
Link to the excitation filter device.
table
location indicator optical_fiber excitation_source photodetector dichroic_mirror fiber_depth_in_mm baseline_fluorescence normalized_fluorescence recording_target_type signal_to_noise_ratio cross_correlation_with_acceleration coordinates emission_filter excitation_filter
id
0 SNc GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber1 abc.OpticalFiber at 0x139836832922464\nFields:\n core_diameter_in_um: 200.0\n description: The optical fiber used to record the GCaMP fluorescence from the SNc brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource470 abc.ExcitationSource at 0x139836830370064\nFields:\n description: Blue excitation light (470 nm LED, Thorlabs, M70F3) and violet excitation light (for the isosbestic control)\nwere coupled into the optic fiber such that a power of 0.75 mW was delivered to the fiber tip.\nThen, 470 nm and 405 nm excitation were alternated at 100 Hz using a waveform generator,\neach filtered with a corresponding filter.\n\n excitation_wavelength_in_nm: 470.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M70F3\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 3.6 1.041767 0.686421 cell bodies in SNc 18.898114 0.067393 [nan, nan, nan] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter470 abc.BandOpticalFilter at 0x139836830371024\nFields:\n bandwidth_in_nm: 30.0\n center_wavelength_in_nm: 472.0\n description: The band-pass filter used to isolate the 470 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF02-472/30-25\n
1 TS GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber2 abc.OpticalFiber at 0x139836830370384\nFields:\n core_diameter_in_um: 200.0\n description: The second optical fiber used to record the GCaMP fluorescence from the TS brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource470 abc.ExcitationSource at 0x139836830370064\nFields:\n description: Blue excitation light (470 nm LED, Thorlabs, M70F3) and violet excitation light (for the isosbestic control)\nwere coupled into the optic fiber such that a power of 0.75 mW was delivered to the fiber tip.\nThen, 470 nm and 405 nm excitation were alternated at 100 Hz using a waveform generator,\neach filtered with a corresponding filter.\n\n excitation_wavelength_in_nm: 470.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M70F3\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 1.0 1.050157 0.053596 axons in striatum 0.000000 0.014802 [3.0748749730962577, -0.58, 2.1599445426572172] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter470 abc.BandOpticalFilter at 0x139836830371024\nFields:\n bandwidth_in_nm: 30.0\n center_wavelength_in_nm: 472.0\n description: The band-pass filter used to isolate the 470 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF02-472/30-25\n
2 SNc GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber1 abc.OpticalFiber at 0x139836832922464\nFields:\n core_diameter_in_um: 200.0\n description: The optical fiber used to record the GCaMP fluorescence from the SNc brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource405 abc.ExcitationSource at 0x139836832922128\nFields:\n description: Violet LED (405 nm, Thorlabs, M405FP1) for the isosbestic control.\n excitation_wavelength_in_nm: 405.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M405FP1\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 3.6 1.041767 0.686421 cell bodies in SNc 18.898114 0.067393 [nan, nan, nan] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter405 abc.BandOpticalFilter at 0x139836830370704\nFields:\n bandwidth_in_nm: 15.0\n center_wavelength_in_nm: 406.0\n description: The band-pass filter used to isolate the 405 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-406/15-25\n
3 TS GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber2 abc.OpticalFiber at 0x139836830370384\nFields:\n core_diameter_in_um: 200.0\n description: The second optical fiber used to record the GCaMP fluorescence from the TS brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource405 abc.ExcitationSource at 0x139836832922128\nFields:\n description: Violet LED (405 nm, Thorlabs, M405FP1) for the isosbestic control.\n excitation_wavelength_in_nm: 405.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M405FP1\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 1.0 1.050157 0.053596 axons in striatum 0.000000 0.014802 [3.0748749730962577, -0.58, 2.1599445426572172] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter405 abc.BandOpticalFilter at 0x139836830370704\nFields:\n bandwidth_in_nm: 15.0\n center_wavelength_in_nm: 406.0\n description: The band-pass filter used to isolate the 405 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-406/15-25\n
experiment_description: Dopamine neurons are characterized by their response to unexpected rewards, but they also fire during movement and aversive stimuli. Dopamine neuron diversity has been observed based on molecular expression profiles; however, whether different functions map onto such genetic subtypes remains unclear. In this study, we established that three genetic dopamine neuron subtypes within the substantia nigra pars compacta, characterized by the expression of Slc17a6 (Vglut2), Calb1 and Anxa1, each have a unique set of responses to rewards, aversive stimuli and accelerations and decelerations, and these signaling patterns are highly correlated between somas and axons within subtypes. Remarkably, reward responses were almost entirely absent in the Anxa1+ subtype, which instead displayed acceleration-correlated signaling. Our findings establish a connection between functional and genetic dopamine neuron subtypes and demonstrate that molecular expression patterns can serve as a common framework to dissect dopaminergic functions.
session_id: 20200205-0001
lab: Dombeck
institution: Northwestern University
pharmacology: Adult mice (postnatal 2–4 months old) were anesthetized with isoflurane (1–2%), and a 0.5–1-mm-diameter craniotomy was made over the right substantia nigra (−3.25 mm caudal, +1.55 mm lateral from bregma). A small volume (0.4 μl total) of virus (AAV8-EF1α-CreOn/FlpOn-GCaMP6f (RRID:Addgene_137122, titer 6.10 × 1013) for Aldh1a1-iCre/Th-Flpo, Vglut2-IRES-Cre/Th-Flpo and Calb1-IRES2-Cre/Th-Flpo mice or AAV1-CAG-FLEX-GCaMP6f (RRID:Addgene_100835, titer 2.00 × 1013) for DAT-Cre or Anxa1-iCre mice), diluted 1:1 in PBS, was pressure injected through a pulled glass micropipette into the SNc at four depths (−3.8, −4.1, −4.4 and −4.7 mm ventral from dura surface, 0.1 μl per depth). After the injections, the skull and craniotomy were sealed with Metabond (Parkell), and a custom metal headplate was installed for head fixation. The location of recording sites was marked on the surface of the Metabond for future access. For Calb1-IRES2-Cre/DAT-tTA/Ai93D mice, which express GCaMP6f endogenously, no injection was conducted, and only the headplate was implanted at this time. Four weeks were allowed for GCaMP6f expression to ramp up and fill dopaminergic somas in SNc and axons in striatum.
protocol: https://doi.org/10.17504/protocols.io.5qpvor8zxv4o/v1
source_script: Created using NeuroConv v0.4.10
source_script_file_name: /Users/weian/anaconda3/envs/clean-env-dombeck/lib/python3.11/site-packages/neuroconv/basedatainterface.py
virus: AAV8-EF1α-CreOn/FlpOn-GCaMP6f virus (RRID, Addgene_137122)

Access Subject Metadata ¶

This section demonstrates how to access the Subject field in an NWB file.

The Subject field can be accessed as nwbfile.subject.

In [4]:
nwbfile.subject
Out[4]:

subject (Subject)

age: P8W/P16W
age__reference: birth
genotype: Vglut2-IRES-Cre/Th-Flpo (RRID, IMSR_JAX:016963)
sex: F
species: Mus musculus
subject_id: VGlut-A997
strain: C57BL6

Access fiber photometry data ¶

This section demonstrates how to access the fiber photometry data in the NWBfile.

NWB organizes data into different groups depending on the type of data. Groups can be thought of as folders within the file. Here are some of the groups within an NWBFile and the types of data they are intended to store:

  • acquisition: raw, acquired data that should never change
  • processing: processed data, typically the results of preprocessing algorithms and could change

Picoscope signals¶

The signals collected at 4000 Hz from the PicoScope acquisition system are added to nwbfile.acquisition and are stored in pynwb.base.TimeSeries objects. These signals include the fluorescence traces from one or two optical fibers, velocity and may additionally include the stimulus signals (light, air puff, reward delivery).

The fluorescence traces from the optical fiber(s) can be accessed as nwbfile.acquisition["Fluorescence"].

The velocity from the rotary encoder can be accessed as nwbfile.acquisition["Velocity"].

In [5]:
fluorescence_picoscope = nwbfile.acquisition["Fluorescence"]
fluorescence_picoscope
Out[5]:

Fluorescence (TimeSeries)

starting_time: 0.0
rate: 4000.2000543686745
resolution: -1.0
comments: no comments
description: The fluorescence traces from one or two optical fibers during 405 nm and 470 nm illumination collected at 4000 Hz by Picoscope.
conversion: 1.0
offset: 0.0
unit: Volts
data
HDF5 dataset
Data typefloat32
Shape(6761014, 2)
Array size51.58 MiB
Chunk shape(1581, 2)
Compressiongzip
Compression opts4
Uncompressed size (bytes)54088112
Compressed size (bytes)15206372
Compression ratio3.5569373154885335
starting_time_unit: seconds
In [6]:
velocity_picoscope = nwbfile.acquisition["Velocity"]
velocity_picoscope
Out[6]:

Velocity (TimeSeries)

starting_time: 0.0
rate: 4000.2000543686745
resolution: -1.0
comments: no comments
description: Velocity from rotary encoder collected at 4000 Hz by Picoscope.
conversion: 1.0
offset: 0.0
unit: Volts
data
HDF5 dataset
Data typefloat32
Shape(6761014,)
Array size25.79 MiB
Chunk shape(2500000,)
Compressiongzip
Compression opts4
Uncompressed size (bytes)27044056
Compressed size (bytes)8672698
Compression ratio3.1182979045275183
starting_time_unit: seconds

Picoscope TTL signals¶

The 405 nm and 470 nm illumination onset times are stored in a TtlsTable object using ndx-events and can be accessed as nwbfile.acquisition["TtlsTable"]. The id of events and the description of the TTL event can be accessed as nwbfile.acquisition["TtlTypesTable"].

In [7]:
import pandas as pd

ttl_times = pd.merge(
    left=nwbfile.acquisition["TtlsTable"][:],
    right=nwbfile.acquisition["TtlTypesTable"][:],
    left_on="ttl_type",
    right_on="id",
)
ttl_times.head()
Out[7]:
timestamp ttl_type event_name event_type_description pulse_value duration
0 0.001000 1 Ch470 The times when the 470 nm LED was on. 1 0.005
1 0.006000 0 Ch405 The times when the 405 nm LED was on. 1 0.005
2 0.010999 1 Ch470 The times when the 470 nm LED was on. 1 0.005
3 0.015999 0 Ch405 The times when the 405 nm LED was on. 1 0.005
4 0.020999 1 Ch470 The times when the 470 nm LED was on. 1 0.005
In [8]:
import pandas as pd
from matplotlib import pyplot as plt

# Prepare data for plotting
data = fluorescence_picoscope.data[10000:10500, 0]
timestamps = fluorescence_picoscope.get_timestamps()[10000:10500]

fig, ax = plt.subplots(figsize=(6, 2), dpi=300)
line_handle, = ax.plot(timestamps, data, color="green", linewidth=0.9, label="Fiber 1")

ttl_0 = ttl_times[ttl_times["ttl_type"] == 0]
violet_illumination_times = ttl_0[(ttl_0["timestamp"] > 2.5) & (ttl_0["timestamp"] <= 2.62)]
violet_handles = []
for illumination_onset in violet_illumination_times["timestamp"]:
    fill_end = illumination_onset + 0.005
    violet_handle = ax.fill_between(timestamps, max(data), where=(timestamps >= illumination_onset) & (timestamps <= fill_end), 
                                    color='purple', edgecolor='none', alpha=0.1, label="405 nm LED on")
    violet_handles.append(violet_handle)

ttl_1 = ttl_times[ttl_times["ttl_type"] == 1]
blue_illumination_times = ttl_1[(ttl_1["timestamp"] > 2.5) & (ttl_1["timestamp"] <= 2.62)]
blue_handles = []
for illumination_onset in blue_illumination_times["timestamp"]:
    fill_end = illumination_onset + 0.005
    blue_handle = ax.fill_between(timestamps, max(data), where=(timestamps >= illumination_onset) & (timestamps <= fill_end), 
                                  color='blue', edgecolor='none', alpha=0.1, label="470 nm LED on")
    blue_handles.append(blue_handle)

# Hide top and right spines
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)

# Create the legend with the appropriate handles
handles = [line_handle, violet_handles[0], blue_handles[0]]
labels = ["Fiber 1", "405 nm LED on", "470 nm LED on"]
ax.legend(handles, labels, frameon=False, bbox_to_anchor=(.95, 1), loc='upper left', prop={'size': 8})

ax.tick_params(axis='y', labelsize=8)
plt.xlabel('Time (s)', fontsize=8)
plt.tick_params(axis='x', labelsize=8)
plt.show()
No description has been provided for this image

Fiber photometry traces¶

The fluorescence signals from the Picoscope were separated due to 405 vs 470 nm illumination (405 nm is GCaMP's isosbestic point and thus serves as a movement control) and were re-binned from 4000 Hz to 100 Hz.

The fluorescence traces are added to nwbfile.acquisition and are stored in a FiberPhotometryResponseSeries object using ndx-fiber-photometry. The fluorescence data during 470 nm excitation can be accessed as nwbfile.acquisition["FiberPhotometryResponseSeries"]. The control signal can be accessed as nwbfile.acquisition["FiberPhotometryResponseSeriesIsosbestic"].

In [9]:
fiber_photometry_response_series = nwbfile.acquisition["FiberPhotometryResponseSeries"]
fiber_photometry_response_series
Out[9]:

FiberPhotometryResponseSeries

starting_time: 0.0
rate: 100.0
resolution: -1.0
comments: no comments
description: Raw green fluorescence collected during 470 nm illumination re-binned to 100 Hz and acquired with one or two optical fibers.
conversion: 1.0
offset: 0.0
unit: n.a.
data
HDF5 dataset
Data typefloat64
Shape(169024, 2)
Array size2.58 MiB
Chunk shape(169024, 2)
Compressiongzip
Compression opts4
Uncompressed size (bytes)2704384
Compressed size (bytes)1137393
Compression ratio2.377704100517587
starting_time_unit: seconds
fiber_photometry_table_region (DynamicTableRegion)
description: source fibers
table (FiberPhotometryTable)
description: Contains the metadata for the fiber photometry experiment.
columns
location
Location of fiber.
indicator
Link to the indicator object.
optical_fiber
Link to the optical fiber device.
excitation_source
Link to the excitation source device.
photodetector
Link to the photodetector device.
dichroic_mirror
Link to the dichroic mirror device.
fiber_depth_in_mm
The depth of the optical fiber in the unit of millimeters.
baseline_fluorescence
The baseline fluorescence value for each fiber.
normalized_fluorescence
The normalized fluorescence value for each fiber.
recording_target_type
Defines whether recordings are made in axons vs cell bodies.
signal_to_noise_ratio
The signal to noise ratio for each fiber.
cross_correlation_with_acceleration
The cross-correlation between ΔF/F and acceleration.
coordinates
Fiber placement in stereotactic coordinates (AP, ML, DV) mm relative to Bregma.
emission_filter
Link to the emission filter device.
excitation_filter
Link to the excitation filter device.
table
location indicator optical_fiber excitation_source photodetector dichroic_mirror fiber_depth_in_mm baseline_fluorescence normalized_fluorescence recording_target_type signal_to_noise_ratio cross_correlation_with_acceleration coordinates emission_filter excitation_filter
id
0 SNc GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber1 abc.OpticalFiber at 0x139836832922464\nFields:\n core_diameter_in_um: 200.0\n description: The optical fiber used to record the GCaMP fluorescence from the SNc brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource470 abc.ExcitationSource at 0x139836830370064\nFields:\n description: Blue excitation light (470 nm LED, Thorlabs, M70F3) and violet excitation light (for the isosbestic control)\nwere coupled into the optic fiber such that a power of 0.75 mW was delivered to the fiber tip.\nThen, 470 nm and 405 nm excitation were alternated at 100 Hz using a waveform generator,\neach filtered with a corresponding filter.\n\n excitation_wavelength_in_nm: 470.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M70F3\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 3.6 1.041767 0.686421 cell bodies in SNc 18.898114 0.067393 [nan, nan, nan] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter470 abc.BandOpticalFilter at 0x139836830371024\nFields:\n bandwidth_in_nm: 30.0\n center_wavelength_in_nm: 472.0\n description: The band-pass filter used to isolate the 470 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF02-472/30-25\n
1 TS GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber2 abc.OpticalFiber at 0x139836830370384\nFields:\n core_diameter_in_um: 200.0\n description: The second optical fiber used to record the GCaMP fluorescence from the TS brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource470 abc.ExcitationSource at 0x139836830370064\nFields:\n description: Blue excitation light (470 nm LED, Thorlabs, M70F3) and violet excitation light (for the isosbestic control)\nwere coupled into the optic fiber such that a power of 0.75 mW was delivered to the fiber tip.\nThen, 470 nm and 405 nm excitation were alternated at 100 Hz using a waveform generator,\neach filtered with a corresponding filter.\n\n excitation_wavelength_in_nm: 470.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M70F3\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 1.0 1.050157 0.053596 axons in striatum 0.000000 0.014802 [3.0748749730962577, -0.58, 2.1599445426572172] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter470 abc.BandOpticalFilter at 0x139836830371024\nFields:\n bandwidth_in_nm: 30.0\n center_wavelength_in_nm: 472.0\n description: The band-pass filter used to isolate the 470 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF02-472/30-25\n
2 SNc GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber1 abc.OpticalFiber at 0x139836832922464\nFields:\n core_diameter_in_um: 200.0\n description: The optical fiber used to record the GCaMP fluorescence from the SNc brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource405 abc.ExcitationSource at 0x139836832922128\nFields:\n description: Violet LED (405 nm, Thorlabs, M405FP1) for the isosbestic control.\n excitation_wavelength_in_nm: 405.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M405FP1\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 3.6 1.041767 0.686421 cell bodies in SNc 18.898114 0.067393 [nan, nan, nan] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter405 abc.BandOpticalFilter at 0x139836830370704\nFields:\n bandwidth_in_nm: 15.0\n center_wavelength_in_nm: 406.0\n description: The band-pass filter used to isolate the 405 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-406/15-25\n
3 TS GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber2 abc.OpticalFiber at 0x139836830370384\nFields:\n core_diameter_in_um: 200.0\n description: The second optical fiber used to record the GCaMP fluorescence from the TS brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource405 abc.ExcitationSource at 0x139836832922128\nFields:\n description: Violet LED (405 nm, Thorlabs, M405FP1) for the isosbestic control.\n excitation_wavelength_in_nm: 405.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M405FP1\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 1.0 1.050157 0.053596 axons in striatum 0.000000 0.014802 [3.0748749730962577, -0.58, 2.1599445426572172] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter405 abc.BandOpticalFilter at 0x139836830370704\nFields:\n bandwidth_in_nm: 15.0\n center_wavelength_in_nm: 406.0\n description: The band-pass filter used to isolate the 405 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-406/15-25\n
In [10]:
import pandas as pd
from matplotlib import pyplot as plt

# Prepare data for plotting
data = fiber_photometry_response_series.data[1000:1500, 0]
timestamps = fiber_photometry_response_series.get_timestamps()[1000:1500]

control_signal = nwbfile.acquisition["FiberPhotometryResponseSeriesIsosbestic"]
control_data = control_signal.data[1000:1500, 0]

fig, ax = plt.subplots(nrows=2, ncols=1, figsize=(8, 3), dpi=300, sharex=True)

# Plot data
ax[0].plot(timestamps, data, color="green", linewidth=0.8, label='Data')

# Plot control data with offset
ax[1].plot(timestamps, control_data, color="grey", linewidth=0.5, label='Control Data (shifted)')

ax[0].spines['top'].set_visible(False)
ax[0].spines['right'].set_visible(False)
ax[0].spines['bottom'].set_visible(False)
ax[1].spines['top'].set_visible(False)
ax[1].spines['right'].set_visible(False)

ax[0].legend(["Raw fluorescence Fiber 1"], frameon=False, bbox_to_anchor=(.95, 1), loc='upper left', prop={'size': 8})
ax[1].legend(["Isosbestic control"], frameon=False, bbox_to_anchor=(.96, 1), loc='upper left', prop={'size': 8})
ax[1].tick_params(axis='y', labelsize=8)
ax[0].tick_params(axis='y', labelsize=8)


plt.xlabel('Time (s)', fontsize=8)
plt.tick_params(axis='x', labelsize=8)
plt.show()
No description has been provided for this image

Fiber photometry metadata¶

The fiber photometry metadata includes the type of indicator(s), optical fiber(s), excitation source(s), photodector(s), dichroic mirror(s), and optical filter(s) that were used to construct a single fluorescence signal.

The metadata is stored in a FiberPhotometryTable object using ndx-fiber-photometry and is added to nwbfile.lab_meta_data. It can be accessed as nwbfile.lab_meta_data["FiberPhotometry"].fiber_photometry_table.

In [11]:
nwbfile.lab_meta_data["FiberPhotometry"].fiber_photometry_table[:]
Out[11]:
location indicator optical_fiber excitation_source photodetector dichroic_mirror fiber_depth_in_mm baseline_fluorescence normalized_fluorescence recording_target_type signal_to_noise_ratio cross_correlation_with_acceleration coordinates emission_filter excitation_filter
id
0 SNc GCaMP6f abc.Indicator at 0x139836832919440\nFi... Fiber1 abc.OpticalFiber at 0x139836832922464\n... ExcitationSource470 abc.ExcitationSource at 0x... PhotodetectorPMT abc.Photodetector at 0x139836... DichroicMirror abc.DichroicMirror at 0x1398368... 3.6 1.041767 0.686421 cell bodies in SNc 18.898114 0.067393 [nan, nan, nan] EmissionFilter abc.BandOpticalFilter at 0x1398... OpticalFilter470 abc.BandOpticalFilter at 0x13...
1 TS GCaMP6f abc.Indicator at 0x139836832919440\nFi... Fiber2 abc.OpticalFiber at 0x139836830370384\n... ExcitationSource470 abc.ExcitationSource at 0x... PhotodetectorPMT abc.Photodetector at 0x139836... DichroicMirror abc.DichroicMirror at 0x1398368... 1.0 1.050157 0.053596 axons in striatum 0.000000 0.014802 [3.0748749730962577, -0.58, 2.1599445426572172] EmissionFilter abc.BandOpticalFilter at 0x1398... OpticalFilter470 abc.BandOpticalFilter at 0x13...
2 SNc GCaMP6f abc.Indicator at 0x139836832919440\nFi... Fiber1 abc.OpticalFiber at 0x139836832922464\n... ExcitationSource405 abc.ExcitationSource at 0x... PhotodetectorPMT abc.Photodetector at 0x139836... DichroicMirror abc.DichroicMirror at 0x1398368... 3.6 1.041767 0.686421 cell bodies in SNc 18.898114 0.067393 [nan, nan, nan] EmissionFilter abc.BandOpticalFilter at 0x1398... OpticalFilter405 abc.BandOpticalFilter at 0x13...
3 TS GCaMP6f abc.Indicator at 0x139836832919440\nFi... Fiber2 abc.OpticalFiber at 0x139836830370384\n... ExcitationSource405 abc.ExcitationSource at 0x... PhotodetectorPMT abc.Photodetector at 0x139836... DichroicMirror abc.DichroicMirror at 0x1398368... 1.0 1.050157 0.053596 axons in striatum 0.000000 0.014802 [3.0748749730962577, -0.58, 2.1599445426572172] EmissionFilter abc.BandOpticalFilter at 0x1398... OpticalFilter405 abc.BandOpticalFilter at 0x13...

The fiber_photometry_table_region attribute in the FiberPhotometryResponseSeries object references row(s) of this table:

In [12]:
fiber_photometry_table_region = nwbfile.acquisition["FiberPhotometryResponseSeries"].fiber_photometry_table_region[:]
fiber_photometry_table_region
Out[12]:
location indicator optical_fiber excitation_source photodetector dichroic_mirror fiber_depth_in_mm baseline_fluorescence normalized_fluorescence recording_target_type signal_to_noise_ratio cross_correlation_with_acceleration coordinates emission_filter excitation_filter
id
0 SNc GCaMP6f abc.Indicator at 0x139836832919440\nFi... Fiber1 abc.OpticalFiber at 0x139836832922464\n... ExcitationSource470 abc.ExcitationSource at 0x... PhotodetectorPMT abc.Photodetector at 0x139836... DichroicMirror abc.DichroicMirror at 0x1398368... 3.6 1.041767 0.686421 cell bodies in SNc 18.898114 0.067393 [nan, nan, nan] EmissionFilter abc.BandOpticalFilter at 0x1398... OpticalFilter470 abc.BandOpticalFilter at 0x13...
1 TS GCaMP6f abc.Indicator at 0x139836832919440\nFi... Fiber2 abc.OpticalFiber at 0x139836830370384\n... ExcitationSource470 abc.ExcitationSource at 0x... PhotodetectorPMT abc.Photodetector at 0x139836... DichroicMirror abc.DichroicMirror at 0x1398368... 1.0 1.050157 0.053596 axons in striatum 0.000000 0.014802 [3.0748749730962577, -0.58, 2.1599445426572172] EmissionFilter abc.BandOpticalFilter at 0x1398... OpticalFilter470 abc.BandOpticalFilter at 0x13...

The metadata on the optical fiber used to record the GCaMP fluorescence is added to nwbfile.devices and can be accessed as nwbfile.devices["Fiber1"] or can be accessed from the referenced optical fiber in the fiber_photometry_table_region of the FiberPhotometryResponseSeries.

In [13]:
fiber_photometry_table_region["optical_fiber"][0]
Out[13]:

Fiber1 (OpticalFiber)

description: The optical fiber used to record the GCaMP fluorescence from the SNc brain region.
manufacturer: Doric
model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF
numerical_aperture: 0.57
core_diameter_in_um: 200.0
In [14]:
fiber_photometry_table_region["indicator"][0]
Out[14]:

GCaMP6f (Indicator)

label: AAV-GCaMP6f
injection_location: SNc
injection_coordinates_in_mm
NumPy array
Data typefloat64
Shape(3,)
Array size24.00 bytes

[-3.25 1.55 -3.8 ]
In [15]:
fiber_photometry_table_region["excitation_source"][0]
Out[15]:

ExcitationSource470 (ExcitationSource)

description: Blue excitation light (470 nm LED, Thorlabs, M70F3) and violet excitation light (for the isosbestic control) were coupled into the optic fiber such that a power of 0.75 mW was delivered to the fiber tip. Then, 470 nm and 405 nm excitation were alternated at 100 Hz using a waveform generator, each filtered with a corresponding filter.
manufacturer: Thorlabs
model: M70F3
illumination_type: LED
excitation_wavelength_in_nm: 470.0
In [16]:
fiber_photometry_table_region["photodetector"][0]
Out[16]:

PhotodetectorPMT (Photodetector)

description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).
manufacturer: Hamamatsu Photonics
model: H10770PA-40
detector_type: PMT
detected_wavelength_in_nm: 520.0
In [17]:
fiber_photometry_table_region["dichroic_mirror"][0]
Out[17]:

DichroicMirror

description: The dichroic mirror used to separate green fluorescence from the excitation light.
manufacturer: Chroma Tech Corp
cut_on_wavelength_in_nm: 505.0
transmission_band_in_nm
NumPy array
Data typefloat64
Shape(2,)
Array size16.00 bytes

[505. 750.]
model: T505lpxr
In [18]:
fiber_photometry_table_region["emission_filter"][0]
Out[18]:

EmissionFilter (BandOpticalFilter)

description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.
manufacturer: Semrock
center_wavelength_in_nm: 540.0
bandwidth_in_nm: 50.0
filter_type: Bandpass
model: FF01-540/50-25
In [19]:
fiber_photometry_table_region["excitation_filter"][0]
Out[19]:

OpticalFilter470 (BandOpticalFilter)

description: The band-pass filter used to isolate the 470 nm excitation light.
manufacturer: Semrock
center_wavelength_in_nm: 472.0
bandwidth_in_nm: 30.0
filter_type: Bandpass
model: FF02-472/30-25

Access processed fiber photometry data ¶

This section demonstrates how to access the processed fiber photometry data in the NWBfile.

The processed fiber photometry data is stored in "processing/ophys" which can be accessed as nwbfile.processing["ophys"]. Within this processing module we can access the ∆F/F traces as nwbfile.processing["ophys"]["DfOverFFiberPhotometryResponseSeries"].

In [20]:
nwbfile.processing["ophys"]
Out[20]:

ophys (ProcessingModule)

description: Processed fiber photometry data.
DfOverFFiberPhotometryResponseSeries (FiberPhotometryResponseSeries)
starting_time: 13.91
rate: 100.0
resolution: -1.0
comments: no comments
description: DF/F calculated from green fluorescence collected during 470 nm illumination re-binned to 100 Hz and acquired with one or two optical fibers.
conversion: 1.0
offset: 0.0
unit: n.a.
data
HDF5 dataset
Data typefloat64
Shape(167634, 2)
Array size2.56 MiB
Chunk shape(167634, 2)
Compressiongzip
Compression opts4
Uncompressed size (bytes)2682144
Compressed size (bytes)2436481
Compression ratio1.1008269713574619
starting_time_unit: seconds
fiber_photometry_table_region (DynamicTableRegion)
description: source fibers
table (FiberPhotometryTable)
description: Contains the metadata for the fiber photometry experiment.
columns
location
Location of fiber.
indicator
Link to the indicator object.
optical_fiber
Link to the optical fiber device.
excitation_source
Link to the excitation source device.
photodetector
Link to the photodetector device.
dichroic_mirror
Link to the dichroic mirror device.
fiber_depth_in_mm
The depth of the optical fiber in the unit of millimeters.
baseline_fluorescence
The baseline fluorescence value for each fiber.
normalized_fluorescence
The normalized fluorescence value for each fiber.
recording_target_type
Defines whether recordings are made in axons vs cell bodies.
signal_to_noise_ratio
The signal to noise ratio for each fiber.
cross_correlation_with_acceleration
The cross-correlation between ΔF/F and acceleration.
coordinates
Fiber placement in stereotactic coordinates (AP, ML, DV) mm relative to Bregma.
emission_filter
Link to the emission filter device.
excitation_filter
Link to the excitation filter device.
table
location indicator optical_fiber excitation_source photodetector dichroic_mirror fiber_depth_in_mm baseline_fluorescence normalized_fluorescence recording_target_type signal_to_noise_ratio cross_correlation_with_acceleration coordinates emission_filter excitation_filter
id
0 SNc GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber1 abc.OpticalFiber at 0x139836832922464\nFields:\n core_diameter_in_um: 200.0\n description: The optical fiber used to record the GCaMP fluorescence from the SNc brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource470 abc.ExcitationSource at 0x139836830370064\nFields:\n description: Blue excitation light (470 nm LED, Thorlabs, M70F3) and violet excitation light (for the isosbestic control)\nwere coupled into the optic fiber such that a power of 0.75 mW was delivered to the fiber tip.\nThen, 470 nm and 405 nm excitation were alternated at 100 Hz using a waveform generator,\neach filtered with a corresponding filter.\n\n excitation_wavelength_in_nm: 470.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M70F3\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 3.6 1.041767 0.686421 cell bodies in SNc 18.898114 0.067393 [nan, nan, nan] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter470 abc.BandOpticalFilter at 0x139836830371024\nFields:\n bandwidth_in_nm: 30.0\n center_wavelength_in_nm: 472.0\n description: The band-pass filter used to isolate the 470 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF02-472/30-25\n
1 TS GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber2 abc.OpticalFiber at 0x139836830370384\nFields:\n core_diameter_in_um: 200.0\n description: The second optical fiber used to record the GCaMP fluorescence from the TS brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource470 abc.ExcitationSource at 0x139836830370064\nFields:\n description: Blue excitation light (470 nm LED, Thorlabs, M70F3) and violet excitation light (for the isosbestic control)\nwere coupled into the optic fiber such that a power of 0.75 mW was delivered to the fiber tip.\nThen, 470 nm and 405 nm excitation were alternated at 100 Hz using a waveform generator,\neach filtered with a corresponding filter.\n\n excitation_wavelength_in_nm: 470.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M70F3\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 1.0 1.050157 0.053596 axons in striatum 0.000000 0.014802 [3.0748749730962577, -0.58, 2.1599445426572172] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter470 abc.BandOpticalFilter at 0x139836830371024\nFields:\n bandwidth_in_nm: 30.0\n center_wavelength_in_nm: 472.0\n description: The band-pass filter used to isolate the 470 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF02-472/30-25\n
2 SNc GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber1 abc.OpticalFiber at 0x139836832922464\nFields:\n core_diameter_in_um: 200.0\n description: The optical fiber used to record the GCaMP fluorescence from the SNc brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource405 abc.ExcitationSource at 0x139836832922128\nFields:\n description: Violet LED (405 nm, Thorlabs, M405FP1) for the isosbestic control.\n excitation_wavelength_in_nm: 405.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M405FP1\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 3.6 1.041767 0.686421 cell bodies in SNc 18.898114 0.067393 [nan, nan, nan] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter405 abc.BandOpticalFilter at 0x139836830370704\nFields:\n bandwidth_in_nm: 15.0\n center_wavelength_in_nm: 406.0\n description: The band-pass filter used to isolate the 405 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-406/15-25\n
3 TS GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber2 abc.OpticalFiber at 0x139836830370384\nFields:\n core_diameter_in_um: 200.0\n description: The second optical fiber used to record the GCaMP fluorescence from the TS brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource405 abc.ExcitationSource at 0x139836832922128\nFields:\n description: Violet LED (405 nm, Thorlabs, M405FP1) for the isosbestic control.\n excitation_wavelength_in_nm: 405.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M405FP1\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 1.0 1.050157 0.053596 axons in striatum 0.000000 0.014802 [3.0748749730962577, -0.58, 2.1599445426572172] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter405 abc.BandOpticalFilter at 0x139836830370704\nFields:\n bandwidth_in_nm: 15.0\n center_wavelength_in_nm: 406.0\n description: The band-pass filter used to isolate the 405 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-406/15-25\n
DfOverFFiberPhotometryResponseSeriesIsosbestic (FiberPhotometryResponseSeries)
starting_time: 13.91
rate: 100.0
resolution: -1.0
comments: no comments
description: DF/F calculated from green fluorescence collected at its isosbestic wavelength (405 nm) re-binned to 100 Hz and acquired with one or two optical fibers.
conversion: 1.0
offset: 0.0
unit: n.a.
data
HDF5 dataset
Data typefloat64
Shape(167634, 2)
Array size2.56 MiB
Chunk shape(167634, 2)
Compressiongzip
Compression opts4
Uncompressed size (bytes)2682144
Compressed size (bytes)2544179
Compression ratio1.0542277096069106
starting_time_unit: seconds
fiber_photometry_table_region (DynamicTableRegion)
description: source fibers
table (FiberPhotometryTable)
description: Contains the metadata for the fiber photometry experiment.
columns
location
Location of fiber.
indicator
Link to the indicator object.
optical_fiber
Link to the optical fiber device.
excitation_source
Link to the excitation source device.
photodetector
Link to the photodetector device.
dichroic_mirror
Link to the dichroic mirror device.
fiber_depth_in_mm
The depth of the optical fiber in the unit of millimeters.
baseline_fluorescence
The baseline fluorescence value for each fiber.
normalized_fluorescence
The normalized fluorescence value for each fiber.
recording_target_type
Defines whether recordings are made in axons vs cell bodies.
signal_to_noise_ratio
The signal to noise ratio for each fiber.
cross_correlation_with_acceleration
The cross-correlation between ΔF/F and acceleration.
coordinates
Fiber placement in stereotactic coordinates (AP, ML, DV) mm relative to Bregma.
emission_filter
Link to the emission filter device.
excitation_filter
Link to the excitation filter device.
table
location indicator optical_fiber excitation_source photodetector dichroic_mirror fiber_depth_in_mm baseline_fluorescence normalized_fluorescence recording_target_type signal_to_noise_ratio cross_correlation_with_acceleration coordinates emission_filter excitation_filter
id
0 SNc GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber1 abc.OpticalFiber at 0x139836832922464\nFields:\n core_diameter_in_um: 200.0\n description: The optical fiber used to record the GCaMP fluorescence from the SNc brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource470 abc.ExcitationSource at 0x139836830370064\nFields:\n description: Blue excitation light (470 nm LED, Thorlabs, M70F3) and violet excitation light (for the isosbestic control)\nwere coupled into the optic fiber such that a power of 0.75 mW was delivered to the fiber tip.\nThen, 470 nm and 405 nm excitation were alternated at 100 Hz using a waveform generator,\neach filtered with a corresponding filter.\n\n excitation_wavelength_in_nm: 470.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M70F3\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 3.6 1.041767 0.686421 cell bodies in SNc 18.898114 0.067393 [nan, nan, nan] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter470 abc.BandOpticalFilter at 0x139836830371024\nFields:\n bandwidth_in_nm: 30.0\n center_wavelength_in_nm: 472.0\n description: The band-pass filter used to isolate the 470 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF02-472/30-25\n
1 TS GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber2 abc.OpticalFiber at 0x139836830370384\nFields:\n core_diameter_in_um: 200.0\n description: The second optical fiber used to record the GCaMP fluorescence from the TS brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource470 abc.ExcitationSource at 0x139836830370064\nFields:\n description: Blue excitation light (470 nm LED, Thorlabs, M70F3) and violet excitation light (for the isosbestic control)\nwere coupled into the optic fiber such that a power of 0.75 mW was delivered to the fiber tip.\nThen, 470 nm and 405 nm excitation were alternated at 100 Hz using a waveform generator,\neach filtered with a corresponding filter.\n\n excitation_wavelength_in_nm: 470.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M70F3\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 1.0 1.050157 0.053596 axons in striatum 0.000000 0.014802 [3.0748749730962577, -0.58, 2.1599445426572172] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter470 abc.BandOpticalFilter at 0x139836830371024\nFields:\n bandwidth_in_nm: 30.0\n center_wavelength_in_nm: 472.0\n description: The band-pass filter used to isolate the 470 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF02-472/30-25\n
2 SNc GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber1 abc.OpticalFiber at 0x139836832922464\nFields:\n core_diameter_in_um: 200.0\n description: The optical fiber used to record the GCaMP fluorescence from the SNc brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource405 abc.ExcitationSource at 0x139836832922128\nFields:\n description: Violet LED (405 nm, Thorlabs, M405FP1) for the isosbestic control.\n excitation_wavelength_in_nm: 405.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M405FP1\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 3.6 1.041767 0.686421 cell bodies in SNc 18.898114 0.067393 [nan, nan, nan] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter405 abc.BandOpticalFilter at 0x139836830370704\nFields:\n bandwidth_in_nm: 15.0\n center_wavelength_in_nm: 406.0\n description: The band-pass filter used to isolate the 405 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-406/15-25\n
3 TS GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber2 abc.OpticalFiber at 0x139836830370384\nFields:\n core_diameter_in_um: 200.0\n description: The second optical fiber used to record the GCaMP fluorescence from the TS brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource405 abc.ExcitationSource at 0x139836832922128\nFields:\n description: Violet LED (405 nm, Thorlabs, M405FP1) for the isosbestic control.\n excitation_wavelength_in_nm: 405.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M405FP1\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 1.0 1.050157 0.053596 axons in striatum 0.000000 0.014802 [3.0748749730962577, -0.58, 2.1599445426572172] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter405 abc.BandOpticalFilter at 0x139836830370704\nFields:\n bandwidth_in_nm: 15.0\n center_wavelength_in_nm: 406.0\n description: The band-pass filter used to isolate the 405 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-406/15-25\n
In [21]:
df_over_f_traces = nwbfile.processing["ophys"]["DfOverFFiberPhotometryResponseSeries"]
df_over_f_traces
Out[21]:

DfOverFFiberPhotometryResponseSeries (FiberPhotometryResponseSeries)

starting_time: 13.91
rate: 100.0
resolution: -1.0
comments: no comments
description: DF/F calculated from green fluorescence collected during 470 nm illumination re-binned to 100 Hz and acquired with one or two optical fibers.
conversion: 1.0
offset: 0.0
unit: n.a.
data
HDF5 dataset
Data typefloat64
Shape(167634, 2)
Array size2.56 MiB
Chunk shape(167634, 2)
Compressiongzip
Compression opts4
Uncompressed size (bytes)2682144
Compressed size (bytes)2436481
Compression ratio1.1008269713574619
starting_time_unit: seconds
fiber_photometry_table_region (DynamicTableRegion)
description: source fibers
table (FiberPhotometryTable)
description: Contains the metadata for the fiber photometry experiment.
columns
location
Location of fiber.
indicator
Link to the indicator object.
optical_fiber
Link to the optical fiber device.
excitation_source
Link to the excitation source device.
photodetector
Link to the photodetector device.
dichroic_mirror
Link to the dichroic mirror device.
fiber_depth_in_mm
The depth of the optical fiber in the unit of millimeters.
baseline_fluorescence
The baseline fluorescence value for each fiber.
normalized_fluorescence
The normalized fluorescence value for each fiber.
recording_target_type
Defines whether recordings are made in axons vs cell bodies.
signal_to_noise_ratio
The signal to noise ratio for each fiber.
cross_correlation_with_acceleration
The cross-correlation between ΔF/F and acceleration.
coordinates
Fiber placement in stereotactic coordinates (AP, ML, DV) mm relative to Bregma.
emission_filter
Link to the emission filter device.
excitation_filter
Link to the excitation filter device.
table
location indicator optical_fiber excitation_source photodetector dichroic_mirror fiber_depth_in_mm baseline_fluorescence normalized_fluorescence recording_target_type signal_to_noise_ratio cross_correlation_with_acceleration coordinates emission_filter excitation_filter
id
0 SNc GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber1 abc.OpticalFiber at 0x139836832922464\nFields:\n core_diameter_in_um: 200.0\n description: The optical fiber used to record the GCaMP fluorescence from the SNc brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource470 abc.ExcitationSource at 0x139836830370064\nFields:\n description: Blue excitation light (470 nm LED, Thorlabs, M70F3) and violet excitation light (for the isosbestic control)\nwere coupled into the optic fiber such that a power of 0.75 mW was delivered to the fiber tip.\nThen, 470 nm and 405 nm excitation were alternated at 100 Hz using a waveform generator,\neach filtered with a corresponding filter.\n\n excitation_wavelength_in_nm: 470.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M70F3\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 3.6 1.041767 0.686421 cell bodies in SNc 18.898114 0.067393 [nan, nan, nan] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter470 abc.BandOpticalFilter at 0x139836830371024\nFields:\n bandwidth_in_nm: 30.0\n center_wavelength_in_nm: 472.0\n description: The band-pass filter used to isolate the 470 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF02-472/30-25\n
1 TS GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber2 abc.OpticalFiber at 0x139836830370384\nFields:\n core_diameter_in_um: 200.0\n description: The second optical fiber used to record the GCaMP fluorescence from the TS brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource470 abc.ExcitationSource at 0x139836830370064\nFields:\n description: Blue excitation light (470 nm LED, Thorlabs, M70F3) and violet excitation light (for the isosbestic control)\nwere coupled into the optic fiber such that a power of 0.75 mW was delivered to the fiber tip.\nThen, 470 nm and 405 nm excitation were alternated at 100 Hz using a waveform generator,\neach filtered with a corresponding filter.\n\n excitation_wavelength_in_nm: 470.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M70F3\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 1.0 1.050157 0.053596 axons in striatum 0.000000 0.014802 [3.0748749730962577, -0.58, 2.1599445426572172] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter470 abc.BandOpticalFilter at 0x139836830371024\nFields:\n bandwidth_in_nm: 30.0\n center_wavelength_in_nm: 472.0\n description: The band-pass filter used to isolate the 470 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF02-472/30-25\n
2 SNc GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber1 abc.OpticalFiber at 0x139836832922464\nFields:\n core_diameter_in_um: 200.0\n description: The optical fiber used to record the GCaMP fluorescence from the SNc brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource405 abc.ExcitationSource at 0x139836832922128\nFields:\n description: Violet LED (405 nm, Thorlabs, M405FP1) for the isosbestic control.\n excitation_wavelength_in_nm: 405.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M405FP1\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 3.6 1.041767 0.686421 cell bodies in SNc 18.898114 0.067393 [nan, nan, nan] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter405 abc.BandOpticalFilter at 0x139836830370704\nFields:\n bandwidth_in_nm: 15.0\n center_wavelength_in_nm: 406.0\n description: The band-pass filter used to isolate the 405 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-406/15-25\n
3 TS GCaMP6f abc.Indicator at 0x139836832919440\nFields:\n injection_coordinates_in_mm: [-3.25 1.55 -3.8 ]\n injection_location: SNc\n label: AAV-GCaMP6f\n Fiber2 abc.OpticalFiber at 0x139836830370384\nFields:\n core_diameter_in_um: 200.0\n description: The second optical fiber used to record the GCaMP fluorescence from the TS brain region.\n manufacturer: Doric\n model: MFP_200/230/900-0.57_1.5m_FC-FLT_LAF\n numerical_aperture: 0.57\n ExcitationSource405 abc.ExcitationSource at 0x139836832922128\nFields:\n description: Violet LED (405 nm, Thorlabs, M405FP1) for the isosbestic control.\n excitation_wavelength_in_nm: 405.0\n illumination_type: LED\n manufacturer: Thorlabs\n model: M405FP1\n PhotodetectorPMT abc.Photodetector at 0x139836832922800\nFields:\n description: Hamamatsu GaAsP photomultiplier tube (signal amplified using Stanford Research Systems SR570 preamplifier).\n detected_wavelength_in_nm: 520.0\n detector_type: PMT\n manufacturer: Hamamatsu Photonics\n model: H10770PA-40\n DichroicMirror abc.DichroicMirror at 0x139836832921456\nFields:\n cut_on_wavelength_in_nm: 505.0\n description: The dichroic mirror used to separate green fluorescence from the excitation light.\n manufacturer: Chroma Tech Corp\n model: T505lpxr\n transmission_band_in_nm: [505. 750.]\n 1.0 1.050157 0.053596 axons in striatum 0.000000 0.014802 [3.0748749730962577, -0.58, 2.1599445426572172] EmissionFilter abc.BandOpticalFilter at 0x139836832921792\nFields:\n bandwidth_in_nm: 50.0\n center_wavelength_in_nm: 540.0\n description: The band-pass filter used to further filter the green fluorescence after it was separated from the excitation light by a dichroic mirror.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-540/50-25\n OpticalFilter405 abc.BandOpticalFilter at 0x139836830370704\nFields:\n bandwidth_in_nm: 15.0\n center_wavelength_in_nm: 406.0\n description: The band-pass filter used to isolate the 405 nm excitation light.\n filter_type: Bandpass\n manufacturer: Semrock\n model: FF01-406/15-25\n
In [22]:
import pandas as pd
from matplotlib import pyplot as plt

# Prepare data for plotting
data = df_over_f_traces.data[0:3000, 0]
timestamps = df_over_f_traces.get_timestamps()[0:3000]

control_signal = nwbfile.processing["ophys"]["DfOverFFiberPhotometryResponseSeriesIsosbestic"]
control_data = control_signal.data[0:3000, 0]

fig, ax = plt.subplots(nrows=2, ncols=1, figsize=(8, 3), dpi=300, sharex=True)

# Plot data
ax[0].plot(timestamps, data, color="green", linewidth=0.5)

# Plot control data with offset
ax[1].plot(timestamps, control_data, color="grey", linewidth=0.1)

ax[0].spines['top'].set_visible(False)
ax[0].spines['right'].set_visible(False)
ax[0].spines['bottom'].set_visible(False)
ax[1].spines['top'].set_visible(False)
ax[1].spines['right'].set_visible(False)

ax[0].legend(["∆F/F Fiber 1"], frameon=False, bbox_to_anchor=(.95, 1), loc='upper left', prop={'size': 8})
ax[1].legend(["Isosbestic control"], frameon=False, bbox_to_anchor=(.96, 1), loc='upper left', prop={'size': 8})
ax[1].tick_params(axis='y', labelsize=8)
ax[0].tick_params(axis='y', labelsize=8)


plt.xlabel('Time (s)', fontsize=8)
plt.tick_params(axis='x', labelsize=8)
plt.show()
No description has been provided for this image

Access processed behavior ¶

This section demonstrates how to access the processed behavior data in the NWBfile.

The processed behavior data (veloctity, acceleration) is stored in "processing/behavior" which can be accessed as nwbfile.processing["behavior"]. Within this processing module we can access the velocity from the rotary encoder as nwbfile.processing["behavior"]["Velocity"].

In [23]:
nwbfile.processing["behavior"]["Velocity"]
Out[23]:

Velocity (TimeSeries)

starting_time: 13.91
rate: 100.0
resolution: -1.0
comments: no comments
description: The velocity from rotary encoder converted to m/s.
conversion: 1.0
offset: 0.0
unit: m/s
data
HDF5 dataset
Data typefloat64
Shape(167634,)
Array size1.28 MiB
Chunk shape(167634,)
Compressiongzip
Compression opts4
Uncompressed size (bytes)1341072
Compressed size (bytes)1219633
Compression ratio1.099570116584251
starting_time_unit: seconds

Access derived events¶

Wheel events¶

The derived events from the wheel (accelerations, decelerations) are also stored in an EventsTable object using ndx-events and can be accessed as nwbfile.processing["behavior"]["WheelEvents"]. The id and the description of the events can be accessed as nwbfile.processing["behavior"]["WheelEventTypes"].

In [24]:
import pandas as pd

wheel_events = pd.merge(
    left=nwbfile.processing["behavior"]["WheelEvents"][:],
    right=nwbfile.processing["behavior"]["WheelEventTypes"][:],
    left_on="event_type",
    right_on="id",
)
wheel_events.head()
Out[24]:
timestamp event_type event_name event_type_description
0 13.95 0 Acceleration onset The times of the Acceleration onset event.
1 16.93 0 Acceleration onset The times of the Acceleration onset event.
2 21.87 0 Acceleration onset The times of the Acceleration onset event.
3 27.46 1 Deceleration onset The times of the Deceleration onset event.
4 27.83 0 Acceleration onset The times of the Acceleration onset event.
In [25]:
import pandas as pd
from matplotlib import pyplot as plt

# Prepare data for plotting
data = df_over_f_traces.data[:3000, 0]
timestamps = df_over_f_traces.get_timestamps()[:3000]

velocity_data = nwbfile.processing["behavior"]["Velocity"].data[:3000]

# Add events during selected time
accelerations = wheel_events[wheel_events["event_type"] == 0]
accelerations = accelerations[accelerations["timestamp"] <= 45]["timestamp"]

decelerations = wheel_events[wheel_events["event_type"] == 1]
decelerations = decelerations[decelerations["timestamp"] <= 45]["timestamp"]

fig, ax = plt.subplots(nrows=1, ncols=1, figsize=(6, 2), dpi=300, sharex=True)

# Plot the main data
data_handle, = ax.plot(timestamps, data, color="green", linewidth=0.5, label="∆F/F from SNc")

# Add vertical lines for events
for time in accelerations:
    ax.axvline(time, color='grey', linewidth=0.1, linestyle="--")
for time in decelerations:
    ax.axvline(time, color='grey', linewidth=0.1, linestyle="--")

# Add scatter for acceleration and deceleration
arrowhead_size = 6  # Adjust this value to change the size of the arrowheads
accel_handle = ax.scatter(accelerations, [1.05] * len(accelerations), color='grey', marker='^', s=arrowhead_size, label='▲ Acceleration')
decel_handle = ax.scatter(decelerations, [1.05] * len(decelerations), marker='v', s=arrowhead_size, facecolor='none', edgecolor='grey', label='▽ Deceleration')

# Plot the velocity data on the background
velocity_handle, = ax.plot(timestamps, velocity_data, color="black", linewidth=0.1, zorder=1, label="Velocity")

# Hide top and right spines
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)

# Add legends
handles = [data_handle, accel_handle, decel_handle, velocity_handle]
labels = ["∆F/F from SNc", "Acceleration", "Deceleration", "Velocity"]
ax.legend(handles, labels, frameon=False, bbox_to_anchor=(.95, 1), loc='upper left', prop={'size': 8})

# Adjust tick parameters
ax.tick_params(axis='y', labelsize=8)

plt.xlabel('Time (s)', fontsize=8)
plt.tick_params(axis='x', labelsize=8)
plt.tight_layout()
plt.show()
No description has been provided for this image

Stimuli events¶

The times when the mouse was moving and the reward, air puff, light, and licking event times are added to nwbfile.processing["behavior"]["Events"]

In [26]:
events = nwbfile.processing["behavior"]["Events"][:]
events.head()
Out[26]:
start_time stop_time event_type tags timeseries
id
0 13.91 201.82 MovOnOff [] [(55642, 751678, Velocity pynwb.base.TimeSerie...
1 28.59 28.67 Reward [long] [(114365, 320, Reward pynwb.base.TimeSeries at...
2 28.85 32.24 Licking [] [(115405, 13561, Licking pynwb.base.TimeSeries...
3 32.42 32.52 Licking [] [(129686, 400, Licking pynwb.base.TimeSeries a...
4 32.55 32.66 Licking [] [(130206, 440, Licking pynwb.base.TimeSeries a...
In [27]:
import pandas as pd
from matplotlib import pyplot as plt
import matplotlib.lines as mlines

# Prepare data for plotting
data = df_over_f_traces.data[3000:5000, 0]
timestamps = df_over_f_traces.get_timestamps()[3000:5000]

fig, ax = plt.subplots(nrows=1, ncols=1, figsize=(6, 2), dpi=300, sharex=True)

# Plot the main data
ax.plot(timestamps, data, color="green", linewidth=0.5)

licking_events = events[events["event_type"] == "Licking"]
licking_events = licking_events[(licking_events["start_time"] >= timestamps[0]) & (licking_events["stop_time"] < timestamps[-1])]

airpuff_events = events[events["event_type"] == "AirPuff"]
airpuff_events = airpuff_events[(airpuff_events["start_time"] >= timestamps[0]) & (airpuff_events["stop_time"] < timestamps[-1])]

for ind, row in licking_events.iterrows():
    ax.fill_between(timestamps, max(data), where=(timestamps >= row["start_time"]) & (timestamps <= row["stop_time"]), color='blue', edgecolor='none', alpha=0.1)

for ind, row in airpuff_events.iterrows():
    ax.fill_between(timestamps, max(data), where=(timestamps >= row["start_time"]) & (timestamps <= row["stop_time"]), color='red', edgecolor='none', alpha=0.1)

ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)

# Create proxy lines for legend entries with corresponding colors and transparency
green_line = mlines.Line2D([], [], color='green', label='∆F/F from SNc', alpha=0.5)
blue_line = mlines.Line2D([], [], color='blue', label='Licking', alpha=0.1)
red_line = mlines.Line2D([], [], color='red', label='AirPuff', alpha=0.1)

# Set legends with proxy lines
ax.legend(handles=[green_line, blue_line, red_line], frameon=False, bbox_to_anchor=(.95, 1), loc='upper left', prop={'size': 8})

ax.tick_params(axis='y', labelsize=8)

plt.xlabel('Time (s)', fontsize=8)
plt.tick_params(axis='x', labelsize=8)
plt.show()
No description has been provided for this image

Fluorescence peaks¶

The onset times of large fluorescence peaks are also stored in an EventsTable object using ndx-events and can be accessed as nwbfile.analysis["PeakFluorescenceEvents"]. The id and the description of the events can be accessed as nwbfile.analysis["PeakFluorescenceEventTypes"].

In [28]:
import pandas as pd

peak_events = pd.merge(
    left=nwbfile.analysis["PeakFluorescenceEvents"][:],
    right=nwbfile.analysis["PeakFluorescenceEventTypes"][:],
    left_on="event_type",
    right_on="id",
)
peak_events.tail()
Out[28]:
timestamp event_type peak_fluorescence event_name event_type_description
1101 1683.64 0 0.099074 peaksG Large transient peaks for Fiber 1 fluorescence
1102 1685.67 0 0.058068 peaksG Large transient peaks for Fiber 1 fluorescence
1103 1685.67 1 0.058068 peaksGRun Large transient peaks occurring during running...
1104 1689.86 0 0.113421 peaksG Large transient peaks for Fiber 1 fluorescence
1105 1689.86 1 0.113421 peaksGRun Large transient peaks occurring during running...
In [29]:
import pandas as pd
from matplotlib import pyplot as plt

# Prepare data for plotting
data = df_over_f_traces.data[:3000, 0]
timestamps = df_over_f_traces.get_timestamps()[:3000]

# Add events during selected time
peak_event_times = peak_events[peak_events["event_type"] == 0]
peak_event_times = peak_event_times[peak_event_times["timestamp"] <= 45]["timestamp"]

fig, ax = plt.subplots(nrows=1, ncols=1, figsize=(6, 2), dpi=300, sharex=True)

# Plot the main data
data_handle, = ax.plot(timestamps, data, color="green", linewidth=0.5, label="∆F/F from SNc")

# Add vertical lines for events
for time in peak_event_times:
    ax.axvline(time, color='orange', linewidth=0.1, linestyle="--")

# Add scatter for peak events
arrowhead_size = 6  # Adjust this value to change the size of the arrowheads
peak_handle = ax.scatter(peak_event_times, [1.05] * len(peak_event_times), color='orange', marker='*', s=arrowhead_size, label='Peak fluorescence')

# Hide top and right spines
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)

# Add legends
handles = [data_handle, peak_handle]
labels = ["∆F/F from SNc", "Peak fluorescence"]
ax.legend(handles, labels, frameon=False, bbox_to_anchor=(.95, 1), loc='upper left', prop={'size': 6})

# Adjust tick parameters
ax.tick_params(axis='y', labelsize=6)

plt.xlabel('Time (s)', fontsize=6)
plt.tick_params(axis='x', labelsize=6)
plt.tight_layout()
plt.show()
No description has been provided for this image

View NWB ¶

This section demonstrates how to use Neurosift to interactively visualize the data in the NWBfile.

In [30]:
from IPython.display import IFrame

url = "https://neurosift.app/?p=/nwb&url=https://api.dandiarchive.org/api/assets/9994f42b-fdbb-4938-a3a3-6add744bf169/download/&dandisetId=001038&dandisetVersion=draft&tab=neurodata-items:neurodata-item:/processing/ophys/DfOverFFiberPhotometryResponseSeries|FiberPhotometryResponseSeries@neurodata-item:/processing/ophys/DfOverFFiberPhotometryResponseSeriesIsosbestic|FiberPhotometryResponseSeries@neurodata-item:/processing/behavior/Velocity|TimeSeries"
IFrame(url, width=1200, height=1000)
Out[30]: