allensdk.model.biophysical.utils module¶
- class allensdk.model.biophysical.utils.AllActiveUtils(description, axon_type)[source]¶
Bases:
Utils
- class allensdk.model.biophysical.utils.Utils(description)[source]¶
Bases:
HocUtils
A helper class for NEURON functionality needed for biophysical simulations.
- Attributes:
- hobject
The NEURON hoc object.
- nrnobject
The NEURON python object.
- neuronmodule
The NEURON module.
- generate_morphology(morph_filename)[source]¶
Load a swc-format cell morphology file.
- Parameters:
- morph_filenamestring
Path to swc.
- get_recorded_data(vec)[source]¶
Extract recorded voltages and timestamps given the recorded Vector instance. If self.stimulus_sampling_rate is smaller than self.simulation_sampling_rate, resample to self.stimulus_sampling_rate.
- Parameters:
- vecneuron.Vector
constructed by self.record_values
- Returns:
- dict with two keys: ‘v’ = numpy.ndarray with voltages,
‘t’ = numpy.ndarray with timestamps
- read_stimulus(stimulus_path, sweep=0)[source]¶
Load current values for a specific experiment sweep and setup simulation and stimulus sampling rates.
NOTE: NEURON only allows simulation timestamps of multiples of 40KHz. To avoid aliasing, we set the simulation sampling rate to the least common multiple of the stimulus sampling rate and 40KHz.
- Parameters:
- stimulus pathstring
NWB file name
- sweepinteger, optional
sweep index
- allensdk.model.biophysical.utils.create_utils(description, model_type=None)[source]¶
Factory method to create a Utils subclass.
- Parameters:
- descriptionConfig instance
used to initialize Utils subclass
- model_typestring
Must be one of [PERISOMATIC_TYPE, ALL_ACTIVE_TYPE]. If none, defaults to PERISOMATIC_TYPE
- Returns:
- Utils instance