PYTHON MODULES

I have generated a number of python modules that I thought others might find useful. The links to these modules and descriptions of their contents appear below. Please note that none embody anything resembling ideal python programming style. I've just found the functions to be useful. As usual, no guarrantees either expressed or implied, though I am open to suggestions, changes, fixes, and the like. :-) Just e-mail me.

GENERAL For a fairly complete, though not very pretty, set of tests the stats.py, pstat.py and io.py modules, get the zip file below. Version 0.6 of stats.py uploaded on 2003-02-07.
REQUIRES pstat.py (v0.3 or later) and io.py (v0.1 or later).
stats.py [NOTE: In something like 2003, I was asked if this stats.py library could be incorporated into scipy as scipy.stats. I agreed and since then, considerable improvements and additions have been made within scipy.stats. I have therefore not been maintaining the stats.py here in any regular fashion. I leave it posted for those who want stats capabilities for lists and tuples, or who do not want toor cannot install scipy. See also python-statlib] A collection of statistical functions, ranging from descriptive statistics (mean, median, histograms, variance, skew, kurtosis, etc.) to inferential statistics (t-tests, F-tests, chi-square, etc.). Originally, the functions were defined for operation on lists and, if Numeric is installed, also defined for array arguments. THIS HAS NOW BEEN UPDATED TO BE COMPATIBLE WITH THE NEW numpy AND AS SUCH MAY FAIL ON Numeric ARRAY ARGUMENTS. ALSO AVAILABLE IS statstest.py FOR TESTING THE INSTALL. THIS VERSION UPLOADED ON 2008-01-03, INCLUDING MIT-LIKE LICENSE. [If you want the previous version of stats.py].
pstat.py A collection of list manipulation functions based on the |Stat ("pipe-stat") programs written by Gary Perlman. Allows things like column extraction (from a "2D" list of lists), row-extraction based on criteria, as well as some file manipulation abilities (and for which many python modules already exist). Version 0.5 uploaded on 2008-01-03, which is NOW COMPATIBLE WITH NUMPY AND WITH AN MIT-LIKE LICENSE. [If you want the previous version of pstat.py].
io.py A collection of input/output routines for flat space/tab delimited text files and "flat" binary files, including some special file handlers for MRI files. NUMPY-COMPATIBLE VERSION uploaded 2008-01-03. [If you want the previous version of io.py].
REQUIRES: pstat.py.
glplot.py A thin (barely there) glue between PyOpenGL and wxPython to create quick-and-dirty multiline-plots (with or without errorbars) that allow zooming (a little like Matlab). The code isn't pretty, but it works. Requires PyOpenGL, wxPython and Numeric. Tested on Linux and win32 platforms. Version 0.1 uploaded 2003-12-02.
statstest.zip A collection of datasets and testing programs that run each function in the previous version of stats.py.


SPECIALIZED
fmri.py A collection of functions useful for fMRI image manipulation and data analysis. Requires Numeric, PIL (Python Imaging Library), stats.py, pstat.py and io.py.

Main Page