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