ipfx.dataset package

Submodules

ipfx.dataset.create module

ipfx.dataset.create.create_ephys_data_set(nwb_file: str, sweep_info: Optional[Dict[str, Any]] = None, ontology: Optional[str] = None) → ipfx.dataset.ephys_data_set.EphysDataSet[source]

Create an ephys data set with the appropriate nwbdata reader class

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/create.py:docstring of ipfx.dataset.create.create_ephys_data_set, line 4)

Unexpected section title.

Parameters
----------

nwb_file sweep_info ontology

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/create.py:docstring of ipfx.dataset.create.create_ephys_data_set, line 10)

Unexpected section title.

Returns
-------

EphysDataSet

ipfx.dataset.create.get_nwb_version(nwb_file: str) → Dict[str, Any][source]

Find version of the nwb file

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/create.py:docstring of ipfx.dataset.create.get_nwb_version, line 4)

Unexpected section title.

Parameters
----------

nwb_file

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/create.py:docstring of ipfx.dataset.create.get_nwb_version, line 8)

Unexpected section title.

Returns
-------

dict in the format:

{
major: str full str.

System Message: WARNING/2 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/create.py:docstring of ipfx.dataset.create.get_nwb_version, line 15)

Definition list ends without a blank line; unexpected unindent.

}

ipfx.dataset.create.get_scalar_value(dataset_from_nwb)[source]

Some values in NWB are stored as scalar whereas others as np.ndarrays with dimension 1. Use this function to retrieve the scalar value itself.

ipfx.dataset.create.is_file_mies(path: str) → bool[source]

ipfx.dataset.ephys_data_interface module

class ipfx.dataset.ephys_data_interface.EphysDataInterface(ontology: ipfx.stimulus.StimulusOntology, validate_stim: bool = True)[source]

Bases: abc.ABC

The interface that any child class providing data to the EphysDataSet must implement

get_clamp_mode(sweep_number) → str[source]

Extract clamp mode from the class of Time Series Parameters ———- sweep_number

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_interface.py:docstring of ipfx.dataset.ephys_data_interface.EphysDataInterface.get_clamp_mode, line 7)

Unexpected section title.

Returns
-------
get_full_recording_date() → datetime.datetime[source]

Obtain the full date and time at which recording began.

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_interface.py:docstring of ipfx.dataset.ephys_data_interface.EphysDataInterface.get_full_recording_date, line 4)

Unexpected section title.

Returns
-------

A datetime object, with timezone, reporting the start of recording

get_stimulus_code(sweep_number: int) → str[source]

Obtain the code of the stimulus presented on a particular sweep.

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_interface.py:docstring of ipfx.dataset.ephys_data_interface.EphysDataInterface.get_stimulus_code, line 4)

Unexpected section title.

Parameters
----------

sweep_number : unique identifier for the sweep

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_interface.py:docstring of ipfx.dataset.ephys_data_interface.EphysDataInterface.get_stimulus_code, line 8)

Unexpected section title.

Returns
-------

The codified name of the stimulus presented on the identified sweep

get_stimulus_name(stim_code)[source]
get_stimulus_unit(sweep_number: int) → str[source]

Extract unit of a stimulus

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_interface.py:docstring of ipfx.dataset.ephys_data_interface.EphysDataInterface.get_stimulus_unit, line 4)

Unexpected section title.

Parameters
----------

sweep_number

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_interface.py:docstring of ipfx.dataset.ephys_data_interface.EphysDataInterface.get_stimulus_unit, line 8)

Unexpected section title.

Returns
-------

stimulus unit

get_sweep_attrs(sweep_number) → Dict[str, Any][source]

Extract sweep attributes

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_interface.py:docstring of ipfx.dataset.ephys_data_interface.EphysDataInterface.get_sweep_attrs, line 4)

Unexpected section title.

Parameters
----------

sweep_number

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_interface.py:docstring of ipfx.dataset.ephys_data_interface.EphysDataInterface.get_sweep_attrs, line 8)

Unexpected section title.

Returns
-------

sweep attributes

get_sweep_data(sweep_number: int) → Dict[str, Any][source]

Extract sweep data

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_interface.py:docstring of ipfx.dataset.ephys_data_interface.EphysDataInterface.get_sweep_data, line 4)

Unexpected section title.

Parameters
----------

