This HTML automatically generated with rman for NEMO
Table of Contents

Name

lineid - spectral line ID tool

Synopsis

lineid in=file [parameter=value]

Description

lineid is a tool that helps with converting between frequencies and doppler velocities, as well as identifying lines when the rest frequency can be derived.

lineid currently operates in three modes:


1. For a given doppler velocity (vel=) and an input list of sky frequencies, the rest frequencies are calculated, and if a linelist is given, a lineid is attempted. This will be useful for multiple spectral lines in a given object.


2. For a given rest frequency (restfreq=) and an input list of sky frequencies, their doppler shifts are calculated in a variety of conventions (radio, relativistic, optical, and z). This will be useful for a large field of view where always the same line (e.g. HI) is detected in many sources at different cosmological distances.


3. For a given restfreq= and an input list of velocities (now with xunit=km/s), the rest frequencies of the other lines are computed, and a lineid can be attempted. The first velocity in the list needs to match the given rest frequency This is probably a rare case, as spectra typically originate in frequency, not doppler velocity.


4. For given vel= and list of velocities there is no practical application? It can probably be run as mode 3.

In cases 1. and 3. a lineid can be attempted if a line list is supplied using linelist=. See LINELIST below for examples of line lists.

lineid can also attempt to find the strongest peak in a spectrum if both the X and Y columns are given, but tabpeak(1NEMO) is probably a better feed into lineid.

More sophisticated algorithms for lineid can be found in ADMIT’s LineID task, in particular dealing with multiple "spectra" derived from a fits cube.

Parameters

