A tool to create 2D morphology collage plots based on matplotlib.
Project description
NeuroCollage
A tool to create 2D morphology collage plots based on matplotlib.
Installation
It is recommended to install NeuroCollage
using pip:
pip install neurocollage
Usage
This package provides only one command that aims at building figures of morphologies in atlas planes (i.e. collage plots).
Inputs
The collage requires the following inputs:
- the path to a standard
CircuitConfig
, or the path to a sonatacircuit_config.json
file of a SONATA circuit and the path to an Atlas directory that can be read by Voxcell. - [optional] a configuration file containing the default values used for the CLI arguments (all
these values are overridden by the ones passed to the CLI). The config file is a
INI
file divided in sections. These sections correspond to the first part of the CLI parameter names. For example, theatlas-path
parameter of the CLI corresponds to thepath
parameter of theatlas
section in the configuration file.
Outputs
This package contains three main functions:
get_layer_annotation
: can generate annotation of layers for plotting or other usescreate_planes
: defines a set of planes to create collage plots, with various algorithms. Planes are sampled along a centerline, which can be straight aligned or not with world coordinates or curved using an algorithm from formeratlas_analysis
package. The first and last point of the centerline can be defined manually, or estimated internally to span the given region best.plot_collage
: make the collage plot, see API for possible arguments.
Command
This package provides a CLI whose parameters are described in the Command Line Interface page of this documentation. It is also possible to get help from the command:
neuro-collage --help
If all the arguments are provided in the configuration file, the command is just:
neuro-collage -c <config-file>
Any argument from the configuration file can be overridden through the CLI:
neuro-collage -c <config-file> --cells-sample 20 --collage-pdf-filename custom_collage_name.pdf
Note that the parameter names of the CLI use the section in the configuration file as prefix. In the
previous example, the --cells-sample
overrides the sample
parameter of the cells
section of
the configuration file.
Examples
The examples
folder contains a simple example on S1
region of SSCx
with L5_TPC:A
morphologies. It
also provides examples of programmatic use of the NeuroCollage
API with both types of circuit formats.
Funding & Acknowledgment
The development of this software was supported by funding to the Blue Brain Project, a research center of the École polytechnique fédérale de Lausanne (EPFL), from the Swiss government's ETH Board of the Swiss Federal Institutes of Technology.
Copyright (c) 2022-2024 Blue Brain Project/EPFL
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file neurocollage-0.3.6.tar.gz
.
File metadata
- Download URL: neurocollage-0.3.6.tar.gz
- Upload date:
- Size: 649.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67325dbc517ef2bf34df58a0b25d2ee6b09ead5b23482b5e753f172af317501d |
|
MD5 | 777c3a671853ed49cd3376d09f54717b |
|
BLAKE2b-256 | 74d6d1b9f81771463a4c378cf307f27ab98a703dbf730ffe063814af132554f8 |
File details
Details for the file neurocollage-0.3.6-py3-none-any.whl
.
File metadata
- Download URL: neurocollage-0.3.6-py3-none-any.whl
- Upload date:
- Size: 38.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 457c263b984af8b30850f57a423ee04e401026b9ebafb1274ea0035959e57b92 |
|
MD5 | 0b88508f5878e91bd6a6b0e989928295 |
|
BLAKE2b-256 | 407c963a3cfa9dfa7a8d1b882c908e56df42faea124484344db43f145cdddd71 |