# [SciPy-user] is scipy OK for my needs?

Ryan Krauss ryanlists at gmail.com
Fri Nov 25 11:41:44 CST 2005

```I think all of this can work.

wxPython is a good plan for gui stuff.

For the most part, plotting is best handled by matplotlib:
http://matplotlib.sourceforge.net/
I don't know if your specific needs about clicking on data points is
possible out-of-the-box, but you could probably add this capability by
creating your own wxPython graph panel.  Matplotlib has a very active
mailing list, you should ask the graph related part of your question
there.

Nonlinear curve fitting is handled by the scipy.optimize module:

Base Class:       <type 'module'>
String Form:   <module 'scipy.optimize' from
'/usr/lib/python2.4/site-packages/scipy/optimize/__init__.pyc'>
Namespace:        Interactive
File:             /usr/lib/python2.4/site-packages/scipy/optimize/__init__.py
Docstring:
Optimization Tools
==================

A collection of general-purpose optimization routines.

fmin        --  Nelder-Mead Simplex algorithm
(uses only function calls)
fmin_powell --  Powell's (modified) level set method (uses only
function calls)
fmin_cg     --  Non-linear (Polak-Rubiere) conjugate gradient algorithm
(can use function and gradient).

fmin_bfgs   --  Quasi-Newton method (can use function and gradient)
fmin_ncg    --  Line-search Newton Conjugate Gradient (can use
function, gradient and hessian).
leastsq     --  Minimize the sum of squares of M equations in
N unknowns given a starting estimate.
fmin_l_bfgs_b -- Zhu, Byrd, and Nocedal's L-BFGS-B constrained optimizer
(if you use this please quote their papers
-- see help)

fmin_tnc      -- Truncated Newton Code originally written by
Stephen Nash and
adapted to C by Jean-Sebastien Roy.

fmin_cobyla   -- Contrained Optimization BY Linear Approximation

Global Optimizers

anneal      --  Simulated Annealing
brute       --  Brute Force searching Optimizer

Scalar function minimizers

fminbound   --  Bounded minimization of a scalar function.
brent       --  1-D function minimization using Brent method.
golden      --  1-D function minimization using Golden Section method
bracket     --  Bracket a minimum (given two starting points)

golden      --  1-D function minimization using Golden Section method
bracket     --  Bracket a minimum (given two starting points)

Also a collection of general_purpose root-finding routines.

fsolve      --  Non-linear multi-variable equation solver.

Scalar function solvers

brentq      --  quadratic interpolation Brent method
brenth      --  Brent method (modified by Harris with
hyperbolic extrapolation)
ridder      --  Ridder's method
bisect      --  Bisection method
newton      --  Secant method or Newton's method

fixed_point -- Single-variable fixed-point solver.

Utility Functions

line_search -- Return a step that satisfies the strong Wolfe conditions.
check_grad  -- Check the supplied derivative using finite difference
techniques.

Hope this helps.  I you already love Python, make the switch, you
won't regret it.

Ryan

On 11/25/05, massimo sandal <massimo.sandal at unibo.it> wrote:
> Hi,
>
> I'm planning to rewrite from scratch a big Matlab spaghetti-code mess we
> use for data analysis. I'd like to use Python and SciPy, for various
> reasons (familiarity and love with Python, free-as-in-freedom license,
> etc.). I'm currently looking at the SciPy documentation, but I still
> have some doubt.
>
> Shortly, my application needs these main capabilities:
>
> 1) Simple interactive GUI (just a column of buttons should work
> well),this should be provided by WxPython or the like, isn't it?
>
> 2) Non-linear, fast curve fitting. It must work quite fast on as much
> data points as 1000-2000 (although I can trick it to use less data
> points without losing much precision, I guess).
>
> 3) Interaction with plots (I must be able to click with the mouse two or
> more points I have to choose visually, and fit the data in between, and
> not elsewhere)
>
> 4) Plot export in various graphic formats (SVG or other vectorial would
> be the best).
>
> I'm doing all this on Debian GNU/Linux.
>
> Can you tell me if SciPy is a good and reliable package for my needs?
> Thanks a lot,
>
> Massimo
> --
> Massimo Sandal
> University of Bologna
> Department of Biochemistry "G.Moruzzi"
>
> snail mail:
> Via Irnerio 48, 40126 Bologna, Italy
>
> email:
> massimo.sandal at unibo.it
>
> tel: +39-051-2094388
> fax: +39-051-2094387
>
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user
>
>
>
>

```

More information about the SciPy-user mailing list