Table of Contents
- Introduction
- Matplotlib and Pylab
- Numpy and SciPy
- Ctypes
- GUI Programming
- Converting Data Structures
- Using Windows COM and ActiveX
Introduction
- See the Python Wiki
Matplotlib and Pylab
- Try the simple plot, which requires numpy and pylab. Numpy is the basic package for scientific computing. The pylab module is part of the Matplotlib package which provides Matlab style graphing functionality.
Numpy and SciPy
- Numpy and SciPy documentation.
- Experiment with this simple least squares fit example using numpy.linalg.lstsq. For fits to polynomials, it seems easier to use numpy.polyfit, as demonstrated in polyfit_fit.py.
- To fit a polynomial to an approximately linear set of data in a csv file, use fit_linear_data.py. Such a set is linear_data.csv, which was generated by make_linear_data.py
- This SciPy Tip Sheet is helpful.
- This SciPy Cookbook example describes file IO. For simplicity, use numpy.savetxt.
Ctypes
- This sample program demonstrates communicating with PCI, USB and GPIB instruments via visa32.dll.
GUI Programming
- This interesting discussion of writing a graphical application for scientific programming using TraitsUI is based on an experimental research need.
Converting Data Structures
- To convert a binary block of data to 32 bit integers in Python/Numpy, read this.
Using Windows COM and ActiveX
- Install PyWin32
- The program excel_test.py will create an Excel worksheet and make entries. You will also need the following in the same directory: aye2.wav, computer_on.wav, computer_working.wav, logical.wav.