star-line

Structure for accelerating line importance sampling
git clone git://git.meso-star.com/star-line.git
Log | Files | Refs | README | LICENSE

sln-get.1 (7544B)


      1 .\" Copyright (C) 2022, 2026 |Méso|Star> (contact@meso-star.com)
      2 .\" Copyright (C) 2026 Université de Lorraine
      3 .\" Copyright (C) 2022 Centre National de la Recherche Scientifique
      4 .\" Copyright (C) 2022 Université Paul Sabatier
      5 .\"
      6 .\" This file is part of Star-Line.
      7 .\"
      8 .\" This program is free software: you can redistribute it and/or modify
      9 .\" it under the terms of the GNU General Public License as published by
     10 .\" the Free Software Foundation, either version 3 of the License, or
     11 .\" (at your option) any later version.
     12 .\"
     13 .\" This program is distributed in the hope that it will be useful,
     14 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
     15 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     16 .\" GNU General Public License for more details.
     17 .\"
     18 .\" You should have received a copy of the GNU General Public License
     19 .\" along with this program. If not, see <http://www.gnu.org/licenses/>.
     20 .Dd August 17, 2026
     21 .Dt SLN-GET 1
     22 .Os
     23 .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
     24 .Sh NAME
     25 .Nm sln-get
     26 .Nd data accesser for a tree built to speed up line sampling
     27 .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
     28 .Sh SYNOPSIS
     29 .Nm
     30 .Op Fl hmnsv
     31 .Op Fl c Ar child_id Ns Op : Ns Ar level_count
     32 .Op Fl d Ar level
     33 .Op Fl w Ar wavenumber
     34 .Fl i Ar lines
     35 .Fl p Ar molparams
     36 .Op Ar tree
     37 .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
     38 .Sh DESCRIPTION
     39 .Nm
     40 queries a tree constructed by
     41 .Xr sln-build 1 .
     42 If no tree is specified as an input argument, its data is read from
     43 standard input.
     44 .Pp
     45 By default,
     46 .Nm
     47 displays the description of the tree, such as the number of lines it
     48 structures, the total number of nodes, or the number of vertices used to
     49 mesh the hierarchical representation of the high-resolution spectrum it
     50 represents.
     51 .Pp
     52 .Nm
     53 can also display data specific to a particular node, such as its general
     54 description
     55 .Pq option Fl n ,
     56 the mesh of its polyline
     57 .Pq option Fl m ,
     58 or the value of the spectrum it represents
     59 .Pq options Fl w .
     60 By default, the node queried is the root node.
     61 The caller can select another node by visiting the tree using the
     62 traversal option
     63 .Pq option Fl c .
     64 .Pp
     65 Finally, the
     66 .Fl d
     67 option allows
     68 .Nm
     69 to display the description of a tree level, i.e., the number of nodes at
     70 that level and the total number of vertices in their polyline.
     71 .Pp
     72 The options are as follows:
     73 .Bl -tag -width Ds
     74 .\""""""""""""""""""""""""""""""""""
     75 .It Fl d Ar level
     76 Displays the description of the level in the tree structure,
     77 i.e., the number of nodes and the total number of vertices of their
     78 polylines.
     79 If the level provided is greater than the maximum depth of the tree,
     80 then its deepest level is queried.
     81 .\""""""""""""""""""""""""""""""""""
     82 .It Fl h
     83 Display short help and exit.
     84 .\""""""""""""""""""""""""""""""""""
     85 .It Fl i Ar lines
     86 List of lines from which the tree was built.
     87 This list is in binary format as generated by the
     88 .Xr shtr 1
     89 binary, or in plain text HITRAN format, depending on whether the
     90 .Fl s
     91 option is set or not, respectively.
     92 .\""""""""""""""""""""""""""""""""""
     93 .It Fl c Ar child_id Ns Op : Ns Ar level_count
     94 Traverse the tree downward by visiting the
     95 .Ar child_id Ns -th
     96 child of the current node.
     97 The value of
     98 .Ar child_id
     99 is between 0 and the number of children of the current node minus 1.
    100 If
    101 .Ar child_id
    102 is greater than or equal to the number of children of the node, it is
    103 truncated to the maximum value it could take.
    104 .Pp
    105 This traversal is repeated
    106 .Ar level_count
    107 times.
    108 If
    109 .Ar level_count
    110 is not provided, its default value is 1.
    111 The tree traversal stops when the specified number of levels has been
    112 reached or when one of the visited nodes is a leaf.
    113 .\""""""""""""""""""""""""""""""""""
    114 .It Fl m
    115 Prints the polyline of the current node, i.e. the mesh representing the high
    116 resolution spectrum of all the lines it structures.
    117 .Pp
    118 The output data is a list of polyline vertices, in plain text, where each
    119 line represents the two values of a polyline vertex, separated by a space:
    120 its wavenumber in cm^-1, and its associated spectrum value.
    121 .\""""""""""""""""""""""""""""""""""
    122 .It Fl n
    123 Displays the description of the current node, i.e., its level relative
    124 to the root, the number of lines it partitions, the number of polyline
    125 vertices used to represent them at the node's hierarchical level, and
    126 the number of the node's children.
    127 .\""""""""""""""""""""""""""""""""""
    128 .It Fl p Ar molparams
    129 Isotopologue metadata from which the tree was built.
    130 The data is in HITRAN format.
    131 .\""""""""""""""""""""""""""""""""""
    132 .It Fl s
    133 Specifies that input lines are formatted according to the binary format
    134 as written by the
    135 .Xr shtr 1
    136 utility, and not according to the HITRAN format.
    137 This format is more compact, allowing for faster loading of line data.
    138 .\""""""""""""""""""""""""""""""""""
    139 .It Fl v
    140 Make
    141 .Nm
    142 verbose.
    143 Multiple
    144 .Fl v
    145 options increase the verbosity.
    146 The maximum is 3.
    147 .\""""""""""""""""""""""""""""""""""
    148 .It Fl w Ar wavenumber
    149 Calculate the spectrum value of the current node at the given
    150 .Ar wavenumber
    151 in cm^-1.
    152 Both the actual spectrum value, calculated from the lines that the node
    153 partitions, and the estimated value from its polyline are printed.
    154 The output format is as follows:
    155 .Bd -literal -offset Ds
    156 "ka(%e) = %e ~ %e\en", wavenumber, ka_node, ka_polyline
    157 .Ed
    158 .El
    159 .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
    160 .Sh EXIT STATUS
    161 .Ex -std
    162 .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
    163 .Sh EXAMPLES
    164 Display the description of a tree built from the list of lines and
    165 isotopologue metadata stored in
    166 .Pa lines.par
    167 and
    168 .Pa molparams.txt ,
    169 respectively:
    170 .Bd -literal -offset Ds
    171 sln-get -i lines.par -p molparams.txt tree.sln
    172 .Ed
    173 .\""""""""""""""""""""""""""""""""""
    174 .Pp
    175 Print the description of the first child of the tree root:
    176 .Bd -literal -offset Ds
    177 sln-get -i lines.par -p molparams.txt -c0 -n tree.sln
    178 .Ed
    179 .\""""""""""""""""""""""""""""""""""
    180 .Pp
    181 Print the description of one of the tree root's grandchildren,
    182 specifically the second grandchild of its first child:
    183 .Bd -literal -offset Ds
    184 sln-get -i lines.par -p molparams.txt -c0 -c1 -n tree.sln
    185 .Ed
    186 .\""""""""""""""""""""""""""""""""""
    187 .Pp
    188 Descend the tree by first visiting the three first children of the first
    189 three levels of the tree
    190 .Pq option Fl c Ns Ar 0 : Ns Ar 3 ,
    191 then the second child
    192 .Pq option Fl c Ns Ar 1 ,
    193 and finally the third child
    194 of the next two levels
    195 .Pq option Fl c Ns Ar 2 : Ns Ar 2 .
    196 Then output the polyline of the node reached
    197 .Pq option Fl m
    198 and save it to the
    199 .Pa polyline.txt
    200 file:
    201 .Bd -literal -offset Ds
    202 sln-get -i lines.par -p molparams.txt -c0:3 -c1 -c2:2 -m tree.sln \e
    203   > polyline.txt
    204 .Ed
    205 .\""""""""""""""""""""""""""""""""""
    206 .Pp
    207 Print the spectrum value at 50 cm^-1 for one of the great-grandchildren
    208 of the root:
    209 .Bd -literal -offset Ds
    210 sln-get -i lines.par -p molparams.txt -c0:3 -w 50 tree.sln
    211 .Ed
    212 .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
    213 .Sh SEE ALSO
    214 .Xr shtr 1 ,
    215 .Xr sln-build 1
    216 .Rs
    217 .%T The HITRAN Database
    218 .%U https://hitran.org/
    219 .Re
    220 .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
    221 .Sh STANDARDS
    222 .Rs
    223 .%A L.S. Rothman et al.
    224 .%T The HITRAN2012 molecular spectroscopic database
    225 .%J Journal of Quantitative Spectroscopy & Radiative Transfer
    226 .%V 130
    227 .%P pp. 4\(en50
    228 .%D 2013
    229 .Re
    230 .Pp
    231 .Rs
    232 .%A L.S. Rothman et al.
    233 .%T HITEMP, the high-temperature molecular spectroscopic database
    234 .%J Journal of Quantitative Spectroscopy & Radiative Transfer
    235 .%V 111
    236 .%P pp. 2139\(en2150
    237 .%D 2010
    238 .Re