Position-sensitive monitor with phase intergration.
Author: Erik Knudsen
Date: March 13, 2010
An (n times m) pixel PSD monitor taking phase into account.
As the i:th ray hits a pixel (j,k) in the monitor the intensity in that
pixel will be updated as a complex sum, i.e. .
By setting ratio<1 the effective pixel area becomes a
fraction of the ideal (which is to divide the xwidth and yheight intervals into nx and ny abutting
subintervals). This reduces the monitor effective area by ratio^2.
If the centering flag is set - the monitor will treat all rays as if they hit a pixel
center. This behaves as if ratio -> 0, but at no cost in statistics.
Example: PSD_monitor_coh(xmin=-0.1, xmax=0.1, ymin=-0.1, ymax=0.1,
nx=90, ny=90, filename="Output.psd")
Parameters in boldface are required;
the others are optional.
Number of pixel columns.
Number of pixel rows.
Name of file in which to store the detector images (the suffixes .abs and .arg will be added).
If set, the monitor does not influence the xray state.
Lower x bound of detector opening.
Upper x bound of detector opening.
Lower y bound of detector opening.
Upper y bound of detector opening.
Width of detector. Overrides xmin,xmax.
Height of detector. Overrides ymin,ymax.
ratio between pixel area and effective pixel area.
Treat all rays as if they hit the center of the pixel.
If set, monitor will skip writing to disk
Array of xray event counts.
Array of second ms.
Array of xray complex weight counts (the argument consituttes the phase).