Skip to main content

A package for performing whole brain simulations

Project description

THE VIRTUAL BRAIN SCIENTIFIC LIBRARY

The Virtual Brain Project (TVB Project) has the purpose of offering some modern tools to the Neurosciences community, for computing, simulating and analyzing functional and structural data of human brains.

“TVB Scientific Library” is the most important scientific contribution of TVB Project, but only a part of our code. In order to use this TVB Python Library (modify/run/test), you are advised to follow the steps described here: http://docs.thevirtualbrain.com/manuals/ContributorsManual/ContributorsManual.html#contributors-manual

The interaction with TVB source code is recommended for advanced users only, for which the concepts proposed by TVB are known and understood, and which also have some programming knowledge.

“TVB Scientific Library” comes in two major forms for code-contributors: as a light-weight Python library, or plugged into TVB framework (including Web interface and Persistence of data layers). Depending on your needs and resources, you could use any of the two available options for contributing and testing new code.

“TVB Scientific Library” is a light-weight, stand-alone Python library that contains all the needed packages in order to run simulations and analysis on data without the need for the entire TVB Framework. This implies that no storage will be provided so data from each session will be lost on close. You need to either persist it yourself in some manner or use the full TVBFramework where HDF5 / database storage is provided as default.

For more details, check: http://www.thevirtualbrain.org/

“TVB Scientific Library” contains the following packages: basic, datatypes, simulator and analyzers. The dependencies between these packages can be seen in tvb-package-diagram.jpg . Following is a short description of each of these packages:

  • tvb.basic

This package is the base of TVB and holds sub-packages that are used by most of the other packages like logging, global settings and the TVB traits package. You should rarely (if at all) need to change code in this package, and should know exactly what you are doing before attempting to change anything from here.

  • tvb.datatypes

The simulator and analyzers packages (as well as uploaders and visualizers in TVB Framework) will need to have a common “language” in order to work with the same data. In TVB architecture, that “common language” is represented by Data Types. TVB Data Types declarations are located in this package.

  • tvb.simulator

The Simulation Component is the most important component in The Virtual Brain solution, as it is the component responsible for all the scientific computation related to brain models and data.

You can find various demos of using the simulator here: http://docs.thevirtualbrain.org/demos/Demos.html .

  • tvb.analyzers

Holds modules that can run various analysis of data resulted from the simulator. TVB is not strong in doing data analysis, we barely have a minimum set of analyzers for immediate needs.

NOTE:

To contribute to this repo, you are advised to first fork it under GitHub (through the web ui), and next clone that fork on your machine, and use it as you use any other git repository.

Testing

For testing the package, the Pytest framework is used. Pytest can be installed using pip.

Pytest will run all files in the current directory and its subdirectories of the form test_*.py or *_test.py. More generally, it follows standard test discovery rules

The command for running our tests has two forms. Recommendation when working with a git clone of tvb-library:

cd [folder_where_tvb_library_is]
pytest tvb/test [--junitxml=path]

The second alternative form of running TVB tests, when installing TVB from Pypi, is:

pip install -U tvb-library
pytest --pyargs tvb.tests.library

Coverage

A coverage report can be generated with:

pip install pytest-cov
cd [folder_where_tvb_library_is]
py.test --cov-config .coveragerc --cov=tvb tvb/tests/ --cov-branch --cov-report xml:[file_where_xml_will_be_generated]

Further Resources

Acknowledgments

This project has received funding from the European Union’s Horizon 2020 Framework Programme for Research and Innovation under the Specific Grant Agreement Nos. 785907 (Human Brain Project SGA2), 945539 (Human Brain Project SGA3) and VirtualBrainCloud 826421.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tvb_library-2.9.1.tar.gz (348.6 kB view details)

Uploaded Source

Built Distribution

tvb_library-2.9.1-py3-none-any.whl (519.8 kB view details)

Uploaded Python 3

File details

Details for the file tvb_library-2.9.1.tar.gz.

File metadata

  • Download URL: tvb_library-2.9.1.tar.gz
  • Upload date:
  • Size: 348.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for tvb_library-2.9.1.tar.gz
Algorithm Hash digest
SHA256 a251f602bffe768e6184ffc14d3d6ad9f03be879a78062a7397c30a5f8878b41
MD5 6ee5a4e0a3dd352fcb4902c0d38e3e0d
BLAKE2b-256 960ac438316127799f6881a76af43a5a0c43e73628499f319e5a786deaea5cd4

See more details on using hashes here.

File details

Details for the file tvb_library-2.9.1-py3-none-any.whl.

File metadata

  • Download URL: tvb_library-2.9.1-py3-none-any.whl
  • Upload date:
  • Size: 519.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for tvb_library-2.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b7a21db761b0ac9aecf91f9a73a3204357226a1842abf39788e72f89210313d9
MD5 eebc4d8e8a90ef1526e96eabf81dbb37
BLAKE2b-256 1e123c96370de5342e7f27571d8da6173f9832c16c272107736f9aebb4dc3c4a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page