The LAMP Application

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

lamp_mac/D17/

d17_he3calc.pro


Routines

aw_peaksearch, win, cen, sigma, x=x, range=range

aw_sumup, xin, yin, ein, bkg, yout, eout

result = aw_gaussfun(x, p)

D17_he3calc, refl, time, phi, f1, f2, trans, main=main, water=water, mask=mask

Routine details

top aw_peaksearch

aw_peaksearch, win, cen, sigma, x=x, range=range

pro D17_he3calc,refl,main=main,water=water,mask=maskstring,time,phi,f1,f2,trans LAMP procedure to take a standard 7-run measurement of the four flipper states for a He3 calibration and return the calculated phi, f1 and f2 for the mean time of the measurements. The calculation is from the equations in: Wildes, Rev. Sci. Instrum., 70 (1999) 4241 ARW 31.08.04 NECESSARY VARIABLES: refl=a string with the first and last of the 7 files, separated by a colon OPTIONAL VARIABLES: main=a string with the numbers for a measurement of the main beam, with an empty cell water=the number of the workspace with the (masked) water file in it. The data will be divided by this workspace if it exists maskstring=your choice of masking the detector, written as a string The default is no mask OUTPUT VARIABLES: time=the mean time for the measurement. The values for phi,f1,f2 and trans correspond to this time phi=the combined polarizer/analyzer inefficiency f1=the first flipper inefficiency f2=the second flipper inefficiency trans=the transmission of the cell. This is only output if 'main' is specified e.g. d17_he3calc,'90230:90236',main='90201',water=1,mask='box,[190,200,63,222]',time,phi,f1,f2,trans CALLS TO: aw_peaksearch,aw_sumup,aw_gaussfun (internal), d17_errmsg D17_polcalc,mload,mpfitfun,d17_waternorm(external) Last modified: ARW 4.2.11

** ************* ** LAMP procedure that takes a 1D array and searches for a peak ** within the limits of range. ** Returns the peak centre (calculated by weighted mean) ** and the standard deviation. ** ARW 03.03.04 ** ** NECESSARY INPUT ** win=input data, a 1D array ** ** OPTIONAL INPUT ** x=x-coordinates for win (defaults is pixels) ** range=2 element array, limits the search for the peak ** (Give units in x, default is pixels) ** ** RETURNS ** cen=weighted mean for the peak ** sigma=standard deviation ** ** e.g. aw_peaksearch,array1D,cen,sigma,x=findgen(51),range=[45,51] ** ** CALLS TO: ** LAST MODIFIED: ARW 19.03.04

Parameters

win
cen
sigma

Keywords

x
range

top aw_sumup

aw_sumup, xin, yin, ein, bkg, yout, eout

** ******** ** LAMP procedure to integrate the intensity over a 1D peak ** Uses a trapezoidal summation, subtracts a FLAT background(!!!) ** ARW 4.2.11 ** ** NECESSARY INPUT ** xin=x-values for input data ** yin=y-values for input data ** ein=corresponding error for the data ** bkgd=a 2 element array ** = [value for the constant background, error in background] ** ** RETURNS ** yout=summed data, minus the background ** eout=corresponding error ** ** CALLS TO: ** last modified: ARW 4.2.11

Parameters

xin
yin
ein
bkg
yout
eout

top aw_gaussfun

result = aw_gaussfun(x, p)

******* *********** ** LAMP function that will write a Gaussian to a workspace. ** Can be used in combination with 'mnfitfun' ** Can also be used in combination with aw_gauss (a procedure) ** This option is rather useful if you want to fit many peaks ** ** NECESSARY INPUTS: ** x = the range of x-values in whatever units you want ** p = the parameters for the fit ** p(0) = background ** p(1) = amplitude (not normalized) ** p(2) = centre point ** p(3) = standard deviation ** If you wish to edit the program to fit N Gaussians, p will need to ** have 3N+1 elements: ** p(0) is always background ** p(3*i-2) is the amplitude of the (1 <= i <= N)th peak ** p(3*i-1) is the centre point of the ith peak ** p(3*i) is the standard deviation of the ith peak ** ARW 22.07.05 ** ** e.g. w1=aw_gauss(indgen(286),[5.0,100.0,150.0,2.0]) ** Last modified:

Parameters

x
p

top D17_he3calc

D17_he3calc, refl, time, phi, f1, f2, trans, main=main, water=water, mask=mask

** *********** ** User callable

Parameters

refl
time
phi
f1
f2
trans

Keywords

main
water
mask

File attributes

Modification date: Tue Oct 1 14:43:02 2013
Lines: 304