Disk chopper time-of-flight spectrometer IN5

IN5 is a high precision direct geometry Time-of-flight (ToF) spectrometer. It is used to study low-energy transfer processes as a function of momentum transfer (e.g. quasi-elastic scattering in solids, liquids, molecular crystals and inelastic scattering, etc ). Typically this instrument is used for measurements in the small energy (10 µeV - 100 meV) and momentum transfer region with values of about 1 % for the energy resolution .

Back to ILL Homepage
www > Instruments & Support > Instruments & groups > IN5 > data analysis > Example of standard analysis

Example of standard analysis

Procedures for IN5 data treatment for LAMP in runtime mode

The following compressed file contains the compiled procedures that have to be used for the IN5 data treatment, e.g., with standard1.prox below. This file  standard.tar.gz (last changes: 2010/11/19) has to be uncompressed in the .../Free_Lamp/lamp/lamp_mac/ directory.

The compiled routines (.sav) should then be accessible from LAMP after a restart of LAMP.  A brief help on the used routines is given below the prox example.  If using LAMP with an IDL licence one can alternatively compile the routines found in standard_sources.tar.gz.


Bugs reports and questions to: J. ollivier (ollivier(at)ill.fr)

Standard1.prox

; ---------------------------------------------------------------------

;
;  @standard1
;
;
;
;   Template for standard nuclear scattering data reduction
;   To be used after the basic data reduction as made with "@reduce"
;
;
;  Last revised: JOR (ollivier@ill.eu), Mon Aug 31 16:37:07 CEST 2009
; ---------------------------------------------------------------------
RDSET,inst="IN5"            
RDSET,base="Current Path"            
; ---------------------------------------------------------------------
s  = '1-38,390-395'     ; bad spectra numbersto remove...
n  =  15                ; n grouping spectra
t  =  0.95              ; Sample transmission
v  =  0.890             ; vanadium transmission
c  = "sample.dat"       ; Name of the output file
; ---------------------------------------------------------------------
;
;   1)             Sample
;
; ---------------------------------------------------------------------
; 1.1.1) load sample (already normalized to monitor or time X 1000)
; ---------------------------------------------------------------------
w1 = rdrun('sample_ToF.hdf')

; ---------------------------------------------------------------------
; 1.1.2) Eventually remove spectra
; ---------------------------------------------------------------------
w1 = in5_remove_spectra(w1,badSpectra=s, /verbose)

; ---------------------------------------------------------------------
; 1.2.1) Empty Cell sample (or buffer)
;        Substraction should be done on raw data
; ---------------------------------------------------------------------
w2 = rdrun('emptycell_ToF.hdf')

; ---------------------------------------------------------------------
; 1.2.2) Eventually remove bad spectra
; ---------------------------------------------------------------------
w2 = in5_remove_spectra(w2,BadSpectra=s, /verbose)

; ---------------------------------------------------------------------
;  1.3) Do sample - t*EC        
; ---------------------------------------------------------------------
w3 = w1 - t*w2
e3 = sqrt(e1^2+(t*e2)^2)

; ---------------------------------------------------------------------
;  1.4) Correct for self-shielding/self-absorption
;  (VF. Sears like) for sample
;
; thick   = thickness [mm]
; rin      = cylinder inner radius [mm]
; rout     = cylinder outer radius [mm]
; angle   = slab angle [deg]
; sigma_a = absorption cross section [barns]
; sigma_s = total scattering cross section [barns]
; rho     = density [g/cm^3]
; Mass    = atomic mass [g]
;
; For a slab:
; ---------------------------------------------------------------------
w3 = in5_safcorr(w3,thick=0.3,angle=135.0,sigma_a=2.3234,sigma_s=95.09,rho=1.49,Mass=29.05, /verbose)

; For a hollow cylinder:
; ---------------------------------------------------------------------
;  w3 = in5_safcorr(w3,rin=114.0, rout=15.0,sigma_a=2.3234,sigma_s=95.09,rho=1.49,Mass=29.05, /verbose)

