mikehulluk / NeuroUnits

A grammar for describing the units and expressions involving units in neuroinformatics
3 stars 4 forks source link

Please document relation to http://pythonhosted.org/quantities/ #1

Open yarikoptic opened 11 years ago

mikehulluk commented 11 years ago

Hello, Quantities is an object model for working with units, but the 'units' objects are constructed in python.

Neurounit is fundementally a string parser, which resolves strings like: '30um2' '1uF/cm2'. It can convert these strings to quantities objects, but also the idea is to support more complex sets of equations, which can either be solved with an ODE solver, or converted to NEURON modl files. See here: https://neurounit.readthedocs.org/en/latest/

A bit of history: I am a PhD student, working on biophysical models using NEURON. I wrote a tool box for controlling NEURON from python (https://morphforge.readthedocs.org/en/latest/), which allows concepts to be expressed in a high level manner, and also handles all units transparently. I wrote a simple parser for reading units like "10mV" and "30mS/cm2". Then, I worked on the NineML language with the INCF, which is a language for specifying neuron and synapse models. During these discussions, I thought it would be interesting to try out the definition of parameters in these sets of equations, 'inline', and so this lead to neurounits, which I merged with my existing morphforge code. I also added experimental support for defining channel/synapse models using differential equations (although the object model is is not as complete as NineML). This works and is available in morphforge: (for example: https://morphforge.readthedocs.org/en/latest/srcs_generated_examples/poster1.html).

Currently, I am working on the 'NineML converge' branch. The idea of this is to merge the ideas from the NineML object model, with the NeuroUnit syntax. If this works, it will be a superset of both projects. This branch is really experimental and rapidly changing. If it works, then I will need to discuss with the other NineML developers whether they are interested in merging the changes. At the moment, the front end is mostly sorted, and it can parse for example: https://github.com/mikehulluk/NeuroUnits/blob/4b635f862a8db06f0fa5e5bcdb650b6e3f438b2f/src/test_data/l4-9ml/std/090_hh_neuron_chls.9ml

I think it should be emphasised that the code is 'alpha' state. I am using it for my PhD work and making changes to interfaces regularly to improve designs. (There is a warning on the morphforge page about this, I should add one to the neurounits page)

I hope this helps. At the moment I am snowed under with PhD writeup, but I will try and update the documentation as the nineml-convergence branch stabilises. This is at (https://neurounit.readthedocs.org/en/latest/)

Best regards

Mike