Welcome. SciPy Central is a collection of code snippets, modules and links for solving scientific problems with SciPy and related Python tools.

Easyleed  automated extraction of intensityenergy spectra from lowenergy electron diffraction patterns
Easyleed facilitates data analysis of images obtained by lowenergy electron diffraction, a common technique in surface science. It aims to automate the process of extracting I(E)spectra from a ...
 0
 by Andreas Mayer
 on 31 March 2014

IBCAO (International Bathymetric Chart of the Arctic Ocean) class for python and Scipy
Class which sets up the IBCAO (projection and loads file) for use with Matplotlib:

scikittensor  A python module for multilinear algebra and tensor factorizations
scikittensor is a Python module for multilinear algebra and tensor factorizations. It supports multilinear operations such as tensormatrix products, tensorvector products and a number of different tensor factorizations such as ...

circular diffraction
Creates a circular diffraction pattern for light of wavelength 500nm. The formula for intensity of circular diffraction is I(r) = (J1(k*r)/(k*r))^2
 0
 revision 2
 by Shishir Dasika
 on 05 January 2014

https://plot.ly
Plotly is a graphing and analytics platform for making and sharing publication quality graphs. You can generate graphs and analyze data from the inbrowser Python sandbox (numpy supported) or the ...
 0
 revision 2
 by MSundquist
 on 18 November 2013

Print Targeted Plots
Make plots suitable for printed publication. This module contains functions to improve the appearance of matplotlib plots that will appear in print. The recommended usage is to first decide on ...
 0
 by Andrew Davis
 on 26 October 2013

Short efficient Ndimensional Octtree
Short (necessary code is just 44 simple LOC) Ndimensional “oct”tree data structure which supports inserting data at coordinates, and extracting all the data within a given bounding box. Data ...

Design of Experiments for Python
A new library for generating experimental design matrices for: Factorial (Full and Fractional) Response Surface Randomized has been created and posted on the Python Package Index. Source code can be ...

angular spectrum field propagation
Compute the complex field at a distance z given an input field. It uses the angular spectrum field propagation algorithm. x, y are coordinates arrays.

Pure python first and secondorder automatic differentiation
The ad python package was designed to make the calculation of first and second derivatives (i.e., the gradient/jacobian and hessian) as transparent as possible for all the base ...

Building a simple interactive 2ddata viewer with Matplotlib
This is a very simple, but practical 2ddata viewer, which uses only matplotlib widgets. Click on the image or the plots to get a cross section  x or y depending ...

pymls  solving bounded linear least squares problems
Based on mls_alloc from the matlab toolbox Qcat by Ola Harkegard, this package allows to solve bounded least squares problems. It is also possible to put weights on your columns ...

Basic linear regression
Expected result: See the official Scipy documentation for details about linregress. A more complete regression model can be obtained with the OLS function in the statsmodels library.

Principal components analysis (PCA) using a sequential method
The singular value decomposition is usually presented as the way to calculate the PCA decomposition of a data matrix. The NIPALS algorithm is a very computationally tractable way of calculating ...

Integrating an initial value problem (single ODE)
We want to integrate a single equation \(\displaystyle \frac{dy(t)}{dt} = f(t, y)\) with a given initial condition \(y(t=0)=y_0\). There are several integrators available in ...
 0
 revision 3
 by SciPy Central
 on 06 August 2011

Find the points at which two given functions intersect
The code considers the case of finding the intersection of a polynomial, \(y=x^2\) and a line, \(y=x+1\). Write these functions in the form \(\mathbf{f(x ...

Python tools for oceanographic analysis
A collaborative effort to organize Python tools for the Oceanographic Community.

SfePy (simple finite elements in Python)
SfePy is a software for solving systems of coupled partial differential equations (PDEs) by the finite element method in 2D and 3D. It can be viewed both as blackbox PDE ...
 0
 by robert.cimrman
 on 08 September 2011

Fitting a Gaussian to noisy datapoints
This script reproduces the plots from
H. Guo, A Simple Algorithm for Fitting a Gaussian Function, IEEE Signal Processing Magazine, September 2011, pp. 134–137.

Using Prony's method to fit a sum of exponentials
This a basic implementation of Prony’s method. In this form, it is very susceptible to noise. Added by Jose: I had some problems using “lstsq” from scipy.linalg that ...