; For a full cylinder:
; ---------------------------------------------------------------------
;  w3 = in5_safcorr(w3, rin=8.0,sigma_a=2.3234,sigma_s=95.09,rho=1.49,Mass=29.05, /verbose)
 
 
; ---------------------------------------------------------------------
;
;  2)          Vanadium
;
; ---------------------------------------------------------------------
; 2.1) load vana
; ---------------------------------------------------------------------
w4 = rdrun('vanadium_ToF.hdf')

; ---------------------------------------------------------------------
; 2.2) Eventually remove bad spectra
; ---------------------------------------------------------------------
w4 = in5_remove_spectra(w4,badSpectra=s, /verbose)

; ---------------------------------------------------------------------
; 2.3) Empty Cell: use Same as above
; ---------------------------------------------------------------------
; ---------------------------------------------------------------------
; 2.5) Do vanadium - EC        
; ---------------------------------------------------------------------
w6 = w4 - v*w2 & e6 = sqrt( e4^2 + (v*e2)^2 )
; ---------------------------------------------------------------------
;  2.6) Correct for self-shielding/self-absorption
;  (VF. Sears like) for vanadium
;
; thick   = thickness
; angle   = slab angle
; rin      = cylinder inner radius [mm]
; rout     = cylinder outer radius [mm]
; sigma_a = absorption cross section
; sigma_s = total scattering cross section
; rho     = density
; Mass    = atomic mass
;
; ---------------------------------------------------------------------
w6 = in5_safcorr(w6,thick=1.0,angle=135.0,sigma_a=5.98,sigma_s=5.205,rho=5.96,Mass=50.941,/verbose)

; For a hollow cylinder:
; ---------------------------------------------------------------------
;  w6 = in5_safcorr(w6,rin=114.0, rout=15.0, sigma_a=5.98, sigma_s=5.205, rho=5.96, Mass=50.941,/verbose)
 
; For a full cylinder:
; ---------------------------------------------------------------------
;  w6 = in5_safcorr(w6, rin=8.0, sigma_a=5.98,sigma_s=5.205,rho=5.96,Mass=50.941,/verbose)
 
 
 
 
 
 
; ---------------------------------------------------------------------
;
; 3)  Normalize by the elastic peak of the vanadium          
;
;  
;   (vnorm correct the vana from DWF first.)
;
;
; ---------------------------------------------------------------------
w7 = in5_vnorm(w3,w6,/verbose)

; ---------------------------------------------------------------------
;
; 4) Correction for detector wavelength-efficiency +
;    remove flat bkgd.
;   /psd means take the same correction for all IN5 angles
;        that was not the case for the former IN5 with the 3 different type of
;        detectors - reduced to 2 in SAF corrections.
;   Other solution : mimic IN6 with rdset, inst="in6"
;                    Warning: for corrtof only.
;
; ---------------------------------------------------------------------
w7 = in5_corrtof(w7, /deteff, /psd, /background , /verbose)

; ---------------------------------------------------------------------
;
; 5) Conversion to S(2*theta, omega)
;
; ---------------------------------------------------------------------
w8 = in5_t2e(w7,/verbose)

; ---------------------------------------------------------------------
;
; 6) Group spectra in n groups
;
; ---------------------------------------------------------------------
  w9 = in5_group(w8,n,/verbose)

; ---------------------------------------------------------------------
;
; 7) Force constant energy bins for convolution in the fit
;
;    dE = 0.02, energy min in  up-scattering (AS) = -10.0
;    
;
; ---------------------------------------------------------------------
w10 = in5_energy_rebin(w9,de=0.02,Emin=-10.0,/force)

; ---------------------------------------------------------------------
;
; 8) Write data S(2*theta,w) format INX
;
; ---------------------------------------------------------------------
write_lamp,c+, w = 10,format = "inx"