sweep_number

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_interface.py:docstring of ipfx.dataset.ephys_data_interface.EphysDataInterface.get_sweep_data, line 8)

Unexpected section title.

Returns
-------

dict in the format:

{
‘stimulus’: np.ndarray, ‘response’: np.ndarray, ‘stimulus_unit’: string, ‘sampling_rate’: float

System Message: WARNING/2 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_interface.py:docstring of ipfx.dataset.ephys_data_interface.EphysDataInterface.get_sweep_data, line 17)

Definition list ends without a blank line; unexpected unindent.

}

get_sweep_metadata(sweep_number: int) → Dict[str, Any][source]

Returns metadata about a sweep

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_interface.py:docstring of ipfx.dataset.ephys_data_interface.EphysDataInterface.get_sweep_metadata, line 4)

Unexpected section title.

Parameters
----------

sweep_number : identifier of the sweep whose metadata will be returned

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_interface.py:docstring of ipfx.dataset.ephys_data_interface.EphysDataInterface.get_sweep_metadata, line 8)

Unexpected section title.

Returns
-------

dict in the format:

{
“sweep_number”: int, “stimulus_units”: str, “bridge_balance_mohm”: float, “leak_pa”: float, “stimulus_scale_factor”: float, “stimulus_code”: str, “stimulus_code_ext”: str, “stimulus_name”: str, “clamp_mode”: str

System Message: WARNING/2 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_interface.py:docstring of ipfx.dataset.ephys_data_interface.EphysDataInterface.get_sweep_metadata, line 22)

Definition list ends without a blank line; unexpected unindent.

}

sweep_numbers

A time-ordered sequence of each sweep’s integer identifier

ipfx.dataset.ephys_data_set module

class ipfx.dataset.ephys_data_set.EphysDataSet(data: ipfx.dataset.ephys_data_interface.EphysDataInterface, sweep_info: Optional[List[Dict[KT, VT]]] = None)[source]

Bases: object

CLAMP_MODE = 'clamp_mode'
COARSE_LONG_SQUARE = 'coarse_long_square'
COLUMN_NAMES = ['stimulus_units', 'stimulus_code', 'stimulus_amplitude', 'stimulus_name', 'clamp_mode', 'sweep_number']
CURRENT_CLAMP = 'CurrentClamp'
LONG_SQUARE = 'long_square'
RAMP = 'ramp'
SHORT_SQUARE = 'short_square'
SHORT_SQUARE_TRIPLE = 'short_square_triple'
STIMULUS_AMPLITUDE = 'stimulus_amplitude'
STIMULUS_CODE = 'stimulus_code'
STIMULUS_NAME = 'stimulus_name'
STIMULUS_UNITS = 'stimulus_units'
SWEEP_NUMBER = 'sweep_number'
VOLTAGE_CLAMP = 'VoltageClamp'
filtered_sweep_table(clamp_mode: Optional[str] = None, stimuli: Optional[Collection[str]] = None, stimuli_exclude: Optional[Collection[str]] = None) → pandas.core.frame.DataFrame[source]

Utility for filtering the sweep table

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_set.py:docstring of ipfx.dataset.ephys_data_set.EphysDataSet.filtered_sweep_table, line 4)

Unexpected section title.

Parameters
----------

clamp_mode: filter to one of self.VOLTAGE_CLAMP or self.CURRENT_CLAMP stimuli: filter to sweeps presenting these stimuli (codes) stimuli_exclude: filter to sweeps not presenting these stimuli

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_set.py:docstring of ipfx.dataset.ephys_data_set.EphysDataSet.filtered_sweep_table, line 10)

Unexpected section title.

Returns
-------

filtered sweep table

get_clamp_mode(sweep_number: int) → str[source]

Obtain the clamp mode of a given sweep. Should be one of EphysDataSet.VOLTAGE_CLAMP or EphysDataSet.CURRENT_CLAMP

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_set.py:docstring of ipfx.dataset.ephys_data_set.EphysDataSet.get_clamp_mode, line 5)

Unexpected section title.

Parameters
----------
sweep_number : identifier for the sweep whose clamp mode will be
returned

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_set.py:docstring of ipfx.dataset.ephys_data_set.EphysDataSet.get_clamp_mode, line 10)

Unexpected section title.

Returns
-------

The clamp mode of the identified sweep

get_recording_date() → str[source]

