hnn_core.parallel_backends.JoblibBackend#

class hnn_core.parallel_backends.JoblibBackend(n_jobs=1)[source]#

The JoblibBackend class.

Parameters:
n_jobsint | None

The number of jobs to start in parallel. If None, then 1 trial will be started without parallelism

Attributes:
n_jobsint

The number of jobs to start in parallel

Methods

simulate(net, tstop, dt, n_trials[, ...])

Simulate the HNN model

simulate(net, tstop, dt, n_trials, postproc=False, baseline_correction=True)[source]#

Simulate the HNN model

Parameters:
netNetwork object

The Network object specifying how cells are connected.

tstopfloat

The simulation stop time (ms).

dtfloat

The integration time step of h.CVode (ms)

n_trialsint

Number of trials to simulate.

postprocbool, default=False

Deprecated. If True, smoothing (dipole_smooth_win) and scaling (dipole_scalefctr) values are read from the Network’s parameter file, and applied to the dipole objects before returning (the default Network parameter file, hnn_core/param/default.json, uses a smoothing value of 30 ms and a scaling factor of 3000). Note that this setting only affects the dipole waveforms, and not somatic voltages, possible extracellular recordings etc. The preferred way is to use the smooth() and scale() methods after the simulation is run instead.

baseline_correctionbool, default=True

Whether to apply the baseline correction after simulation (which correction is used depends on Network._model_variant). Defaults to True, applying the appropriate correction.

Returns:
dpl: list of Dipole

The Dipole results from each simulation trial