; ---------------------------------------------------------------------
;
; 8) Write data S(2*theta,w) format hdf ...
;
; ---------------------------------------------------------------------
;  write_lamp,c, w = 10,format = "hdf"
;  spawn,"mv "+c+"_LAMP.hdf "+c+".hdf"

; ---------------------------------------------------------------------
;  Further treatments
; ---------------------------------------------------------------------
;
; 9) Constant Qelas rebinning
;    Q step = 0.02, energy min in  up-scattering (AS) = -10.0
;  
; ---------------------------------------------------------------------
; w12 = in5_sqw_rebin(w10, dq=0.02, Emin=-10.0, /verbose)
;
;
;
; ---------------------------------------------------------------------
; WARNING:
;
;  Transpose matrix after sqw_rebin before storing in the INX format
;  
; ---------------------------------------------------------------------

Help on IN5 routines

help on in5_ IDL routines

Last modified: Thu Oct 15 15:52:34 2009.

 


List of Routines


Routine Descriptions

IN5_CORRTOF

[Next Routine] [List of Routines]
 

NAME:

corrtof, w_in, deteff = deteff, background = background, psd = psd, frameoverlap = frameoverlap
For IN4, IN5, IN6 and D7 data. 

KEYWORDS:

/deteff           : corrects for energy-variation of detector efficiency  
/frameoverlap	   : subtracts a t^-4 tail from the beginning 		                     
of the time frame & shift the elastic peak  
/background  	   : subtracts a flat background in each detector, 		                     
found using a moving filter (For IN4, IN5 and IN6 only)                             
NO MORE VALID on the transformed data. Must be applied before                             
on the raw time-of-flight data.                             
The moving window width can be changed with the keyword:  
window = [value]  : default is 20. Must be used in conjunction with 
/background  
/psd              : If inst = IN5 need this keyword for the detctor efficiency of the PSDs.              
/verbose          : More info during execution. 

DIMENSIONS:

w_in=w_out(nchannels,nphases*nspectra)

COMMAND SYNTAX:

w2 = corrtof(w1[,/deteff][,/frameoverlap])
w2 = corrtof( w1,/deteff, window=15,/background, /verbose )   Since 10/2008 :     
w2 = corrtof( w1,/deteff, /psd, window=15,/background, /verbose )     
 Keyword PSD means using the new PSD detectors.    
(optional keywords shown in square brackets) 

HISTORY:

written by:  KHA,JRS 23/6/03     
revisions:  JO, 20/12/04 detector efficiency correction as implemented in                           
INX for IN4, IN5, IN6 and MIBEMOL.                 
JO, Mon Nov 24 14:17:47 CET 2008: Add detector efficiency as for 1 inch tubes                                                    
IN5/IN6 (wait for Van Esch calculation ?)                 
JO, Fri Jan 23 10:35:44 CET 2009: Correct the w_in background substraction: W_in                                                   
was affected by the substraction, not normal... 

(See in5_corrtof.pro)


IN5_ENERGY_REBIN

[Previous Routine] [Next Routine] [List of Routines]
 

NAME:

energy_rebin For IN4, IN5, IN6 and D7 data.
    rebins output workspace from t2e to constant energy bin width. 

ARGUMENTS:

dE : required energy bin width

KEYWORDS:

/force : rebin over entire energy range
                otherwise: rebin only where dE is > point spacing (default)  
/keepelastic	: do not rebin over the elastic peak  
Emin = energy minimal to start the exit workspace. 

DIMENSIONS:

w_in=(nE,nspectra) -> w_out(dE, nspectra)

COMMAND SYNTAX:

w10 = energy_rebin(w9,dE=<dE>[Emin=-100.0, /force, /keepelastic])
  (optional keywords shown in square brackets) 

VERSION HISTORY:

KHA,JRS 16/03/05   Modifications: JO, ??? add verbosity                   
JO, Tue Nov 25 11:12:49 CET 2008: Improve output parameters                                                     
presentation 

(See in5_energy_rebin.pro)