Return the date and time at which recording began.

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_set.py:docstring of ipfx.dataset.ephys_data_set.EphysDataSet.get_recording_date, line 4)

Unexpected section title.

Returns
-------

a string, formatted like: “%Y-%m-%d %H:%M:%S” in local time

get_stimulus_code(sweep_number: int) → str[source]

Return the (short form) stimulus code for a particular sweep.

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_set.py:docstring of ipfx.dataset.ephys_data_set.EphysDataSet.get_stimulus_code, line 4)

Unexpected section title.

Parameters
----------
sweep_number : identifier for the sweep whose stimulus code will be
returned

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_set.py:docstring of ipfx.dataset.ephys_data_set.EphysDataSet.get_stimulus_code, line 9)

Unexpected section title.

Returns
-------

code defining the stimulus presented on the identified sweep

get_stimulus_code_ext(sweep_number: int) → str[source]

Obtain the extended stimulus code for a sweep. This is the stimulus code for that sweep augmented with an integer counter describing the number of presentations of that stimulus up to and including the requested sweep.

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_set.py:docstring of ipfx.dataset.ephys_data_set.EphysDataSet.get_stimulus_code_ext, line 7)

Unexpected section title.

Parameters
----------

sweep_number : identifies the sweep whose extended stimulus code will be returned

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_set.py:docstring of ipfx.dataset.ephys_data_set.EphysDataSet.get_stimulus_code_ext, line 12)

Unexpected section title.

Returns
-------

A string of the form “{stimulus_code}[{counter}]”

get_stimulus_units(sweep_number: int) → str[source]

Report the SI unit of measurement for a sweep’s stimulus data

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_set.py:docstring of ipfx.dataset.ephys_data_set.EphysDataSet.get_stimulus_units, line 4)

Unexpected section title.

Parameters
----------
sweep_number : identifies the sweep whose stimulus unit will be
returned

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_set.py:docstring of ipfx.dataset.ephys_data_set.EphysDataSet.get_stimulus_units, line 9)

Unexpected section title.

Returns
-------

An SI (or derived) unit’s name

get_sweep_data(sweep_number: int) → Dict[KT, VT][source]

Obtain the recorded data for a given sweep.

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_set.py:docstring of ipfx.dataset.ephys_data_set.EphysDataSet.get_sweep_data, line 4)

Unexpected section title.

Parameters
----------

sweep_number : identifier for the sweep whose data will be returned

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_set.py:docstring of ipfx.dataset.ephys_data_set.EphysDataSet.get_sweep_data, line 8)

Unexpected section title.

Returns
-------
A dictionary containing at least:
{
‘stimulus’: np.ndarray, ‘response’: np.ndarray, ‘stimulus_unit’: string, ‘sampling_rate’: float

System Message: WARNING/2 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_set.py:docstring of ipfx.dataset.ephys_data_set.EphysDataSet.get_sweep_data, line 15)

Definition list ends without a blank line; unexpected unindent.

}

get_sweep_number(stimuli: Collection[str], clamp_mode: Optional[str] = None) → int[source]

Convenience for getting the integer identifier of the temporally latest sweep matching argued criteria.

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_set.py:docstring of ipfx.dataset.ephys_data_set.EphysDataSet.get_sweep_number, line 5)

Unexpected section title.

Parameters
----------

stimuli : filter to sweeps presentingthese stimuli clamp_mode : filter to sweeps of this clamp mode

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_set.py:docstring of ipfx.dataset.ephys_data_set.EphysDataSet.get_sweep_number, line 10)

Unexpected section title.

Returns
-------

The identifier of the last sweep matching argued criteria

get_sweep_numbers(stimuli: Collection[str] = None, clamp_mode: Optional[str] = None) → List[int][source]

Return the integer identifier of all sweeps matching argued criteria

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_set.py:docstring of ipfx.dataset.ephys_data_set.EphysDataSet.get_sweep_numbers, line 4)

Unexpected section title.

Parameters
----------

stimuli : filter to sweeps presenting these stimuli (codes) clamp_mode : filter to sweeps of this clamp mode

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_set.py:docstring of ipfx.dataset.ephys_data_set.EphysDataSet.get_sweep_numbers, line 9)

Unexpected section title.

Returns
-------

A list of sweep numbers matching these criteria

ontology

The stimulus ontology maps codified description of the stimulus type to the human-readable descriptions.

