API Documentation

Simulation (hnn_core):

simulate_dipole(net, tstop[, dt, n_trials, …])

Simulate a dipole given the experiment parameters.

Network(params[, add_drives_from_params, …])

The Network class.

Cell(name, pos, sections, synapses, …[, gid])

Create a cell object.

CellResponse([spike_times, spike_gids, …])

The CellResponse class.

pick_connection(net[, src_gids, …])

Returns indices of connections that match search parameters.

Network Models (hnn_core):

jones_2009_model([params, …])

Instantiate the Jones et al. 2009 model.

law_2021_model()

Instantiate the beta modulated ERP network model.

calcium_model([params, add_drives_from_params])

Instantiate the Jones 2009 model with improved calcium dynamics.

Optimization (hnn_core.optimization):

optimize_evoked(params, target_dpl, initial_dpl)

Optimize drives to generate evoked response.

Dipole (hnn_core.dipole):

Dipole(times, data[, nave])

Dipole class.

average_dipoles(dpls)

Compute dipole averages over a list of Dipole objects.

ExtracellularArray (hnn_core.extracellular):

ExtracellularArray(positions, *[, …])

Class for recording extracellular potential fields with electrode array

Visualization (hnn_core.viz):

plot_dipole(dpl[, tmin, tmax, ax, layer, …])

Simple layer-specific plot function.

plot_spikes_hist(cell_response[, ax, …])

Plot the histogram of spiking activity across trials.

plot_spikes_raster(cell_response[, ax, show])

Plot the aggregate spiking activity according to cell type.

plot_cells(net[, ax, show])

Plot the cells using Network.pos_dict.

plot_cell_morphology(cell, ax[, show])

Plot the cell morphology.

plot_psd(dpl, *[, fmin, fmax, tmin, tmax, …])

Plot power spectral density (PSD) of dipole time course

plot_tfr_morlet(dpl, freqs, *[, n_cycles, …])

Plot Morlet time-frequency representation of dipole time course

plot_cell_connectivity(net, conn_idx[, …])

Plot synaptic weight of connections.

plot_connectivity_matrix(net, conn_idx[, …])

Plot connectivity matrix with color bar for synaptic weights

Parallel backends (hnn_core.parallel_backends):

MPIBackend([n_procs, mpi_cmd])

The MPIBackend class.

JoblibBackend([n_jobs])

The JoblibBackend class.

Input and Output:

read_params(params_fname)

Read param values from a file (.json or .param).

read_dipole(fname)

Read dipole values from a file and create a Dipole instance.

read_spikes(fname[, gid_ranges])

Read spiking activity from a collection of spike trial files.