API

This section provides detailed documentation for all classes and methods in the ndx-microscopy extension.

Device Components

MicroscopeModel

class ndx_microscopy.MicroscopeModel(name, description=None, manufacturer=None, model_number=None, model_name=None, serial_number=None, skip_post_init=False)

Bases: DeviceModel

Args:

name (str): the name of this device description (str): Description of the device as free-form text. If there is any software/firmware associated with the device, the names and versions of those can be added to NWBFile.was_generated_by. manufacturer (str): The name of the manufacturer of the device, e.g., Imec, Plexon, Thorlabs. model_number (str): The model number (or part/product number) of the device, e.g., PRB_1_4_0480_1, PLX-VP-32-15SE(75)-(260-80)(460-10)-300-(1)CON/32m-V, BERGAMO. model_name (str): The model name of the device, e.g., Neuropixels 1.0, V-Probe, Bergamo III. serial_number (str): The serial number of the device. skip_post_init (bool): bool to skip post_init

namespace = 'ndx-microscopy'
neurodata_type = 'MicroscopeModel'
post_init_method = None

Microscope

class ndx_microscopy.Microscope(name, description=None, manufacturer=None, model_number=None, model_name=None, serial_number=None, model=None, technique=None, skip_post_init=False)

Bases: DeviceInstance

Args:

name (str): the name of this device description (str): Description of the device as free-form text. If there is any software/firmware associated with the device, the names and versions of those can be added to NWBFile.was_generated_by. manufacturer (str): The name of the manufacturer of the device, e.g., Imec, Plexon, Thorlabs. model_number (str): The model number (or part/product number) of the device, e.g., PRB_1_4_0480_1, PLX-VP-32-15SE(75)-(260-80)(460-10)-300-(1)CON/32m-V, BERGAMO. model_name (str): The model name of the device, e.g., Neuropixels 1.0, V-Probe, Bergamo III. serial_number (str): The serial number of the device. model (DeviceModel): The model of the device instance. technique (str): Imaging technique used by the microscope (e.g. scan mirrors, light sheet, temporal focusing, acusto-optical modulation, piezo z-scan mirrors). skip_post_init (bool): bool to skip post_init

namespace = 'ndx-microscopy'
neurodata_type = 'Microscope'
post_init_method = None
property technique

Imaging technique used by the microscope (e.g. scan mirrors, light sheet, temporal focusing, acusto-optical modulation, piezo z-scan mirrors).

MicroscopyRig

class ndx_microscopy.MicroscopyRig(name, description, microscope, excitation_source=None, excitation_filter=None, dichroic_mirror=None, photodetector=None, emission_filter=None, optical_lens=None, skip_post_init=False)

Bases: NWBContainer

Args:

name (str): the name of this container description (str): Description of the microscopy rig. microscope (Microscope): Link to Microscope object which contains metadata about the microscope used to acquire imaging data. excitation_source (ExcitationSource): Link to ExcitationSource object which contains metadata about the excitation source device. If it is a pulsed excitation source link a PulsedExcitationSource object. excitation_filter (OpticalFilter): Link to OpticalFilter object which contains metadata about the excitation filter. It can be either a BandOpticalFilter (e.g., ‘Bandpass’, ‘Bandstop’, ‘Longpass’, ‘Shortpass’) or a EdgeOpticalFilter (Longpass or Shortpass). dichroic_mirror (DichroicMirror): Link to DichroicMirror object which contains metadata about the dichroic mirror. photodetector (Photodetector): Link to Photodetector object which contains metadata about the photodetector device. emission_filter (OpticalFilter): Link to OpticalFilter object which contains metadata about the emission filter. It can be either a BandOpticalFilter (e.g., ‘Bandpass’, ‘Bandstop’, ‘Longpass’, ‘Shortpass’) or a EdgeOpticalFilter (Longpass or Shortpass). optical_lens (OpticalLens): Link to OpticalLens object which contains metadata about the optical lens used in the microscopy rig. skip_post_init (bool): bool to skip post_init

property description

Description of the microscopy rig.

property dichroic_mirror

Link to DichroicMirror object which contains metadata about the dichroic mirror.

property emission_filter

Link to OpticalFilter object which contains metadata about the emission filter. It can be either a BandOpticalFilter (e.g., ‘Bandpass’, ‘Bandstop’, ‘Longpass’, ‘Shortpass’) or a EdgeOpticalFilter (Longpass or Shortpass).

property excitation_filter

Link to OpticalFilter object which contains metadata about the excitation filter. It can be either a BandOpticalFilter (e.g., ‘Bandpass’, ‘Bandstop’, ‘Longpass’, ‘Shortpass’) or a EdgeOpticalFilter (Longpass or Shortpass).

property excitation_source

Link to ExcitationSource object which contains metadata about the excitation source device. If it is a pulsed excitation source link a PulsedExcitationSource object.

property microscope

Link to Microscope object which contains metadata about the microscope used to acquire imaging data.

namespace = 'ndx-microscopy'
neurodata_type = 'MicroscopyRig'
property optical_lens

Link to OpticalLens object which contains metadata about the optical lens used in the microscopy rig.

property photodetector

Link to Photodetector object which contains metadata about the photodetector device.

post_init_method = None

MicroscopyChannel

class ndx_microscopy.MicroscopyChannel(name, excitation_wavelength_in_nm, emission_wavelength_in_nm, indicator, description=None, skip_post_init=False)

Bases: NWBContainer

Args:

name (str): Name of the channel. excitation_wavelength_in_nm (float or float64): Wavelength of the excitation light in nanometers. emission_wavelength_in_nm (float or float64): Wavelength of the emission light in nanometers. indicator (Indicator): Indicator object which contains metadata about the indicator used in this light path. description (str): Description of the channel. skip_post_init (bool): bool to skip post_init

property description

Description of the channel.

property emission_wavelength_in_nm

Wavelength of the emission light in nanometers.

property excitation_wavelength_in_nm

Wavelength of the excitation light in nanometers.

property indicator

Indicator object which contains metadata about the indicator used in this light path.

namespace = 'ndx-microscopy'
neurodata_type = 'MicroscopyChannel'
post_init_method = None

Illumination Pattern Components

IlluminationPattern

class ndx_microscopy.IlluminationPattern(name, description=None, skip_post_init=False)

Bases: NWBContainer

Args:

name (str): the name of this container description (str): General description of the illumination pattern used. skip_post_init (bool): bool to skip post_init

property description

General description of the illumination pattern used.

namespace = 'ndx-microscopy'
neurodata_type = 'IlluminationPattern'
post_init_method = None

LineScan