IN5_ESTRIP

[Previous Routine] [Next Routine] [List of Routines]
  For IN4, IN5, IN6 and D7 Rebins output data from t2e and reb to 
regular-grid S(Q,w) data using the old KHA IN6 rebin algorithm. 
Selects a single E-value. Input workspace must be in energy transfer 
versus scattering angle, i.e. only one component or spin phase. 

ARGUMENTS:

Evalue: E-value at centre of extracted strip
dE :	Width of E-strip 	
dQ :	Q bin width 

KEYWORDS:

(- only for D7 data:)
/neg_angles   : use only negative angles  
/pos_angles	: use only positive angles  
/all_angles	: use all angles (default) 		
input workspace must be in energy transfer versus scattering 
angle, i.e. only one component or spin phase.  
(ev, eb, qb and ib are obsolete, kept for backwards compatability) 

DIMENSIONS:

w_in(nE,nphi) -> w_out(nE,nQ)

COMMAND SYNTAX:

w10 = estrip(w9,E = <Evalue>,dE = <dE>,dQ = <dQ>[,/pos_angles][,/neg_angles][,/all_angles],[/verbose])
(Optional keywords shown in square brackets) 

HISTORY:

Creation : KHA,JRS 9/02/06
Modifications : JOR 2009/08 Reverse array direction for negative angles for D7 only!                              
Add prefix in5_ (= trusted IN5) and on demand verbosity. 

(See in5_estrip.pro)


IN5_GROUP

[Previous Routine] [Next Routine] [List of Routines]
 

NAME:

group

PURPOSES:

Group spectra in scattering angle or Q in a smaller number of groups.
Intensity is the averaged value. 

COMMAND SYNTAX:

w2 = group(w1,10, /verbose) ; group spectra in 10 groups with
output information   
w2 = group(w1,filename='angles.ang', /verbose) ; group spectra according 
to the file 'angles.ang'  

ARGUMENTS:

number of groups : final group number
filename         : name of a file where the spectra numbers are given   
for each group.                            
Angles must be in column and in LAMP  format, i.e., starting from 1     
and going to 88, 90 before 2006 and up to 395 for the renewed IN5.                               
e.g.:  1    7                                   
8    15                                   
...                               
Means: group 1 include spectra 1 to 7, group 2, spectra 8 to 15, etc.                            
Last value lower than the number of remaining groups                            
after remove_spectra                            
Bad groups must have been removed                             
with remove_spectra first      
/verbose         : more info during execution 

VERSION HISTORY:

Written by . S. Rols 11/01
Revisions:                       
+ S. Rols 10.08.02 rols@gdpc.univ-montp2.fr                     
+ M.Plazanet 2005: add the possibility to group according to                        
an angle group file 'angles.ang'                     
+ JO 2006-11-22: Improved version for the group file, verbosity added. 

(See in5_group.pro)


IN5_NORMALISE

[Previous Routine] [Next Routine] [List of Routines]
 

NAME:

FUNCTION normalise, w_in, raw=raw, monitor=monitor, time=time, $
 			  detector=detector, alldetectors=alldetectors, 
ei=ei, $ 			  
madangles=madangles, zeroshift=zeroshift, nopo = nopo, $ 			  
inorm, ikeep 
For IN4, IN5, IN6, HET and D7 data. 
For IN4, IN5 and IN6:  
---------------------  
Normalises raw data to monitor or counting time, depending on value of 
inorm.  Finds the position of the elastic peak. 
KEYWORDS:  
/raw	        : no normlisation (error bars calculated)  
/monitor      : normalise data to 1000 monitor1 counts (DEFAULT)  
/time         : normalise data to counting time (will not work for summed data)  
(inorm and ikeep are obsolete, kept for backwards compatability)
 For HET:  
--------  
Normalises raw data to monitor 1 (must be monitor 1 for ISIS data).  
Removes  empty spectra.  User must input incident energy. 
ARGUMENTS:  
ei	: incident energy of measurement 
For D7: 
 --------  
