projects/barrel/barrel_sp_v3.5/
barrel_sp_fold_m3.pro
NAME: barrel_sp_fold_m3.pro DESCRIPTION: BARREL mid-level spectral folding routine method3 = two file-based spectral shapes, single drm REQUIRED INPUTS: subspec background subtracted count spectrum subspecerr its error bars modlfile Input model spectrum. Required format is starting energy boundary, ending energy boundary, flux it will be interpolated to phebins if necessary. Comment lines beginning with characters not = '0123456789.-' are allowed at the start. secondmodlfile Second input model spectrum. drm response matrix for correct payload altitude and chosen PID of electrons phebins energy channel boundaries (length = length of spectrum + 1) phmean energy channel centers (should have length = length of spectrum) -- this is for the photons dimension phwidth energy channel widths (should have length = length of spectrum) -- this is for the photons dimension ctwidth energy channel widths (should have length = length of spectrum) -- this is for the counts dimension usebins subset of energy channels (count space) to actually use for fitting maxcycles Maximum number of times to try rescaling range for fit parameters OPTIONAL INPUTS: quiet Don't make graphs + screen output verbose show some debugging info as fits go along OUTPUTS: params best fit parameters param_ranges ranges on best fit parameters (1 sigma) (2x2 array) modvals values of the fit function at the centers of the energy bins (first component) secondmodvals values of the fit function at the centers of the energy bins (second component) chisquare chi-square (not reduced) dof degrees of freedom associated with chisquare CALLS: barrel_sp_fitgrid3.pro STATUS: TO BE ADDED: REVISION HISTORY: Version 1.0 DMS 8/18/12 Version 3.4 DMS 4/17/14 -- save elecmodel for best fit e- spectrum
Routines
top source barrel_sp_fold_m3
barrel_sp_fold_m3, subspec, subspecerr, modlfile, secondmodlfile, drm, phebins, phmean, phwidth, ctwidth, usebins, maxcycles, params, param_ranges, elecmodel, modvals, secondmodvals, chisquare, dof, quiet=quiet, verbose=verbose
Parameters
- subspec
- subspecerr
- modlfile
- secondmodlfile
- drm
- phebins
- phmean
- phwidth
- ctwidth
- usebins
- maxcycles
- params
- param_ranges
- elecmodel
- modvals
- secondmodvals
- chisquare
- dof
Keywords
- quiet
- verbose
File attributes
Modification date: | Tue Oct 21 13:53:31 2014 |
Lines: | 81 |