15.12.2012 Views

scipy tutorial - Baustatik-Info-Server

scipy tutorial - Baustatik-Info-Server

scipy tutorial - Baustatik-Info-Server

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SciPy Reference Guide, Release 0.8.dev<br />

Either a size or a footprint, or the structure must be provided. An output array can optionally be provided. The<br />

origin parameter controls the placement of the filter. The mode parameter determines how the array borders are<br />

handled, where cval is the value when mode is equal to ‘constant’.<br />

iterate_structure(structure, iterations, origin=None)<br />

Iterate a structure by dilating it with itself.<br />

If origin is None, only the iterated structure is returned. If not, a tuple of the iterated structure and the modified<br />

origin is returned.<br />

morphological_gradient(input, size=None, footprint=None, structure=None, output=None, mode=’reflect’,<br />

cval=0.0, origin=0)<br />

Multi-dimensional morphological gradient.<br />

Either a size or a footprint, or the structure must be provided. An output array can optionally be provided. The<br />

origin parameter controls the placement of the filter. The mode parameter determines how the array borders are<br />

handled, where cval is the value when mode is equal to ‘constant’.<br />

morphological_laplace(input, size=None, footprint=None, structure=None, output=None, mode=’reflect’,<br />

cval=0.0, origin=0)<br />

Multi-dimensional morphological laplace.<br />

Either a size or a footprint, or the structure must be provided. An output array can optionally be provided. The<br />

origin parameter controls the placement of the filter. The mode parameter determines how the array borders are<br />

handled, where cval is the value when mode is equal to ‘constant’.<br />

white_tophat(input, size=None, footprint=None, structure=None, output=None, mode=’reflect’, cval=0.0, origin=0)<br />

Multi-dimensional white tophat filter.<br />

Either a size or a footprint, or the structure must be provided. An output array can optionally be provided. The<br />

origin parameter controls the placement of the filter. The mode parameter determines how the array borders are<br />

handled, where cval is the value when mode is equal to ‘constant’.<br />

3.11 Orthogonal distance regression (<strong>scipy</strong>.odr)<br />

Orthogonal Distance Regression<br />

3.11.1 Introduction<br />

Why Orthogonal Distance Regression (ODR)? Sometimes one has measurement errors in the explanatory variable,<br />

not just the response variable. Ordinary Least Squares (OLS) fitting procedures treat the data for explanatory variables<br />

as fixed. Furthermore, OLS procedures require that the response variable be an explicit function of the explanatory<br />

variables; sometimes making the equation explicit is unwieldy and introduces errors. ODR can handle both of these<br />

cases with ease and can even reduce to the OLS case if necessary.<br />

ODRPACK is a FORTRAN-77 library for performing ODR with possibly non-linear fitting functions. It uses a modified<br />

trust-region Levenberg-Marquardt-type algorithm to estimate the function parameters. The fitting functions are<br />

provided by Python functions operating on NumPy arrays. The required derivatives may be provided by Python functions<br />

as well or may be numerically estimated. ODRPACK can do explicit or implicit ODR fits or can do OLS. Input<br />

and output variables may be multi-dimensional. Weights can be provided to account for different variances of the<br />

observations (even covariances between dimensions of the variables).<br />

odr provides two interfaces: a single function and a set of high-level classes that wrap that function. Please refer to<br />

their docstrings for more information. While the docstring of the function, odr, does not have a full explanation of its<br />

arguments, the classes do, and the arguments with the same name usually have the same requirements. Furthermore,<br />

it is highly suggested that one at least skim the ODRPACK User’s Guide. Know Thy Algorithm.<br />

290 Chapter 3. Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!