PEARL Procedures
rev-distro-2.1.1-1-gf419e92-dirty
Igor procedures for the analysis of PEARL data
|
preprocessing functions for Scienta detector images. More...
#include "pearl-fitfuncs"
Go to the source code of this file.
Namespaces | |
PearlScientaPreprocess | |
preprocessing functions for Scienta detector images. | |
Functions | |
variable | prompt_int_linbg_reduction (string *param) |
prompt the user for integrate on linear background reduction parameters. More... | |
string | capture_int_linbg_cursors () |
capture linear background reduction parameters from cursors in a graph. More... | |
string | csr_int_linbg_reduction (string win) |
calculate linear background reduction parameters from cursors in a graph. More... | |
threadsafe wave | int_linbg_reduction (wave source, string *param) |
linear-background subtracted integration reduction function. More... | |
variable | prompt_int_quadbg_reduction (string *param) |
threadsafe wave | int_quadbg_reduction (wave source, string *param) |
integrate peak area minus a quadratic background More... | |
variable | prompt_redim_linbg_reduction (string *param) |
parameter dialog for the redim_linbg_reduction() function More... | |
threadsafe wave | redim_linbg_reduction (wave source, string *param) |
linear background reduction function for incorrectly dimensioned scienta image More... | |
variable | test_gauss4_reduction (wave image) |
apply the gauss4_reduction function to a single image More... | |
variable | prompt_gauss4_reduction (string *param) |
prompt for the gauss4_reduction parameters More... | |
threadsafe wave | gauss4_reduction (wave source, string *param) |
fit horizontal cuts of an image with up to four gaussian peaks on a linear background More... | |
preprocessing functions for Scienta detector images.
this procedure contains functions for data reduction and instrument-specific normalization.
Definition in file pearl-scienta-preprocess.ipf.
string capture_int_linbg_cursors | ( | ) |
capture linear background reduction parameters from cursors in a graph.
PRELIMINARY - function arguments may change
sets reduction parameters from cursors in a graph. the resulting parameters are copied to the global s_reduction_params
string used by the data explorer.
an even number of cursors (2 or more) must be set on the image. cursor names and order do not matter, except that the alphabetically first cursor which is attached to an image selects the image. the cursors mark the following positions, from innermost to outermost pair:
ad_profiles_cursor_mode(root:packages:pearl_explorer:preview_image, 1)
. Definition at line 93 of file pearl-scienta-preprocess.ipf.
string csr_int_linbg_reduction | ( | string | win | ) |
calculate linear background reduction parameters from cursors in a graph.
PRELIMINARY - function arguments may change
calculates reduction parameters from cursors in a graph. the resulting parameters are returned in a string.
an even number of cursors (2 or more) must be set on the image. cursor names and order do not matter, except that the alphabetically first cursor which is attached to an image selects the image. the cursors mark the following positions, from innermost to outermost pair:
ad_profiles_cursor_mode(root:packages:pearl_explorer:preview_image, 1)
.win | graph window name or empty string for top window. |
Definition at line 133 of file pearl-scienta-preprocess.ipf.
threadsafe wave gauss4_reduction | ( | wave | source, |
string * | param | ||
) |
fit horizontal cuts of an image with up to four gaussian peaks on a linear background
the function fits each horizontal profile (EDC) with four gaussian peaks on a linear background. the position and width of the peaks is kept fixed according to input parameters. the peak amplitude is constrained to positive value.
the width parameter is defined as in Igor's gauss curve fit function (standard deviation divided by the square root of two). the return value in dest1 is the integrated peak of one of the peaks. dest2 returns the corresponding error estimate.
source | source wave. two-dimensional distribution of counts. for correct weighting and error estimation it is important that the source wave contains actual counts (Poisson statistics). |
param | (in, out) semicolon-separated key=value list of processing parameters. this is a pass-by-reference argument. the following parameters are required. position, width and limit parameters are on the x (energy) scale.
|
Definition at line 718 of file pearl-scienta-preprocess.ipf.
threadsafe wave int_linbg_reduction | ( | wave | source, |
string * | param | ||
) |
linear-background subtracted integration reduction function.
data reduction function for adh5_load_reduced_detector. cf. adh5_default_reduction for an explanation of reduction functions.
this function calculates the average pixel value of each angular slice in one center and two background intervals. a background value is calculated at the center position by linear interpolation from the two background values. returns the center minus linear background in dest1. returns the Poisson one-sigma error in dest2.
typical values (peak centered on detector, FWHM ~ 20 % of image) Lcrop=0.11;Hcrop=0.11;Lsize=0.2;Hsize=0.2;Cpos=0.5;Csize=0.2
source | scienta detector image, energy axis along X, angle axis along Y. two-dimensional intensity distribution (image). the scales are carried over to the result waves. |
param | parameters in a key1=value1;key2=value2;... list. all region parameters are relative to the image size (0...1).
|
Definition at line 260 of file pearl-scienta-preprocess.ipf.
threadsafe wave int_quadbg_reduction | ( | wave | source, |
string * | param | ||
) |
integrate peak area minus a quadratic background
data reduction function for adh5_load_reduced_detector. cf. adh5_default_reduction for an explanation of reduction functions.
this function calculates the average pixel value of each angular slice in one center and two background intervals. a background value is calculated at the center position by linear interpolation from the two background values. returns the center minus linear background in dest1. returns the Poisson one-sigma error in dest2.
typical values (peak centered on detector, FWHM ~ 20 % of image) Lcrop=0.11;Hcrop=0.11;Lsize=0.2;Hsize=0.2;Cpos=0.5;Csize=0.2
source | scienta detector image, energy axis along X, angle axis along Y. two-dimensional intensity distribution (image). the scales are carried over to the result waves. |
param | parameters in a key1=value1;key2=value2;... list. all region parameters are relative to the image size (0...1).
|
Definition at line 413 of file pearl-scienta-preprocess.ipf.
variable prompt_gauss4_reduction | ( | string * | param | ) |
prompt for the gauss4_reduction parameters
Definition at line 626 of file pearl-scienta-preprocess.ipf.
variable prompt_int_linbg_reduction | ( | string * | param | ) |
prompt the user for integrate on linear background reduction parameters.
Definition at line 35 of file pearl-scienta-preprocess.ipf.
variable prompt_int_quadbg_reduction | ( | string * | param | ) |
Definition at line 351 of file pearl-scienta-preprocess.ipf.
variable prompt_redim_linbg_reduction | ( | string * | param | ) |
parameter dialog for the redim_linbg_reduction() function
param | parameter string in a key1=value1;key2=value2;... list. the parameter string is passed by reference. see redim_linbg_reduction() for a description of parameters. |
Definition at line 509 of file pearl-scienta-preprocess.ipf.
threadsafe wave redim_linbg_reduction | ( | wave | source, |
string * | param | ||
) |
linear background reduction function for incorrectly dimensioned scienta image
if the energy step size does not divide the energy range to an integer number, the scienta image is exported with the wrong array size. this can be fixed by redimensioning the array.
the current implementation works in the case where dimension 0 needs to be incremented. the function may be generalized to dimension 1 and/or decrementing by additional parameters. it is not known yet whether a generalization is needed or whether it can cover all cases.
background subtraction and peak integration is the same as by the int_linbg_reduction() function.
source | source wave Scienta detector image, energy axis along X, angle axis along Y |
param | parameter string in a key1=value1;key2=value2;... list. the parameter string is passed by reference. |
all region parameters are relative to the image size (0...1).
typical values (peak centered on detector, FWHM ~ 20 % of image) Lcrop=0.11;Hcrop=0.11;Lsize=0.2;Hsize=0.2;Cpos=0.5;Csize=0.2
Definition at line 572 of file pearl-scienta-preprocess.ipf.
variable test_gauss4_reduction | ( | wave | image | ) |
apply the gauss4_reduction function to a single image
useful for testing or manual processing. to debug, (temporarily) remove the threadsafe attribute from the gauss2_reduction function.
Definition at line 592 of file pearl-scienta-preprocess.ipf.