minor updates and bug fixes in angle scan processing and data explorer
This commit is contained in:
@ -90,6 +90,40 @@ threadsafe function MultiGaussLinBG_AO(pw, yw, xw) : FitFunc
|
||||
endfor
|
||||
end
|
||||
|
||||
/// doublet gaussian peaks on a linear background fit function (all at once).
|
||||
///
|
||||
/// this fits two gaussian peaks.
|
||||
/// peak positions are specified by center and distance rather than individually.
|
||||
/// amplitude and width are specified as absolute values for the upper peak (in x),
|
||||
/// and relative values for the lower peak.
|
||||
///
|
||||
/// @note FWHM = width * 2 * sqrt(ln(2)) = width * 1.665
|
||||
///
|
||||
/// @param pw shape parameters.
|
||||
/// the length of the wave defines the number of peaks.
|
||||
/// @arg pw[0] = constant coefficient of background
|
||||
/// @arg pw[1] = linear coefficient of background
|
||||
/// @arg pw[2] = amplitude of peak 1 (higher x)
|
||||
/// @arg pw[3] = amplitude of peak 2 relative to peak 1
|
||||
/// @arg pw[4] = center position
|
||||
/// @arg pw[5] = distance between peaks (splitting)
|
||||
/// @arg pw[6] = width of peak 1 (see note)
|
||||
/// @arg pw[7] = width of peak 2 relative to peak 1
|
||||
///
|
||||
/// @param yw y (dependent) values.
|
||||
///
|
||||
/// @param xw x (independent) independent values.
|
||||
///
|
||||
threadsafe function DoubletGaussLinBG_AO(pw, yw, xw) : FitFunc
|
||||
wave pw
|
||||
wave yw
|
||||
wave xw
|
||||
|
||||
yw = pw[0] + xw[p] * pw[1]
|
||||
yw += pw[2] * exp( -( (xw[p] - pw[4] - pw[5] /2) / pw[6] )^2 )
|
||||
yw += pw[2] * pw[3] * exp( -( (xw[p] - pw[4] + pw[5] /2) / pw[6] / pw[7] )^2 )
|
||||
end
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Voigt shapes
|
||||
//------------------------------------------------------------------------------
|
||||
@ -581,7 +615,7 @@ function Au4f(w, x): fitfunc
|
||||
// otherwise only the constant background.
|
||||
variable x
|
||||
|
||||
variable np = 15
|
||||
variable np = numpnts(w)
|
||||
variable ip, ip0
|
||||
|
||||
variable bg = w[0]
|
||||
|
Reference in New Issue
Block a user