| |
- correctorclass
-
- perfect
class correctorclass |
|
Applies a spatial distortion to a peak position using a fit2d splinefile |
|
Methods defined here:
- __init__(self, argsplinefile, orientation='edf')
- Argument is the name of a fit2d spline file
- correct(self, xin, yin)
- Transform x,y in raw image coordinates into x,y of an
idealised image. Returns a tuple (x,y), expects a
pair of floats as arguments
- distort(self, xin, yin)
- Distort a pair of points xnew, ynew to find where they
would be in a raw image
Iterative algorithm...
- make_pixel_lut(self, dims)
- Generate an x and y image which maps the array indices into
floating point array indices (to be corrected for pixel size later)
returns
FIXME - check they are the right way around
add some sort of known splinefile testcase
- make_pos_lut(self, dims)
- Generate a look up table of pixel positions in microns
# Cache the value in case of multiple calls
returns ...
- readfit2dspline(self, name)
- Reads a fit2d spline file into a scipy/fitpack tuple, tck
A fairly long and dull routine...
- test(self, xin, yin)
- Checks that the correct and distort functions are indeed
inversely related to each other
|
class perfect(correctorclass) |
|
To use on previously corrected when there is no splinefile
Allows pixel size etc to be set |
|
Methods defined here:
- __init__(self)
- correct(self, xin, yin)
- Do nothing - just return the same values
Data and other attributes defined here:
- splinefile = 'NO_CORRECTION_APPLIED'
- xsize = 'UNKNOWN'
- ysize = 'UNKNOWN'
Methods inherited from correctorclass:
- distort(self, xin, yin)
- Distort a pair of points xnew, ynew to find where they
would be in a raw image
Iterative algorithm...
- make_pixel_lut(self, dims)
- Generate an x and y image which maps the array indices into
floating point array indices (to be corrected for pixel size later)
returns
FIXME - check they are the right way around
add some sort of known splinefile testcase
- make_pos_lut(self, dims)
- Generate a look up table of pixel positions in microns
# Cache the value in case of multiple calls
returns ...
- readfit2dspline(self, name)
- Reads a fit2d spline file into a scipy/fitpack tuple, tck
A fairly long and dull routine...
- test(self, xin, yin)
- Checks that the correct and distort functions are indeed
inversely related to each other
| |