class ndx_microscopy.LineScan(name, description=None, scan_direction=None, line_rate_in_Hz=None, dwell_time_in_s=None, skip_post_init=False)

Bases: IlluminationPattern

Args:

name (str): the name of this container description (str): General description of the illumination pattern used. scan_direction (str): Direction of line scanning (horizontal or vertical). line_rate_in_Hz (float or float64): Rate of line scanning in lines per second. dwell_time_in_s (float or float64): Average time spent at each scanned point. skip_post_init (bool): bool to skip post_init

property dwell_time_in_s

Average time spent at each scanned point.

property line_rate_in_Hz

Rate of line scanning in lines per second.

namespace = 'ndx-microscopy'
neurodata_type = 'LineScan'
post_init_method = None
property scan_direction

Direction of line scanning (horizontal or vertical).

PlaneAcquisition

class ndx_microscopy.PlaneAcquisition(name, description=None, point_spread_function_in_um=None, illumination_angle_in_degrees=None, plane_rate_in_Hz=None, skip_post_init=False)

Bases: IlluminationPattern

Args:

name (str): the name of this container description (str): General description of the illumination pattern used. point_spread_function_in_um (str): Estimated plane spatial profile or point spread function, expressed as mean [um] ± s.d [um]. illumination_angle_in_degrees (float or float64): Angle of illumination in degrees. plane_rate_in_Hz (float or float64): Rate of plane acquisition in planes per second. skip_post_init (bool): bool to skip post_init

property illumination_angle_in_degrees

Angle of illumination in degrees.

namespace = 'ndx-microscopy'
neurodata_type = 'PlaneAcquisition'
property plane_rate_in_Hz

Rate of plane acquisition in planes per second.

property point_spread_function_in_um

Estimated plane spatial profile or point spread function, expressed as mean [um] ± s.d [um].

post_init_method = None

RandomAccessScan

class ndx_microscopy.RandomAccessScan(name, description=None, max_scan_points=None, dwell_time_in_s=None, scanning_pattern=None, skip_post_init=False)

Bases: IlluminationPattern

Args:

name (str): the name of this container description (str): General description of the illumination pattern used. max_scan_points (float or float32 or float64 or int8 or int16 or int32 or int64 or int or uint8 or uint16 or uint32 or uint64): Maximum number of points that can be scanned in a single frame. dwell_time_in_s (float or float64): Average time spent at each scanned point. scanning_pattern (str): Description of the point selection strategy. skip_post_init (bool): bool to skip post_init

property dwell_time_in_s

Average time spent at each scanned point.

property max_scan_points

Maximum number of points that can be scanned in a single frame.

namespace = 'ndx-microscopy'
neurodata_type = 'RandomAccessScan'
post_init_method = None
property scanning_pattern

Description of the point selection strategy.

Imaging Space Components

ImagingSpace

class ndx_microscopy.ImagingSpace(name, description, illumination_pattern, location=None, reference_frame=None, orientation=None, origin_coordinates=None, origin_coordinates__unit='micrometers', skip_post_init=False)

Bases: NWBContainer

Args:

name (str): the name of this container description (str): Description of the imaging space. illumination_pattern (IlluminationPattern): IlluminationPattern object containing metadata about the method used to acquire this imaging data. location (str): General estimate of location in the brain being subset by this space. Specify the area, layer, etc. Use standard atlas names for anatomical regions when possible. Specify ‘whole brain’ if the entire brain is strictly contained within the space. reference_frame (str): The reference frame for the origin coordinates. For example, ‘bregma’ or ‘lambda’ for rodent brains. If the origin coordinates are relative to a specific anatomical landmark, specify that here. orientation (str): A 3-letter string. One of A,P,L,R,S,I for each of x, y, and z. For example, the most common orientation is ‘RAS’, which means x is right, y is anterior, and z is superior (a.k.a. dorsal). For dorsal/ventral use ‘S/I’ (superior/inferior). In the AnatomicalCoordinatesTable, an orientation of ‘RAS’ corresponds to coordinates in the order of (ML (x), AP (y), DV (z)). origin_coordinates (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO): Physical location in stereotactic coordinates for the first element of the grid. See reference_frame to determine what the coordinates are relative to (e.g., bregma). origin_coordinates__unit (str): Measurement units for origin coordinates. The default value is ‘micrometers’. skip_post_init (bool): bool to skip post_init

property description

Description of the imaging space.

property illumination_pattern

IlluminationPattern object containing metadata about the method used to acquire this imaging data.

property location

General estimate of location in the brain being subset by this space. Specify the area, layer, etc. Use standard atlas names for anatomical regions when possible. Specify ‘whole brain’ if the entire brain is strictly contained within the space.

namespace = 'ndx-microscopy'
neurodata_type = 'ImagingSpace'
property orientation

A 3-letter string. One of A,P,L,R,S,I for each of x, y, and z. For example, the most common orientation is ‘RAS’, which means x is right, y is anterior, and z is superior (a.k.a. dorsal). For dorsal/ventral use ‘S/I’ (superior/inferior). In the AnatomicalCoordinatesTable, an orientation of ‘RAS’ corresponds to coordinates in the order of (ML (x), AP (y), DV (z)).

property origin_coordinates

Physical location in stereotactic coordinates for the first element of the grid. See reference_frame to determine what the coordinates are relative to (e.g., bregma).

property origin_coordinates__unit

Measurement units for origin coordinates. The default value is ‘micrometers’.

post_init_method = None
property reference_frame

The reference frame for the origin coordinates. For example, ‘bregma’ or ‘lambda’ for rodent brains. If the origin coordinates are relative to a specific anatomical landmark, specify that here.

PlanarImagingSpace

class ndx_microscopy.PlanarImagingSpace(name, description, illumination_pattern, location=None, reference_frame=None, orientation=None, origin_coordinates=None, origin_coordinates__unit='micrometers', pixel_size_in_um=None, dimensions_in_pixels=None, skip_post_init=False)

Bases: ImagingSpace

Args:

name (str): the name of this container description (str): Description of the imaging space. illumination_pattern (IlluminationPattern): IlluminationPattern object containing metadata about the method used to acquire this imaging data. location (str): General estimate of location in the brain being subset by this space. Specify the area, layer, etc. Use standard atlas names for anatomical regions when possible. Specify ‘whole brain’ if the entire brain is strictly contained within the space. reference_frame (str): The reference frame for the origin coordinates. For example, ‘bregma’ or ‘lambda’ for rodent brains. If the origin coordinates are relative to a specific anatomical landmark, specify that here. orientation (str): A 3-letter string. One of A,P,L,R,S,I for each of x, y, and z. For example, the most common orientation is ‘RAS’, which means x is right, y is anterior, and z is superior (a.k.a. dorsal). For dorsal/ventral use ‘S/I’ (superior/inferior). In the AnatomicalCoordinatesTable, an orientation of ‘RAS’ corresponds to coordinates in the order of (ML (x), AP (y), DV (z)). origin_coordinates (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO): Physical location in stereotactic coordinates for the first element of the grid. See reference_frame to determine what the coordinates are relative to (e.g., bregma). origin_coordinates__unit (str): Measurement units for origin coordinates. The default value is ‘micrometers’. pixel_size_in_um (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO): The physical dimensions of the pixel in micrometers. dimensions_in_pixels (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO): The number of pixels in the x and y dimensions of the imaging space. skip_post_init (bool): bool to skip post_init

property dimensions_in_pixels

The number of pixels in the x and y dimensions of the imaging space.

get_FOV_size(dimensions_in_pixels=None, pixel_size_in_um=None)

Get the size of the Field of View (FOV) in micrometers.

dimension_in_pixelsint or tuple, optional

The size of the image in pixels. If not provided, will use the imaging space’s dimension.

pixel_size_in_umfloat or tuple, optional

The size of a pixel in micrometers. If not provided, will use the imaging space’s pixel size.

tuple

The size of the FOV in micrometers as (height, width).

Args:

dimensions_in_pixels (tuple or ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator): the size of the image in pixels pixel_size_in_um (tuple or ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator): the size of a pixel in micrometers

namespace = 'ndx-microscopy'
neurodata_type = 'PlanarImagingSpace'
property pixel_size_in_um

The physical dimensions of the pixel in micrometers.

post_init_method = None

Methods

PlanarImagingSpace.get_FOV_size(dimensions_in_pixels=None, pixel_size_in_um=None)

Get the size of the Field of View (FOV) in micrometers.

dimension_in_pixelsint or tuple, optional

The size of the image in pixels. If not provided, will use the imaging space’s dimension.

pixel_size_in_umfloat or tuple, optional

The size of a pixel in micrometers. If not provided, will use the imaging space’s pixel size.

tuple

The size of the FOV in micrometers as (height, width).

Args:

dimensions_in_pixels (tuple or ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator): the size of the image in pixels pixel_size_in_um (tuple or ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator): the size of a pixel in micrometers

VolumetricImagingSpace

class ndx_microscopy.VolumetricImagingSpace(name, description, illumination_pattern, location=None, reference_frame=None, orientation=None, origin_coordinates=None, origin_coordinates__unit='micrometers', voxel_size_in_um=None, dimensions_in_voxels=None, skip_post_init=False)

Bases: ImagingSpace

Args:

name (str): the name of this container description (str): Description of the imaging space. illumination_pattern (IlluminationPattern): IlluminationPattern object containing metadata about the method used to acquire this imaging data. location (str): General estimate of location in the brain being subset by this space. Specify the area, layer, etc. Use standard atlas names for anatomical regions when possible. Specify ‘whole brain’ if the entire brain is strictly contained within the space. reference_frame (str): The reference frame for the origin coordinates. For example, ‘bregma’ or ‘lambda’ for rodent brains. If the origin coordinates are relative to a specific anatomical landmark, specify that here. orientation (str): A 3-letter string. One of A,P,L,R,S,I for each of x, y, and z. For example, the most common orientation is ‘RAS’, which means x is right, y is anterior, and z is superior (a.k.a. dorsal). For dorsal/ventral use ‘S/I’ (superior/inferior). In the AnatomicalCoordinatesTable, an orientation of ‘RAS’ corresponds to coordinates in the order of (ML (x), AP (y), DV (z)). origin_coordinates (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO): Physical location in stereotactic coordinates for the first element of the grid. See reference_frame to determine what the coordinates are relative to (e.g., bregma). origin_coordinates__unit (str): Measurement units for origin coordinates. The default value is ‘micrometers’. voxel_size_in_um (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO): The physical dimensions of the voxel in micrometers. dimensions_in_voxels (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO): The number of voxels in the x, y, and z dimensions of the imaging space. skip_post_init (bool): bool to skip post_init

property dimensions_in_voxels

The number of voxels in the x, y, and z dimensions of the imaging space.

get_FOV_size(dimensions_in_voxels=None, voxel_size_in_um=None)

Get the size of the Field of View (FOV) in micrometers.

dimension_in_voxelsint or tuple, optional

The size of the image in voxels. If not provided, will use the imaging space’s dimension.

voxel_size_in_umfloat or tuple, optional

The size of a voxel in micrometers. If not provided, will use the imaging space’s voxel size.

tuple

The size of the FOV in micrometers as (depth, height, width).

Args:

dimensions_in_voxels (tuple or ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator): the size of the image in voxels voxel_size_in_um (tuple or ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator): the size of a voxel in micrometers

namespace = 'ndx-microscopy'
neurodata_type = 'VolumetricImagingSpace'
post_init_method = None
property voxel_size_in_um

The physical dimensions of the voxel in micrometers.

Methods

VolumetricImagingSpace.get_FOV_size(dimensions_in_voxels=None, voxel_size_in_um=None)

Get the size of the Field of View (FOV) in micrometers.

dimension_in_voxelsint or tuple, optional

The size of the image in voxels. If not provided, will use the imaging space’s dimension.

voxel_size_in_umfloat or tuple, optional

The size of a voxel in micrometers. If not provided, will use the imaging space’s voxel size.

tuple

The size of the FOV in micrometers as (depth, height, width).

Args:

dimensions_in_voxels (tuple or ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator): the size of the image in voxels voxel_size_in_um (tuple or ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator): the size of a voxel in micrometers

Microscopy Series Components

MicroscopySeries

class ndx_microscopy.MicroscopySeries(name, data, unit, microscopy_rig, microscopy_channel, resolution=-1.0, conversion=1.0, offset=0.0, timestamps=None, starting_time=None, rate=None, comments='no comments', description='no description', control=None, control_description=None, continuity=None, skip_post_init=False)

Bases: TimeSeries

Args:

