allensdk.brain_observatory.ecephys.ecephys_session_api.ecephys_nwb1_session_api module

class allensdk.brain_observatory.ecephys.ecephys_session_api.ecephys_nwb1_session_api.EcephysNwb1Api(path, *args, **kwargs)[source]

Bases: allensdk.brain_observatory.ecephys.ecephys_session_api.ecephys_session_api.EcephysSessionApi

An EcephySession adaptor for reading NWB1.0 files.

Was created by sight using an assortment of existing NWB1 files. It is possible that parts of the NWB1 standard (?!) is missing or not properly implemented.

NWB1 vs NWB2 issues: * In NWB 1 there is no difference between global unit-ids and probe’s local-index. A unit is unique to one channel * Units are missing information about firing_rate, isi_violation, and quality.

  • So that EcephysSession._build_units() actually return values I had to set quality=good for all units
  • NWB Stimulus_presentations missing stimulus_block, stimulus_index and Image column - To get EcephysSession.conditionwise_spikes() working had to make up a block number for every stimulus type
  • NWB1 missing a ‘valid_data’ tag for channels. Had to set to True otherwise EcephysSession won’t see any channels
  • There were no ‘channels’ table/group in NWB1. Instead we had to iterate through all the units and pull out the distinct channel info.
  • In NWB2 each unit has a mean-waveform for every channel on the probe. In NWB1 A unit only has a single waveform
  • The NWB1 identifier is a string
classmethod from_path(path, **kwargs)[source]
get_channels(self) → pandas.core.frame.DataFrame[source]
get_ecephys_session_id(self) → int[source]
get_mean_waveforms(self) → Dict[int, numpy.ndarray][source]
get_probes(self) → pandas.core.frame.DataFrame[source]
get_running_speed(self)[source]
get_spike_times(self) → Dict[int, numpy.ndarray][source]
get_stimulus_presentations(self) → pandas.core.frame.DataFrame[source]
get_units(self) → pandas.core.frame.DataFrame[source]
processing_grp
running_speed_grp
class allensdk.brain_observatory.ecephys.ecephys_session_api.ecephys_nwb1_session_api.IDCreator(init_id=0)[source]

Bases: object

get_id(self, key)[source]