AIPS HELP file for LISPX in 31DEC25
As of Wed Mar 26 15:44:34 2025
LISPX: Finds spectral index of spectra input from text file
INPUTS
INFILE
Input text file
OUTFILE
Output text file
FLUX Use only data > FLUX
REFREQ Reference frequency in same
units as INFILE, 0 -> 1
OPTYPE 'CURV' fit incl curvature
DPARM Flag if bad answer levels:
(1) N < (2) Sp < (3) Sp >
(4) T/min < (5) T/max >
(6) T < (7) T > (8) c <
(9) c >
CPARM Flag if uncertainty >
(1) Brightness
(2) Spectral index
(3) Curvature
HELP SECTION
LISPX
Task: In some cases, users may find that they have interesting spectra
only at a few celestial positions. In that case, it may be
simpler to provide the data in a text file rather than
constructing image cubes. LISPX reads such text files and fits
the data for the function
log(T(i,f)) = log(T(i,f0)) + S(i) log(f/f0) +
C(i) (log(f/f0))^2
where i is the spectrum number. It can write an output text file
containing the answers. Note that the logarithms are base 10 and
f0 is set by the user with a default of 1 in the same units as
the frequencies in the input text file. The value of f0 affects
the values of the curvature.
Note that the data in each spectrum must have the same units, be
they Jy or Jy/beam or whatever. Note that AIPS scales each plane
of an image cube so that it is in Jy per header beam even though
the plane may actually have a different beam size. If the
primary beam is of importance, the data must be corrected for
the primary beam.
The model is fit to all spectra found in the input file, with
results blanked based on FLUX, CPARM, and DPARM. The main TV
function is a loop over all spectra offering a chance to edit
the data and try for better fits.
Adverbs:
INFILE.....Input text file. Format described below.
OUTFILE....Output text file. ' ' => write results to message file
only.
FLUX.......A flux cutoff in the same units as the input data (i.e.
Jy, Jy/beam, mJy, ...). Data values below FLUX are
ignored in the spectral index computation. NOTE that
0.0 is not a null value. Instead, it means ignore all
negative brightnesses (which it has to do anyway).
REFREQ.....Compute total flux, spectra index and curvature with
reference frequency REFREQ in the same units as the
input frequencies in INFILE. 0 => use 1 in those units.
OPTYPE.....'CURV' => fit curvature as well as spectral index
anything else => fit only spectral index.
DPARM......The images can be dominated by bad answers, making it
hard to see the good parts. Therefore flag the solution
for a pixel if
(1) Number samples > FLUX is < DPARM(1) 0 -> 0
NOTE: solutions will be found for only 2 or 3 (CURV)
samples - so this is a serious thing to test.
(2) Spectral index < DPARM(2) 0 -> -large
(3) Spectral index > DPARM(3) 0 -> +large
(4) Brightness/(min brightness) < DPARM(4) 0 -> 0
(5) Brightness/(max brightness) > DPARM(5) 0 -> +large
(6) Brightness < DPARM(6) 0 -> 0
(7) Brightness > DPARM(7) 0 -> +large
(8) Curvature < DPARM(8) 0 -> -large
(9) Curvature > DPARM(9) 0 -> +large
You should invoke some of these - 2,3 and 8,9 at least.
CPARM......The image can also be messed up by fits that are very
uncertain. Therefore, flag the solution for a pixel if
(1) Uncertainty in brightness > CPARM(1) 0 -> large
(2) Uncertainty in spectral index > CPARM(2) 0 -> large
(3) Uncertainty in curvature > CPARM(3) 0 -> large
EXPLAIN SECTION
LISPX: One-dimensional spectral index fitting of data cubes
Documenter: E. W. Greisen NRAO
Related Programs: SPIXR, TVSPX, MCUBE, FQUBE
The format of INFILE is generally free. The first line of each
spectrum must begin with SPEC. It may contain a label to identify the
spectrum. The label begins with a single quote (') and may be
terminated with a single quote. Any number of data lines follow
giving frequency, data value, and optionally any third number in free
format. A second spectrum may follow beginning with a SPEC card.
The number of spectral channels in each spectrum is optional. The
task can read up to 100 spectra with a total number of channels less
than 32768. A sample INFILE is:
SPECTRUM 'Rising portion'
1.0394999981 5.13000000 0.30131237
1.1035000086 5.89500000 0.25485172
1.1675000191 6.18000000 0.27045544
1.2315000296 6.44000000 0.23502017
1.2955000401 6.49000000 0.19581820
1.3595000505 6.85000000 0.15384054
1.4234999418 7.33900000 0.12678549
1.4874999523 7.63000000 0.12760009
1.6154999733 8.82300000 0.12842990
1.6794999838 9.09000000 0.10342442
1.7434999943 9.37600000 0.08856928
1.8075000048 9.71800000 0.08747287
1.8715000153 9.98000000 0.07980375
1.9355000257 10.34000000 0.08447846
1.9995000362 10.94000000 0.11433641
2.0510001183 11.04600000 0.06416714
2.4349999428 12.66000000 0.04400924
2.5629999638 13.08800000 0.04278684
2.6909999847 13.61600000 0.04252661
2.8190000057 14.14800000 0.04056944
2.9470000267 14.51600000 0.03983166
3.0750000477 14.92500000 0.03566618
3.2030000687 15.22800000 0.03414860
3.3310000896 15.60600000 0.03500000
3.4590001106 15.79200000 0.03500000
3.5869998932 16.08600000 0.03400000
3.7149999142 16.06300000 0.04266301
SPECTRUM 'Shoulder portion'
4.2950000763 15.99100000 0.03318315
4.4229998589 16.05200000 0.03221361
4.5510001183 16.06700000 0.03254890
4.6789999008 16.00300000 0.03460564
4.8070001602 15.84500000 0.03526764
4.9349999428 15.79500000 0.03600000
5.0630002022 15.66100000 0.04400000
5.1909999847 15.54800000 0.04100000
5.3189997673 15.49400000 0.03900000
5.4470000267 15.50700000 0.03603313
5.5749998093 15.43100000 0.03398262
5.9590001106 15.26300000 0.05000000
6.0869998932 15.24524000 0.05100000
6.2150001526 15.20720400 0.12099661
6.3429999352 15.10748800 0.04575826
SPECTRUM 'Dropping portion'
6.4710001946 14.86590800 0.06200000
6.5989999771 14.74974400 0.04341357
6.7270002365 14.68703600 0.04450022
etc.
After all pixels that are strong enough have been given a solution,
LISPX enters a menu-driven function. The menu has:
| EXIT | Exit LISPX, writing output images
| ABORT | Exit LISPX, deleting the output images.
| |
| REDO ALL | Re-do all solutions
Unlike TVSPX, this task will display all spectra in sequence offering
the option to edit the data and re-fit the spectrum.
The REDO ALL option invokes another display, one spectrum at a time.
The spectrum (as plus signs) and the current fit (as a connected line)
are displayed. Then a menu is offered:
| CHAN RANGE | To select a range of channels in the spectrum
| RESET CHANS | To select all channels in the current spectrum
| FLAG POINTS | To mark samples to leave out of the fit
| UNDO FLAGS | To restore all samples
| NEW FIT | To fit the unflagged spectrum samples
| |
| GOOD | To return the current fit to the outputs
| BAD | To flag this pixel in the outputs
| |
| QUIT | To terminate the current REDO ALL.
These functions allow you to omit certain spectral points from the fit
in the hopes of getting a better fit. The CHAN RANGE option allows
you to see the samples more clearly in a crowded spectrum display. The
channel range is used in FLAG POINTS but all channels are used in the
NEW FIT. If that fit fails for any reason including the limits in DPARM
and CPARM, the flagged samples will be unflagged. You have the choice
to assert BAD to flag the pixel, GOOD to keep the original fit, or to
try again with different flagging.