name (str): The name of this TimeSeries dataset data (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO or TimeSeries): The data values. The first dimension must be time. Can also store binary data, e.g., image frames unit (str): The base unit of measurement (should be SI unit) microscopy_rig (MicroscopyRig): MicroscopyRig object containing metadata about the microscopy rig used to acquire this imaging data. microscopy_channel (MicroscopyChannel): MicroscopyChannel object containing metadata about the channel used to acquire this imaging data. resolution (float): The smallest meaningful difference (in specified unit) between values in data conversion (float): Scalar to multiply each element in data to convert it to the specified unit offset (float): Scalar to add to each element in the data scaled by ‘conversion’ to finish converting it to the specified unit. timestamps (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO or TimeSeries): Timestamps for samples stored in data starting_time (float): The timestamp of the first sample rate (float): Sampling rate in Hz comments (str): Human-readable comments about this TimeSeries dataset description (str): Description of this TimeSeries dataset control (Iterable): Numerical labels that apply to each element in data control_description (Iterable): Description of each control value continuity (str): Optionally describe the continuity of the data. Can be “continuous”, “instantaneous”, or”step”. For example, a voltage trace would be “continuous”, because samples are recorded from a continuous process. An array of lick times would be “instantaneous”, because the data represents distinct moments in time. Times of image presentations would be “step” because the picture remains the same until the next time-point. This field is optional, but is useful in providing information about the underlying data. It may inform the way this data is interpreted, the way it is visualized, and what analysis methods are applicable. skip_post_init (bool): bool to skip post_init

property microscopy_channel

MicroscopyChannel object containing metadata about the channel used to acquire this imaging data.

property microscopy_rig

MicroscopyRig object containing metadata about the microscopy rig used to acquire this imaging data.

namespace = 'ndx-microscopy'
neurodata_type = 'MicroscopySeries'
post_init_method = None

PlanarMicroscopySeries

class ndx_microscopy.PlanarMicroscopySeries(name, data, unit, microscopy_rig, microscopy_channel, planar_imaging_space, resolution=-1.0, conversion=1.0, offset=0.0, timestamps=None, starting_time=None, rate=None, comments='no comments', description='no description', control=None, control_description=None, continuity=None, skip_post_init=False)

Bases: MicroscopySeries

Args:

name (str): The name of this TimeSeries dataset data (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO or TimeSeries): The data values. The first dimension must be time. Can also store binary data, e.g., image frames unit (str): The base unit of measurement (should be SI unit) microscopy_rig (MicroscopyRig): MicroscopyRig object containing metadata about the microscopy rig used to acquire this imaging data. microscopy_channel (MicroscopyChannel): MicroscopyChannel object containing metadata about the channel used to acquire this imaging data. planar_imaging_space (PlanarImagingSpace): PlanarImagingSpace object containing metadata about the region of physical space this imaging data was recorded from. resolution (float): The smallest meaningful difference (in specified unit) between values in data conversion (float): Scalar to multiply each element in data to convert it to the specified unit offset (float): Scalar to add to each element in the data scaled by ‘conversion’ to finish converting it to the specified unit. timestamps (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO or TimeSeries): Timestamps for samples stored in data starting_time (float): The timestamp of the first sample rate (float): Sampling rate in Hz comments (str): Human-readable comments about this TimeSeries dataset description (str): Description of this TimeSeries dataset control (Iterable): Numerical labels that apply to each element in data control_description (Iterable): Description of each control value continuity (str): Optionally describe the continuity of the data. Can be “continuous”, “instantaneous”, or”step”. For example, a voltage trace would be “continuous”, because samples are recorded from a continuous process. An array of lick times would be “instantaneous”, because the data represents distinct moments in time. Times of image presentations would be “step” because the picture remains the same until the next time-point. This field is optional, but is useful in providing information about the underlying data. It may inform the way this data is interpreted, the way it is visualized, and what analysis methods are applicable. skip_post_init (bool): bool to skip post_init

namespace = 'ndx-microscopy'
neurodata_type = 'PlanarMicroscopySeries'
property planar_imaging_space

PlanarImagingSpace object containing metadata about the region of physical space this imaging data was recorded from.

post_init_method = None

VolumetricMicroscopySeries

class ndx_microscopy.VolumetricMicroscopySeries(name, data, unit, microscopy_rig, microscopy_channel, volumetric_imaging_space, resolution=-1.0, conversion=1.0, offset=0.0, timestamps=None, starting_time=None, rate=None, comments='no comments', description='no description', control=None, control_description=None, continuity=None, skip_post_init=False)

Bases: MicroscopySeries

Args:

name (str): The name of this TimeSeries dataset data (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO or TimeSeries): The data values. The first dimension must be time. Can also store binary data, e.g., image frames unit (str): The base unit of measurement (should be SI unit) microscopy_rig (MicroscopyRig): MicroscopyRig object containing metadata about the microscopy rig used to acquire this imaging data. microscopy_channel (MicroscopyChannel): MicroscopyChannel object containing metadata about the channel used to acquire this imaging data. volumetric_imaging_space (VolumetricImagingSpace): VolumetricImagingSpace object containing metadata about the region of physical space this imaging data was recorded from. resolution (float): The smallest meaningful difference (in specified unit) between values in data conversion (float): Scalar to multiply each element in data to convert it to the specified unit offset (float): Scalar to add to each element in the data scaled by ‘conversion’ to finish converting it to the specified unit. timestamps (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO or TimeSeries): Timestamps for samples stored in data starting_time (float): The timestamp of the first sample rate (float): Sampling rate in Hz comments (str): Human-readable comments about this TimeSeries dataset description (str): Description of this TimeSeries dataset control (Iterable): Numerical labels that apply to each element in data control_description (Iterable): Description of each control value continuity (str): Optionally describe the continuity of the data. Can be “continuous”, “instantaneous”, or”step”. For example, a voltage trace would be “continuous”, because samples are recorded from a continuous process. An array of lick times would be “instantaneous”, because the data represents distinct moments in time. Times of image presentations would be “step” because the picture remains the same until the next time-point. This field is optional, but is useful in providing information about the underlying data. It may inform the way this data is interpreted, the way it is visualized, and what analysis methods are applicable. skip_post_init (bool): bool to skip post_init

namespace = 'ndx-microscopy'
neurodata_type = 'VolumetricMicroscopySeries'
post_init_method = None
property volumetric_imaging_space

VolumetricImagingSpace object containing metadata about the region of physical space this imaging data was recorded from.

MultiPlaneMicroscopyContainer

class ndx_microscopy.MultiPlaneMicroscopyContainer(planar_microscopy_series, name='MultiPlaneMicroscopyContainer', skip_post_init=False)

Bases: NWBDataInterface, MultiContainerInterface

Args:

planar_microscopy_series (list or tuple or dict or PlanarMicroscopySeries): PlanarMicroscopySeries object(s) containing imaging data for a single depth scan. name (str): the name of this container skip_post_init (bool): bool to skip post_init

add_planar_microscopy_series(planar_microscopy_series)

Add one or multiple PlanarMicroscopySeries objects to this MultiPlaneMicroscopyContainer

