Documentation for /home/davin/idl/socware/

Generated by IDLdoc

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

projects/barrel/barrel_sp_v3.5/

barrel_sp_fitgrid4.pro


NAME: barrel_sp_fitgrid4.pro DESCRIPTION: BARREL low-level spectral folding routine for method 4 (analytic spectral function, dual DRMs) REQUIRED INPUTS: subspec background subtracted count spectrum, cts/keV subspecerr its error bars model spectral model of electron spectrum (default is exponential) 1 = exponential 2 = monoenergetic drm response matrix for correct payload altitude and chosen PID of electrons drm2 second response matrix; interpolation between these two is the last fit parameter phmean energy bin centers for the photons dimension phwidth energy bin widths for the photons dimension usebins which energy channels to use in minimizing chisquare startpar Starting value of spectral parameter startnorm Starting value of spectral normalization startdrm Starting value of drm parameter points Number of points on each side of starting values to test scaling Range around the starting values to test -- for example, points=2 and scaling=1.5 means that the values tested are x/1.5, x/1.25, x, x*1.25, x*1.5 scaling[0]=norm, scaling[1]=spectral parameter, scaling[2]=drm and works differently (direct value rather than fractional) OPTIONAL INPUTS: none OUTPUTS: bestpar best-fit value of the spectral parameter bestnorm best-fit value of the normalization parameter bestdrm best-fit value of the drm interpolation bestparn array location of bestpar bestnormn array location of bestnorm bestdrmn array location of bestdrm modvals values of the best-fit function at the data bin centers chiarray array of chi-square values bestchi lowest chi-square value pararray array of spectral parameter values normarray array of normalization parameter values drmarray array of drm parameter values CALLS: None. STATUS: not yet tested TO BE ADDED: N/A REVISION HISTORY: Version 1.0 DMS 7/12/12 based on barrel_fitgrid2 Version 2.0 DMS 7/18/12 added "usebins" -- functionality was missing before -- renamed "bestvals" to "modvals" "scaling" becomes an array instead of 3 variables with different names Version 2.1 DMS 7/24/12 Add code to omit unphysical drm scale regions 11/12/13 insist on only one value of bestparn, etc.

Routines

top source barrel_sp_fitgrid4

barrel_sp_fitgrid4, subspec, subspecerr, model, drm, drm2, phmean, phwidth, usebins, startpar, startnorm, startdrm, points, scaling, bestpar, bestnorm, bestdrm, bestparn, bestnormn, bestdrmn, modvals, chiarray, bestchi, pararray, normarray, drmarray, debug=debug

Parameters

subspec
subspecerr
model
drm
drm2
phmean
phwidth
usebins
startpar
startnorm
startdrm
points
scaling
bestpar
bestnorm
bestdrm
bestparn
bestnormn
bestdrmn
modvals
chiarray
bestchi
pararray
normarray
drmarray

Keywords

debug

File attributes

Modification date: Tue Oct 21 13:53:31 2014
Lines: 46