morphval.common¶
Private helper functions of the validation module.
Attributes¶
Functions¶
|
Make a pretty name. |
|
Add a progress bar in notebooks. |
|
Format progress bar label. |
|
Save the dictionary 'data' into a .json file. |
|
Load a json file from file with fname into the results dictionary. |
|
Return the cells in dir_name. |
Suppress pyplot showing blank graphs when in interactive mode. |
|
Yield a figure and close it afterwards. |
|
|
Return a new population where all cells have been translated to their soma origins. |
|
Return a new population with count elements. |
|
Get component of a given population. |
|
Get bounding box of a population. |
|
Plot a population. |
|
Plot cell examples and store the file in output_dir. |
|
Module Contents¶
- COMP_MAP¶
- pretty_name(name)¶
Make a pretty name.
- add_progress_bar(items, template, description)¶
Add a progress bar in notebooks.
- progress_bar_label(template, description, notebook)¶
Format progress bar label.
- dump2json(data_dir, var_name, data)¶
Save the dictionary ‘data’ into a .json file.
- Parameters:
data_dir – the data directory
var_name – the name of the dictionary as a string
data – the data dictionary
- load_json(fname)¶
Load a json file from file with fname into the results dictionary.
- Returns:
The results dictionary
- find_cells(dir_name)¶
Return the cells in dir_name.
- Parameters:
dir_name (str) – path to the directory containing the cells
- Returns:
The list of cell files
- pyplot_non_interactive()¶
Suppress pyplot showing blank graphs when in interactive mode.
This usually happens in the context of jupyter notebooks
- get_agg_fig()¶
Yield a figure and close it afterwards.
- center_population(population)¶
Return a new population where all cells have been translated to their soma origins.
- truncate_population(population, count)¶
Return a new population with count elements.
- get_components_population(population, component)¶
Get component of a given population.
- compute_bounding_box(*populations)¶
Get bounding box of a population.
- plot_population(output_dir, population, xlim, ylim, notebook_desc=None)¶
Plot a population.
- plot_normalized_neurons(output_dir, ref_population, test_population, cell_figure_count, components, notebook_desc=None)¶
Plot cell examples and store the file in output_dir.
- Parameters:
- _center_truncate_population(population, cell_figure_count)¶