Skip to main content

Applications for interactive visualization of numerical methods.

Project description

The Why
=======

Being able to calculate something is not very interesting,
but being able to visualize it makes the calcuations mean
something. The primary goal of these programs where to
make sens of the different numerical methods and be able to
play with differnt types of input data. Also I had some
spare time on my hands.


Application Descriptions
========================

chebychev
---------

The function of the users choice
(or from a set of presets) will be approximated using
Chebchev Approximation. The user can chose the start
and end range of the function, as wel as the number
of points(in that range) that will be used to plot
the function. The range of Chebychev series can also
be set.


integral
--------

Shows differenty types of algorithms used to integrate
functions. The fucntion and expected result are user
configurable, as well as the range of the integration
and number of subdivition. The first algorithm is an
implementation of the simplest method used to integrate
function(calculates the area of a trapeze) while
the other method uses GSL's QAP algorithm.

The resutls from the calculation can be displayed on
the plot. There are 3 types of plots aviablable. The
first displays the error rate in corrolation to the
number of subdivisions used. The second displays the
corrolation between adjecent errors. The final plot
displays the actual result per number of subdivions.

There is also a table displaying the number of subdivision
needed to achive an error less than 1E-3, 1E-4, 1E-5
and 1E-6. All raw data used for plotting is also
available.



interpolation
-------------

Enables a user to see the precision of different interpolation
methods implemented in GSL. The user can input his own custom
function, as well as describe the start and end range and
the number of points that the interpolation methods will
use. The follwing GSL interpolation methods are available:
akima, akima_periodic, cspline, cspline_periodic, polynominal
and linear. The user can chose any number of interpolation
methods to be displayed on the plot. The input point are
displayed as dots. All plot data is avialable to the user.

lineareq
--------

Shows the time relations beetween matrix decomposition(LU)
time and the time required to solve the matrix. Each
matrix is populated with random numbers. The start size
and end size of the matracies can be specified as well
as the step size.

roots
-----

Shows different root finding methods
and the error assosiated with each iteration
of the convergance process. Both the function
as well as the bracket range are configurable.
The maximum number of iteration can also be
specified. Data generated by the methods
can be displayed and analyzed.

There are a total of 6 methods avaialbe,
false postion, bisection, brent, newton,
newton-steffenson, scant.

Methods which have exceded the maximum
amount of iterations are discarded and
not displayed.


TODO
====

* Implement Save As for plot data viewer in
the format of CVS
* Error highlighting when an invalid function
is inputed.

Directory Structure
===================


The following section outlines the directory
structure of the PyMois package. The entire
applications code is divided into directories
containing code that has similar functionality.

/
-

All application launchers are located in the root
directory of the package.
calc
----

All algorithms and mathematical methods used
in all programs are located here. Every application
has a single module in this directory. For example
if we have the integral_app.py application it will
have a integra.py module in this directory.

gui
---

Withing the gui directory are located all the
python files created from QT UI format. These
files should not be edited since they are replaced
every time the UI files are update.

gui/ui
______

Files created by QT Designer are located in this
directory. Any modification to the GUI should
be done using theses file in QT Designer. The
python files generated from theses files should
not be edited.

matlib
------

The matlib directory contains code related to
the matplotlib library used for creating plots
and visualizing numerical data. All programs
use the plot widget located in this directory.
The plot widget is very easy to create and
minimizes the amount of code needed to embed
a plot within a QT application.

utils
----

Code which is shared between applications.


Naming Convention
=================

All files adhear to naming convention which
enables quick identification of which files
belong to which application. There are
a couple of prefixes and suffixes used.

For example if we had an application called
Integrator we would uss the following naming
convetion.


If a gui was created using QT Designer it
name should be integrator_app.ui and should
be stored in gui/ui. The generated python
code from that UI file will be located
in gui/ and will be named(if make is used
to generate the code) ui_integrator_app.py .

Next the main application code used to start
and customize the GUI should be calle d
integrator_app.py. The file should
be located in the root of the package.

If any calculation need to be done, the code
should be locaded in calc and have a name like
so integrator.py.

Dependencies
============

The entire PyMois packages depends on
a couple of key libraries. These need to
be installed in order for the applications
to work. All mathematical calculations use
the PyGSL and NumPy packages. The interface
and plotting relies on QT, PyQT and MatPlotLib.

QT
--
Description: Cross-platform GUI Toolkit
Version: 4.5
URL: http://www.qtsoftware.com/products/

PyGSL
-----
Description: GNU GSL Python Binding
Version: 0.9.4
URL: http://pygsl.sourceforge.net/


PyQT
----
Description: Python QT4 Bindings
Version: 4.4.3
URL: http://www.riverbankcomputing.co.uk/software/pyqt/download

SIP
---
Description: Python extension module generator for C and C++ libraries(needed by
PyQT)
Version: 4.7.7
URL: http://www.riverbankcomputing.co.uk/software/sip/download

MatPlotLib
----------
Description: Python 2D plotting library
Version: 0.98.5.3
URL: http://matplotlib.sourceforge.net/

NumPy
-----
Description: Python Numerical Library
Version: 1.2.0
URL: http://numpy.scipy.org/

Project details


Release history Release notifications | RSS feed

This version

0.1

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page