pynwb.file module
- class pynwb.file.LabMetaData(name)[source]
Bases:
NWBContainer
Container for storing lab-specific meta-data
The LabMetaData class serves as a base type for defining lab specific meta-data. To define your own lab-specific metadata, create a Neurodata Extension (NDX) for NWB that defines the data to add. Using the LabMetaData container as a base type makes it easy to add your data to an NWBFile without having to modify the NWBFile type itself, since adding of LabMetaData is already implemented. For more details on how to create an extension see the Extending NWB tutorial.
- Parameters:
name (
str
) – name of lab metadata
- namespace = 'core'
- neurodata_type = 'LabMetaData'
- class pynwb.file.Subject(age=None, age__reference='birth', description=None, genotype=None, sex=None, species=None, subject_id=None, weight=None, date_of_birth=None, strain=None)[source]
Bases:
NWBContainer
Subject information and metadata.
- Parameters:
age (
str
ortimedelta
) – The age of the subject. The ISO 8601 Duration format is recommended, e.g., “P90D” for 90 days old.A timedelta will automatically be converted to The ISO 8601 Duration format.age__reference (
str
) – Age is with reference to this event. Can be ‘birth’ or ‘gestational’. If reference is omitted, then ‘birth’ is implied. Value can be None when read from an NWB file with schema version 2.0 to 2.5 where age__reference is missing.description (
str
) – A description of the subject, e.g., “mouse A10”.genotype (
str
) – The genotype of the subject, e.g., “Sst-IRES-Cre/wt;Ai32(RCL-ChR2(H134R)_EYFP)/wt”.sex (
str
) – The sex of the subject. Using “F” (female), “M” (male), “U” (unknown), or “O” (other) is recommended.species (
str
) – The species of the subject. The formal latin binomal name is recommended, e.g., “Mus musculus”subject_id (
str
) – A unique identifier for the subject, e.g., “A10”weight (
float
orstr
) – The weight of the subject, including units. Using kilograms is recommended. e.g., “0.02 kg”. If a float is provided, then the weight will be stored as “[value] kg”.date_of_birth (
datetime
) – The datetime of the date of birth. May be supplied instead of age.strain (
str
) – The strain of the subject, e.g., “C57BL/6J”
- property age
The age of the subject. The ISO 8601 Duration format is recommended, e.g., “P90D” for 90 days old.A timedelta will automatically be converted to The ISO 8601 Duration format.
- property age__reference
Age is with reference to this event. Can be ‘birth’ or ‘gestational’. If reference is omitted, then ‘birth’ is implied. Value can be None when read from an NWB file with schema version 2.0 to 2.5 where age__reference is missing.
- property date_of_birth
The datetime of the date of birth. May be supplied instead of age.
- property description
A description of the subject, e.g., “mouse A10”.
- property genotype
The genotype of the subject, e.g., “Sst-IRES-Cre/wt;Ai32(RCL-ChR2(H134R)_EYFP)/wt”.
- namespace = 'core'
- neurodata_type = 'Subject'
- property sex
The sex of the subject. Using “F” (female), “M” (male), “U” (unknown), or “O” (other) is recommended.
- property species
The species of the subject. The formal latin binomal name is recommended, e.g., “Mus musculus”
- property strain
The strain of the subject, e.g., “C57BL/6J”
- property subject_id
A unique identifier for the subject, e.g., “A10”
- property weight
The weight of the subject, including units. Using kilograms is recommended. e.g., “0.02 kg”. If a float is provided, then the weight will be stored as “[value] kg”.
- class pynwb.file.NWBFile(session_description, identifier, session_start_time, file_create_date=None, timestamps_reference_time=None, experimenter=None, experiment_description=None, session_id=None, institution=None, keywords=None, notes=None, pharmacology=None, protocol=None, related_publications=None, slices=None, source_script=None, source_script_file_name=None, data_collection=None, surgery=None, virus=None, stimulus_notes=None, lab=None, acquisition=None, analysis=None, stimulus=None, stimulus_template=None, epochs=None, trials=None, invalid_times=None, intervals=None, units=None, processing=None, lab_meta_data=None, electrodes=None, electrode_groups=None, ic_electrodes=None, sweep_table=None, imaging_planes=None, ogen_sites=None, devices=None, subject=None, scratch=None, icephys_electrodes=None, icephys_filtering=None, intracellular_recordings=None, icephys_simultaneous_recordings=None, icephys_sequential_recordings=None, icephys_repetitions=None, icephys_experimental_conditions=None)[source]
Bases:
MultiContainerInterface
,HERDManager
A representation of an NWB file.
- Parameters:
session_description (
str
) – a description of the session where this data was generatedidentifier (
str
) – a unique text identifier for the filesession_start_time (
datetime
) – the start date and time of the recording sessionfile_create_date (
ndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
ordatetime
) – the date and time the file was created and subsequent modifications madetimestamps_reference_time (
datetime
) – date and time corresponding to time zero of all timestamps; defaults to value of session_start_timeexperimenter (
tuple
orlist
orstr
) – name of person who performed experimentexperiment_description (
str
) – general description of the experimentsession_id (
str
) – lab-specific ID for the sessioninstitution (
str
) – institution(s) where experiment is performedkeywords (
ndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
) – Terms to search overnotes (
str
) – Notes about the experiment.pharmacology (
str
) – Description of drugs used, including how and when they were administered. Anesthesia(s), painkiller(s), etc., plus dosage, concentration, etc.protocol (
str
) – Experimental protocol, if applicable. E.g., include IACUC protocolrelated_publications (
tuple
orlist
orstr
) – Publication information.PMID, DOI, URL, etc. If multiple, concatenate together and describe which is which. such as PMID, DOI, URL, etcslices (
str
) – Description of slices, including information about preparation thickness, orientation, temperature and bath solutionsource_script (
str
) – Script file used to create this NWB file.source_script_file_name (
str
) – Name of the source_script filedata_collection (
str
) – Notes about data collection and analysis.surgery (
str
) – Narrative description about surgery/surgeries, including date(s) and who performed surgery.virus (
str
) – Information about virus(es) used in experiments, including virus ID, source, date made, injection location, volume, etc.stimulus_notes (
str
) – Notes about stimuli, such as how and where presented.lab (
str
) – lab where experiment was performedacquisition (
list
ortuple
) – Raw TimeSeries objects belonging to this NWBFilestimulus (
list
ortuple
) – Stimulus TimeSeries, DynamicTable, or NWBDataInterface objects belonging to this NWBFilestimulus_template (
list
ortuple
) – Stimulus template TimeSeries objects belonging to this NWBFileepochs (
TimeIntervals
) – Epoch objects belonging to this NWBFiletrials (
TimeIntervals
) – A table containing trial datainvalid_times (
TimeIntervals
) – A table containing times to be omitted from analysisintervals (
list
ortuple
) – any TimeIntervals tables storing time intervalsunits (
Units
) – A table containing unit metadataprocessing (
list
ortuple
) – ProcessingModule objects belonging to this NWBFilelab_meta_data (
list
ortuple
) – an extension that contains lab-specific meta-dataelectrodes (
DynamicTable
) – the ElectrodeTable that belongs to this NWBFileelectrode_groups (
Iterable
) – the ElectrodeGroups that belong to this NWBFileic_electrodes (
list
ortuple
) – DEPRECATED use icephys_electrodes parameter instead. IntracellularElectrodes that belong to this NWBFilesweep_table (
SweepTable
) – the SweepTable that belong to this NWBFileimaging_planes (
list
ortuple
) – ImagingPlanes that belong to this NWBFileogen_sites (
list
ortuple
) – OptogeneticStimulusSites that belong to this NWBFiledevices (
list
ortuple
) – Device objects belonging to this NWBFilesubject (
Subject
) – subject metadataicephys_electrodes (
list
ortuple
) – IntracellularElectrodes that belong to this NWBFile.icephys_filtering (
str
) – [DEPRECATED] Use IntracellularElectrode.filtering instead. Description of filtering used.intracellular_recordings (
IntracellularRecordingsTable
) – the IntracellularRecordingsTable table that belongs to this NWBFileicephys_simultaneous_recordings (
SimultaneousRecordingsTable
) – the SimultaneousRecordingsTable table that belongs to this NWBFileicephys_sequential_recordings (
SequentialRecordingsTable
) – the SequentialRecordingsTable table that belongs to this NWBFileicephys_repetitions (
RepetitionsTable
) – the RepetitionsTable table that belongs to this NWBFileicephys_experimental_conditions (
ExperimentalConditionsTable
) – the ExperimentalConditionsTable table that belongs to this NWBFile
- all_children()[source]
Get a list of all child objects and their child objects recursively.
If the object has an object_id, the object will be added to “ret” to be returned. If that object has children, they will be added to the “stack” in order to be: 1) Checked to see if has an object_id, if so then add to “ret” 2) Have children that will also be checked
- property objects
- property modules
- property epoch_tags
- property ec_electrode_groups
- property ec_electrodes
- property ic_electrodes
- property icephys_filtering
- add_ic_electrode(*args, **kwargs)[source]
This method is deprecated and will be removed in future versions. Please use
add_icephys_electrode
instead
- create_ic_electrode(*args, **kwargs)[source]
This method is deprecated and will be removed in future versions. Please use
create_icephys_electrode
instead
- get_ic_electrode(*args, **kwargs)[source]
This method is deprecated and will be removed in future versions. Please use
get_icephys_electrode
instead
- add_epoch_column(name, description, data=[], table=False, index=False, enum=False, col_cls=<class 'hdmf.common.table.VectorData'>, check_ragged=True)[source]
- Add a column to the epoch table.
See
add_column
for more details
- Parameters:
name (
str
) – the name of this VectorDatadescription (
str
) – a description for this columndata (
ndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
orDataIO
) – a dataset where the first dimension is a concatenation of multiple vectorstable (
bool
orDynamicTable
) – whether or not this is a table region or the table the region applies toindex (
bool
orVectorIndex
orndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
orint
) –False
(default): do not generate a VectorIndexTrue
: generate one empty VectorIndexVectorIndex
: Use the supplied VectorIndexarray-like of ints: Create a VectorIndex and use these values as the data
int
: Recursively create n VectorIndex objects for a multi-ragged array
enum (
bool
orndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
) – whether or not this column contains data from a fixed set of elementscol_cls (
type
) – class to use to represent the column data. If table=True, this field is ignored and a DynamicTableRegion object is used. If enum=True, this field is ignored and a EnumData object is used.check_ragged (
bool
) – whether or not to check for ragged arrays when adding data to the table. Set to False to avoid checking every element if performance issues occur.
- add_epoch_metadata_column(*args, **kwargs)[source]
This method is deprecated and will be removed in future versions. Please use
add_epoch_column
instead
- add_epoch(start_time, stop_time, tags=None, timeseries=None)[source]
- Creates a new Epoch object. Epochs are used to track intervals
in an experiment, such as exposure to a certain type of stimuli (an interval where orientation gratings are shown, or of sparse noise) or a different paradigm (a rat exploring an enclosure versus sleeping between explorations)
- add_electrode_column(name, description, data=[], table=False, index=False, enum=False, col_cls=<class 'hdmf.common.table.VectorData'>, check_ragged=True)[source]
- Add a column to the electrode table.
See
add_column
for more details
- Parameters:
name (
str
) – the name of this VectorDatadescription (
str
) – a description for this columndata (
ndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
orDataIO
) – a dataset where the first dimension is a concatenation of multiple vectorstable (
bool
orDynamicTable
) – whether or not this is a table region or the table the region applies toindex (
bool
orVectorIndex
orndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
orint
) –False
(default): do not generate a VectorIndexTrue
: generate one empty VectorIndexVectorIndex
: Use the supplied VectorIndexarray-like of ints: Create a VectorIndex and use these values as the data
int
: Recursively create n VectorIndex objects for a multi-ragged array
enum (
bool
orndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
) – whether or not this column contains data from a fixed set of elementscol_cls (
type
) – class to use to represent the column data. If table=True, this field is ignored and a DynamicTableRegion object is used. If enum=True, this field is ignored and a EnumData object is used.check_ragged (
bool
) – whether or not to check for ragged arrays when adding data to the table. Set to False to avoid checking every element if performance issues occur.
- add_electrode(x=None, y=None, z=None, imp=None, location=None, filtering=None, group=None, id=None, rel_x=None, rel_y=None, rel_z=None, reference=None, enforce_unique_id=True)[source]
- Add an electrode to the electrodes table.
See
add_row
for more details.Required fields are location and group and any columns that have been added (through calls to add_electrode_columns).
- Parameters:
x (
float
) – the x coordinate of the position (+x is posterior)y (
float
) – the y coordinate of the position (+y is inferior)z (
float
) – the z coordinate of the position (+z is right)imp (
float
) – the impedance of the electrode, in ohmslocation (
str
) – the location of electrode within the subject e.g. brain region. Required.filtering (
str
) – description of hardware filtering, including the filter name and frequency cutoffsgroup (
ElectrodeGroup
) – the ElectrodeGroup object to add to this NWBFile. Required.id (
int
) – a unique identifier for the electroderel_x (
float
) – the x coordinate within the electrode grouprel_y (
float
) – the y coordinate within the electrode grouprel_z (
float
) – the z coordinate within the electrode groupreference (
str
) – Description of the reference electrode and/or reference scheme used for this electrode, e.g.,”stainless steel skull screw” or “online common average referencing”.enforce_unique_id (
bool
) – enforce that the id in the table must be unique
- add_unit_column(name, description, data=[], table=False, index=False, enum=False, col_cls=<class 'hdmf.common.table.VectorData'>, check_ragged=True)[source]
- Add a column to the unit table.
See
add_column
for more details
- Parameters:
name (
str
) – the name of this VectorDatadescription (
str
) – a description for this columndata (
ndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
orDataIO
) – a dataset where the first dimension is a concatenation of multiple vectorstable (
bool
orDynamicTable
) – whether or not this is a table region or the table the region applies toindex (
bool
orVectorIndex
orndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
orint
) –False
(default): do not generate a VectorIndexTrue
: generate one empty VectorIndexVectorIndex
: Use the supplied VectorIndexarray-like of ints: Create a VectorIndex and use these values as the data
int
: Recursively create n VectorIndex objects for a multi-ragged array
enum (
bool
orndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
) – whether or not this column contains data from a fixed set of elementscol_cls (
type
) – class to use to represent the column data. If table=True, this field is ignored and a DynamicTableRegion object is used. If enum=True, this field is ignored and a EnumData object is used.check_ragged (
bool
) – whether or not to check for ragged arrays when adding data to the table. Set to False to avoid checking every element if performance issues occur.
- add_unit(spike_times=None, obs_intervals=None, electrodes=None, electrode_group=None, waveform_mean=None, waveform_sd=None, waveforms=None, id=None)[source]
- Add a unit to the unit table.
See
add_row
for more details.
- Parameters:
spike_times (
ndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
) – the spike times for each unitobs_intervals (
ndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
) – the observation intervals (valid times) for each unit. All spike_times for a given unit should fall within these intervals. [[start1, end1], [start2, end2], …]electrodes (
ndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
) – the electrodes that each unit came fromelectrode_group (
ElectrodeGroup
) – the electrode group that each unit came fromwaveform_mean (
ndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
) – the spike waveform mean for each unit. Shape is (time,) or (time, electrodes)waveform_sd (
ndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
) – the spike waveform standard deviation for each unit. Shape is (time,) or (time, electrodes)waveforms (
ndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
) – Individual waveforms for each spike. If the dataset is three-dimensional, the third dimension shows the response from different electrodes that all observe this unit simultaneously. In this case, the electrodes column of this Units table should be used to indicate which electrodes are associated with this unit, and the electrodes dimension here should be in the same order as the electrodes referenced in the electrodes column of this table.id (
int
) – the id for each unit
- add_trial_column(name, description, data=[], table=False, index=False, enum=False, col_cls=<class 'hdmf.common.table.VectorData'>, check_ragged=True)[source]
- Add a column to the trial table.
See
add_column
for more details
- Parameters:
name (
str
) – the name of this VectorDatadescription (
str
) – a description for this columndata (
ndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
orDataIO
) – a dataset where the first dimension is a concatenation of multiple vectorstable (
bool
orDynamicTable
) – whether or not this is a table region or the table the region applies toindex (
bool
orVectorIndex
orndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
orint
) –False
(default): do not generate a VectorIndexTrue
: generate one empty VectorIndexVectorIndex
: Use the supplied VectorIndexarray-like of ints: Create a VectorIndex and use these values as the data
int
: Recursively create n VectorIndex objects for a multi-ragged array
enum (
bool
orndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
) – whether or not this column contains data from a fixed set of elementscol_cls (
type
) – class to use to represent the column data. If table=True, this field is ignored and a DynamicTableRegion object is used. If enum=True, this field is ignored and a EnumData object is used.check_ragged (
bool
) – whether or not to check for ragged arrays when adding data to the table. Set to False to avoid checking every element if performance issues occur.
- add_trial(start_time, stop_time, tags=None, timeseries=None)[source]
- Add a trial to the trial table.
See
add_interval
for more details.Required fields are start_time, stop_time, and any columns that have been added (through calls to add_trial_columns).
- add_invalid_times_column(name, description, data=[], table=False, index=False, enum=False, col_cls=<class 'hdmf.common.table.VectorData'>, check_ragged=True)[source]
- Add a column to the invalid times table.
See
add_column
for more details
- Parameters:
name (
str
) – the name of this VectorDatadescription (
str
) – a description for this columndata (
ndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
orDataIO
) – a dataset where the first dimension is a concatenation of multiple vectorstable (
bool
orDynamicTable
) – whether or not this is a table region or the table the region applies toindex (
bool
orVectorIndex
orndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
orint
) –False
(default): do not generate a VectorIndexTrue
: generate one empty VectorIndexVectorIndex
: Use the supplied VectorIndexarray-like of ints: Create a VectorIndex and use these values as the data
int
: Recursively create n VectorIndex objects for a multi-ragged array
enum (
bool
orndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
) – whether or not this column contains data from a fixed set of elementscol_cls (
type
) – class to use to represent the column data. If table=True, this field is ignored and a DynamicTableRegion object is used. If enum=True, this field is ignored and a EnumData object is used.check_ragged (
bool
) – whether or not to check for ragged arrays when adding data to the table. Set to False to avoid checking every element if performance issues occur.
- add_invalid_time_interval(start_time, stop_time, tags=None, timeseries=None)[source]
- Add a time interval to the invalid times table.
See
add_row
for more details.Required fields are start_time, stop_time, and any columns that have been added (through calls to add_invalid_times_columns).
- set_electrode_table(electrode_table)[source]
Set the electrode table of this NWBFile to an existing ElectrodeTable
- Parameters:
electrode_table (
DynamicTable
) – the ElectrodeTable for this file
- add_acquisition(nwbdata, use_sweep_table=False)[source]
- Parameters:
nwbdata (
NWBDataInterface
orDynamicTable
) – Noneuse_sweep_table (
bool
) – Use the deprecated SweepTable
- add_stimulus(stimulus=None, use_sweep_table=False, timeseries=None)[source]
- Parameters:
stimulus (
TimeSeries
orDynamicTable
orNWBDataInterface
) – The stimulus presentation data to add to this NWBFile.use_sweep_table (
bool
) – Use the deprecated SweepTabletimeseries (
TimeSeries
) – The “timeseries” keyword argument is deprecated. Use the “nwbdata” argument instead.
- add_stimulus_template(timeseries, use_sweep_table=False)[source]
- Parameters:
timeseries (
TimeSeries
orImages
) – Noneuse_sweep_table (
bool
) – Use the deprecated SweepTable
- get_intracellular_recordings()[source]
Get the NWBFile.intracellular_recordings table.
In contrast to NWBFile.intracellular_recordings, this function will create the IntracellularRecordingsTable table if not yet done, whereas NWBFile.intracellular_recordings will return None if the table is currently not being used.
- Returns:
The NWBFile.intracellular_recordings table
- Return type:
- add_intracellular_recording(electrode=None, stimulus_start_index=None, stimulus_index_count=None, stimulus=None, stimulus_template_start_index=None, stimulus_template_index_count=None, stimulus_template=None, response_start_index=None, response_index_count=None, response=None, electrode_metadata=None, stimulus_metadata=None, response_metadata=None)[source]
- Add a intracellular recording to the intracellular_recordings table. If the
electrode, stimulus, and/or response do not exist yet in the NWBFile, then they will be added to this NWBFile before adding them to the table.
Note: For more complex organization of intracellular recordings you may also be interested in the related SimultaneousRecordingsTable, SequentialRecordingsTable, RepetitionsTable, and ExperimentalConditionsTable tables and the related functions of NWBFile: add_icephys_simultaneous_recording, add_icephys_sequential_recording, add_icephys_repetition, and add_icephys_experimental_condition.
- Parameters:
electrode (
IntracellularElectrode
) – The intracellular electrode usedstimulus_start_index (
int
) – Start index of the stimulusstimulus_index_count (
int
) – Stop index of the stimulusstimulus (
TimeSeries
) – The TimeSeries (usually a PatchClampSeries) with the stimulusstimulus_template_start_index (
int
) – Start index of the stimulus templatestimulus_template_index_count (
int
) – Stop index of the stimulus templatestimulus_template (
TimeSeries
) – The TimeSeries (usually a PatchClampSeries) with the stimulus template waveformsresponse_start_index (
int
) – Start index of the responseresponse_index_count (
int
) – Stop index of the responseresponse (
TimeSeries
) – The TimeSeries (usually a PatchClampSeries) with the responseelectrode_metadata (
dict
) – Additional electrode metadata to be stored in the electrodes tablestimulus_metadata (
dict
) – Additional stimulus metadata to be stored in the stimuli tableresponse_metadata (
dict
) – Additional resposnse metadata to be stored in the responses table
- Returns:
Integer index of the row that was added to IntracellularRecordingsTable
- Return type:
- get_icephys_simultaneous_recordings()[source]
Get the NWBFile.icephys_simultaneous_recordings table.
In contrast to NWBFile.icephys_simultaneous_recordings, this function will create the SimultaneousRecordingsTable table if not yet done, whereas NWBFile.icephys_simultaneous_recordings will return None if the table is currently not being used.
- Returns:
The NWBFile.icephys_simultaneous_recordings table
- Return type:
- add_icephys_simultaneous_recording(recordings)[source]
Add a new simultaneous recording to the icephys_simultaneous_recordings table
- Parameters:
recordings (
ndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
) – the indices of the recordings belonging to this simultaneous recording- Returns:
Integer index of the row that was added to SimultaneousRecordingsTable
- Return type:
- get_icephys_sequential_recordings()[source]
Get the NWBFile.icephys_sequential_recordings table.
In contrast to NWBFile.icephys_sequential_recordings, this function will create the IntracellularRecordingsTable table if not yet done, whereas NWBFile.icephys_sequential_recordings will return None if the table is currently not being used.
- Returns:
The NWBFile.icephys_sequential_recordings table
- Return type:
- add_icephys_sequential_recording(stimulus_type, simultaneous_recordings)[source]
Add a new sequential recording to the icephys_sequential_recordings table
- Parameters:
stimulus_type (
str
) – the type of stimulus used for the sequential recordingsimultaneous_recordings (
ndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
) – the indices of the simultaneous_recordings belonging to this sequential recording
- Returns:
Integer index of the row that was added to SequentialRecordingsTable
- Return type:
- get_icephys_repetitions()[source]
Get the NWBFile.icephys_repetitions table.
In contrast to NWBFile.icephys_repetitions, this function will create the RepetitionsTable table if not yet done, whereas NWBFile.icephys_repetitions will return None if the table is currently not being used.
- Returns:
The NWBFile.icephys_repetitions table
- Return type:
- add_icephys_repetition(sequential_recordings=None)[source]
Add a new repetition to the RepetitionsTable table
- Parameters:
sequential_recordings (
ndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
) – the indices of the sequential recordings belonging to this repetition- Returns:
Integer index of the row that was added to RepetitionsTable
- Return type:
- get_icephys_experimental_conditions()[source]
Get the NWBFile.icephys_experimental_conditions table.
In contrast to NWBFile.icephys_experimental_conditions, this function will create the RepetitionsTable table if not yet done, whereas NWBFile.icephys_experimental_conditions will return None if the table is currently not being used.
- Returns:
The NWBFile.icephys_experimental_conditions table
- Return type:
- add_icephys_experimental_condition(repetitions=None)[source]
Add a new condition to the ExperimentalConditionsTable table
- Parameters:
repetitions (
ndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
) – the indices of the repetitions belonging to this condition- Returns:
Integer index of the row that was added to ExperimentalConditionsTable
- Return type:
- get_icephys_meta_parent_table()[source]
Get the top-most table in the intracellular ephys metadata table hierarchy that exists in this NWBFile.
The intracellular ephys metadata consists of a hierarchy of DynamicTables, i.e., experimental_conditions –> repetitions –> sequential_recordings –> simultaneous_recordings –> intracellular_recordings etc. In a given NWBFile not all tables may exist. This convenience functions returns the top-most table that exists in this file. E.g., if the file contains only the simultaneous_recordings and intracellular_recordings tables then the function would return the simultaneous_recordings table. Similarly, if the file contains all tables then it will return the experimental_conditions table.
- Returns:
DynamicTable object or None
- add_scratch(data, name=None, notes=None, table_description='', description=None)[source]
Add data to the scratch space
- Parameters:
data (
str
orint
orfloat
orbytes
orbool
orndarray
orlist
ortuple
orDataFrame
orDynamicTable
orNWBContainer
orScratchData
) – The data to add to the scratch space.name (
str
) – The name of the data. Required only when passing in a scalar, numpy.ndarray, list, or tuplenotes (
str
) – Notes to add to the data. Only used when passing in numpy.ndarray, list, or tuple. This argument is not recommended. Use the description argument instead.table_description (
str
) – Description for the internal DynamicTable used to store a pandas.DataFrame. This argument is not recommended. Use the description argument instead.description (
str
) – Description of the data. Required only when passing in a scalar, numpy.ndarray, list, tuple, or pandas.DataFrame. Ignored when passing in an NWBContainer, DynamicTable, or ScratchData object.
- property acquisition
a dictionary containing the NWBDataInterface or DynamicTable in this NWBFile
- add_analysis(analysis)
Add one or multiple NWBContainer or DynamicTable objects to this NWBFile
- Parameters:
analysis (
list
ortuple
ordict
orNWBContainer
orDynamicTable
) – one or multiple NWBContainer or DynamicTable objects to add to this NWBFile
- add_device(devices)
Add one or multiple Device objects to this NWBFile
- add_electrode_group(electrode_groups)
Add one or multiple ElectrodeGroup objects to this NWBFile
- Parameters:
electrode_groups (
list
ortuple
ordict
orElectrodeGroup
) – one or multiple ElectrodeGroup objects to add to this NWBFile
- add_icephys_electrode(icephys_electrodes)
Add one or multiple IntracellularElectrode objects to this NWBFile
- Parameters:
icephys_electrodes (
list
ortuple
ordict
orIntracellularElectrode
) – one or multiple IntracellularElectrode objects to add to this NWBFile
- add_imaging_plane(imaging_planes)
Add one or multiple ImagingPlane objects to this NWBFile
- Parameters:
imaging_planes (
list
ortuple
ordict
orImagingPlane
) – one or multiple ImagingPlane objects to add to this NWBFile
- add_lab_meta_data(lab_meta_data)
Add one or multiple LabMetaData objects to this NWBFile
- Parameters:
lab_meta_data (
list
ortuple
ordict
orLabMetaData
) – one or multiple LabMetaData objects to add to this NWBFile
- add_ogen_site(ogen_sites)
Add one or multiple OptogeneticStimulusSite objects to this NWBFile
- Parameters:
ogen_sites (
list
ortuple
ordict
orOptogeneticStimulusSite
) – one or multiple OptogeneticStimulusSite objects to add to this NWBFile
- add_processing_module(processing)
Add one or multiple ProcessingModule objects to this NWBFile
- Parameters:
processing (
list
ortuple
ordict
orProcessingModule
) – one or multiple ProcessingModule objects to add to this NWBFile
- add_time_intervals(intervals)
Add one or multiple TimeIntervals objects to this NWBFile
- Parameters:
intervals (
list
ortuple
ordict
orTimeIntervals
) – one or multiple TimeIntervals objects to add to this NWBFile
- property analysis
a dictionary containing the NWBContainer or DynamicTable in this NWBFile
- create_device(name, description=None, manufacturer=None)
Create a Device object and add it to this NWBFile
- create_electrode_group(name, description, location, device, position=None)
Create an ElectrodeGroup object and add it to this NWBFile
- Parameters:
name (
str
) – the name of this electrode groupdescription (
str
) – description of this electrode grouplocation (
str
) – description of location of this electrode groupdevice (
Device
) – the device that was used to record from this electrode groupposition (
ndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
) – Compound dataset with stereotaxic position of this electrode group (x, y, z). The data array must have three elements or the dtype of the array must be(float, float, float)
- Returns:
the ElectrodeGroup object that was created
- Return type:
- create_icephys_electrode(name, device, description, slice=None, seal=None, location=None, resistance=None, filtering=None, initial_access_resistance=None, cell_id=None)
Create an IntracellularElectrode object and add it to this NWBFile
- Parameters:
name (
str
) – the name of this electrodedevice (
Device
) – the device that was used to record from this electrodedescription (
str
) – Recording description, description of electrode (e.g., whole-cell, sharp, etc).slice (
str
) – Information about slice used for recording.seal (
str
) – Information about seal used for recording.location (
str
) – Area, layer, comments on estimation, stereotaxis coordinates (if in vivo, etc).resistance (
str
) – Electrode resistance, unit - Ohm.filtering (
str
) – Electrode specific filtering.initial_access_resistance (
str
) – Initial access resistance.cell_id (
str
) – Unique ID of cell.
- Returns:
the IntracellularElectrode object that was created
- Return type:
- create_imaging_plane(name, optical_channel, description, device, excitation_lambda, indicator, location, imaging_rate=None, manifold=None, conversion=1.0, unit='meters', reference_frame=None, origin_coords=None, origin_coords_unit='meters', grid_spacing=None, grid_spacing_unit='meters')
Create an ImagingPlane object and add it to this NWBFile
- Parameters:
name (
str
) – the name of this containeroptical_channel (
list
orOpticalChannel
) – One of possibly many groups storing channel-specific data.description (
str
) – Description of this ImagingPlane.device (
Device
) – the device that was used to recordexcitation_lambda (
float
) – Excitation wavelength in nm.indicator (
str
) – Calcium indicatorlocation (
str
) – Location of image plane.imaging_rate (
float
) – Rate images are acquired, in Hz. If the corresponding TimeSeries is present, the rate should be stored there instead.manifold (
ndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
) – DEPRECATED - Physical position of each pixel. size=(“height”, “width”, “xyz”). Deprecated in favor of origin_coords and grid_spacing.conversion (
float
) – DEPRECATED - Multiplier to get from stored values to specified unit (e.g., 1e-3 for millimeters) Deprecated in favor of origin_coords and grid_spacing.unit (
str
) – DEPRECATED - Base unit that coordinates are stored in (e.g., Meters). Deprecated in favor of origin_coords_unit and grid_spacing_unit.reference_frame (
str
) – Describes position and reference frame of manifold based on position of first element in manifold.origin_coords (
ndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
) – Physical location of the first element of the imaging plane (0, 0) for 2-D data or (0, 0, 0) for 3-D data. See also reference_frame for what the physical location is relative to (e.g., bregma).origin_coords_unit (
str
) – Measurement units for origin_coords. The default value is ‘meters’.grid_spacing (
ndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
) – Space between pixels in (x, y) or voxels in (x, y, z) directions, in the specified unit. Assumes imaging plane is a regular grid. See also reference_frame to interpret the grid.grid_spacing_unit (
str
) – Measurement units for grid_spacing. The default value is ‘meters’.
- Returns:
the ImagingPlane object that was created
- Return type:
- create_lab_meta_data(name)
Create a LabMetaData object and add it to this NWBFile
- Parameters:
name (
str
) – name of lab metadata- Returns:
the LabMetaData object that was created
- Return type:
- create_ogen_site(name, device, description, excitation_lambda, location)
Create an OptogeneticStimulusSite object and add it to this NWBFile
- Parameters:
- Returns:
the OptogeneticStimulusSite object that was created
- Return type:
- create_processing_module(name, description, data_interfaces=None)
Create a ProcessingModule object and add it to this NWBFile
- create_time_intervals(name, description='experimental intervals', id=None, columns=None, colnames=None)
Create a TimeIntervals object and add it to this NWBFile
- Parameters:
name (
str
) – name of this TimeIntervalsdescription (
str
) – Description of this TimeIntervalsid (
ndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
orDataIO
orElementIdentifiers
) – the identifiers for this tablecolnames (
ndarray
orlist
ortuple
orDataset
orArray
orStrDataset
orHDMFDataset
orAbstractDataChunkIterator
) – the ordered names of the columns in this table. columns must also be provided.
- Returns:
the TimeIntervals object that was created
- Return type:
- property data_collection
Notes about data collection and analysis.
- property devices
a dictionary containing the Device in this NWBFile
- property electrode_groups
a dictionary containing the ElectrodeGroup in this NWBFile
- property electrodes
the ElectrodeTable that belongs to this NWBFile
- property epochs
Epoch objects belonging to this NWBFile
- property experiment_description
general description of the experiment
- property experimenter
name of person who performed experiment
- property file_create_date
the date and time the file was created and subsequent modifications made
- get_acquisition(name=None)
Get a NWBDataInterface from this NWBFile
- Parameters:
name (
str
) – the name of the NWBDataInterface or DynamicTable- Returns:
the NWBDataInterface or DynamicTable with the given name
- Return type:
- get_analysis(name=None)
Get a NWBContainer from this NWBFile
- Parameters:
name (
str
) – the name of the NWBContainer or DynamicTable- Returns:
the NWBContainer or DynamicTable with the given name
- Return type:
- get_device(name=None)
Get a Device from this NWBFile
- get_electrode_group(name=None)
Get an ElectrodeGroup from this NWBFile
- Parameters:
name (
str
) – the name of the ElectrodeGroup- Returns:
the ElectrodeGroup with the given name
- Return type:
- get_icephys_electrode(name=None)
Get an IntracellularElectrode from this NWBFile
- Parameters:
name (
str
) – the name of the IntracellularElectrode- Returns:
the IntracellularElectrode with the given name
- Return type:
- get_imaging_plane(name=None)
Get an ImagingPlane from this NWBFile
- Parameters:
name (
str
) – the name of the ImagingPlane- Returns:
the ImagingPlane with the given name
- Return type:
- get_lab_meta_data(name=None)
Get a LabMetaData from this NWBFile
- Parameters:
name (
str
) – the name of the LabMetaData- Returns:
the LabMetaData with the given name
- Return type:
- get_ogen_site(name=None)
Get an OptogeneticStimulusSite from this NWBFile
- Parameters:
name (
str
) – the name of the OptogeneticStimulusSite- Returns:
the OptogeneticStimulusSite with the given name
- Return type:
- get_processing_module(name=None)
Get a ProcessingModule from this NWBFile
- Parameters:
name (
str
) – the name of the ProcessingModule- Returns:
the ProcessingModule with the given name
- Return type:
- get_stimulus(name=None)
Get a NWBDataInterface from this NWBFile
- Parameters:
name (
str
) – the name of the NWBDataInterface or DynamicTable- Returns:
the NWBDataInterface or DynamicTable with the given name
- Return type:
- get_stimulus_template(name=None)
Get a TimeSeries from this NWBFile
- Parameters:
name (
str
) – the name of the TimeSeries or Images- Returns:
the TimeSeries or Images with the given name
- Return type:
TimeSeries
orImages
- get_time_intervals(name=None)
Get a TimeIntervals from this NWBFile
- Parameters:
name (
str
) – the name of the TimeIntervals- Returns:
the TimeIntervals with the given name
- Return type:
- property icephys_electrodes
a dictionary containing the IntracellularElectrode in this NWBFile
- property icephys_experimental_conditions
A table for grouping different intracellular recording repetitions together that belong to the same experimental experimental_conditions.
- property icephys_repetitions
A table for grouping different intracellular recording sequential recordings together.With each SweepSequence typically representing a particular type of stimulus, the RepetitionsTable table is typically used to group sets of stimuli applied in sequence.
- property icephys_sequential_recordings
A table for grouping different simultaneous intracellular recording from the SimultaneousRecordingsTable table together. This is typically used to group together simultaneous recordings where the a sequence of stimuli of the same type with varying parameters have been presented in a sequence.
- property icephys_simultaneous_recordings
SimultaneousRecordingsTable table for grouping different intracellular recordings fromthe IntracellularRecordingsTable table together that were recorded simultaneously from different electrodes
- property identifier
a unique text identifier for the file
- property imaging_planes
a dictionary containing the ImagingPlane in this NWBFile
- property institution
institution(s) where experiment is performed
- property intervals
a dictionary containing the TimeIntervals in this NWBFile
- property intracellular_recordings
IntracellularRecordingsTable table to group together a stimulus and response from a single intracellular electrode and a single simultaneous recording.
- property invalid_times
A table containing times to be omitted from analysis
- property keywords
Terms to search over
- property lab
lab where experiment was performed
- property lab_meta_data
a dictionary containing the LabMetaData in this NWBFile
- namespace = 'core'
- neurodata_type = 'NWBFile'
- property notes
Notes about the experiment.
- property ogen_sites
a dictionary containing the OptogeneticStimulusSite in this NWBFile
- property pharmacology
Description of drugs used, including how and when they were administered. Anesthesia(s), painkiller(s), etc., plus dosage, concentration, etc.
- property processing
a dictionary containing the ProcessingModule in this NWBFile
- property protocol
Experimental protocol, if applicable. E.g., include IACUC protocol
Publication information.PMID, DOI, URL, etc. If multiple, concatenate together and describe which is which. such as PMID, DOI, URL, etc
- property scratch
a dictionary containing the DynamicTable, NWBContainer, or ScratchData in this NWBFile
- property session_description
a description of the session where this data was generated
- property session_id
lab-specific ID for the session
- property session_start_time
the start date and time of the recording session
- property slices
Description of slices, including information about preparation thickness, orientation, temperature and bath solution
- property source_script
Script file used to create this NWB file.
- property source_script_file_name
Name of the source_script file
- property stimulus
a dictionary containing the NWBDataInterface or DynamicTable in this NWBFile
- property stimulus_notes
Notes about stimuli, such as how and where presented.
- property stimulus_template
a dictionary containing the TimeSeries or Images in this NWBFile
- property subject
subject metadata
- property surgery
Narrative description about surgery/surgeries, including date(s) and who performed surgery.
- property sweep_table
the SweepTable that belong to this NWBFile
- property timestamps_reference_time
date and time corresponding to time zero of all timestamps; defaults to value of session_start_time
- property trials
A table containing trial data
- property units
A table containing unit metadata
- property virus
Information about virus(es) used in experiments, including virus ID, source, date made, injection location, volume, etc.