commit cdcf1498af81f88763be76d33edf22e4888d933c
parent 4a6a75527094bdce3c38633999cd0faf304cfa4b
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Thu, 19 Mar 2026 16:57:03 +0100
sln-slab: complete the manual page
Document the utility's output and add an example.
Diffstat:
2 files changed, 42 insertions(+), 3 deletions(-)
diff --git a/doc/sln-slab.1 b/doc/sln-slab.1
@@ -15,7 +15,7 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program. If not, see <http://www.gnu.org/licenses/>.
-.Dd March 16, 2026
+.Dd March 19, 2026
.Dt SLN-SLAB 1
.Os
.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@@ -60,6 +60,16 @@ the structure or its use, but the computed value can also contribute to
this validation through its comparison with the result of a calculation
of the same quantity performed by another radiative transfer code.
.Pp
+The output of
+.Nm
+displays the estimated transmittance, its standard deviation, and the
+number of Monte Carlo realisations rejected due to issues encountered
+during the computation, such as numerical uncertainty.
+The displayed values are presented as follows:
+.Bd -literal -offset Ds
+"%e %e %lu\en", transmittance, std_err, rejects_count
+.Ed
+.Pp
The options are as follows:
.Bl -tag -width Ds
.\""""""""""""""""""""""""""""""""""
@@ -106,7 +116,7 @@ The default value is 1.
Advice on the number of threads to use.
By default,
.Nm
-uses many threads as processor cores.
+uses as many threads as processor cores.
.\""""""""""""""""""""""""""""""""""
.It Fl v
Make
@@ -121,5 +131,34 @@ The maximum is 3.
.Sh EXIT STATUS
.Ex -std
.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+.Sh EXAMPLES
+Estimate the transmittance between 100 and 2500 cm^-1 for a slab 2
+meters thick.
+The slab consists of a homogeneous gas mixture of H2O, CO2 and CO
+molecules.
+The thermodynamic properties of the mixture, such as its pressure,
+temperature and molecular concentrations, correspond to those used to
+construct the acceleration structures with sln-build, provided as input
+arguments
+.Pq option Fl a .
+The isotopic metadata
+.Pq option Fl m
+and the list of lines
+.Pq option Fl l
+partitioned by the acceleration structure, complete the list of input
+data.
+The latter is encoded in the format generated by the
+.Xr shtr 1
+tool
+.Pq option Fl s .
+The isotopes are in HITRAN format.
+Finally, make the program as verbose as possible
+.Pq options Fl vvv .
+.Bd -literal -offset Ds
+sln-slab -S 100,2500 -T2 -a tree_H2O_CO2_CO_1atm_600K.sln \e
+ -m molparam.txt -sl H2O_CO2_CO_100-2500cm-1.shtr -vvv
+.Ed
+.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.Sh SEE ALSO
+.Xr shtr 1 ,
.Xr sln-build 1
diff --git a/src/sln_slab.c b/src/sln_slab.c
@@ -541,7 +541,7 @@ cmd_run(const struct cmd* cmd)
SE = sqrt(V/(double)accum.count);
nrejects = nrealisations - accum.count;
- printf("%g %g %lu\n", E, SE, (unsigned long)nrejects);
+ printf("%e %e %lu\n", E, SE, (unsigned long)nrejects);
exit:
delete_per_thread_rngs(cmd, rngs);