PEARL Procedures  rev-distro-1.6.0-0-gcf1399e-dirty
Igor procedures for the analysis of PEARL data
pearl-scienta-preprocess.ipf File Reference

preprocessing functions for Scienta detector images. More...

#include "mm-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)
 
string capture_int_linbg_cursors ()
 
string csr_int_linbg_reduction (string win)
 
variable test_int_linbg (wave image)
 
threadsafe variable int_linbg_reduction (wave source, wave dest1, wave dest2, string *param)
 
variable test_shockley_anglefit (wave image, variable branch)
 
variable prompt_Shockley_anglefit (string *param)
 
threadsafe variable Shockley_anglefit (wave source, wave dest1, wave dest2, string *param)
 
variable prompt_int_quadbg_reduction (string *param)
 
variable test_int_quadbg (wave image)
 
threadsafe variable int_quadbg_reduction (wave source, wave dest1, wave dest2, string *param)
 
variable scienta_norm (wave w, variable x)
 
wave fit_scienta_ang_transm (wave data, wave params)
 
threadsafe variable scienta_ang_transm (wave w, variable x)
 
wave fit_scienta_poly_bg (wave data, wave params, variable bgterms)
 
variable scienta_poly_bg (wave w, variable e, variable a)
 
variable prompt_redim_linbg_reduction (string *param)
 parameter dialog for the redim_linbg_reduction() function More...
 
threadsafe variable redim_linbg_reduction (wave source, wave dest1, wave dest2, string *param)
 linear background reduction function for incorrectly dimensioned scienta image More...
 
variable test_gauss2_reduction (wave image)
 apply the gauss2_reduction function to a single image More...
 
variable prompt_gauss2_reduction (string *param)
 prompt for the gauss2_reduction parameters More...
 
threadsafe variable gauss2_reduction (wave source, wave dest1, wave dest2, string *param)
 fit horizontal cuts of an image with two gaussian peaks on a linear background More...
 

Detailed Description

preprocessing functions for Scienta detector images.

this procedure contains functions for data reduction and instrument-specific normalization.

Author
matthias muntwiler, matth.nosp@m.ias..nosp@m.muntw.nosp@m.iler.nosp@m.@psi..nosp@m.ch

Definition in file pearl-scienta-preprocess.ipf.

Function Documentation

string capture_int_linbg_cursors ( )

Definition at line 66 of file pearl-scienta-preprocess.ipf.

string csr_int_linbg_reduction ( string  win)

Definition at line 76 of file pearl-scienta-preprocess.ipf.

wave fit_scienta_ang_transm ( wave  data,
wave  params 
)

Definition at line 551 of file pearl-scienta-preprocess.ipf.

wave fit_scienta_poly_bg ( wave  data,
wave  params,
variable  bgterms 
)

Definition at line 610 of file pearl-scienta-preprocess.ipf.

threadsafe variable gauss2_reduction ( wave  source,
wave  dest1,
wave  dest2,
string *  param 
)

fit horizontal cuts of an image with two gaussian peaks on a linear background

the function fits each horizontal profile (EDC) with two 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 either of peak 1 or peak 2. dest2 returns the corresponding error estimate.

Parameters
sourcesource wave. two-dimensional distribution of counts. for correct weighting and error estimation it is important that the source wave contains actual counts (Poisson statistics).
dest1(out) peak area
dest2(out) error estimate of peak area
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.
  • rngl low limit of fit interval
  • rngh high limit of fit interval
  • pos1 position of peak 1
  • wid1 width of peak 1
  • pos2 position of peak 2
  • wid2 width of peak 2
  • return select result to return, either "int1" or "int2".
  • ybox box size of averaging in y direction, must be 1 or 3. other values lead to corrupt data.
Returns
zero if successful, non-zero if an error occurs.

Definition at line 903 of file pearl-scienta-preprocess.ipf.

threadsafe variable int_linbg_reduction ( wave  source,
wave  dest1,
wave  dest2,
string *  param 
)

Definition at line 197 of file pearl-scienta-preprocess.ipf.

threadsafe variable int_quadbg_reduction ( wave  source,
wave  dest1,
wave  dest2,
string *  param 
)

Definition at line 457 of file pearl-scienta-preprocess.ipf.

variable prompt_gauss2_reduction ( string *  param)

prompt for the gauss2_reduction parameters

useful for testing or manual processing. to debug, (temporarily) remove the threadsafe attribute from the gauss2_reduction function.

Definition at line 834 of file pearl-scienta-preprocess.ipf.

variable prompt_int_linbg_reduction ( string *  param)

Definition at line 36 of file pearl-scienta-preprocess.ipf.

variable prompt_int_quadbg_reduction ( string *  param)

Definition at line 410 of file pearl-scienta-preprocess.ipf.

variable prompt_redim_linbg_reduction ( string *  param)

parameter dialog for the redim_linbg_reduction() function

Parameters
paramparameter string in a key1=value1;key2=value2;... list. the parameter string is passed by reference. see redim_linbg_reduction() for a description of parameters.
Returns
zero if the user clicked OK, non-zero if the user clicked Cancel.

Definition at line 716 of file pearl-scienta-preprocess.ipf.

variable prompt_Shockley_anglefit ( string *  param)

Definition at line 322 of file pearl-scienta-preprocess.ipf.

threadsafe variable redim_linbg_reduction ( wave  source,
wave  dest1,
wave  dest2,
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.

Parameters
sourcesource wave Scienta detector image, energy axis along X, angle axis along Y
dest1destination wave 1
dest2destination wave 2 each wave is a one-dimensional intensity distribution the function may redimension these waves to one of the image dimensions (it must be clear to the user which dimension this is). the meaning of dest1 and dest2 is up to the particular function, e.g. dest1 could hold the mean value and dest2 the one-sigma error, or dest1 could hold the X-profile, and dest2 the Y-profile.
paramparameter 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).

  • Lcrop size of the lower cropping region
  • Hcrop size of the upper cropping region
  • Lsize size of the lower background integration region
  • Hsize size of the upper background integration region
  • Cpos center position of the of the peak integration region
  • Csize size of the peak integration region

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

Returns
zero if successful, non-zero if an error occurs.

Definition at line 787 of file pearl-scienta-preprocess.ipf.

threadsafe variable scienta_ang_transm ( wave  w,
variable  x 
)

Definition at line 578 of file pearl-scienta-preprocess.ipf.

variable scienta_norm ( wave  w,
variable  x 
)

Definition at line 544 of file pearl-scienta-preprocess.ipf.

variable scienta_poly_bg ( wave  w,
variable  e,
variable  a 
)

Definition at line 654 of file pearl-scienta-preprocess.ipf.

threadsafe variable Shockley_anglefit ( wave  source,
wave  dest1,
wave  dest2,
string *  param 
)

Definition at line 337 of file pearl-scienta-preprocess.ipf.

variable test_gauss2_reduction ( wave  image)

apply the gauss2_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 810 of file pearl-scienta-preprocess.ipf.

variable test_int_linbg ( wave  image)

Definition at line 180 of file pearl-scienta-preprocess.ipf.

variable test_int_quadbg ( wave  image)

Definition at line 440 of file pearl-scienta-preprocess.ipf.

variable test_shockley_anglefit ( wave  image,
variable  branch 
)

Definition at line 297 of file pearl-scienta-preprocess.ipf.