pyLTR is a repository of Python modules & packages useful to the CISM
community. This includes:
pyLTR ships with LTR version 2.2.0 and newer
After downloading LTR, look in misc/pyLTR
These can be easily installed in several ways:
sudo port install py27-nose py27-scipy py27-numpy py27-matplotlib py27-ipython
easy_install ipython matplotlib numpy scipy nose
pyLTR has has been successfully tested on Intel Macs running OSX 10.5 (Leopard) and 10.6 (Snow Leopard), 10.7 (Lion), 32 & 64 bit Linux environments, and IBM AIX systems.
Once the prerequisites are installed:
$PYTHONPATH
:
export PYTHONPATH=/path/to/LTR-para/misc/pyLTR:$PYTHONPATH
ln -s /path/to/LTR-para/misc/pyLTR/pyLTR /path/to/lib/python2.x/site-packages/pyLTR
install.sh
to point to the correct python. Strange things may happen if you attempt to install with Python-2.5 when the requirements were built using Python-2.6.install.sh
may complain about missing libraries unless you set the CFLAGS environment variable to use 32-bit libraries (i.e. for GCC, export CFLAGS="-m32").Although not required, it's a good idea to install Nose & run test.sh
to make sure everything has been installed properly (note: Nose should be included with the Enthought Python Distribution).
pyLTR ships with a variety of convenience scripts in the "scripts" subdirectory. Learn what a script does by passing the "--about" command-line argument, like so:
Execute with the {{--help }}flag for usage information. For example:
LTR-para/misc/pyLTR/scripts/solarWind.py --about
Execute with the --help
flag for usage information. For example:
.LTR-para/misc/pyLTR/scripts/solarWind.py --help
Generates TIEGCM (NetCDF) or LFM (SW-SM-DAT) solar wind file. Can convert from a variety of data sources (eg. CCMC, Enlil, LFM, MAS, OMNI).
Sample usage:
solarWind.py --filename=OMNI_HRO_1MIN_27372.txt -o TIEGCM
When output is LFM (ie. flag -o LFM
), this will generate coefficients for a linear Bx fit; save the SW-SM-DAT file; and generate a Python Pickle file storing the data for further analysis.
See the "Usage" section above to learn how to use some of the following visualization tools:
MIX output can be visualized with a variety of tools:
Magnetosphere:
Ionosphere:
Want to write your own custom scripts using the pyLTR developers API? Take a look at source code of files from both the "examples" and "scripts" directories.
The solar wind processor computes a linear regression fit to Bx and writes the coefficients BXZERO, BYCOEF, BZCOEF:
Write these numbers down and use them as input to the corresponding MakeItSo prompt.
Note on BXZERO
BXZERO
is currently unsupported due to a bug within the LFM. If prompted, set BXZERO=0.0
This will be fixed in a future release of the code (refs #143).