ImageD11.peakmerge module#
- class ImageD11.peakmerge.peak(line, omega, threshold, num, tolerance)#
Bases:
objectRepresents a peak
- combine(other)#
Combine this peak with another peak (eg merge!) # # If the thresholds are different, we see the same peaks # twice. We will just pick the one with the lower threshold # # Otherwise we try to average them #
- class ImageD11.peakmerge.peakmerger(quiet='No')#
Bases:
objectThe useful class - called by the gui to process peaksearch output into spots
- filter()#
Does nothing really, just makes a self.finalpeaks array
TODO: pass functions to filter/compress finalpeaks
- getheaderinfo(key)#
try to find “key” in the headers and return it
- getheaderkeys()#
things in the headers
- harvestpeaks(numlim=None, omlim=None, thresholds=None)#
Harvests the peaks from the images within a range of imagenumbers and/or omega eg: it actually reads the numbers now
- mergepeaks()#
Merges peaks together - if they overlap and are on adjacent frames
More complex than initially planned
- readpeaks(filename, startom=0.0, omstep=1.0)#
Read in the output from the peaksearching script Filename is the output file optionally startom and omstep fill in omega ONLY if missing in file
- savepeaks(filename)#
# Write out minimal information # list of xcorr,ycorr,omega, try to keep intensity now
- setpixeltolerance(tolerance=2)#
TODO ah… if only
- class ImageD11.peakmerge.pkimage(name)#
Bases:
objectContains the header information from an image Also pointers to positions of lines in peaksearch output file
- addtoheader(headerline)#
save header info in dict headerline is line starting with # in peaksearch output
- otherheaderstuff(headerline)#
Hard to parse header info - called by addtoheader
- ImageD11.peakmerge.roundfloat(x, tol)#
Return the float nearest to x stepsize tol