PROJECT: Amalthea (https://sourceforge.net/projects/amalthea-rte)
AUTHOR: Damián Cirelli <email@example.com>
LAST UPDATE: 2011-11-09
Amalthea is, in its minimal form, a main script written in Python that
takes readings from laboratory balances every 10 seconds for roughly 4
minutes and performs a linear regression of the collected data. It is
intended to measure plant transpiration gravimetrically.
The name 'amalthea' was unavailable to use in SF.net. Therefore,
although the program name is Amalthea, the project page is
'amalthea-rte'. "RTE" stands for "Real Time Transpiration",
transpiration being usually represented by the letter "E" in the plant
sciences. In many cases, and for reasons beyond the scope of this
README, gravimetric measurements of transpiration are preferred to
steady-state porometers, sap-flow methods, etc. but no universal tool
has so far been available to aid in a systematic balance-computer
interfacing oriented to the measurement of E. Amalthea takes care of
this, and although it is perfectly usable it needs polishing and
improvement of its "user interface".
- Any modest computer with Linux
- Python 2.4 or newer
- pyserial (http://pyserial.sourceforge.net/)
- At least 1 balance capable of bi-directional communication over RS-232
- One available RS-232 serial port per balance
The simple approach for using multiple simultaneous balances is to have
an available USB port on the computer and attach the required number of
USB-to-RS232 conversion cables through a USB hub, taking care to
identify each cable with the appropriate file descriptor (e.g.
INSTALLATION / USAGE:
For standalone running, no instalation is necessary. Simply run amalthea.py
with a port and an area argument. e.g.:
python amalthea.py -a 0.1 /dev/ttyUSB0 1>>data/mydata.csv 2>>data/mydata.raw
This runs amalthea reading a balance on port "/dev/ttyUSB0" which is
weighing a plant with a 0.1 m^2 leaf area. It outputs the raw readings
to stderr so in the command above, this is redirected to the file
mydata.raw in the data directory. Similarly, the final calculations are
printed to stdout, so we redirect that to data/mydata.csv since it
produces a line in CSV format. After this, the proram exits. The idea is
to use `cron' as a scheduler for periodically calling the program.
Several different features are planned to provide different "modes": i)
interval run; ii) continuous run; and iii) array mode, to begin with.
If you receive a 'Permission denied' error, you likely do not have r/w
permissions. Issuing 'chmod 666 /dev/YOURPORT' as root should fix it.
You may run 'amalthea --help' for a list of options.
To use amalthea for regular automatic logging, you may run
'amalthea-setup.sh' which will create symlinks to the amalthea.py and
amalthea-config.py files for easier use, plus it will install the required
lines in your crontab. After that, use 'amalthea-config' to control the
program. Run 'amalthea-config --help' for a list of options.
Amalthea runs in linear fashion to keep things simple and depends on some form
of 'cron' for recurring execution. Once running, it will poll the connected
balance(s) for a weight value and at the end of the period (default is 220
seconds) it will use the data to build a linear regression and report the
average weight and rate of weight change for the *average* of the period based
on the UNIX-epoch timestamp in seconds. If you have many balances and many
serial-to-USB cables, amalthea-config will add one line per configured balance
to the crontab file and thus they will run almost simultaneously, allowing you
to measure transpiration on a number of plants at the same time.
This is an open source project which I have successfully implemented in my own
plant-water use research but I realise that as a software project it is in its
infancy. If you'd like to help out, by all means get involved. If you have a
balance that you would like to use, it will likely NOT be in the database
YET. If that is the case e-mail me with the model number and I will add it.
That in itself is a contribution on your part, so thank you!