Args:

planar_microscopy_series (list or tuple or dict or PlanarMicroscopySeries): one or multiple PlanarMicroscopySeries objects to add to this MultiPlaneMicroscopyContainer

create_planar_microscopy_series(name, data, unit, microscopy_rig, microscopy_channel, planar_imaging_space, resolution=-1.0, conversion=1.0, offset=0.0, timestamps=None, starting_time=None, rate=None, comments='no comments', description='no description', control=None, control_description=None, continuity=None, skip_post_init=False)

Create a PlanarMicroscopySeries object and add it to this MultiPlaneMicroscopyContainer

Args:

name (str): The name of this TimeSeries dataset data (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO or TimeSeries): The data values. The first dimension must be time. Can also store binary data, e.g., image frames unit (str): The base unit of measurement (should be SI unit) microscopy_rig (MicroscopyRig): MicroscopyRig object containing metadata about the microscopy rig used to acquire this imaging data. microscopy_channel (MicroscopyChannel): MicroscopyChannel object containing metadata about the channel used to acquire this imaging data. planar_imaging_space (PlanarImagingSpace): PlanarImagingSpace object containing metadata about the region of physical space this imaging data was recorded from. resolution (float): The smallest meaningful difference (in specified unit) between values in data conversion (float): Scalar to multiply each element in data to convert it to the specified unit offset (float): Scalar to add to each element in the data scaled by ‘conversion’ to finish converting it to the specified unit. timestamps (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO or TimeSeries): Timestamps for samples stored in data starting_time (float): The timestamp of the first sample rate (float): Sampling rate in Hz comments (str): Human-readable comments about this TimeSeries dataset description (str): Description of this TimeSeries dataset control (Iterable): Numerical labels that apply to each element in data control_description (Iterable): Description of each control value continuity (str): Optionally describe the continuity of the data. Can be “continuous”, “instantaneous”, or”step”. For example, a voltage trace would be “continuous”, because samples are recorded from a continuous process. An array of lick times would be “instantaneous”, because the data represents distinct moments in time. Times of image presentations would be “step” because the picture remains the same until the next time-point. This field is optional, but is useful in providing information about the underlying data. It may inform the way this data is interpreted, the way it is visualized, and what analysis methods are applicable. skip_post_init (bool): bool to skip post_init

Returns:

PlanarMicroscopySeries: the PlanarMicroscopySeries object that was created

get_planar_microscopy_series(name=None)

Get a PlanarMicroscopySeries from this MultiPlaneMicroscopyContainer

Args:

name (str): the name of the PlanarMicroscopySeries

Returns:

PlanarMicroscopySeries: the PlanarMicroscopySeries with the given name

namespace = 'ndx-microscopy'
neurodata_type = 'MultiPlaneMicroscopyContainer'
property planar_microscopy_series

a dictionary containing the PlanarMicroscopySeries in this MultiPlaneMicroscopyContainer

post_init_method = None

Segmentation Components

Segmentation

class ndx_microscopy.Segmentation(name, description, id=None, columns=None, colnames=None, target_tables=None, summary_images=None, skip_post_init=False)

Bases: DynamicTable, MultiContainerInterface

Args:

name (str): the name of this table description (str): a description of what is in this table id (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO or ElementIdentifiers): the identifiers for this table columns (tuple or list): the columns in this table colnames (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator): the ordered names of the columns in this table. columns must also be provided. target_tables (dict): dict mapping DynamicTableRegion column name to the table that the DTR points to. The column is added to the table if it is not already present (i.e., when it is optional). summary_images (list or tuple or dict or SummaryImage): Summary images that are related to the segmentation, e.g., mean, correlation, maximum projection. skip_post_init (bool): bool to skip post_init

add_summary_images(summary_images)

Add one or multiple SummaryImage objects to this Segmentation

Args:

summary_images (list or tuple or dict or SummaryImage): one or multiple SummaryImage objects to add to this Segmentation

create_summary_images(name, description, data, skip_post_init=False)

Create a SummaryImage object and add it to this Segmentation

Args:

name (str): the name of this container description (str): Description of the summary image. data (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO): Summary image data. skip_post_init (bool): bool to skip post_init

Returns:

SummaryImage: the SummaryImage object that was created

get_summary_images(name=None)

Get a SummaryImage from this Segmentation

Args:

name (str): the name of the SummaryImage

Returns:

SummaryImage: the SummaryImage with the given name

namespace = 'ndx-microscopy'
neurodata_type = 'Segmentation'
post_init_method = None
property summary_images

a dictionary containing the SummaryImage in this Segmentation

PlanarSegmentation

class ndx_microscopy.PlanarSegmentation(name, description, planar_imaging_space, id=None, columns=None, colnames=None, target_tables=None, summary_images=None, skip_post_init=False)

Bases: Segmentation

Args:

name (str): the name of this table description (str): a description of what is in this table planar_imaging_space (PlanarImagingSpace): PlanarImagingSpace object from which this data was generated. id (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO or ElementIdentifiers): the identifiers for this table columns (tuple or list): the columns in this table colnames (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator): the ordered names of the columns in this table. columns must also be provided. target_tables (dict): dict mapping DynamicTableRegion column name to the table that the DTR points to. The column is added to the table if it is not already present (i.e., when it is optional). summary_images (list or tuple or dict or SummaryImage): Summary images that are related to the segmentation, e.g., mean, correlation, maximum projection. skip_post_init (bool): bool to skip post_init

add_roi(pixel_mask=None, image_mask=None, id=None)

Add a Region Of Interest (ROI) data to this PlanarSegmentation.

pixel_maskarray_data, optional

Pixel mask for 2D ROIs in format [(x1, y1, weight1), (x2, y2, weight2), …]. Each row contains x,y coordinates and weight value for a pixel.

image_maskarray_data, optional

2D image where positive values mark this ROI.

idint, optional

The ID for the ROI. If not provided, will be auto-generated.

**kwargsdict

Additional keyword arguments passed to add_row.

ValueError

If neither pixel_mask nor image_mask is provided.

Args:

pixel_mask (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator): pixel mask for 2D ROIs: [(x1, y1, weight1), (x2, y2, weight2), …] image_mask (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator): image with the same size of image where positive values mark this ROI id (int): the ID for the ROI

add_summary_images(summary_images)

Add one or multiple SummaryImage objects to this PlanarSegmentation

Args:

summary_images (list or tuple or dict or SummaryImage): one or multiple SummaryImage objects to add to this PlanarSegmentation

create_roi_table_region(description, region=slice(None, None, None), name='rois')

