This TASK fits polynomial or sin & cos functions to spectra,
subtracts the fitted baselines from the original spectra, and re-calculates rms of the residual spectra.
Some explanation was added to the 'sin&cos' mode. (Feb. 16, 2007)
Spectra will be appended if the name of the output file already exists.
* USAGE:
<
Parameter window for BASELINE
>
1. Setting up parameters
Spectrum file(in):
Specify a spectrum file name, or select from [File List].
Spectrum file(out):
Specify a file name for output, and set a class (extension).
When you set an extension mode to 'manual', put a class name in the 'Class' box.
Function:
Select a fitting function: 'polynomial' or 'sin&cos'.
If you select 'polynomial', put the order in the first box of 'Order/wave num.' and type 0 in the rest of the boxes.
If you select 'sin&cos', put the wave numbers in the 'Order/wave num.'
boxes (Ten numbers are the maximum).
This function is useful to subtract fringe like periodical features from spectra.
For example, if your spectrum has such feature with about 10 waves between the beginning and
the end channels, try (for example) 9, 10, 11 in the 'Order/wave num.'
boxes.
The selection and modification of the functions and 'order/wave num.' can also
be done in the TTT window after execution in the interactive mode (see below).
X-axis mode:
Select X-axis unit: 'channel(ch)', 'frequency(GHz)', or 'velocity(km/s)'.
Rest frequency:
Select rest frequency mode to calculate velocity.
from header
uses the rest frequency in the header (center frequency of the spectrometer).
manual
uses the frequency (GHz) specified at the 'manual frequency:' box.
X-axis range:
Select X-axis range: 'all range' or 'manual'.
If you select 'manual', then put minimum and maximum values in the 'manual range:' boxes with the unit selected at 'X-axis mode:'.
Y-axis mode:
Select Y-axis unit: At present only 'Ta*(K)' works.
Y-axis range:
Select Y-axis range: 'auto', 'manual', or 'fixed span'.
If you select 'manual', then put minimum and maximum values in the 'manual range:' boxes.
If you select 'fixed span', then put a value in the 'fixed span value:' box.
Execution Mode:
Select execution mode: 'Interactive' or 'Background'.
In 'Interactive' mode, you specify base ranges after execution. You can change base ranges, fitting function, and the order (or the wave numbers).
See the next section 2. Execution in the interactive mode.
In 'Background' mode, specify base ranges in the 'fitting parts for background operations' boxes before execution. Six ranges are the maximum.
See section 3. Execution in the background mode.
<Spectrum Window>
Specify spectrum numbers (sp.#) that you want to treat.
2. Execution in the interactive mode
Execute this TASK from the menu bar. The following TTT window appears.
The function in 'EXIT' is to finish this procedure.
The function in 'GO' is to fit a baseline to a spectrum. Execute after setting base ranges (see 'SetRanges').
The functions in 'SHOW':
Original shows an original spectrum.
Result shows the result of subtraction of a baseline from the original spectrum. Also re-calculated rms(s) is shown.
The function in 'RangesReset' is to reset base ranges.
The functions in 'Save&next':
SaveAndNext saves the result of subtraction, and goes to the next spectrum in the spectrum file.
Save saves in the same way as 'SaveAndNext.'
Next goes to the next spectrum in the spectrum file.
The function in 'Order&Wave' is to change the order of the polynomial function or the wave number(s) of the sin & cos function. The following TextDialog window appears. Specify the order, or the wave number(s) such as 1, 2, 3 with ", (comma)".
If you want to change the fitting function, select 'polynomial' or 'sin & cos' from the pull-down menu.
After displaying the original spectrum (see 'SHOW'), re-execute 'GO'.
The function in 'SetRanges' is to set base range(s) for fitting. Click left and right edges of the range in which you want to fit a baseline. Six ranges are the maximum. If you want to change the present range(s), set new range(s) after executing 'RangeReset'.
For details, please also see BASELINE in Basic manual.
The function in 'BEFORE' is to go to the previous spectrum in the spectrum file.
The functions in 'Print':
LW outputs the contents in the TTT window to a laser printer (Laser Writer).
PostScriptText outputs the contents in the TTT window to a postscript file in the directory /home/Group/Project/. Specify an output file name.
Option changes the pen width.
3. Execution in the background mode
Put base ranges (with the unit selected in 'X-axis mode:') in the 'fitting parts for background operations' boxes in the parameter window.
The other (and probably more convenient) way of putting the fitting ranges is to once carry out fittings in the 'Interactive' mode: 'SetRanges', 'GO', and then 'EXIT'. Also the fitting function and the order or the wave number(s) are put in 'Function:' and 'Order/wave num.'.
Then, execute from the menu bar. The TASK automatically ends.
This mode automatically executes the following functions for each spectrum specified at '<Spectrum Window>' in the parameter window.
baseline fitting to a spectrum
subtracting the baseline from the original spectrum, and re-calculating rms.
saving the result in an output file specified at 'Spectrum file(out):' in the parameter window.