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.
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.
#> 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
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
admit::LineID_AT()
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