Table of Contents

Module: peaks experiment/peaks.py

Utility routines for peak searching/matching.

Functions   
detlim2
integrate
refill
set2
  detlim2 
detlim2 ( peaks )

Given a list of peaks, estimate the accuracy that set2 should use for merging Friedel opposites. For internal use in set2

  integrate 
integrate (
        pnt,
        data,
        sz=config.initialpeaksize,
        allowshift=1.0,
        gain=1.6,
        )

Integrate a peak at pixel coordinates pnt from the frame at data.

parameters:

pnt

a 2-tuple of the (horizontal, vertical) pixel coordinates where the peak is expected.

data

a 2D array containing the frame data, with the vertical coordinate from top to bottom as the first coordinate, and the horizontal coordinate from left to right as the second coordinate (top-left is 0,0)

optional parameters:

sz

starting size of the integration area. This is automatically refined by the procedure.

allowshift

distance in pixels that the final peak position is allowed to differ from the given pnt.

gain

approximate gain of the detector, used for determination of the standard deviation.

return value: A projtls.Record() instance, with the following attributes:

ihmax

horizontal pixel coordinate of pixel with highest value

ivmax

vertical pixel coordinate of pixel with highest value

ih

horizontal pixel coordinate of final center of integration

iv

vertical pixel coordinate of final center of integration

bg1

first guess at background level

int1

first guess at peak intensity

bg

final background level

int

final intensity

rh

horizontal coordinate of the center of gravity of the peak

rv

vertical coordinate of the center of gravity of the peak

rad

single-sigma peak radius of the peak

sigma

standard deviation of the intensity

pixel

the highest pixel value in the peak

numbgpix

number of pixels used for background estimation

numpkpix

number of pixels integrated for peak intensity

size

final refined size of the area used for integration

h10

horizontal full width at 10% maximum

v10

vertical full width at 10% maximum

  refill 
refill (
        oldpk,
        filename,
        dis,
        peaksclass=Peaks,
        header=None,
        )

  set2 
set2 (
        peaks,
        suppresssingles=0,
        lim1=None,
        lim2=None,
        )

Given a list of peaks, merge Friedel opposites.

arguments:

peaks

peak list containing .c attributes with the diffraction angle corresponding to the peak.

suppressingles

if set to 1, will not return any reflections that do not occur as Friedel pair.

lim1

a merging criterion, if not given set to sqrt(lim2)

lim2

another merging criterion. If not given, estimated using detlim2

return value: another peak list.

Classes   
DistortionError

Exception raised when no distortion correction is available when it is required.

IntensityFilter

Peak filter that removes peaks weaker than a given intensity

NoDatabasePeakSearcher

Class that can turn image files into 'peak lists

PeakSearcher

PeakSearcher class that will read/write the peak database if allowed

Peaks

Extends the SimplePeaks records with the following attributes

SigmaFilter

Peak filter that removes peaks weaker than a given number of sigmas

SimplePeaks

Stand-alone peak storage class.

ThetaFilter

Peak filter that removes peaks outside given theta limits

ZetaFilter

Peak Filter that removes peaks that are above a chi limit.


Table of Contents

This document was automatically generated on Fri Jul 3 09:28:36 2009 by HappyDoc version WORKING