sweep(sweep_number: int) → ipfx.sweep.Sweep[source]

Create an instance of the Sweep class with the data loaded from the from a file

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_set.py:docstring of ipfx.dataset.ephys_data_set.EphysDataSet.sweep, line 5)

Unexpected section title.

Parameters
----------

sweep_number: int

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_set.py:docstring of ipfx.dataset.ephys_data_set.EphysDataSet.sweep, line 9)

Unexpected section title.

Returns
-------

sweep: Sweep object

sweep_info
sweep_set(sweep_numbers: Union[Sequence[int], int, None] = None) → ipfx.sweep.SweepSet[source]

Construct a SweepSet object, which offers convenient access to an ordered collection of sweeps.

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_set.py:docstring of ipfx.dataset.ephys_data_set.EphysDataSet.sweep_set, line 5)

Unexpected section title.

Parameters
----------
sweep_numbers : Identifiers for the sweeps which will make up this set.
If None, use all available sweeps.

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_data_set.py:docstring of ipfx.dataset.ephys_data_set.EphysDataSet.sweep_set, line 10)

Unexpected section title.

Returns
-------

A SweepSet constructed from the requested sweeps

sweep_table

Each row of the sweep table contains the metadata for a single sweep. In particular details of the stimulus presented and the clamp mode. See EphysDataInterface.get_sweep_metadata for more information.

ipfx.dataset.ephys_nwb_data module

class ipfx.dataset.ephys_nwb_data.EphysNWBData(nwb_file: None, ontology: ipfx.stimulus.StimulusOntology, load_into_memory: bool = True, validate_stim: bool = True)[source]

Bases: ipfx.dataset.ephys_data_interface.EphysDataInterface

Abstract base class for implementing an EphysDataInterface with an NWB file

Provides common NWB2 reading and writing functionality

RESPONSE = (<class 'pynwb.icephys.VoltageClampSeries'>, <class 'pynwb.icephys.CurrentClampSeries'>)
STIMULUS = (<class 'pynwb.icephys.VoltageClampStimulusSeries'>, <class 'pynwb.icephys.CurrentClampStimulusSeries'>)
get_clamp_mode(sweep_number)[source]

Extract clamp mode from the class of Time Series Parameters ———- sweep_number

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_nwb_data.py:docstring of ipfx.dataset.ephys_nwb_data.EphysNWBData.get_clamp_mode, line 7)

Unexpected section title.

Returns
-------
get_full_recording_date()[source]

Extract session_start_time in nwb Use last value if more than one is present

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_nwb_data.py:docstring of ipfx.dataset.ephys_nwb_data.EphysNWBData.get_full_recording_date, line 5)

Unexpected section title.

Returns
-------
recording_date: str
use date format “%Y-%m-%d %H:%M:%S”, drop timezone info
static get_long_unit_name(unit)[source]
get_spike_times(sweep_number)[source]
get_stimulus_code(sweep_number)[source]

Obtain the code of the stimulus presented on a particular sweep.

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_nwb_data.py:docstring of ipfx.dataset.ephys_nwb_data.EphysNWBData.get_stimulus_code, line 4)

Unexpected section title.

Parameters
----------

sweep_number : unique identifier for the sweep

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_nwb_data.py:docstring of ipfx.dataset.ephys_nwb_data.EphysNWBData.get_stimulus_code, line 8)

Unexpected section title.

Returns
-------

The codified name of the stimulus presented on the identified sweep

get_stimulus_unit(sweep_number)[source]

Extract unit of a stimulus

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_nwb_data.py:docstring of ipfx.dataset.ephys_nwb_data.EphysNWBData.get_stimulus_unit, line 4)

Unexpected section title.

Parameters
----------

sweep_number

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_nwb_data.py:docstring of ipfx.dataset.ephys_nwb_data.EphysNWBData.get_stimulus_unit, line 8)

Unexpected section title.

Returns
-------

stimulus unit

get_sweep_attrs(sweep_number)[source]

Extract sweep attributes

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_nwb_data.py:docstring of ipfx.dataset.ephys_nwb_data.EphysNWBData.get_sweep_attrs, line 4)

Unexpected section title.

Parameters
----------

sweep_number

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_nwb_data.py:docstring of ipfx.dataset.ephys_nwb_data.EphysNWBData.get_sweep_attrs, line 8)

Unexpected section title.

