star-line

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

sln-get.1 (7905B)


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