Create a region (sub-selection) of ROIs.

descriptionstr

Brief description of what the region represents.

regionslice, list, tuple, optional

The indices of the table to include in the region. Default is slice(None) (all ROIs).

namestr, optional

Name of the ROITableRegion. Default is ‘rois’.

DynamicTableRegion

Table region object for the selected ROIs.

Args:

description (str): a brief description of what the region is region (slice or list or tuple): the indices of the table name (str): the name of the ROITableRegion

create_summary_images(name, description, data, skip_post_init=False)

Create a SummaryImage object and add it to this PlanarSegmentation

Args:

name (str): the name of this container description (str): Description of the summary image. data (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO): Summary image data. skip_post_init (bool): bool to skip post_init

Returns:

SummaryImage: the SummaryImage object that was created

get_summary_images(name=None)

Get a SummaryImage from this PlanarSegmentation

Args:

name (str): the name of the SummaryImage

Returns:

SummaryImage: the SummaryImage with the given name

static image_to_pixel(image_mask)

Convert a 2D image_mask of a ROI into a pixel_mask.

Parameters

image_masknumpy.ndarray

2D array where non-zero values indicate ROI pixels.

Returns

list

List of [x, y, weight] coordinates for each non-zero pixel in the image_mask. The weight is the value at that pixel location in the image_mask.

Raises

ValueError

If image_mask is not 2D.

namespace = 'ndx-microscopy'
neurodata_type = 'PlanarSegmentation'
static pixel_to_image(pixel_mask, image_shape=None)

Convert a 2D pixel_mask of a ROI into an image_mask.

Parameters

pixel_maskarray-like

Array of shape (N, 3) where each row contains (x, y, weight) coordinates. The x, y coordinates specify the pixel position and weight specifies the value to fill in the output image mask.

image_shapetuple, optional

Shape of the output image (height, width). If not provided, will be determined from the maximum x,y coordinates in pixel_mask.

Returns

image_matrixnumpy.ndarray

2D array where non-zero values indicate the ROI pixels with their corresponding weights.

Raises

ValueError

If pixel_mask does not have shape (N, 3).

property planar_imaging_space

PlanarImagingSpace object from which this data was generated.

post_init_method = None

Methods

PlanarSegmentation.add_roi(pixel_mask=None, image_mask=None, id=None)

Add a Region Of Interest (ROI) data to this PlanarSegmentation.

pixel_maskarray_data, optional

Pixel mask for 2D ROIs in format [(x1, y1, weight1), (x2, y2, weight2), …]. Each row contains x,y coordinates and weight value for a pixel.

image_maskarray_data, optional

2D image where positive values mark this ROI.

idint, optional

The ID for the ROI. If not provided, will be auto-generated.

**kwargsdict

Additional keyword arguments passed to add_row.

ValueError

If neither pixel_mask nor image_mask is provided.

Args:

pixel_mask (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator): pixel mask for 2D ROIs: [(x1, y1, weight1), (x2, y2, weight2), …] image_mask (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator): image with the same size of image where positive values mark this ROI id (int): the ID for the ROI

static PlanarSegmentation.pixel_to_image(pixel_mask, image_shape=None)

Convert a 2D pixel_mask of a ROI into an image_mask.

Parameters
pixel_maskarray-like

Array of shape (N, 3) where each row contains (x, y, weight) coordinates. The x, y coordinates specify the pixel position and weight specifies the value to fill in the output image mask.

image_shapetuple, optional

Shape of the output image (height, width). If not provided, will be determined from the maximum x,y coordinates in pixel_mask.

Returns
image_matrixnumpy.ndarray

2D array where non-zero values indicate the ROI pixels with their corresponding weights.

Raises
ValueError

If pixel_mask does not have shape (N, 3).

static PlanarSegmentation.image_to_pixel(image_mask)

Convert a 2D image_mask of a ROI into a pixel_mask.

Parameters
image_masknumpy.ndarray

2D array where non-zero values indicate ROI pixels.

Returns
list

List of [x, y, weight] coordinates for each non-zero pixel in the image_mask. The weight is the value at that pixel location in the image_mask.

Raises
ValueError

If image_mask is not 2D.

PlanarSegmentation.create_roi_table_region(description, region=slice(None, None, None), name='rois')

Create a region (sub-selection) of ROIs.

descriptionstr

Brief description of what the region represents.

regionslice, list, tuple, optional

The indices of the table to include in the region. Default is slice(None) (all ROIs).

namestr, optional

Name of the ROITableRegion. Default is ‘rois’.

DynamicTableRegion

Table region object for the selected ROIs.

Args:

description (str): a brief description of what the region is region (slice or list or tuple): the indices of the table name (str): the name of the ROITableRegion

VolumetricSegmentation

class ndx_microscopy.VolumetricSegmentation(name, description, volumetric_imaging_space, id=None, columns=None, colnames=None, target_tables=None, summary_images=None, skip_post_init=False)

Bases: Segmentation

Args:

name (str): the name of this table description (str): a description of what is in this table volumetric_imaging_space (VolumetricImagingSpace): VolumetricImagingSpace object from which this data was generated. id (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO or ElementIdentifiers): the identifiers for this table columns (tuple or list): the columns in this table colnames (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator): the ordered names of the columns in this table. columns must also be provided. target_tables (dict): dict mapping DynamicTableRegion column name to the table that the DTR points to. The column is added to the table if it is not already present (i.e., when it is optional). summary_images (list or tuple or dict or SummaryImage): Summary images that are related to the segmentation, e.g., mean, correlation, maximum projection. skip_post_init (bool): bool to skip post_init

add_roi(voxel_mask=None, volume_mask=None, id=None)

Add a Region Of Interest (ROI) data to this VolumetricSegmentation.

voxel_maskarray_data, optional

Voxel mask for 3D ROIs in format [(x1, y1, z1, weight1), (x2, y2, z2, weight2), …]. Each row contains x,y,z coordinates and weight value for a voxel.

volume_maskarray_data, optional

3D image where positive values mark this ROI.

idint, optional

The ID for the ROI. If not provided, will be auto-generated.

**kwargsdict

Additional keyword arguments passed to add_row.

NWBTable.Row

Row object representing the added ROI.

ValueError

If neither voxel_mask nor volume_mask is provided.

Args:

voxel_mask (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator): voxel mask for 3D ROIs: [(x1, y1, z1, weight1), (x2, y2, z2, weight2), …] volume_mask (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator): image with the same size of image where positive values mark this ROI id (int): the ID for the ROI

add_summary_images(summary_images)

Add one or multiple SummaryImage objects to this VolumetricSegmentation

