ImageD11.linearity | index c:\python25\lib\site-packages\imaged11\linearity.py

`Class for determining the linearity correction for a frelon4m
Take a quadratic as a first guess
Mathematically:
I = Io + a * Io * Io = Io ( 1 + a * Io )
read series of images.
try to scale them to one another.
a is a constant for all images
each image has it's own scale factor (exposure time)
fit scale factor for each image
fit a single 'a'
fo`

Modules
`` |  |
numpy.oldnumeric.linear_algebra | numpy.oldnumeric | ImageD11.opendata |

Classes
`` |  | linearity
class linearity
`` |  | Methods defined here: __init__(self, a=9.9999999999999995e-007) `self.a = first guess at non linear term` anotherimage(self, ar, scale=1.0, name=None) `add another image to the class ar = data scale = guessed scale factor` fittoaverage(self) `Try to fit the scale and a for each image to match the average chi2 = avg - calc = avg - scale * t * (1.0 + t * self.a ) dc/ds = t * (1.0 + t * self.a ) = calc / scale dc/da = scale * t * t` makeaverage(self) `try to get a better idea of the scale factors for each image`

Functions
`` |  | lsq(diff, gradients) `difference gradients`