Returns
-------

sweep attributes

get_sweep_data(sweep_number)[source]

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_nwb_data.py:docstring of ipfx.dataset.ephys_nwb_data.EphysNWBData.get_sweep_data, line 2)

Unexpected section title.

Parameters
----------

sweep_number: int

get_sweep_metadata(sweep_number: int)[source]

Returns metadata about a sweep

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_nwb_data.py:docstring of ipfx.dataset.ephys_nwb_data.EphysNWBData.get_sweep_metadata, line 4)

Unexpected section title.

Parameters
----------

sweep_number : identifier of the sweep whose metadata will be returned

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_nwb_data.py:docstring of ipfx.dataset.ephys_nwb_data.EphysNWBData.get_sweep_metadata, line 8)

Unexpected section title.

Returns
-------

dict in the format:

{
“sweep_number”: int, “stimulus_units”: str, “bridge_balance_mohm”: float, “leak_pa”: float, “stimulus_scale_factor”: float, “stimulus_code”: str, “stimulus_code_ext”: str, “stimulus_name”: str, “clamp_mode”: str

System Message: WARNING/2 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_nwb_data.py:docstring of ipfx.dataset.ephys_nwb_data.EphysNWBData.get_sweep_metadata, line 22)

Definition list ends without a blank line; unexpected unindent.

}

load_nwb(nwb_file: None, load_into_memory: bool = True)[source]

Load NWB to self.nwb

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/ephys_nwb_data.py:docstring of ipfx.dataset.ephys_nwb_data.EphysNWBData.load_nwb, line 4)

Unexpected section title.

Parameters
----------

nwb_file: NWB file path or hdf5 obj load_into_memory: whether using load_into_memory approach to load NWB

sweep_numbers

A time-ordered sequence of each sweep’s integer identifier

static validate_SI_unit(unit)[source]
ipfx.dataset.ephys_nwb_data.get_finite_or_none(d, key)[source]
ipfx.dataset.ephys_nwb_data.get_scalar_value(dataset_from_nwb)[source]

Some values in NWB are stored as scalar whereas others as np.ndarrays with dimension 1. Use this function to retrieve the scalar value itself.

ipfx.dataset.hbg_nwb_data module

class ipfx.dataset.hbg_nwb_data.HBGNWBData(nwb_file: str, ontology: ipfx.stimulus.StimulusOntology, load_into_memory: bool = True, validate_stim: bool = True)[source]

Bases: ipfx.dataset.ephys_nwb_data.EphysNWBData

Provides an Ephys Data Interface to an HBG generated NWB file

get_stimulus_code_ext(sweep_number)[source]
get_sweep_metadata(sweep_number: int) → Dict[str, Any][source]

Returns metadata about a sweep

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/hbg_nwb_data.py:docstring of ipfx.dataset.hbg_nwb_data.HBGNWBData.get_sweep_metadata, line 4)

Unexpected section title.

Parameters
----------

sweep_number : identifier of the sweep whose metadata will be returned

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/hbg_nwb_data.py:docstring of ipfx.dataset.hbg_nwb_data.HBGNWBData.get_sweep_metadata, line 8)

Unexpected section title.

Returns
-------

dict in the format:

{
“sweep_number”: int, “stimulus_units”: str, “bridge_balance_mohm”: float, “leak_pa”: float, “stimulus_scale_factor”: float, “stimulus_code”: str, “stimulus_code_ext”: str, “stimulus_name”: str, “clamp_mode”: str

System Message: WARNING/2 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/hbg_nwb_data.py:docstring of ipfx.dataset.hbg_nwb_data.HBGNWBData.get_sweep_metadata, line 22)

Definition list ends without a blank line; unexpected unindent.

}

ipfx.dataset.labnotebook module

class ipfx.dataset.labnotebook.LabNotebookReader[source]

Bases: object

The Lab Notebook Reader class

This class reads two sections: numeric data and text data

get_numeric_value(name, data_col, sweep_col, enable_col, sweep_num, default_val)[source]

fetch numeric data

val_number has 3 dimensions – the first has a shape of (#fields * 9). there are many hundreds of elements in this dimension. they look to represent the full array of values (for each field for each multipatch) for a given point in time, and thus given sweep according to Thomas Braun (igor nwb dev), the first 8 pages are for headstage data, and the 9th is for headstage-independent data

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/labnotebook.py:docstring of ipfx.dataset.labnotebook.LabNotebookReader.get_numeric_value, line 13)

