ImageD11.scale
index
/sware/exp/fable/standalone/redhate4-a64/lib/python2.5/site-packages/ImageD11/scale.py

Class for scaling images with respect to each other due to moco
style instabilities.
 
Depends on there being a large background contribution to work with
 
 
Mathematically:
   y  =  a * x + b
   dy/da = x
   dy/db = 1
   Least squares problem with:
   matrix = ( dy/da*dy/da , dy/da*dy/db)
            ( dy/da*dy/db , dy/db*dy/db)
   rhs    = ( dy/da*y )
            ( dy/db*y )
 
Has the option to use only pixels in the image to scale to which
are above a threshold (eg the central circle on the bruker)

 
Modules
       
numpy.oldnumeric.linear_algebra
numpy.oldnumeric
ImageD11.opendata

 
Classes
       
scale

 
class scale
     Methods defined here:
__init__(self, im1, threshold=None)
Determines scale and offset values for images
with respect to each other
im1 = a * im2 + b
returns a, b
scale(self, im2)
Fill out RHS and solve
returns the scale to apply to the image stored in the class
 
You probably want the scale to apply to the image you supply
...use scale image for that
scaleimage(self, im2)
Return a copy of the image scaled to match the class

 
Functions
       
testscaleimage()