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

Class to wrap the connectedpixels c extensions for labelling
blobs in images.

 
Modules
       
ImageD11.blobcorrector
ImageD11.connectedpixels
numpy.oldnumeric
sys

 
Classes
       
labelimage

 
class labelimage
    For labelling spots in diffraction images
 
  Methods defined here:
__init__(self, shape, fileout=<open file '<stdout>', mode 'w' at 0x2a957fd198>, spatial=<ImageD11.blobcorrector.perfect instance at 0x2a9a43d5a8>, flipper=<function flip2 at 0x2a9a43ba28>, sptfile=<open file '<stdout>', mode 'w' at 0x2a957fd198>)
Shape - image dimensions
fileout - writeable stream for merged peaks
spatial - correction of of peak positions
finalise(self)
Write out the last frame
mergelast(self)
Merge the last two images searches
output2dpeaks(self, file_obj)
Write something compatible with the old ImageD11 format
which fabian is reading.
This is called before mergelast, so we write self.npk/self.res
outputpeaks(self, peaks)
Peaks are in Numeric arrays nowadays
peaksearch(self, data, threshold, omega)
# Call the c extensions to do the peaksearch, on entry:
#
# data = 2D Numeric array (of your data)
# threshold = float - pixels above this number are put into objects

Data and other attributes defined here:
format = ' %.4f %.4f %.4f %.0f %.4f %.4f %.4f %.4f... %.0f %.0f %.4f %.4f %.4f %.4f %d %d %d\n'
titles = '# sc fc omega Number_of_pixels avg_intensit...o Max_o dety detz onfirst onlast spot3d_id\n'

 
Functions
       
flip1(x, y)
fast, slow to dety, detz
flip2(x, y)
fast, slow to dety, detz
flip3(x, y)
fast, slow to dety, detz
flip4(x, y)
fast, slow to dety, detz
flip5(x, y)
fast, slow to dety, detz
flip6(x, y)
fast, slow to dety, detz
flip7(x, y)
fast, slow to dety, detz
flip8(x, y)
fast, slow to dety, detz
sqrt(...)
sqrt(x)
 
Return the square root of x.

 
Data
        avg_i = 22
bb_mn_f = 19
bb_mn_o = 21
bb_mn_s = 20
bb_mx_f = 16
bb_mx_o = 18
bb_mx_s = 17
dety = 34
detz = 35
f_cen = 32
f_raw = 23
m_ff = 27
m_fo = 31
m_oo = 28
m_sf = 29
m_so = 30
m_ss = 26
mx_I = 12
mx_I_f = 13
mx_I_o = 15
mx_I_s = 14
o_raw = 25
s_1 = 0
s_I = 1
s_I2 = 2
s_cen = 33
s_fI = 3
s_ffI = 4
s_foI = 11
s_oI = 8
s_ooI = 9
s_raw = 24
s_sI = 5
s_sfI = 7
s_soI = 10
s_ssI = 6