Normalises raw data to monitor (default) or counting time or individual  
detector.  Extracts every other spectrum if desired (=> nbSpectra=32).  
Recalculates detector angles based on a YIG calibration by default. 
ARGUMENTS:  
detector      : detector number to normalise to  
zeroshift     : angle in degrees of 2theta = 0  
(inorm and ikeep are obsolete, kept for backwards compatability) 
KEYWORDS:  
/raw	        : no normlisation (error bars calculated)  
/monitor      : normalise data to 1000 monitor1 counts (DEFAULT) 
 /time	        : normalise data to counting time  
/alldetectors : supresses the removal of the odd numbered detectors 
 /madangles    : supresses the recalculation of the detector angles using the 		  
current YIG calibration 
DIMENSIONS:    non-TOF data: w_out(nbSpectra,nphases,nruns)           
-unless nphases is 1 	
TOF data: w_out(nbChannels,nbSpectra*nphases,nruns) 
DCOMMAND SYNTAX:   
w2=normalise(w1[,/raw][,/monitor][,/time][,detector=#][,/alldetectors][,/rawangles][,ei=#])   
(optional keywords/arguments shown in square brackets) 

VERSION HISTORY:

Writtne by:    KHA,JRS 29/7/04   
Modifications: S. Rols 09/01 srols@anl.gov: Normalization for mibemol data and DCS                   
JO, ??? Add verbosity and use str_fit instead of fitgauss (due to)                          
problems with the errors computation.                  
JO, Tue Dec  9 18:12:50 CET 2008: correct normalise for the 3D raw data                                                    
with the new PSDs. Add ELP calculation                                                    
in that case. 

(See in5_normalise.pro)


IN5_QSTRIP

[Previous Routine] [Next Routine] [List of Routines]
  For IN4, IN5, IN6 and D7 rebins output data from t2e and 
reb to regular-grid S(Q,w) data using the old KHA IN6 rebin algorithm. 
Selects a single Q-value. Input workspace must be in energy transfer 
versus scattering angle, i.e. only one component or spin phase. 

ARGUMENTS:

Qvalue:	Q-value at centre of extracted strip 	
dQ :	Width of Q-strip 

KEYWORDS

(- only for D7 data)
/neg_angles	: use only negative angles  
/pos_angles	: use only positive angles  
/all_angles	: use all angles (default) 		
input workspace must be in energy transfer versus scattering angle, 		
i.e. only one component or spin phase. 
 (ev, eb, qb and ib are obsolete, kept for backwards compatability) 

DIMENSIONS:

w_in(nE,nphi) -> w_out(nE)

COMMAND SYNTAX:

w10 = qstrip(w9,Q=<Qvalue>,dQ=<dQ>[,/neg_angles][,/pos_angles][,/all_angles],[/verbose])
(optional keywords shown in square brackets)  

HISTORY:

Creation : KHA,JRS 9/02/06
Modifications : JOR 2009/08 Reverse array direction for negative angles for D7 only!                              
Add prefix in5_ (= trusted IN5) and on demand verbosity. 

(See in5_qstrip.pro)


IN5_REMOVE_SPECTRA

[Previous Routine] [Next Routine] [List of Routines]
 

NAME:

remove_spectra For IN4, IN5, IN6, DCS and HET, ...
Removes spectra with numbers given in array badspecs. 
Spectrum numbers  run from 1 to nspectra. 

KEYWORDS:

/nolog : if set, supresses output of badspecs in other_tit
This is necessary in cases where other_tit exceeds 160 characters  
/verbose : add verbosity to the standard output. 

ARGUMENTS:

badspecs : array of spectrum numbers to be deleted
BadSpectra: String of bad spectra to remove. 
Syntax is : '1-40,87,90,93,356-367'             
 '1-40' means all spectra from number 1 to number 40, etc. 

DIMENSIONS:

w_in(nchannels,nspectra) -> w_out(nchannels,nspectra-n) - n=number of bad spectra

COMMAND SYNTAX:

w2 = remove_spectra(w1,[3,90,202]) (remember square brackets)
or (new version):    
w2 = remove_spectra(w1,BadSpectra = '1-87,112-121,234,235,236,256-273',/verbose)	 

HISTORY:

KHA,JRS 7/05/05
JO, Mon Jun 16 14:24:35 CEST 2008  Modif to take a group of detectors instead                                       
of individual numbers.   
e.g. w2 = remove_spectra(w1,BadSpectra = '1-87,112-121,234,235,236,256-273')	        
in that case, the BadSpectra string replace the badspecs input. 

(See in5_remove_spectra.pro)


IN5_SAFCORR

[Previous Routine] [Next Routine] [List of Routines]
 

NAME:

safcorr

PURPOSES:

Perform the Self Attenuation Factor corrections on data in w_in
similarly to INX routines.  
For slab samples, the calculation is identical to INX as taken from the Sears   
calculations (V.F. Sears Adv. Phys. (1975)).  
For cylinders (full/hollow) the calculation is similar to those of J.Wuttke  (ILL report WU....) 
and differs slightly formt the calculation from Rieutord   
(ILL report RI.... 1991) as implemented in INX but the results are similar.  
In all cases, contrarily to the INx and SQW routines, 
the SAF corrections are   computed for each energy. 

ARGUMENTS:

sigma_a: Absorption cross-section (barns)
sigma_s:	Total scattering cross-section (barns)   
rho:		sample density (g/cm^3)   
Mass:		molar mass (g/mol)  
Rin: 		Inner radius (full/hollow cylinders). Unit: [mm]  
Rout:		outer radius (full/hollow cylinders). Unit: [mm]   
thick: 	Slab thickness (flat plate -- slab -- samples). Unit: [mm]  
angle:		Slab setting angle (flat plate -- slab -- samples). Unit: [deg.] 

KEYWORDS:

/verbose: Information during the process
/corrections:	Gives the Self Attenuation Factors instead of the corrected intensities  			
Size = size(w_in)  
hlp = hlp	Gives this help 

DIMENSIONS:

Default: w_in=w_out(nchannels, nspectra)
If keyword '/corrections': gives the correction map Corr such as:   
W_out = W_in/Corr instead of W_out. 

COMMAND SYNTAX:

For a SLAB sample:
w8=safcorr(w7,thick=0.5,angle=135.0,sigma_a=5.08,sigma_s=5.205,rho=5.96,Mass=50.941)  
Performs self-absorption / self-attenuation for w7   
(here parameters are for vanadium slab at an angle of 135 deg)   
(optional arguments shown in square brackets)  
For a cylinder (full or hollow) sample:  
w8=safcorr(w7,Rin=10.0,Rout=11.0,sigma_a=5.08,sigma_s=5.205,rho=5.96,Mass=50.941)  
For a full cylinder set Rin=0 or cancel the keyword in the routine:  
w8=safcorr(w7,Rout=11.0,sigma_a=5.08,sigma_s=5.205,rho=5.96,Mass=50.941)  
w3 = safcorr(w2,Rin=0,Rout=12,sigma_a=5.08,sigma_s=5.205,rho=5.96,Mass=50.941,/verbose,/corrections)  
for a vanadium full cylinder, gives the corrections factors instead of the corrected intensities 

VERSION HISTORY:

Written by : J.Ollivier 2006-03-23
Modified by:                 
JO-2006-06-15: Corrected a bug 2 times win/H1 in safcyl                
JO-2006-11-10: Compute energies. Data need no more to be in energy                               
mode. Warning: all cases are not treated , MIBEMOL                               
should not work.                
JO-2008-11-25: Treat correctly the case where all is in time channel.                               
Improve verbosity. 

(See in5_safcorr.pro)


IN5_T2E

[Previous Routine] [Next Routine] [List of Routines]
 

NAME:

t2e

PURPOSES:

Converts array w_in to energy in w_out Based on the original "tee" procedure instead of on "t2e".

COMMAND SYNTAX:

w2 = t2e(w1)
convert tof spectrum in w1 to energy and output in w2          
Energies are in x2.    
w2 = t2e(w1,/verbose)    ; same with information on the standard output.    
w2 = t2e(w1,w3,/verbose) ; Uses an elastic peak standard raw data reference for finding the                                
elastic peak position (ELP).                                
The Vanadium or better the low temperature sample is this                                
reference usually. This is required each time the ELP is incorrectly                               
defined in the sample. E.g. on liquid spectra. 

ARGUMENTS:

(all optional)
/average_elp     : take average elp instead of   
W_van            : Workspace for the vanadium/low temp. sample, that gives the elastic peak reference   
/verbose         : more info during execution    

DIMENSIONS:

w_in = w_out(nchannels, nspectra)

VERSION HISTORY:

Written by  GJK 1994  	
Revisions:     JO 2004-11-03 Include other Tof instruments (e.g.: MIBEMOL, LLB) 		           
JO 2006-03-28 Html help, more verbosity                   
JO 2006-10-23 tee -> t2e with the same properties                                  
in case the original t2e fails.                   
JO 2006-11-10 gaussian fit with str_fit instead of fitgauss (due to                                  
problems when error bars are not computed), with the same restriction                                 
to the elastic peak than before +/- 30 channels from                                   
mean elastic maximum.                   
JO 2006-12-14 Reference of the elastic line by the vanadium (keyword: Wvan)                                 
Vanadium data must be in the same format than sample data.                   
JO, 2007-11-05 Seems that the gauss ELP is 1 channel out from the reality.                                  
Is it always true ???                   
JO, Sat Oct 11 11:57:30 CEST 2008: If spectra are zeros remove first and last index                                                     
str_fit gives the first X if no maxi found                  

JO, Thu Dec  4 10:55:17 CET 2008: correction on the index ind                                 

(See in5_t2e.pro)


IN5_T2EPSD

[Previous Routine] [Next Routine] [List of Routines]
 

NAME:

t2epsd

PURPOSES:

Converts array w_in to energy in w_out fpr IN5 PSD in single Xtal mode
Same as in5_t2e but adapted for PSDs. ;

DIMENSIONS:

w_in = w_out(nchannels, nspectra, nZ)

VERSION HISTORY:

JO 2008-07-01 This version T2EPSD adapted for IN5 PSD but other instruments                                 
removed for clarity.                                 

(See in5_t2epsd.pro)


IN5_VNORM

[Previous Routine] [List of Routines]
 

NAME:

vnorm

PURPOSES:

Normalises data in w_in with vanadium in (w_van0) elastic peak integral.

ARGUMENTS:

(all optional)
chmin		: lower time channel limit of integration over vanadium elastic peak  
chmax		: upper time channel limit  
/verbose       : more info during execution 

DIMENSIONS:

w_in=w_out(nchannels, nspectra)

COMMAND SYNTAX:

w3 = vnorm(w1,w2,chmin=<min>,chmax=<max>[,/verbose])
- normalises data in w1 to vanadium data in w2 and store the result in w3         
(optional arguments shown in square brackets). 

EXAMPLES:

w3 = vnorm(w1,w2,/verbose) ; calculation of the integration limit are automatic.
w3 = vnorm(w1,w2, chmin=490,chmax=520) ; only a few case require to put the limits                                           
by hand.   

VERSION HISTORY:

Written by : JR. Stewart,KH.Andersen 15/11/02
Modified by: S. Rols (for mibemol data) 4/12/03               
J. ollivier (2006-03-21) New version with vanadium temperature correction for the Debye-waller factor. 
Add verbosity on the standard output. Calculation of the integral limitsautomatic. 
WARNING: D7 case removed for clarity of the code!!! 

(See in5_vnorm.pro)