This page lists some software that I've written or co-wrote, and is
available for download. It is intended to be useful for research or teaching
purposes.
During my research, I routinely perform various numerical
operations ranging from integration/differentiation to FFTs to polynomial transformations
and basic file handling. I decided to collect these routines into a single location
and put them into a python package. Over the years, this package has served as my
own guinea pig in order to learn new skills, such as how to make a
python package and how to do automatic documentation with Sphinx. It also served as
a test bed to implement my own versions of simple tasks to help learn various
numerical algorithms relevant to my work. When I decided to make the repository public,
I moved my day-to-day development to the "devel" branch and very rarely updated the
master branch. Years later, the "master" branch has become somewhat outdated. As a
result, the link below directs you to the "devel" branch (despite its name, it is very
stable).
My dissertation work relied heavily on the
Rayleigh pseudo-spectral
code. As a result, most of my days were spent coding up various plotting tools and
analysis operations. To maintain my sanity, I kept these tools in a git repository named
RayleighUtils. These routines heavily relied on the above NumericalTools
package (which originally started as a sub-directory of RayleighUtils). This
heritage can be seen in the "master" branch of RayleighUtils, which locally includes
a copy of an early version of NumericalTools. When I split the project into two packages,
I made a new branch, "numtools", that relied on the separate NumericalTools package
(mainly the "devel" branch). As a result, the most useful branch is "numtools", which
is where the link below leads.
Fortran 95 code to solve the 1D constant coefficient
Helmholtz equation: a*phi - b*phi'' = f for a given f and two boundary
conditions on phi. Dirichlet and Neumann boundary conditions are supported
in addition to having Dirichlet on one boundary and Neumann on the other.
This routine uses the same linear algebra module that appears in the
linear_algebra_test.f90 code.
Python code to do Classical Runge Kutta and Adaptive
Runge Kutta integrations, both are 4th order schemes. The code can solve
vector systems of the form ydot = f(y, t) where y and ydot are vectors and
t is the independent variable. Users specify the function f(y,t) and the
appropriate initial conditions along with integration limits and the required
relative error tolerance (adaptive scheme only). There is a simple example
code that uses the Runge Kutta code to solve the chaotic pendulum problem.
These will work in python 2 or python 3.
Fortran 95 code to solve matrix systems of the
form A.x = b where A is a NxN matrix and b is a Nx1 length vector. Currently
only two routines are included: Tridiagonal Solve and Gaussian elimination
(using pivoting). The code below includes the necessary solvers in a module
and the main program performs a unit test.
I have developed a few python GUIs to help analyze my
data. These GUIs use the Wx Python module and are described in more
detail here. These GUIs use python 2 and were written
for a particular code, so some of the routines may need significant modification
in order to use them for your own tasks.
Python Command Line Options
A code to introduce command line options in python 2 using
the getopt module.
Nearly half of the lines in the code are devoted to comments to teach what is
happening. Currently, my preferred way to handle command line arguments is
with the docopt package, available on github
here.
Simple code to illustrate how to overwrite the previous
line when printing from a shell script. This trick can be used to show
percentage complete progress bars that only take up one line of output,
instead of 100 lines.
Simple code to illustrate the fun things Python can do.
This is meant to be an educational code to help beginning programmers learn
the basic python operations, but it is not a standalone one-stop-shop way to
learn python 2, it is more of a collection of how to do common tasks.
I include numpy functions, string slicing,
lists, dictionaries, importing your own python modules and plotting with
pylab. It does not cover object-oriented programming using classes.
These were written for Python 2, i.e., the print operation is a statement, not
a function call.
A simple collection of python scripts and supporting
makefile scripts to automatically build Fortran 95 source files. Runtime
parameters and command line arguments are supported and the files to define
these capabilities are automatically generated.