emodel_generalisation.exemplars

“Module to create exemplar morphologies from a morphological population.

Functions

bin_data(distances, data, path_bins[, tpe])

Bin data using distances.

build_ais_diameter_model(morphology_paths[, ...])

Build the AIS model by fitting first sections of axons.

build_soma_model(morphology_paths)

Build soma model.

extract_ais_diameters(morphologies)

Produce an iterator on ais diameters.

extract_ais_path_distances(morphologies)

Produce an iterator on ais diameters.

generate_exemplars(df[, figure_folder, ...])

Create a yaml file with data to produce exemplar morphologies to optimise.

get_ais(neuron)

Get the axon initial section of a neuron.

get_best_exemplar(df[, bin_params, ...])

Find the best exemplar morphology to be most average in surface area profile.

get_bins(bin_params)

Compute path lengths bins from parameters.

get_surface_density(neuron_path, path_bins)

Compute the binned surface densities of a neuron.

get_surface_profile(df, path_bins[, ...])

Get surface profile.

plot_ais_taper(data, model, ax)

Plot AIS taper.

plot_ais_taper_models(models[, pdf_filename])

Create a pdf with all models of AIS and datapoints.

plot_soma_shape_models(models[, pdf_filename])

Plot soma shape models (surface area and radii).

plot_surface_comparison(surf_df, df[, ...])

Plot comparison of surface areas and median scores.

taper_function(length, strength, ...)

Function to model tappers AIS.

emodel_generalisation.exemplars.bin_data(distances, data, path_bins, tpe='area')

Bin data using distances.

emodel_generalisation.exemplars.build_ais_diameter_model(morphology_paths, bin_size=2, total_length=60, with_taper=False)

Build the AIS model by fitting first sections of axons.

Parameters:
  • morphology_paths (list) – list of paths to morphologies

  • bin_size (float) – size of bins (in unit length) for smoothing of diameters

  • total_length (flow) – length of AIS

emodel_generalisation.exemplars.build_soma_model(morphology_paths)

Build soma model.

Using only surface area for now.

emodel_generalisation.exemplars.extract_ais_diameters(morphologies)

Produce an iterator on ais diameters.

emodel_generalisation.exemplars.extract_ais_path_distances(morphologies)

Produce an iterator on ais diameters.

emodel_generalisation.exemplars.generate_exemplars(df, figure_folder='exemplar_figures', with_plots=True, surface_percentile=50, bin_params=None)

Create a yaml file with data to produce exemplar morphologies to optimise.

emodel_generalisation.exemplars.get_ais(neuron)

Get the axon initial section of a neuron.

emodel_generalisation.exemplars.get_best_exemplar(df, bin_params=None, surface_percentile=50)

Find the best exemplar morphology to be most average in surface area profile.

emodel_generalisation.exemplars.get_bins(bin_params)

Compute path lengths bins from parameters.

emodel_generalisation.exemplars.get_surface_density(neuron_path, path_bins, neurite_type='basal', tpe='area')

Compute the binned surface densities of a neuron.

emodel_generalisation.exemplars.get_surface_profile(df, path_bins, neurite_type='basal', morphology_path='path', tpe='area')

Get surface profile.

emodel_generalisation.exemplars.plot_ais_taper(data, model, ax)

Plot AIS taper.

emodel_generalisation.exemplars.plot_ais_taper_models(models, pdf_filename='AIS_models.pdf')

Create a pdf with all models of AIS and datapoints.

emodel_generalisation.exemplars.plot_soma_shape_models(models, pdf_filename='soma_shape_models.pdf')

Plot soma shape models (surface area and radii).

emodel_generalisation.exemplars.plot_surface_comparison(surf_df, df, pdf_filename='surface_profile.pdf', surface_percentile=50)

Plot comparison of surface areas and median scores.

emodel_generalisation.exemplars.taper_function(length, strength, taper_scale, terminal_diameter)

Function to model tappers AIS.