The RealData class stores the weightings as actual standard deviations
and/or covariances.
The weights needed for ODRPACK are generated on-the-fly with __getattr__
trickery.
sx and sy are standard deviations of x and y and are converted to weights by
dividing 1.0 by their squares.
E.g. wd = 1./numpy.power(sx, 2)
covx and covy are arrays of covariance matrices and are converted to weights
by performing a matrix inversion on each observation's covariance matrix.
- E.g. we[i] = numpy.linalg.inv(covy[i]) # i in range(len(covy))
- # if covy.shape == (n,q,q)
These arguments follow the same structured argument conventions as wd and we
only restricted by their natures: sx and sy can't be rank-3, but covx and
covy can be.
Only set either sx or covx (not both). Setting both will raise an
exception. Same with sy and covy.
- The argument and member fix is the same as Data.fix and ODR.ifixx:
- It is an array of integers with the same shape as data.x that determines
which input observations are treated as fixed. One can use a sequence of
length m (the dimensionality of the input observations) to fix some
dimensions for all observations. A value of 0 fixes the observation,
a value > 0 makes it free.