Args:

summary_images (list or tuple or dict or SummaryImage): one or multiple SummaryImage objects to add to this VolumetricSegmentation

create_roi_table_region(description, region=slice(None, None, None), name='rois')

Create a region (sub-selection) of ROIs.

descriptionstr

Brief description of what the region represents.

regionslice, list, tuple, optional

The indices of the table to include in the region. Default is slice(None) (all ROIs).

namestr, optional

Name of the ROITableRegion. Default is ‘rois’.

DynamicTableRegion

Table region object for the selected ROIs.

Args:

description (str): a brief description of what the region is region (slice or list or tuple): the indices of the table name (str): the name of the ROITableRegion

create_summary_images(name, description, data, skip_post_init=False)

Create a SummaryImage object and add it to this VolumetricSegmentation

Args:

name (str): the name of this container description (str): Description of the summary image. data (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO): Summary image data. skip_post_init (bool): bool to skip post_init

Returns:

SummaryImage: the SummaryImage object that was created

get_summary_images(name=None)

Get a SummaryImage from this VolumetricSegmentation

Args:

name (str): the name of the SummaryImage

Returns:

SummaryImage: the SummaryImage with the given name

namespace = 'ndx-microscopy'
neurodata_type = 'VolumetricSegmentation'
post_init_method = None
static volume_to_voxel(volume_mask)

Convert a 3D volume_mask of a ROI into a voxel_mask.

Parameters

volume_masknumpy.ndarray

3D array where non-zero values indicate ROI voxels.

Returns

list

List of [x, y, z, weight] coordinates for each non-zero voxel in the volume_mask. The weight is the value at that voxel location in the volume_mask.

Raises

ValueError

If volume_mask is not 3D.

property volumetric_imaging_space

VolumetricImagingSpace object from which this data was generated.

static voxel_to_volume(voxel_mask, volume_shape=None)

Convert a 3D voxel_mask of a ROI into a 3D volume_mask.

Parameters

voxel_maskarray-like

Array of shape (N, 4) where each row contains (x, y, z, weight) coordinates. The x, y, z coordinates specify the voxel position and weight specifies the value to fill in the output image mask.

volume_shapetuple, optional

Shape of the output image (depth, height, width). If not provided, will be determined from the maximum x,y,z coordinates in voxel_mask.

Returns

image_matrixnumpy.ndarray

3D array where non-zero values indicate the ROI voxels with their corresponding weights.

Raises

ValueError

If voxel_mask does not have shape (N, 4).

Methods

VolumetricSegmentation.add_roi(voxel_mask=None, volume_mask=None, id=None)

Add a Region Of Interest (ROI) data to this VolumetricSegmentation.

voxel_maskarray_data, optional

Voxel mask for 3D ROIs in format [(x1, y1, z1, weight1), (x2, y2, z2, weight2), …]. Each row contains x,y,z coordinates and weight value for a voxel.

volume_maskarray_data, optional

3D image where positive values mark this ROI.

idint, optional

The ID for the ROI. If not provided, will be auto-generated.

**kwargsdict

Additional keyword arguments passed to add_row.

NWBTable.Row

Row object representing the added ROI.

ValueError

If neither voxel_mask nor volume_mask is provided.

Args:

voxel_mask (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator): voxel mask for 3D ROIs: [(x1, y1, z1, weight1), (x2, y2, z2, weight2), …] volume_mask (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator): image with the same size of image where positive values mark this ROI id (int): the ID for the ROI

static VolumetricSegmentation.voxel_to_volume(voxel_mask, volume_shape=None)

Convert a 3D voxel_mask of a ROI into a 3D volume_mask.

Parameters
voxel_maskarray-like

Array of shape (N, 4) where each row contains (x, y, z, weight) coordinates. The x, y, z coordinates specify the voxel position and weight specifies the value to fill in the output image mask.

volume_shapetuple, optional

Shape of the output image (depth, height, width). If not provided, will be determined from the maximum x,y,z coordinates in voxel_mask.

Returns
image_matrixnumpy.ndarray

3D array where non-zero values indicate the ROI voxels with their corresponding weights.

Raises
ValueError

If voxel_mask does not have shape (N, 4).

static VolumetricSegmentation.volume_to_voxel(volume_mask)

Convert a 3D volume_mask of a ROI into a voxel_mask.

Parameters
volume_masknumpy.ndarray

3D array where non-zero values indicate ROI voxels.

Returns
list

List of [x, y, z, weight] coordinates for each non-zero voxel in the volume_mask. The weight is the value at that voxel location in the volume_mask.

Raises
ValueError

If volume_mask is not 3D.

VolumetricSegmentation.create_roi_table_region(description, region=slice(None, None, None), name='rois')

Create a region (sub-selection) of ROIs.

descriptionstr

Brief description of what the region represents.

regionslice, list, tuple, optional

The indices of the table to include in the region. Default is slice(None) (all ROIs).

namestr, optional

Name of the ROITableRegion. Default is ‘rois’.

DynamicTableRegion

Table region object for the selected ROIs.

Args:

description (str): a brief description of what the region is region (slice or list or tuple): the indices of the table name (str): the name of the ROITableRegion

SegmentationContainer

class ndx_microscopy.SegmentationContainer(segmentations={}, name='SegmentationContainer')

Bases: MultiContainerInterface

Container for managing multiple segmentation objects.

This class provides an interface for storing and managing multiple segmentation objects, each associated with a specific imaging space.

Args:

segmentations (list or tuple or dict or Segmentation): Segmentation to store in this interface name (str): the name of this container

create_segmentation(name, description, id=None, columns=None, colnames=None, target_tables=None, summary_images=None, skip_post_init=False)

Create a Segmentation object and add it to this SegmentationContainer

Args:

name (str): the name of this table description (str): a description of what is in this table id (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO or ElementIdentifiers): the identifiers for this table columns (tuple or list): the columns in this table colnames (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator): the ordered names of the columns in this table. columns must also be provided. target_tables (dict): dict mapping DynamicTableRegion column name to the table that the DTR points to. The column is added to the table if it is not already present (i.e., when it is optional). summary_images (list or tuple or dict or SummaryImage): Summary images that are related to the segmentation, e.g., mean, correlation, maximum projection. skip_post_init (bool): bool to skip post_init

Returns:

Segmentation: the Segmentation object that was created

get_segmentation(name=None)

Get a Segmentation from this SegmentationContainer

Args:

name (str): the name of the Segmentation

Returns:

Segmentation: the Segmentation with the given name

namespace = 'ndx-microscopy'
neurodata_type = 'SegmentationContainer'
property segmentations

