sln-get.1 (5861B)
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 6, 2026 19 .Dt SLN-GET 1 20 .Os 21 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 22 .Sh NAME 23 .Nm sln-get 24 .Nd data accessor of a tree used to sample lines by importance 25 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 26 .Sh SYNOPSIS 27 .Nm 28 .Op Fl hlmnrv 29 .Op Fl L Ar nlevels 30 .Op Fl R Ar nlevels 31 .Op Fl w Ar wavenumber 32 .Op Ar tree 33 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 34 .Sh DESCRIPTION 35 .Nm 36 prints on the standard output the data of a 37 .Ar tree , 38 built by 39 .Xr sln-build 1 , 40 in order to speed up the importance sampling of spectral lines. 41 If no structure is defined as an input argument, the 42 .Ar tree 43 is read on the 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 The data for a node can be printed 53 .Pq options Fl m , Fl n , No and Fl w . 54 By default, the node for which information is displayed is the root 55 node. 56 The caller can select another node by visiting the tree using the 57 traversal options 58 .Pq options Fl L , Fl l , Fl R No and Fl r . 59 .Pp 60 The options are as follows: 61 .Bl -tag -width Ds 62 .\"""""""""""""""""""""""""""""""""" 63 .It Fl h 64 Display short help and exit. 65 .\"""""""""""""""""""""""""""""""""" 66 .It Fl L Ar nlevels 67 Descend the tree by visiting the left child of the nodes traversed up to 68 .Ar nlevels 69 times. 70 The traversal of the tree stops when the number of levels traversed is 71 reached or when one of the nodes visited is a leaf. 72 The node at which the traversal stopped then becomes the current node. 73 .\"""""""""""""""""""""""""""""""""" 74 .It Fl l 75 Visit the left child of the current node. 76 This is a shortcut for the 77 .Fl L Ns Ar 1 78 option. 79 The current node then becomes this left child. 80 If the node has no left child, i.e., if it is a leaf, then the current 81 node is not updated. 82 .\"""""""""""""""""""""""""""""""""" 83 .It Fl R Ar nlevels 84 Descend the tree by visiting the right child of the nodes traversed up 85 to 86 .Ar nlevels 87 times. 88 This option behaves in the same way as the 89 .Fl L 90 option, but here for the right child of the nodes, instead of their left 91 child. 92 .\"""""""""""""""""""""""""""""""""" 93 .It Fl r 94 Query the right child of the current node. 95 This option behaves in the same way as the 96 .Fl l 97 option, but here for the right child of the node, instead of the left 98 child. 99 .\"""""""""""""""""""""""""""""""""" 100 .It Fl m 101 Prints the mesh of the current node, i.e. the mesh representing the high 102 resolution spectrum of all the lines it structures. 103 .Pp 104 The output data is a list of mesh vertices, in plain text, where each 105 line represents the two values of a mesh vertex, separated by a space: 106 its wavenumber in cm^-1, and its associated spectrum value. 107 .\"""""""""""""""""""""""""""""""""" 108 .It Fl n 109 Displays the description of the current node, i.e., its level relative to 110 the root, the number of lines it partitions, and the number of mesh 111 vertices used to represent them at the node's hierarchical level. 112 .\"""""""""""""""""""""""""""""""""" 113 .It Fl v 114 Make 115 .Nm 116 verbose. 117 Multiple 118 .Fl v 119 options increase the verbosity. 120 The maximum is 3. 121 .\"""""""""""""""""""""""""""""""""" 122 .It Fl w Ar wavenumber 123 Calculate the spectrum value of the current node at the given 124 .Ar wavenumber 125 in cm^-1. 126 Both the actual spectrum value, calculated from the lines that the node 127 partitions, and the estimated value from its mesh are printed. 128 The output format is as follows: 129 .Bd -literal -offset Ds 130 "ka(%e) = %e ~ %e\en", wavenumber, ka_node, ka_mesh 131 .Ed 132 .El 133 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 134 .Sh EXIT STATUS 135 .Ex -std 136 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 137 .Sh EXAMPLES 138 Display the description of a tree: 139 .Bd -literal -offset Ds 140 sln-get tree.sln 141 .Ed 142 .\"""""""""""""""""""""""""""""""""" 143 .Pp 144 Print the description of the child left of the tree root: 145 .Bd -literal -offset Ds 146 sln-get -ln tree.sln 147 .Ed 148 .\"""""""""""""""""""""""""""""""""" 149 .Pp 150 Print the description of one of the grandchildren of the root of the 151 tree, in this case the right child of its left child: 152 .Bd -literal -offset Ds 153 sln-get -lrn tree.sln 154 .Ed 155 .\"""""""""""""""""""""""""""""""""" 156 .Pp 157 Descend the tree by first visiting the three left children of the first 158 three levels of the tree 159 .Pq option Fl L Ns Ar 3 , 160 then the right child 161 .Pq option Fl r , 162 and finally the left child 163 .Pq option Fl l 164 of the next two levels. 165 Then output the mesh of the node reached 166 .Pq option Fl m 167 and save it to the 168 .Pa mesh.txt 169 file: 170 .Bd -literal -offset Ds 171 sln-get -L3 -rl -m tree.sln > mesh.txt 172 .Ed 173 .\"""""""""""""""""""""""""""""""""" 174 .Pp 175 Print the spectrum value at 50 cm^-1 for one of the great-grandchildren 176 of the root: 177 .Bd -literal -offset Ds 178 sln-get -L3 -w 50 tree.sln 179 .Ed 180 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 181 .Sh SEE ALSO 182 .Xr sln-build 1