The following parameters are recognized in order; they may be given in any order if the keyword is also given. Use --help to confirm this man page is up to date.
in=file
Input file name, in ASCII table(5NEMO) format. The number of columns will depend on which of the xcol,ycol,dycol is used.
No default.
xcol=x-column
X coordinate column, representing the frequency or wavelength axis. Units are GHz, unless specified with the xunit keyword. The X column is always required.
[1]
ycol=y-column
Y coordinate column, reprepenting an intensity. If not used, the xcol is assumed to have the already determined values of the lines to be identified or converted to doppler velocities.
By default not used.
dxcol=x-err-column
Errors in the X coordnates. Only makes sense if no ycol is given. Not implemented yet.
By default not used.
xunit=
X axis unit. Currently only GHz and km/s are supported.
[GHz]
vel=[#[,unit]]
Redshift of object, in km/s. Optional unit added, e.g. vel=1.2,z. As for unit, only km/s and the dimensionless z are allowed.
Not set by default. If a value is given, the unit defaults to km/s.
restfreq=
If line is known, give rest frequency in xunit (only GHz supported now). In a future version restwave= might be supported.
Not set by default.
linelist=
Table with frequencies and line names. There is a simple list in $NEMODAT/z_lines.list with some common high-Z lines.
Not set by default.
dv=
Slop (in km/s) allowed in identifying lines. Negative values will use nearest neighbor and report the dv.
[10]
clip=
Do not fit peaks in the spectrum below this clip level.
Default: not used
veldef=RAD|OPT|REL
Mode of velocity axis. Radio, Relativistic, or Optical are supported.
[OPT]

Caveats

The code was developed with frequency in mind, only GHz and km/s are supported. Wavelength is planned.

Looks for a single emission line in the strongest peak.. May not work for absorption lines yet, or use tabpeak(1NEMO) if multiple lines are needed. See EXAMPLES below.

Although different doppler conventions are supported, coordinate frames are ignored.

Examples

The following three example generates a spectrum from a random table of 115 values, smoothes by 10 channels to create a handful of peaks and investigates the strongest peak, which happens to be near 40 "GHz". The frequencies are labeled 0 to 114 in steps of 1 GHz.

#> mode 1.
tabgen - 115 1 2 123 | tabsmooth - 1 12 10,5 |\
lineid - 0 1 vel=1.872,z dv=200 linelist=$NEMODAT/z_lines.list
### nemo Debug[0]: Vrad=195408 Vrel=234961 Vopt=561211 z=1.872
### nemo Debug[0]: Found 23 lines in the linelist=/home/teuben/teunix/nemo/data/z_lines.list
# There are 1 restfreq’s to identify:
# Commented lines do not fall within dv=200 km/s
# guess ID LINE dFreq deltaV NAME
# GHz Ghz GHz km/s
115.230827 2 115.271202 0.040375 105.006 CO(1-0)

#> mode 2.
tabgen - 115 1 2 123 | tabsmooth - 1 12 10,5 | tabpeak - 0 1 |\
lineid - restfreq=115
# restfreq=115
# SkyFreq Vrad Vrel Vopt z
# GHz km/s km/s km/s
29.914 221810 261794 852717 2.84436
40.1222 195198 234729 559487 1.86625
72.1352 111744 130493 178145 0.594229

#> mode 3.
tabgen - 115 1 2 123 | tabsmooth - 1 12 10,5 | tabpeak - 0 1 |\
lineid - restfreq=115 xunit=km/s
### nemo Debug[0]: Reading 2 column(s)
# There are 3 restfreq’s to identify: (use linelist= to find their names)
115.000000
114.996085
114.983808

and here some examples with no input spectrum. Only xcol= is needed:

#> mode 1.
echo 1.397105 | lineid - vel=5000
### nemo Debug[0]: Vrad=4917.98 Vrel=4958.31 Vopt=5000 z=0.0166782
# There are 1 restfreq’s to identify: (use linelist= to find their names)
1.420406

#> mode 2.
nemoinp 1.397105,1.1 | lineid - restfreq=1.420405751786
# restfreq=1.42041
# SkyFreq Vrad Vrel Vopt z
# GHz km/s km/s km/s
1.39711 4916.83 4957.14 4998.81 0.0166742
1.1 67625.2 75009.8 87322.9 0.291278

#> mode 3.
echo 5000 | lineid - restfreq=1.420405751786 xunit=km/s
### nemo Debug[1]: 0a: Line at 5000.000000 km/s has skyfreq 1.397105 restfreq 1.420406
# There are 1 restfreq’s to identify: (use linelist= to find their names)
1.420406

An contrived example of the CO(1-0) and CO(2-1) lines from the CO ladder, deliberately doppler shifted a bit by 300 km/s (give or take):

#> mode 1.
nemoinp 110.092,115.155,220.179,230.308 |\
lineid - linelist=$NEMODAT/z_lines.list vel=300 dv=2.5
### nemo Debug[0]: Vrad=299.7 Vrel=299.85 Vopt=300 z=0.00100069
### nemo Debug[0]: Found 23 lines in the listlist /home/teuben/NEMO/nemo/data/z_lines.list
# There are 4 restfreq’s to identify:
# guess ID LINE dFreq deltaV NAME
# GHz Ghz GHz km/s
110.202168 1 110.201354 0.000814 -2.21418 13CO(1-0)
# 115.270235 2 115.271202 0.000967 2.51514 CO(1-0)
220.399331 3 220.398680 0.000651 -0.886089 13CO(2-1)
230.538467 4 230.538000 0.000467 -0.607859 CO(2-1)

Here an example of detected lines in velocity space and deriving their restfreq’s. The first line in the list will be the one belonging to the known restfreq of CO(1-0), and was detected at -20 km/s. But there was a weak line at -312 km/s with unknown identification. To find what line this is, We need to find the rest frequency and then a lineid. In the example we only grab the restfreq’s.

#> mode 3.
nemoinp -20,-310 | lineid - restfreq=115.2712018 xunit=km/s
# There are 2 restfreq’s to identify: (use linelist= to find names)
115.271202
115.382823

There is indeed a known SiC2,v=0 line at 115.382367 GHz.

Compare different doppler conventions (veldef)

#> mode 1.
echo 0 | lineid - vel=5000 veldef=rel
### nemo Debug[0]: rad=4958.99 rel=5000 opt=5042.4 z=0.0168196

Linelist

The input linelist is a very simple ascii table of (frequency,name). There are many sources for a linelist, we mention a few:
1. $NEMO/data/z_lines.list : common high-Z lines, from HI at 1.4GHz upwards
2. ADMIT’S has a few in $ADMIT/etc/*list
3. Splatalogue at https://www.splatalogue.online/
4. Astroquery:   https://astroquery.readthedocs.io/en/latest/nist/nist.html
and
   https://astroquery.readthedocs.io/en/latest/atomic/atomic.html

See Also

tablsqfit(1NEMO) , tabpeak(1NEMO) , tabpp(1NEMO) , ccdsky(1NEMO) , table(5NEMO)

admit::LineID_AT()

Author

Peter Teuben

Update History


13-dec-2024    0.1 Draft created    PJT
3-jul-2025    0.3 add mode=    PJT
15-jan-2026    0.4 added simple nearest neighbor line_id    PJT
16-jan-2026    0.5 implemented veldef=        PJT
17-jan-2026    0.6 mode= deprecated    PJT
18-jan-2026    0.7 removed never used keywords        PJT


Table of Contents