a dictionary containing the Segmentation in this SegmentationContainer

add_segmentation(segmentations)

Add one or multiple Segmentation objects to this SegmentationContainer

Args:

segmentations (list or tuple or dict or Segmentation): one or multiple Segmentation objects to add to this SegmentationContainer

Methods

SegmentationContainer.add_segmentation(segmentations)

Add one or multiple Segmentation objects to this SegmentationContainer

Args:

segmentations (list or tuple or dict or Segmentation): one or multiple Segmentation objects to add to this SegmentationContainer

SummaryImage

class ndx_microscopy.SummaryImage(name, description, data, skip_post_init=False)

Bases: NWBContainer

Args:

name (str): the name of this container description (str): Description of the summary image. data (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO): Summary image data. skip_post_init (bool): bool to skip post_init

property data

Summary image data.

property description

Description of the summary image.

namespace = 'ndx-microscopy'
neurodata_type = 'SummaryImage'
post_init_method = None

Response Series Components

MicroscopyResponseSeries

class ndx_microscopy.MicroscopyResponseSeries(name, data, unit, rois, resolution=-1.0, conversion=1.0, offset=0.0, timestamps=None, starting_time=None, rate=None, comments='no comments', description='no description', control=None, control_description=None, continuity=None, microscopy_series=None, skip_post_init=False)

Bases: TimeSeries

Args:

name (str): The name of this TimeSeries dataset data (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO or TimeSeries): The data values. The first dimension must be time. Can also store binary data, e.g., image frames unit (str): The base unit of measurement (should be SI unit) rois (DynamicTableRegion): DynamicTableRegion referencing segmentation containing more information about the ROIs stored in this series. resolution (float): The smallest meaningful difference (in specified unit) between values in data conversion (float): Scalar to multiply each element in data to convert it to the specified unit offset (float): Scalar to add to each element in the data scaled by ‘conversion’ to finish converting it to the specified unit. timestamps (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO or TimeSeries): Timestamps for samples stored in data starting_time (float): The timestamp of the first sample rate (float): Sampling rate in Hz comments (str): Human-readable comments about this TimeSeries dataset description (str): Description of this TimeSeries dataset control (Iterable): Numerical labels that apply to each element in data control_description (Iterable): Description of each control value continuity (str): Optionally describe the continuity of the data. Can be “continuous”, “instantaneous”, or”step”. For example, a voltage trace would be “continuous”, because samples are recorded from a continuous process. An array of lick times would be “instantaneous”, because the data represents distinct moments in time. Times of image presentations would be “step” because the picture remains the same until the next time-point. This field is optional, but is useful in providing information about the underlying data. It may inform the way this data is interpreted, the way it is visualized, and what analysis methods are applicable. microscopy_series (MicroscopySeries): Link to a MicroscopySeries object containing the imaging data this response series is derived from. skip_post_init (bool): bool to skip post_init

property microscopy_series

Link to a MicroscopySeries object containing the imaging data this response series is derived from.

namespace = 'ndx-microscopy'
neurodata_type = 'MicroscopyResponseSeries'
post_init_method = None
property rois

DynamicTableRegion referencing segmentation containing more information about the ROIs stored in this series.

MicroscopyResponseSeriesContainer

class ndx_microscopy.MicroscopyResponseSeriesContainer(microscopy_response_series, name='MicroscopyResponseSeriesContainer', skip_post_init=False)

Bases: NWBDataInterface, MultiContainerInterface

Args:

microscopy_response_series (list or tuple or dict or MicroscopyResponseSeries): MicroscopyResponseSeries object(s) containing fluorescence data for a ROI. name (str): the name of this container skip_post_init (bool): bool to skip post_init

add_microscopy_response_series(microscopy_response_series)

Add one or multiple MicroscopyResponseSeries objects to this MicroscopyResponseSeriesContainer

Args:

microscopy_response_series (list or tuple or dict or MicroscopyResponseSeries): one or multiple MicroscopyResponseSeries objects to add to this MicroscopyResponseSeriesContainer

create_microscopy_response_series(name, data, unit, rois, resolution=-1.0, conversion=1.0, offset=0.0, timestamps=None, starting_time=None, rate=None, comments='no comments', description='no description', control=None, control_description=None, continuity=None, microscopy_series=None, skip_post_init=False)

Create a MicroscopyResponseSeries object and add it to this MicroscopyResponseSeriesContainer

Args:

name (str): The name of this TimeSeries dataset data (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO or TimeSeries): The data values. The first dimension must be time. Can also store binary data, e.g., image frames unit (str): The base unit of measurement (should be SI unit) rois (DynamicTableRegion): DynamicTableRegion referencing segmentation containing more information about the ROIs stored in this series. resolution (float): The smallest meaningful difference (in specified unit) between values in data conversion (float): Scalar to multiply each element in data to convert it to the specified unit offset (float): Scalar to add to each element in the data scaled by ‘conversion’ to finish converting it to the specified unit. timestamps (ndarray or list or tuple or Dataset or StrDataset or HDMFDataset or AbstractDataChunkIterator or DataIO or TimeSeries): Timestamps for samples stored in data starting_time (float): The timestamp of the first sample rate (float): Sampling rate in Hz comments (str): Human-readable comments about this TimeSeries dataset description (str): Description of this TimeSeries dataset control (Iterable): Numerical labels that apply to each element in data control_description (Iterable): Description of each control value continuity (str): Optionally describe the continuity of the data. Can be “continuous”, “instantaneous”, or”step”. For example, a voltage trace would be “continuous”, because samples are recorded from a continuous process. An array of lick times would be “instantaneous”, because the data represents distinct moments in time. Times of image presentations would be “step” because the picture remains the same until the next time-point. This field is optional, but is useful in providing information about the underlying data. It may inform the way this data is interpreted, the way it is visualized, and what analysis methods are applicable. microscopy_series (MicroscopySeries): Link to a MicroscopySeries object containing the imaging data this response series is derived from. skip_post_init (bool): bool to skip post_init

Returns:

MicroscopyResponseSeries: the MicroscopyResponseSeries object that was created

get_microscopy_response_series(name=None)

Get a MicroscopyResponseSeries from this MicroscopyResponseSeriesContainer

Args:

name (str): the name of the MicroscopyResponseSeries

Returns:

MicroscopyResponseSeries: the MicroscopyResponseSeries with the given name

property microscopy_response_series

a dictionary containing the MicroscopyResponseSeries in this MicroscopyResponseSeriesContainer

namespace = 'ndx-microscopy'
neurodata_type = 'MicroscopyResponseSeriesContainer'
post_init_method = None