Unexpected section title.

Parameters
----------

name: str data_col: int sweep_col: int enable_col: int sweep_num: int default_val: dict

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/labnotebook.py:docstring of ipfx.dataset.labnotebook.LabNotebookReader.get_numeric_value, line 22)

Unexpected section title.

Returns
-------

last non-empty entry in specified column for specified sweep number

get_text_value(name, data_col, sweep_col, enable_col, sweep_num, default_val)[source]

fetch text data

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/labnotebook.py:docstring of ipfx.dataset.labnotebook.LabNotebookReader.get_text_value, line 4)

Unexpected section title.

Parameters
----------

name: str data_col: int sweep_col: int enable_col: int sweep_num: int default_val: dict

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/labnotebook.py:docstring of ipfx.dataset.labnotebook.LabNotebookReader.get_text_value, line 13)

Unexpected section title.

Returns
-------

last non-empty entry in specified column for specified sweep number

get_value(name, sweep_num, default_val)[source]

looks for key in lab notebook and returns the value associated with the specified sweep, or the default value if no value is found (NaN and empty strings are considered to be non-values)

name_number has 3 dimensions – the first has shape (#fields * 9) and stores the key names. the second looks to store units for those keys. The third is numeric text but it’s role isn’t clear

val_number has 3 dimensions – the first has a shape of (#fields * 9). there are many hundreds of elements in this dimension. they look to represent the full array of values (for each field for each multipatch) for a given point in time, and thus given sweep

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/labnotebook.py:docstring of ipfx.dataset.labnotebook.LabNotebookReader.get_value, line 17)

Unexpected section title.

Parameters
----------

name: str sweep_num: int default_val: dict

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/labnotebook.py:docstring of ipfx.dataset.labnotebook.LabNotebookReader.get_value, line 23)

Unexpected section title.

Returns
-------

values obtained from lab notebook

register_enabled_names()[source]

register_enabled_names: mapping of notebook keys to keys representing if that value is enabled move this to subclasses if/when key names diverge

class ipfx.dataset.labnotebook.LabNotebookReaderIgorNwb(nwb_file)[source]

Bases: ipfx.dataset.labnotebook.LabNotebookReader

LabNotebookReaderIgorNwb: Loads lab notebook data out of an Igor-generated NWB file. Module input is the name of the nwb file. Notebook data can be read through get_value() function

get_numerical_keys()[source]
get_numerical_values()[source]
get_textual_keys()[source]
get_textual_values()[source]

ipfx.dataset.mies_nwb_data module

class ipfx.dataset.mies_nwb_data.MIESNWBData(nwb_file: str, notebook: ipfx.dataset.labnotebook.LabNotebookReader, ontology: ipfx.stimulus.StimulusOntology, load_into_memory: bool = True, validate_stim: bool = True)[source]

Bases: ipfx.dataset.ephys_nwb_data.EphysNWBData

Provides an Ephys Data Interface to a MIES generated NWB file

get_stim_code_ext(sweep_number)[source]
get_sweep_metadata(sweep_number: int) → Dict[str, Any][source]

Returns metadata about a sweep

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/mies_nwb_data.py:docstring of ipfx.dataset.mies_nwb_data.MIESNWBData.get_sweep_metadata, line 4)

Unexpected section title.

Parameters
----------

sweep_number : identifier of the sweep whose metadata will be returned

System Message: SEVERE/4 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/mies_nwb_data.py:docstring of ipfx.dataset.mies_nwb_data.MIESNWBData.get_sweep_metadata, line 8)

Unexpected section title.

Returns
-------

dict in the format:

{
“sweep_number”: int, “stimulus_units”: str, “bridge_balance_mohm”: float, “leak_pa”: float, “stimulus_scale_factor”: float, “stimulus_code”: str, “stimulus_code_ext”: str, “stimulus_name”: str, “clamp_mode”: str

System Message: WARNING/2 (/home/docs/checkouts/readthedocs.org/user_builds/ipfx/checkouts/v1.0.0.1/ipfx/dataset/mies_nwb_data.py:docstring of ipfx.dataset.mies_nwb_data.MIESNWBData.get_sweep_metadata, line 22)

Definition list ends without a blank line; unexpected unindent.

}

Module contents