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 network model described in Jones et al. J.

law_2021_model([params, ...])

Instantiate the expansion of Jones 2009 model to study beta modulated ERPs as described in Law et al. Cereb.

calcium_model([params, ...])

Instantiate the Jones 2009 model with improved calcium dynamics in L5 pyramidal neurons.

Optimization (hnn_core.optimization):

Optimizer(initial_net, tstop, constraints, ...)

Methods

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[, trial_idx, ...])

Plot the histogram of spiking activity across trials.

plot_spikes_raster(cell_response[, ...])

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[, color, pos, ...])

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

plot_laminar_lfp(times, data, contact_labels)

Plot laminar extracellular electrode array voltage time series.

plot_laminar_csd(times, data, contact_labels)

Plot laminar current source density (CSD) estimation from LFP array.

NetworkPlotter(net[, ax, vmin, vmax, ...])

Helper class to visualize full morphology of HNN model.

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[, file_contents])

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

read_dipole(fname)

Read dipole values from a txt or hdf5 file and

read_spikes(fname[, gid_ranges])

Read spiking activity from a collection of spike trial files.

GUI (hnn_core.gui):

HNNGUI([theme_color, total_height, ...])

HNN GUI class