miv_simulator.clamps.cell#
Functions
|
|
|
Fit an exponential to estimate membrane time constant between start and end |
|
Instantiates a BiophysCell instance and all its synapses. |
|
|
|
|
|
Measure voltage deflection (min or max, between start and end). |
|
|
|
|
|
|
|
|
|
|
|
Calculate the membrane time constant by fitting the voltage response with a single exponential. |
- miv_simulator.clamps.cell.init_biophys_cell(env, pop_name, gid, load_weights=True, load_connections=True, register_cell=True, write_cell=False, validate_tree=True, cell_dict={})[source]#
Instantiates a BiophysCell instance and all its synapses.
- Parameters:
env (
AbstractEnv) – an instance of env.Envpop_name (
str) – population namegid (
int) – gidload_connections (
bool) – boolregister_cell (
bool) – boolvalidate_tree (
bool) – boolwrite_cell (
bool) – boolcell_dict (
Dict[str,Union[Dict[str,Union[ndarray,Dict[str,Union[int,Dict[int,ndarray],ndarray]]]],Dict[str,ndarray],Tuple[Dict[str,Dict[str,List[Tuple[int,Tuple[ndarray,Dict[str,List[ndarray]]]]]]],Dict[str,Dict[str,Dict[str,Dict[str,int]]]]],None]]) – dict
- Return type:
Environment can be instantiated as: env = Env(config_file, template_paths, dataset_prefix) :param template_paths: str; colon-separated list of paths to directories containing hoc cell templates :param dataset_prefix: str; path to directory containing required neuroh5 data files
- miv_simulator.clamps.cell.measure_deflection(t, v, t0, t1, stim_amp=None)[source]#
Measure voltage deflection (min or max, between start and end).
- miv_simulator.clamps.cell.fit_membrane_time_constant(t, v, t0, t1, rmse_max_tol=1.0)[source]#
Fit an exponential to estimate membrane time constant between start and end
- Parameters:
- vnumpy array of voltages in mV
- tnumpy array of times in ms
- t0start of time window for exponential fit
- t1end of time window for exponential fit
- rsme_max_tol: minimal acceptable root mean square error (default 1e-4)
- Returns:
- a, inv_tau, y0Coefficients of equation y0 + a * exp(-inv_tau * x)
- returns np.nan for values if fit fails
- miv_simulator.clamps.cell.measure_time_constant(t, v, t0, t1, stim_amp, frac=0.1, baseline_interval=100.0, min_snr=20.0)[source]#
Calculate the membrane time constant by fitting the voltage response with a single exponential.
- Parameters:
- vnumpy array of voltages in mV
- tnumpy array of times in ms
- t0start of stimulus interval in ms
- t1end of stimulus interval in ms
- stim_ampstimulus amplitude
- fracfraction of peak deflection to find to determine start of fit window. (default 0.1)
- baseline_intervalduration before start for baseline Vm calculation
- min_snrminimum signal-to-noise ratio (SNR) to allow calculation of time constant.
If SNR is too low, np.nan will be returned. (default 20)
- Returns:
- taumembrane time constant in ms