Fits a combination of a polynomial and set of harmonic sinusoids to the current spectrum, within the nominated x-axis intervals (10 intervals max). Invented for analysis of baseline ripple data from Parkes, and still the only routine for analysing sinusoidal baselines (apart from Fourier analysis).
The problem is non-linear if the sinusoid period is undetermined -- you can allow this to be fitted or not as you require.
If the fit is successful the stack is pushed and the resulting baseline is written to the current spectrum. Just use SUBTRACT-SPECTRUM to calculate the residuals.
N_POLY |
I4 | Number of polynomial coefficients. | |||||||||
POLY_COEFF(30) |
R4 | Polynomial coefficients. | |||||||||
N_SIN |
I4 | Number of harmonics to fit. | |||||||||
AMP_PHASE(28) |
R4 | Amplitude and phase of sinusoidal components. | |||||||||
FREQ_COEFF |
R4 | Fitted frequency (may be negative if constrained to be constant). | |||||||||
N_INTS |
I4 | Number of intervals to use for analysis. | |||||||||
BLF_INTS |
R4 | Pairs of channels defining spectral intervals to be used for baseline fitting, analysis etc.. | |||||||||
FIT_TOL |
I4 | Specifies the convergence criterion. If the fractional change in the sum-squared-error from one interation to the next is less than FIT_TOL then the process has converged. [.05] | |||||||||
MAX_ITS |
I4 | Specifies the maximum number of iterations to be executed. [20] | |||||||||
FIT_DEBUG |
I4 |
|
Examples:
>> fit-composite-baseline<CR>
Type intervals, one at a time, CTRL(Z) to finish
Current units are km/s
# -10 10<CR>
# ^z<CR>
Estimate of polynomial coefficients for x**n
One at a time, CTRL(Z) to finish
Current units are km/s
# (x** 0) 0.2<CR>
# (x** 1) ^z<CR>
Estimate of fundamental period,-ve if const;CTRL(z)=none [ 0.0000] 5.0<CR>
Estimates of Amplitude and phase for each harmonic
Term at a time, CTRL(Z) to finish
Current units are km/s
# 1 0<CR>
# ^z<CR>
No of Iterations = 7 Final SUMSQ = 0.9940E+01
Parameters of Least-Square Baseline
Polynomial terms - Coefficients of X**n
0 0.36
Fundamental period is 25.2 km/s
Harmonic Amplitude Phase(km/s )
1 0.92 13.04
Baseline calculated - Pushed into stack
..