https://github.com/openworm/org.geppetto.recording
Python project allowing to create a recording for Geppetto
https://github.com/openworm/org.geppetto.recording
Last synced: 4 months ago
JSON representation
Python project allowing to create a recording for Geppetto
- Host: GitHub
- URL: https://github.com/openworm/org.geppetto.recording
- Owner: openworm
- License: other
- Created: 2014-03-14T18:31:40.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2015-05-12T19:29:10.000Z (about 11 years ago)
- Last Synced: 2025-03-22T19:43:12.409Z (over 1 year ago)
- Language: Python
- Homepage: http://www.geppetto.org/
- Size: 30.7 MB
- Stars: 5
- Watchers: 23
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
org.geppetto.recording
======================
This Python project creates recordings for `Geppetto `_.
A recording is a file that contains all the raw data processed during a simulation run.
The recording files are based on the popular binary file format `HDF5 `_
(more information to come).
Requirements
------------
- **Python 2.7**: `Download `_ and install
(Tip: Use the 32bit version, it will save you a lot of trouble if you want to install NEURON and Brian later).
Make sure that the *Python27* and *Python27/Scripts* directories are in your PATH environment variable.
- **Python packages** (h5py, numpy, enum34): If you use pip to install org.geppetto.recording (see below), these
packages will be installed automatically as needed. If you want to install them manually, use pip
(`Get it here `_).
and type on the command line::
pip install h5py
pip install numpy
pip install enum34
- **NEURON and Brian (optional)**: Required to record simulations or read binary recordings
from `NEURON `_ or `Brian `_.
Note that for NEURON, the standard installer is not enough - you need to be able to run ``import neuron`` or
``import brian``, respectively, from the Python console.
For installation instructions, see the `Appendix: Installing NEURON and Brian`_.
Installation
------------
If you installed all requirements, use pip (`Get it here `_) to
install org.geppetto.recording::
pip install org.geppetto.recording
Alternatively, download or clone the source code from this repository. Fire up the command line, navigate into
the org.geppetto.recording folder (the one containing this *README*) and type::
python setup.py install
Usage
-----
Detailed instructions on how to create and replay a recording are in the
`Geppetto documentation `_.
If you can't await it, fire up the Python console and type:
>>> from org.geppetto.recording.creators import RecordingCreator, MetaType
>>> c = RecordingCreator('recording_file.h5')
>>> c.add_values('cell.voltage', [-60.0, -59.9, -59.8], 'mV', MetaType.STATE_VARIABLE)
>>> c.set_time_step(0.1, 'ms')
>>> c.create()
This will create a simple recording named *recording_file.h5* in you current directory.
You can look at it with `HDFView `_.
Feedback
--------
Got a great idea for a new feature? Found something you don't like? We are happy to hear from you!
Get in touch through the `OpenWorm mailing list `_,
open an issue on `GitHub `_ or create a fork of this repository
and start coding!
Appendix: Installing NEURON and Brian
-------------------------------------
**NEURON**
Unfortunately, the standard installer for NEURON isn't enough, you need to be able to run ``import neuron`` from the
Python console.
For OSX and Linux, there are some (unofficial)
`installers `_ from Eilif Muller that work.
For Windows, there is the `pyNEURON `_ package.
If you have pip, simply run::
pip install pyNEURON
Note that pyNEURON only works completely with a 32bit version of Python.
If your NEURON simulation loads any of the built-in hoc files (for example nrngui, NEURON's graphical user interface),
set the NEURONHOME environment variable to the directory of your (standard) NEURON installation.
pyNEURON can then execute your model file, however, it will not actually show you the user interface!
Hence, make sure that your simulation starts without it.
At the very last resort, you can build NEURON from source (on all operating systems),
see the `instructions `_.
Keep in mind that this is not the easiest thing to do; if possible, use any of the options above.
**Brian**
If you have pip, simply run::
pip install brian
Note that this may not work with a 64bit version of Python. Alternatively, have a look at Brian's excellent
`installation instructions `_. In the end, you should be able
to run ``import brian`` on the Python console.