schiff

Estimate the radiative properties of soft particless
git clone git://git.meso-star.com/schiff.git
Log | Files | Refs | README | LICENSE

commit c39b441416d061d66d5358627d120b9d4cd31d60
parent 9b1c58323b26e9646f8dc9676b7aba1ad0c06b5a
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed, 20 May 2026 11:03:38 +0200

Merge branch 'release_0.5'

Diffstat:
M.gitignore | 15+++++++--------
AMakefile | 136+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
MREADME.md | 85++++++++++++++++++++++++++++++++++++++++++++-----------------------------------
Dcmake/CMakeLists.txt | 140-------------------------------------------------------------------------------
Dcmake/LibYAMLConfig.cmake | 45---------------------------------------------
Aconfig.mk | 91+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mdoc/schiff-geometry.5 | 719++++++++++++++++++++++++++++++++++++++++++++-----------------------------------
Mdoc/schiff-output.5 | 468+++++++++++++++++++++++++++++++++++++++++++++++++------------------------------
Mdoc/schiff.1.in | 439+++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------
Msrc/schiff.c | 8++++++--
Msrc/schiff_args.c | 157+++++++++++++++++++++----------------------------------------------------------
Msrc/schiff_geometry.c | 8++++++--
Msrc/schiff_geometry.h | 8++++++--
Msrc/schiff_mesh.c | 8++++++--
Msrc/schiff_mesh.h | 8++++++--
Msrc/schiff_optical_properties.c | 8++++++--
Msrc/schiff_optical_properties.h | 8++++++--
Msrc/schiff_streambuf.h | 8++++++--
Msrc/schiff_streamline.h | 11+++++++----
Msrc/schiff_version.h.in | 8++++++--
Msrc/test_schiff_cylinder.sh | 695+++++++++++++++++++++++++++++++++++++++++++------------------------------------
Msrc/test_schiff_sphere.sh | 182++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------
22 files changed, 1852 insertions(+), 1403 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -1,11 +1,10 @@ -.gitignore -CMakeCache.txt -CMakeFiles -Makefile -tmp -[Bb]uild* +*.[aod] *.sw[po] -*.[ao] *~ +.config +.gitignore +doc/schiff.1 +src/schiff_args.h +src/schiff_version.h tags - +schiff diff --git a/Makefile b/Makefile @@ -0,0 +1,136 @@ +# Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique +# Copyright (C) 2026 Clermont Auvergne INP +# Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux +# Copyright (C) 2017, 2019-2021, 2026 |Méso|Star> (contact@meso-star.com) +# Copyright (C) 2026 Université de Lorraine +# Copyright (C) 2026 Université de Toulouse +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +.POSIX: +.SUFFIXES: # Clean up default inference rules + +include config.mk + +default: program +all: default + +################################################################################ +# Star-3D building +################################################################################ +SRC =\ + src/schiff.c\ + src/schiff_args.c\ + src/schiff_geometry.c\ + src/schiff_mesh.c\ + src/schiff_optical_properties.c +OBJ = $(SRC:.c=.o) +DEP = $(SRC:.c=.d) + +CFLAGS_PROG = $(CFLAGS) $(INCS) +LDFLAGS_PROG = $(LDFLAGS) $(LIBS) + +program: .config $(DEP) + @$(MAKE) -fMakefile $$(for i in $(DEP); do echo -f "$${i}"; done) schiff + +$(DEP): src/schiff_args.h src/schiff_version.h +$(DEP) $(OBJ): config.mk + +schiff: $(OBJ) + $(CC) $(CFLAGS_PROG) -o $@ $(OBJ) $(LDFLAGS_PROG) + +.config: config.mk + $(PKG_CONFIG) --atleast-version $(RSYS_VERSION) rsys + $(PKG_CONFIG) --atleast-version $(S3D_VERSION) s3d + $(PKG_CONFIG) --atleast-version $(SSCHIFF_VERSION) sschiff + $(PKG_CONFIG) --atleast-version $(SSP_VERSION) star-sp + $(PKG_CONFIG) --atleast-version $(YAML_VERSION) yaml-0.1 + echo "config done" > $@ + +src/schiff_args.h: src/schiff_args.h.in +src/schiff_version.h: src/schiff_version.h.in +doc/schiff.1: doc/schiff.1.in + +src/schiff_version.h src/schiff_args.h doc/schiff.1: config.mk + @sed -e 's#@SCHIFF_ARGS_DEFAULT_NINSAMPLES@#$(SCHIFF_ARGS_DEFAULT_NINSAMPLES)#g' \ + -e 's#@SCHIFF_ARGS_DEFAULT_NREALISATIONS@#$(SCHIFF_ARGS_DEFAULT_NREALISATIONS)#g' \ + -e 's#@SCHIFF_ARGS_DEFAULT_NANGLES@#$(SCHIFF_ARGS_DEFAULT_NANGLES)#g' \ + -e 's#@SCHIFF_ARGS_DEFAULT_NANGLES_INV@#$(SCHIFF_ARGS_DEFAULT_NANGLES_INV)#g' \ + -e 's#@VERSION_MAJOR@#$(VERSION_MAJOR)#g' \ + -e 's#@VERSION_MINOR@#$(VERSION_MINOR)#g' \ + -e 's#@VERSION_PATCH@#$(VERSION_PATCH)#g' \ + $@.in > $@ + +.SUFFIXES: .c .d .o +.c.d: + $(CC) $(CFLAGS_PROG) -MM -MT "$(@:.d=.o) $@" $< -MF $@ + +.c.o: + $(CC) $(CFLAGS_PROG) -c $< -o $@ + +################################################################################ +# Installation +################################################################################ +install: program doc/schiff.1 + install() { mode="$$1"; prefix="$$2"; shift 2; \ + mkdir -p "$${prefix}"; \ + cp "$$@" "$${prefix}"; \ + printf '%s\n' "$${@}" | while read -r i; do \ + chmod "$${mode}" "$${prefix}/$${i##*/}"; \ + done; \ + }; \ + install 755 "$(DESTDIR)$(BINPREFIX)" schiff; \ + install 644 "$(DESTDIR)$(MANPREFIX)/man1" doc/schiff.1; \ + install 644 "$(DESTDIR)$(MANPREFIX)/man5" doc/schiff-geometry.5; \ + install 644 "$(DESTDIR)$(MANPREFIX)/man5" doc/schiff-output.5; \ + install 644 "$(DESTDIR)$(PREFIX)/share/doc/schiff" COPYING README.md + +uninstall: + rm -f "$(DESTDIR)$(BINPREFIX)/schiff" + rm -f "$(DESTDIR)$(MANPREFIX)/man1/schiff.1" + rm -f "$(DESTDIR)$(MANPREFIX)/man5/schiff-geometry.5" + rm -f "$(DESTDIR)$(MANPREFIX)/man5/schiff-output.5" + rm -f "$(DESTDIR)$(PREFIX)/share/doc/schiff/COPYING" + rm -f "$(DESTDIR)$(PREFIX)/share/doc/schiff/README.md" + +clean: + rm -f $(OBJ) $(DEP) $(LIBNAME) + rm -f src/schiff_version.h src/schiff_args.h doc/schiff.1 + rm -f .config schiff + +lint: doc/schiff.1 + shellcheck -o all src/test_schiff_cylinder.sh + shellcheck -o all src/test_schiff_sphere.sh + mandoc -Tlint -Wwarning doc/schiff.1 + mandoc -Tlint -Wwarning doc/schiff-geometry.5 + mandoc -Tlint -Wwarning doc/schiff-output.5 + +################################################################################ +# Test +################################################################################ +test: program + @err=0; \ + run() { \ + test="$$(basename "$$1" ".sh")"; \ + printf '%s' "$${test}"; \ + if sh -c "export PATH=$${PWD}:$${PATH} && sh '$$1'" > /dev/null 2>&1; then \ + printf '\n'; \ + else \ + printf ': error %s\n' "$$?"; \ + err=$$((err+1)); \ + fi \ + }; \ + run src/test_schiff_cylinder.sh; \ + run src/test_schiff_sphere.sh; \ + [ "$${err}" -eq 0 ] diff --git a/README.md b/README.md @@ -1,57 +1,63 @@ # Schiff -The purpose of this program is to estimate the radiative properties of soft -particles with an "Approximation Method for Short Wavelength or High-Energy -Scattering" (L. Schiff, 1956). It relies on the model detailed in "Monte Carlo -Implementation of Schiff's Approximation for Estimating Radiative Properties of +The purpose of this program is to estimate the radiative properties of +soft particles with an "Approximation Method for Short Wavelength or +High-Energy Scattering" (L. Schiff, 1956). +It relies on the model detailed in "Monte Carlo Implementation of +Schiff's Approximation for Estimating Radiative Properties of Homogeneous, Simple\-Shaped and Optically Soft Particles: Application to Photosynthetic Micro-Organisms" ([Charon et al. 2015](http://www.sciencedirect.com/science/article/pii/S0022407315003283)). -## How to build +## Prerequisites +- C compiler +- POSIX make +- pkg-config +- [LibYAML](http://pyyaml.org/wiki/LibYAML), +- [RSys](https://www.meso-star.com/git/rsys) +- [Star-3D](https://www.meso-star.com/git/star-3d) +- [Star-Schiff](https://www.meso-star.com/git/star-schiff) +- [Star-SP](https://www.meso-star.com/git/star-sp) -The library relies on the [CMake](http://www.cmake.org) and the -[RCMake](https://gitlab.com/vaplv/rcmake/) package to build. It also depends -on the -[LibYAML](http://pyyaml.org/wiki/LibYAML), -[RSys](https://gitlab.com/vaplv/rsys/), -[Star-3D](https://gitlab.com/meso-star/star-3d/), -[Star-Schiff](https://gitlab.com/meso-star/star-schiff/) and -[Star-SP](https://gitlab.com/meso-star/star-sp/) libraries. +## Installation -First ensure that CMake is installed on your system. Then install the RCMake -package as well as all the aforementioned prerequisites. Then generate the -project from the `cmake/CMakeLists.txt` file by appending to the -`CMAKE_PREFIX_PATH` variable the install directories of its dependencies. +Edit config.mk as needed, then run: -## How to use - -Refer to the -[manual pages](https://gitlab.com/meso-star/schiff/tree/master/doc) -for informations on the schiff program, the list of its options and the file -formats on which it relies. + make clean install ## Release notes +### Version 0.5 + +- Replace CMake by Makefile as build system. +- Update compiler and linker flags to increase the security and + robustness of generated binaries. +- Convert the manual from man to mdoc. +- Thoroughly review the man pages to make them clearer. +- Improve the portability of test scripts by converting them from + GNU/Bash to the POSIX shell. + ### Version 0.4.2 -Sets the required version of Star-SampPling to 0.12. This version fixes -compilation errors with gcc 11 but introduces API breaks. +Sets the required version of Star-SampPling to 0.12. +This version fixes compilation errors with gcc 11 but introduces API +breaks. ### Version 0.4.1 -Displays the time spent constructing the geometric distribution, writing the -sampled geometries, and performing the calculations. +Displays the time spent constructing the geometric distribution, writing +the sampled geometries, and performing the calculations. ### Version 0.4 -- Set the minimum number of scattering angles to 2 rather than the previous - and arbitrary limit fixed to 100. +- Set the minimum number of scattering angles to 2 rather than the + previous and arbitrary limit fixed to 100. - Fix a bug in the generation of the shape of the helical pipe. - Update the short help of the command as well as the man pages. -- Add the `-D` option that discards all computations for large scattering - angles. -- Add the `--version` that prints the current version of the `schiff` command. +- Add the `-D` option that discards all computations for large + scattering angles. +- Add the `--version` that prints the current version of the `schiff` + command. ### Version 0.3.1 @@ -59,10 +65,13 @@ sampled geometries, and performing the calculations. ## License -Copyright (C) 2020, 2021 [|Meso|Star>](http://www.meso-star.com) -(<contact@meso-star.com>). -Copyright (C) 2015, 2016 CNRS. +Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique +Copyright (C) 2026 Clermont Auvergne INP +Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux +Copyright (C) 2017, 2019-2021, 2026 |Méso|Star> (contact@meso-star.com) +Copyright (C) 2026 Université de Lorraine +Copyright (C) 2026 Université de Toulouse -Schiff is free software released under the GPL v3+ license: GNU GPL version 3 -or later. You are welcome to redistribute it under certain conditions; refer to -the COPYING file for details. +Schiff is free software released under the GPL v3+ license: GNU GPL +version 3 or later. You are welcome to redistribute it under certain +conditions; refer to the COPYING file for details. diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -1,140 +0,0 @@ -# Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com) -# Copyright (C) 2015, 2016 CNRS -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -cmake_minimum_required(VERSION 3.1) -enable_testing() -project(schiff C) - -set(SCHIFF_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../src/) - -################################################################################ -# Check dependencies -################################################################################ -get_filename_component(_current_source_dir ${CMAKE_CURRENT_LIST_FILE} PATH) -set(LibYAML_DIR ${_current_source_dir}/) - -find_package(LibYAML REQUIRED) -find_package(RCMake 0.4 REQUIRED) -find_package(RSys 0.8 REQUIRED) -find_package(Star3D 0.8 REQUIRED) -find_package(StarSchiff 0.4.1 REQUIRED) -find_package(StarSP 0.12 REQUIRED) - -include_directories( - ${LibYAML_INCLUDE_DIR} - ${RSys_INCLUDE_DIR} - ${Star3D_INCLUDE_DIR} - ${StarSchiff_INCLUDE_DIR} - ${StarSP_INCLUDE_DIR} - ${CMAKE_CURRENT_BINARY_DIR}) - -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${RCMAKE_SOURCE_DIR}) -include(rcmake) -include(rcmake_runtime) - -################################################################################ -# Configure and define the targets -################################################################################ -set(VERSION_MAJOR 0) -set(VERSION_MINOR 4) -set(VERSION_PATCH 2) -set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) - -set(SCHIFF_ARGS_DEFAULT_NINSAMPLES "100") -set(SCHIFF_ARGS_DEFAULT_NREALISATIONS "10000") -set(SCHIFF_ARGS_DEFAULT_NANGLES "1000") -set(SCHIFF_ARGS_DEFAULT_NANGLES_INV "2000") - -configure_file(${SCHIFF_SOURCE_DIR}/schiff_version.h.in - ${CMAKE_CURRENT_BINARY_DIR}/schiff_version.h @ONLY) -configure_file(${SCHIFF_SOURCE_DIR}/schiff_args.h.in - ${CMAKE_CURRENT_BINARY_DIR}/schiff_args.h @ONLY) -configure_file(${PROJECT_SOURCE_DIR}/../doc/schiff.1.in - ${CMAKE_CURRENT_BINARY_DIR}/schiff.1 @ONLY) - -set(SCHIFF_FILES_SRC - schiff.c - schiff_args.c - schiff_geometry.c - schiff_mesh.c - schiff_optical_properties.c) -set(SCHIFF_FILES_INC - schiff_geometry.h - schiff_mesh.h - schiff_optical_properties.h - schiff_streamline.h) -set(SCHIFF_FILES_DOC COPYING README.md) - -# Prepend each file in the `SCHIFF_FILES_<SRC|INC|DOC>' list by the absolute -# path of the directory in which they lie -rcmake_prepend_path(SCHIFF_FILES_SRC ${SCHIFF_SOURCE_DIR}) -rcmake_prepend_path(SCHIFF_FILES_INC ${SCHIFF_SOURCE_DIR}) -rcmake_prepend_path(SCHIFF_FILES_DOC ${PROJECT_SOURCE_DIR}/../) - -set(SCHIFF_FILES_MAN1 - ${CMAKE_CURRENT_BINARY_DIR}/schiff.1) -set(SCHIFF_FILES_MAN5 - ${PROJECT_SOURCE_DIR}/../doc/schiff-geometry.5 - ${PROJECT_SOURCE_DIR}/../doc/schiff-output.5) - -if(CMAKE_COMPILER_IS_GNUCC) - set(MATH_LIB m) -endif() - -add_executable(schiff ${SCHIFF_FILES_SRC} ${SCHIFF_FILES_INC}) -target_link_libraries(schiff LibYAML RSys Star3D StarSchiff StarSP ${MATH_LIB}) -set_target_properties(schiff PROPERTIES - VERSION ${VERSION} - SOVERSION ${VERSION_MAJOR}) -rcmake_copy_runtime_libraries(schiff) - -################################################################################ -# Tests -################################################################################ -# Check that the following command exists -find_program(_bash bash) -find_program(_bc bc) -find_program(_csplit csplit) -find_program(_env env) - -if(NOT _bash OR NOT _bc OR NOT _csplit OR NOT _env) - message(WARNING "Cannot setup the bash test script") -else() - add_test( - NAME test_schiff_cylinder - COMMAND - ${_env} PATH=$ENV{PATH}:$<TARGET_FILE_DIR:schiff> - ${_bash} ${SCHIFF_SOURCE_DIR}/test_schiff_cylinder.sh) - add_test( - NAME test_schiff_sphere - COMMAND - ${_env} PATH=$ENV{PATH}:$<TARGET_FILE_DIR:schiff> - ${_bash} ${SCHIFF_SOURCE_DIR}/test_schiff_sphere.sh - WORKING_DIRECTORY ${_test_sphere_path}) -endif() - -################################################################################ -# Define output & install directories -################################################################################ -install(TARGETS schiff - ARCHIVE DESTINATION bin - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin) -install(FILES ${SCHIFF_FILES_DOC} DESTINATION share/doc/schiff) -install(FILES ${SCHIFF_FILES_MAN1} DESTINATION share/man/man1) -install(FILES ${SCHIFF_FILES_MAN5} DESTINATION share/man/man5) -rcmake_install_runtime_libraries(schiff) - diff --git a/cmake/LibYAMLConfig.cmake b/cmake/LibYAMLConfig.cmake @@ -1,45 +0,0 @@ -# Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com) -# Copyright (C) 2015-2016 CNRS -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -cmake_minimum_required(VERSION 3.1) - -# Try to find the LibYAML devel. Once done this will define: -# - LibYAML_FOUND: system has LibYAML -# - LibYAML_INCLUDE_DIR: the include directory -# - LibYAML: Link this to use LibYAML - -find_path(LibYAML_INCLUDE_DIR yaml.h) -unset(LibYAML_LIBRARY CACHE) -unset(LibYAML_LIBRARY_DEBUG CACHE) -unset(LibYAML_LIBRARY_RELWITHDEBINFO CACHE) -unset(LibYAML_LIBRARY_MINSIZEREL CACHE) -find_library(LibYAML_LIBRARY yaml DOC "Path to library yaml.") - -# Create the imported library target -if(CMAKE_HOST_WIN32) - set(_property IMPORTED_IMPLIB) -else(CMAKE_HOST_WIN32) - set(_property IMPORTED_LOCATION) -endif(CMAKE_HOST_WIN32) -add_library(LibYAML SHARED IMPORTED) -set_target_properties(LibYAML PROPERTIES ${_property} ${LibYAML_LIBRARY}) - -# Check the package -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibYAML DEFAULT_MSG - LibYAML_INCLUDE_DIR - LibYAML_LIBRARY) - diff --git a/config.mk b/config.mk @@ -0,0 +1,91 @@ +VERSION_MAJOR = 0 +VERSION_MINOR = 5 +VERSION_PATCH = 0 +VERSION = $(VERSION).$(MINOR).$(PATCH) + +PREFIX = /usr/local +BINPREFIX = $(PREFIX)/bin +MANPREFIX = $(PREFIX)/share/man + +LIB_TYPE = SHARED +#LIB_TYPE = STATIC + +BUILD_TYPE = RELEASE +#BUILD_TYPE = DEBUG + +################################################################################ +# Default argument values +################################################################################ +SCHIFF_ARGS_DEFAULT_NINSAMPLES = 100 +SCHIFF_ARGS_DEFAULT_NREALISATIONS = 10000 +SCHIFF_ARGS_DEFAULT_NANGLES = 1000 +SCHIFF_ARGS_DEFAULT_NANGLES_INV = 2000 + +################################################################################ +# Tools +################################################################################ +AR = ar +CC = cc +LD = ld +OBJCOPY = objcopy +PKG_CONFIG = pkg-config +RANLIB = ranlib + +################################################################################ +# Dependencies +################################################################################ +PCFLAGS_SHARED = +PCFLAGS_STATIC = --static +PCFLAGS = $(PCFLAGS_$(LIB_TYPE)) + +RSYS_VERSION = 0.8 +S3D_VERSION = 0.8 +SSP_VERSION = 0.12 +SSCHIFF_VERSION = 0.5 +YAML_VERSION = 0.1 + +INCS = $$($(PKG_CONFIG) $(PCFLAGS) --cflags rsys s3d star-sp sschiff yaml-0.1) +LIBS = $$($(PKG_CONFIG) $(PCFLAGS) --libs rsys s3d star-sp sschiff yaml-0.1) -lm + +################################################################################ +# Compilation options +################################################################################ +WFLAGS =\ + -Wall\ + -Wcast-align\ + -Wconversion\ + -Wextra\ + -Wmissing-declarations\ + -Wmissing-prototypes\ + -Wshadow + +CFLAGS_HARDENED =\ + -D_FORTIFY_SOURCES=2\ + -fcf-protection=full\ + -fstack-clash-protection\ + -fstack-protector-strong + +CFLAGS_COMMON =\ + -std=c89\ + -pedantic\ + -fvisibility=hidden\ + -fstrict-aliasing\ + $(CFLAGS_HARDENED)\ + $(WFLAGS) + +CFLAGS_RELEASE = -O2 -DNDEBUG $(CFLAGS_COMMON) +CFLAGS_DEBUG = -g $(CFLAGS_COMMON) +CFLAGS = $(CFLAGS_$(BUILD_TYPE)) -fPIE + +################################################################################ +# Linker options +################################################################################ +LDFLAGS_HARDENED = -Wl,-z,relro,-z,now +LDFLAGS_DEBUG = $(LDFLAGS_HARDENED) +LDFLAGS_RELEASE = -s $(LDFLAGS_HARDENED) + +LDFLAGS = $(LDFLAGS_$(BUILD_TYPE)) -pie + +OCPFLAGS_DEBUG = --localize-hidden +OCPFLAGS_RELEASE = --localize-hidden --strip-unneeded +OCPFLAGS = $(OCPFLAGS_$(BUILD_TYPE)) diff --git a/doc/schiff-geometry.5 b/doc/schiff-geometry.5 @@ -1,260 +1,343 @@ -.\" Copying and distribution of this file, with or without modification, -.\" are permitted in any medium without royalty provided the copyright -.\" notice and this notice are preserved. This file is offered as-is, -.\" without any warranty. -.TH SCHIFF-GEOMETRY 5 -.SH NAME -schiff-geometry \- control the shape of soft particles -.SH DESCRIPTION -\fBschiff-geometry\fR is a YAML file [1] that controls the geometry -distribution of soft particles. The -.BR schiff (1) -program relies on this description to generate the shape of the sampled soft +.\" Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique +.\" Copyright (C) 2026 Clermont Auvergne INP +.\" Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux +.\" Copyright (C) 2017, 2019-2021, 2026 |Méso|Star> (contact@meso-star.com) +.\" Copyright (C) 2026 Université de Lorraine +.\" Copyright (C) 2026 Université de Toulouse +.\" +.\" This program is free software: you can redistribute it and/or modify +.\" it under the terms of the GNU General Public License as published by +.\" the Free Software Foundation, either version 3 of the License, or +.\" (at your option) any later version. +.\" +.\" This program is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" 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 May 18, 2026 +.Dt SCHIFF-GEOMETRY 5 +.Os +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh NAME +.Nm schiff-geometry +.Nd control the shape of soft particles +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh DESCRIPTION +.Nm +is a plain text file format that controls the geometry distribution of soft particles. -.PP -A geometry is defined by a type and a set of parameters whose value is -controlled by a distribution. Several geometries with their own probability can -be declared in the same \fBschiff-geometry\fR file to define a discrete random -variate of geometries. This allow to finely tune the shapes of the soft -particles with a collection of geometries, each representing a specific sub-set -of shapes of the soft particles to handle. -.SH GRAMMAR -This section describes the \fBschiff\-geometry\fR grammar based on the YAML -human readable data format [1]. The YAML format provides several ways to define -a mapping or a sequence of data. The following grammar always uses the more -verbose form but any alternative YAML formatting can be used instead. Refer to -the example section for illustrations of such alternatives. -.PP -When the \fBradius_sphere\fR optional parameter is defined, the relative shape -of the geometry must be fixed, i.e. all other parameters must be constants. In -this situation, only the volume of the geometry is variable; it is equal to the -volume of an equivalent sphere whose radius is controlled by the distribution -of the \fBradius_sphere\fR parameter. -.PP -The \fBslices\fR optional attribute controls the discretization of the -geometries in triangular meshes, i.e. the number of discrete steps around 2PI. -When not defined it is assumed to be 64. Note that the \fBhelical_pipe\fR -geometry exposes 2 discretization parameters: \fBslices_circle\fR and -\fBslices_helicoid\fR. The former controls the discretization of the meridian -around 2PI while the later defines the total number of discrete steps along the -helicoid curve. When not defined \fBslices_circle\fR and \fBslices_helicoid\fR +The +.Xr schiff 1 +program relies on this description to generate the shape of the sampled +soft particles. +.Pp +A +.Nm +may contain one or more geometric shapes to be distributed +In the latter case, each geometric shape is assigned a probability such +that the set defines a discrete random variable comprising the geometric +shapes that make up the mixture. +This allow to finely tune the shapes of the soft particles with a +collection of geometries, each representing a specific sub-set of shapes +of the soft particles to handle: +.Bl -column (helical-pipe-geometry) (::=) () +.It Ao Va schiff-geometry Ac Ta ::= Ta Ao Va geometry Ac | +.Aq Va geometry-list +.It \ Ta Ta +.It Ao Va geometry-list Ac Ta ::= Ta Qo - Qc Ao Va geometry Ac +.It Ta Ta ... +.El +.Pp +A geometry is defined by its type +.Pq section Sx GEOMETRIC SHAPES +and a set of parameters whose value is controlled by a distribution +.Pq section Sx DISTRIBUTION OF PARAMETERS . +.Pp +Note that a +.Nm +file is actually a YAML file. +This format provides several ways to define a mapping or a sequence of +data. +In grammar rules, the most detailed form is always used, but it is +possible to opt for any other, more concise form instead +.Pq see section Sx EXAMPLES . +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh GEOMETRIC SHAPES +The list of supported geometric shapes are as follows: +.Bl -column (helical-pipe-geometry) (::=) () +.It Ao Va geometry Ac Ta ::= Ta Ao Va cylinder-geometry Ac +.It Ta \ | Ta Ao Va ellipsoid-geometry Ac +.It Ta \ | Ta Ao Va helical-pipe-geometrya Ac +.It Ta \ | Ta Ao Va sphere-geometry Ac +.It Ta \ | Ta Ao Va supershape-geometry Ac +.El +.Pp +Each of these geometries has an optional parameter +.Ql radius_sphere +that defines the radius of a sphere whose volume would correspond to +that of the geometry. +If defined, all other parameters of the geometric distribution must be +constant, in order to fix the shape of the geometry and allow the +.Ql radius_sphere +parameter to control only its scaling. +.Pp +There are parameters that control the discretisation of geometries. +Such as the +.Ql slices +optional parameter that defines the number of discrete steps around 2PI. +When not defined it is assumed to be 64. +Note that the +.Ql helical_pipe +geometry exposes 2 discretization parameters: +.Ql slices_circle +and +.Ql slices_helicoid . +The former controls the discretisation of the meridian around 2PI while +the later defines the total number of discrete steps along the helicoid +curve. +When not defined +.Ql slices_circle +and +.Ql slices_helicoid are set to 64 and 128, respectively. -.PP -All the geometries have the \fBproba\fR optional attribute that defines the -unnormalized probability to sample the geometry. If it is not defined, it is -assumed to be equal to 1. -.PP -.RS 4 -.nf -<schiff\-geometry> ::= <geometry> | <geometry\-list> - -<geometry\-list> ::= \- <geometry> - [ \- <geometry> ] - -<geometry> ::= <cylinder\-geometry> - | <ellipsoid\-geometry> - | <helical\-pipe\-geometry> - | <sphere\-geometry> - | <supershape\-geometry> - -<cylinder\-geometry> ::= cylinder: - radius: <distribution> - height: <distribution> - [ radius_sphere: <distribution> ] - [ slices: INTEGER ] - [ proba: REAL ] - -<ellipsoid\-geometry> ::= ellipsoid: - a: <distribution> - c: <distribution> - [ radius_sphere: <distribution> ] - [ slices: INTEGER ] - [ proba: REAL ] - -<helical\-pipe\-geometry> ::= helical_pipe: - pitch: <distribution> - height: <distribution> - radius_helicoid: <distribution> - radius_circle: <distribution> - [ radius_sphere: <distribution> ] - [ slices_helicoid: INTEGER ] - [ slices_circle: INTEGER ] - -<sphere\-geometry> ::= sphere: - radius: <distribution> - [ slices: INTEGER ] - [ proba: REAL ] - -<supershape\-geometry> ::= supershape: - formula0: <superformula> - formula1: <superformula> - [ radius_sphere: <distribution> ] - [ slices: INTEGER ] - [ proba: REAL ] - -<superformula> ::= A: <distribution> - B: <Idistribution> - M: <distribution> - N0: <distribution> - N1: <distribution> - N2: <distribution> - -\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- - -<distribution> ::= <constant> - | <gaussian> - | <histogram> - | <lognormal> - -<constant> ::= REAL - -<lognormal> ::= lognormal: - mu: REAL - sigma: REAL - -<gaussian> ::= gaussian: - mu: REAL - sigma: REAL - -<histogram> ::= histogram: - lower: REAL - upper: REAL - probabilities: - <probabilities\-list> - -<probabilities\-list> ::= \- REAL - [ \- <probabilities\-list> ] -.fi -.SH GEOMETRY TYPES -.PP -\fBcylinder\fR -.PP -.RS 4 -A cylinder is simply defined by its \fBheight\fR and a its \fBradius\fR. -.RE -.PP -\fBellipsoid\fR -.PP -.RS 4 +.Pp +All geometric shapes have the optional attribute +.Ql proba , +which defines the unnormalised probability of selecting them from the +set of geometric shapes. +If it is not defined, it is assumed to be equal to 1. +.Pp +The rest of this section describes each of the geometric shapes. +.\"""""""""""""""""""""""""""""""""" +.Ss Cylinder +A cylinder is simply defined by its +.Ql height +and a its +.Ql radius . +.Pp +Its grammar is as follows: +.Bl -column (helical-pipe-geometry) (::=) () +.It Ao Va cylinder-geometry Ac Ta ::= Ta \& Qq cylinder\&: +.It Ta Ta \& Qo \& \& radius: Qc Aq Va distribution +.It Ta Ta \& Qo \& \& height: Qc Aq Va distribution +.It Ta Ta Op Qo \& \& radius_sphere: Qc Aq Va distribution +.It Ta Ta Op Qq \& \& slices: Vt integer +.It Ta Ta Op Qq \& \& proba: Vt real +.El +.\"""""""""""""""""""""""""""""""""" +.Ss Ellipsoid The shape of an ellipsoid geometry is controlled by the length of its -semi\-principal axises \fBa\fR and \fBc\fR used to evaluate the following -equation: -.PP -.RS 8 -.nf -(x/\fBa\fR)^2 + (y/\fBa\fR)^2 + (z/\fBc\fR)^2 = 1 -.fi -.RE -.RE -.PP -\fBhelical_pipe\fR -.RS 4 -.PP -Helicoid whose meridian shape is a circle that is orthogonal to the helicoid -slope. Its \fBpitch\fR defines the width of a complete helicoid turn and its -\fBheight\fR controls the overall distance between the beginning and the end of -the helicoid. Finally, the \fBradius_helicoid\fR and the \fBradius_circle\fR +semi-principal axises +.Ql a +and +.Ql c +used to evaluate the following equation: +.Bd -literal -offset Ds +(x/a)^2 + (y/a)^2 + (z/c)^2 = 1 +.Ed +.Pp +Its grammar is as follows: +.Bl -column (helical-pipe-geometry) (::=) () +.It Ao Va ellipsoid-geometry Ac Ta ::= Ta \& Qq ellipsoid\&: +.It Ta Ta \& Qo \& \& a: Qc Aq Va distribution +.It Ta Ta \& Qo \& \& c: Qc Aq Va distribution +.It Ta Ta Op Qo \& \& radius_sphere: Qc Aq Va distribution +.It Ta Ta Op Qq \& \& slices: Vt integer +.It Ta Ta Op Qq \& \& proba: Vt real +.El +.\"""""""""""""""""""""""""""""""""" +.Ss Helical pipe +An helical pipe has a circle as a meredian shape that is orthogonal to +the helicoid slope. +Its +.Ql pitch +defines the width of a complete helicoid turn and its +.Ql height +controls the overall distance between the beginning and the end of +the helicoid. +Finally, the +.Ql radius_helicoid +and the +.Ql radius_circle defines the radius of the helicoid and the radius of its meridian, -respectively. Let "u" in [0, \fBheight\fR * 2PI / \fBpitch\fR] and "t" in [0, -2PI], the "X", "Y" and "Z" 3D coordinates of the helicoid points are computed -from the following equations: -.PP -.RS 8 -.nf +respectively. +Let +.Qq u +in +.Bq 0,height*2PI/pitch +and +.Qq t +in +.Bq 0,2PI , +the +.Qq X , +.Qq Y +and +.Qq Z +3D coordinates of the helicoid points are computed from the following +equations: +.Bd -literal -offset Ds X(t, u) = x(t)*cos(u) - y(t)*sin(u) Y(t, u) = x(t)*sin(u) + y(t)*cos(u) Z(t, u) = z(t) + c*u -.PP -x(t) = \fBradius_helicoid\fR + \fBradius_circle\fR*cos(t) -y(t) = -\fBradius_circle\fR * c / A * sin(t) -z(t) = \fBradius_circle\fR*\fBradius_helicoid\fR / A * sin(t) -.PP -c = \fBpitch\fR / 2PI -A = sqrt(\fBradius_helicoid\fR^2 + c^2) -.fi -.RE -.RE -.PP -\fBsphere\fR -.RS 4 -.PP -A sphere is simply defined by its \fBradius\fR. -.RE -.PP -\fBsupershape\fR -.RS 4 -.PP -Generalisation of the superellipsoid that is well suited to represent many -complex shapes found in the nature. It is controlled by 2 superformulas, each -defining a radius "r" for a given angle "a": -.PP -.RS 8 -.nf -r(a) = ( |cos(\fBM\fR*a/4)/\fBA\fR)|^\fBN1\fR + |sin(\fBM\fR*a/4)/\fBB\fR|^\fBN2\fR )^{-1/\fBN0\fR} -.fi -.RE -.PP -Assuming a point with the spherical coordinates {theta, phi}, the corresponding -3D coordinates onto the supershape is obtained by evaluating the following -relations: -.RS 8 -.PP -.nf +.Ed +.Pp +with: +.Bd -literal -offset Ds +x(t) = radius_helicoid + radius_circle*cos(t) +y(t) = -radius_circle * c/A*sin(t) +z(t) = radius_circle * radius_helicoid/A*sin(t) + +c = pitch/2PI +A = sqrt(Bradius_helicoid^2 + c^2) +.Ed +.Pp +Its grammar is as follows: +.Bl -column (helical-pipe-geometry) (::=) () +.It Ao Va helical-pipe-geometry Ac Ta ::= Ta \& Qq helical_pipe\&: +.It Ta Ta \& Qo \& \& pitch: Qc Aq Va distribution +.It Ta Ta \& Qo \& \& height: Qc Aq Va distribution +.It Ta Ta \& Qo \& \& radius_helicoid: Qc Aq Va distribution +.It Ta Ta \& Qo \& \& radius_circle: Qc Aq Va distribution +.It Ta Ta Op Qo \& \& radius_sphere: Qc Aq Va distribution +.It Ta Ta Op Qq \& \& slices_helicoid: Vt integer +.It Ta Ta Op Qq \& \& slices_circle: Vt integer +.El +.\"""""""""""""""""""""""""""""""""" +.Ss Sphere +A sphere is simply defined by its +.Ql radius . +.Pp +Its grammar is as follows: +.Bl -column (helical-pipe-geometry) (::=) () +.It Ao Va sphere-geometry Ac Ta ::= Ta \& Qq sphere\&: +.It Ta Ta \& Qo \& \& radius: Qc Aq Va distribution +.It Ta Ta Op Qq \& \& slices: Vt integer +.It Ta Ta Op Qq \& \& proba: Vt real +.El +.\"""""""""""""""""""""""""""""""""" +.Ss Supershape +A supershape is a generalisation of the superellipsoid that is well +suited to represent many complex shapes found in the nature. +It is controlled by 2 superformulas, each +defining a radius +.Qq r +for a given angle +.Qq a : +.Bd -literal -offset Ds +r(a) = ( |cos(M*a/4)/A)|^N1 + |sin(M*a/4)/B|^N2 )^{-1/N0} +.Ed +.Pp +Assuming a point with the spherical coordinates +.Pq theta,phi , +the corresponding 3D coordinates onto the supershape is obtained by +evaluating the following relations: +.Bd -literal -offset Ds x = r0(theta)*cos(theta) * r1(phi)*cos(phi) y = r0(theta)*sin(theta) * r1(phi)*cos(phi) z = r1(phi)*sin(phi) -.fi -.SH PARAMETER DISTRIBUTIONS -.PP -\fBconstant\fR -.RS 4 -.PP -Fixe the value of the parameter. -.RE -.PP -\fBgaussian\fR -.RS 4 -.PP -Use the following probability distribution to define the parameter according to -the mean value \fBmu\fR and the standard deviation \fBsigma\fR: -.PP -.RS 8 -.nf -P(x) dx = 1 / (\fBsigma\fR*sqrt(2*PI)) * exp(1/2*((x-\fBmu\fR)/\fBsigma\fR)^2) dx -.fi -.RE -.RE -.PP -\fBhistogram\fR -.RS 4 -.PP -Split the parameter domain [\fBlower\fR, \fBupper\fR] in \fIN\fR intervals of -length (\fBupper\fR-\fBlower\fR)/\fIN\fR. The list of unnormalized -probabilities of the interval bounds are listed in the \fBprobabilities\fR -array and are used to build the cumulative distribution of the parameter. Let a -random number "r" in [0, 1], the corresponding parameter value is computed by -retrieving the interval of the parameter from the aforementioned cumulative, -before linearly interpolating its bounds with respect to "r"; -.RE -.PP -\fBlognormal\fR -.RS 4 -.PP -Distribute the parameter with respect to a mean value \fBmu\fR and a standard -deviation \fBsigma\fR as follow: -.PP -.RS 8 -.nf -P(x) dx = 1/(log(\fBsigma\fR)*x*sqrt(2*PI) * - exp(-(ln(x)-log(\fBmu\fR))^2 / (2*log(\fBsigma\fR)^2)) dx -.fi -.SH EXAMPLES -.PP +.Ed +.Pp +Its grammar is as follows: +.Bl -column (helical-pipe-geometry) (::=) () +.It Ao Va supershape-geometry Ac Ta ::= Ta \& Qq supershape\&: +.It Ta Ta \& Qo \& \& formula0: Qc Aq Va superformula +.It Ta Ta \& Qo \& \& formula1: Qc Aq Va superformula +.It Ta Ta Op Qo \& \& radius_sphere: Qc Aq Va distribution +.It Ta Ta Op Qq \& \& slices: Vt integer +.It Ta Ta Op Qq \& \& proba: Vt real +.It Ao Va superformula Ac Ta ::= Ta \& Qo A: Qc Aq Va distribution +.It Ta Ta \& Qo B: Qc Aq Va distribution +.It Ta Ta \& Qo M: Qc Aq Va distribution +.It Ta Ta \& Qo N0: Qc Aq Va distribution +.It Ta Ta \& Qo N1: Qc Aq Va distribution +.It Ta Ta \& Qo N2: Qc Aq Va distribution +.El +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh DISTRIBUTIONS OF PARAMETERS +Supported distributions are as follows: +.Bl -column (helical-pipe-geometry) (::=) () +.It Ao Va distribution Ac Ta ::= Ta Aq Va constant +.It Ta \ | Ta Aq Va gaussian +.It Ta \ | Ta Aq Va histogram +.It Ta \ | Ta Aq Va lognormal +.El +.\"""""""""""""""""""""""""""""""""" +.Ss Constant +The constant distribution fix the value of the parameter: +.Bl -column (helical-pipe-geometry) (::=) () +.It Ao Va constant Ac Ta ::= Ta Qq Vt real +.El +.\"""""""""""""""""""""""""""""""""" +.Ss Gaussian +The gaussian distribution defines the parameter according to the mean +value +.Ql mu +and the standard deviation +.Ql sigma : +.Bl -column (helical-pipe-geometry) (::=) () +.It Ao Va gaussian Ac Ta ::= Ta Qq gaussian\&: +.It Ta Ta Qq \& \& mu: Vt real +.It Ta Ta Qq \& \& sigma: Vt real +.El +.\"""""""""""""""""""""""""""""""""" +.Ss Histogram +An histogram splits the parameter domain +.Bq lower,upper +in +.Qq N +intervals of +length +.Po upper-lower Pc Ns /N . +The unnormalized +probabilities of the interval bounds are listed in the +.Ql probabilities +array and are used to build the cumulative distribution of the +parameter. +Let a random number +.Qq r +in +.Bq 0,1 , +the corresponding parameter value is computed by retrieving the interval +of the parameter from the aforementioned cumulative, before linearly +interpolating its bounds with respect to +.Qq r . +.Pp +Its grammar is as follows: +.Bl -column (helical-pipe-geometry) (::=) () +.It Ao Va histogram Ac Ta :: Ta Qq histogram\&: +.It Ta Ta Qq \& \& lower: Vt real +.It Ta Ta Qq \& \& upper: Vt real +.It Ta Ta Qq \& \& probabilities\&: +.It Ta Ta Qq \& \& \& \& - Vt real +.It Ta Ta \& \& \& \& \& ... +.El +.\"""""""""""""""""""""""""""""""""" +.Ss Lognormal +The lognormal distribution is controlled by the mean value +.Ql mu +and the standard deviation +.Ql sigma +as follows: +.Bd -literal -offset Ds +P(x) dx = 1/(log(sigma)*x*sqrt(2*PI) * + exp(-(ln(x)-log(mu))^2 / (2*log(sigma)^2)) dx +.Ed +.Pp +Its grammar is as follows: +.Bl -column (helical-pipe-geometry) (::=) () +.It Ao Va lognormal Ac Ta ::= Ta Qq lognormal\&: +.It Ta Ta Qq \& \& mu: Vt real +.It Ta Ta Qq \& \& sigma: Vt real +.El +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh EXAMPLES Soft particles are spheres whose radius is distributed according to an histogram: -.PP -.RS 4 -.nf +.Bd -literal -offset Ds sphere: radius: histogram: @@ -266,29 +349,25 @@ sphere: - 0.4 - 1.23 - 3 -.fi -.RE -.PP +.Ed +.\"""""""""""""""""""""""""""""""""" +.Pp Soft particles are ellipsoids whose one of its semi-principal axis is distributed with respect to a lognormal distribution: -.PP -.RS 4 -.nf +.Bd -literal -offset Ds ellipsoid: a: 1.0 c: lognormal: sigma: 0.2 mu: 1.3 -.fi -.RE -.PP -Soft particles are ellipsoids whose semi\-principal axises are fixed. Its -volume is equal to the volume of an equivalent sphere whose radius follows an -histogram distribution: -.PP -.RS 4 -.nf +.Ed +.\"""""""""""""""""""""""""""""""""" +.Pp +Soft particles are ellipsoids whose semi-principal axises are fixed. +Its volume is equal to the volume of an equivalent sphere whose radius +follows an histogram distribution: +.Bd -literal -offset Ds ellipsoid: a: 1.1 b: 0.3 @@ -297,28 +376,25 @@ ellipsoid: lower: 1 upper: 2.5 probabilities: [ 0.5, 2, 1 ] -.fi -.RE -.PP -Soft particles are cylinders. Their radius is constant and their height is -distributed according to a gaussian distribution. The cylinder geometry is -discretized in 128 slices along 2PI: -.PP -.RS 4 -.nf +.Ed +.\"""""""""""""""""""""""""""""""""" +.Pp +Soft particles are cylinders. +Their radius is constant and their height is distributed according to a +gaussian distribution. +The cylinder geometry is discretized in 128 slices along 2PI: +.Bd -literal -offset Ds cylinder: slices: 128 radius: 1 height: { gaussian: { mu: 1.3, sigma: 0.84 } } -.fi -.RE -.PP -Soft particles are cylinders whose height and radius are fixed. Their volume -is equal to the volume of a sphere whose radius is distributed with respect to -an histogram: -.PP -.RS 4 -.nf +.Ed +.\"""""""""""""""""""""""""""""""""" +.Pp +Soft particles are cylinders whose height and radius are fixed. +Their volume is equal to the volume of a sphere whose radius is +distributed with respect to an histogram: +.Bd -literal -offset Ds cylinder: height: 1.2 radius: 3.4 @@ -327,16 +403,15 @@ cylinder: lower: 1.24 upper: 4.56 probabilities: [ 2, 1.2, 3, 0.2 ] -.fi -.RE -.PP +.Ed +.\"""""""""""""""""""""""""""""""""" +.Pp Soft particle are helical pipes whose attributes are controlled by several -distribution types. Their helicoid curve is split in 256 steps while its -meridian is discretized in 128 slices: -.PP -.RS 4 -.nf +distribution types. +Their helicoid curve is split in 256 steps while its meridian is +discretized in 128 slices: helical_pipe: +.Bd -literal -offset Ds slices_helicoid: 256 slices_circle: 128 height : 4 @@ -347,14 +422,12 @@ helical_pipe: lower: 1 upper: 1.5 probabilities: [ 1, 1.2, 0.2, 0.5, 1.4 ] -.fi -.RE -.PP -Soft particles are supershapes whose 2 parameters of each of its superformulas -are controlled by gaussian distributions: -.PP -.RS 4 -.nf +.Ed +.\"""""""""""""""""""""""""""""""""" +.Pp +Soft particles are supershapes whose 2 parameters of each of its +superformulas are controlled by gaussian distributions: +.Bd -literal -offset Ds supershape: formula0: A: 1 @@ -370,38 +443,44 @@ supershape: N0: 1 N1: 1 N2: { gaussian: { mu: 1, sigma: 0.3 } } -.fi -.RE -.PP -Soft particles are supershapes with the same shape. Their volume is controlled -by an equivalent sphere whose radius follows a lognormal distribution: -.PP -.RS 4 -.nf +.Ed +.\"""""""""""""""""""""""""""""""""" +.Pp +Soft particles are supershapes with the same shape. +Their volume is controlled by an equivalent sphere whose radius follows +a lognormal distribution: +.Bd -literal -offset Ds supershape: formula0: { A: 1, B: 1, M: 3, N0: 3, N1: 3, N2: 5 } formula1: { A: 2, B: 1.1, M: 3, N0: 1, N1: 1, N2: 1 } radius_sphere : { lognormal: { mu: 2.2, sigma: 1.3 } } -.fi -.RE -.PP +.Ed +.\"""""""""""""""""""""""""""""""""" +.Pp Soft particles are spheres and cylinders with 2 times more spheres than -cylinders. The cylinder parameters are controlled by lognormal distributions -and spherical soft particles have a fixed radius: -.PP -.RS 4 -.nf +cylinders. +The cylinder parameters are controlled by lognormal distributions and +spherical soft particles have a fixed radius: +.Bd -literal -offset Ds - sphere: { radius: 1.12, proba: 2.0, slices: 64 } - - cylinder: - radius: {lognormal: { sigma: 2.3, mu: 0.2 } } - height: {lognormal: { mu: 1, sigma: 1.5 } } + radius: { lognormal: { sigma: 2.3, mu: 0.2 } } + height: { lognormal: { mu: 1, sigma: 1.5 } } slices: 32 # Discretisation in 32 slices proba: 1 -.fi -.RE -.SH NOTES -.PP -[1] YAML Ain't Markup Language \- http://yaml.org -.SH SEE ALSO -.BR schiff (1) +.Ed +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh SEE ALSO +.Xr schiff 1 +.Rs +.%T YAML Ain't Markup Language +.%A Clark C. Evans et al +.%D 2009 +.%U https://yaml.org/ +.Re +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh HISTORY +.Nm +has been developed as part of +.Li ANR-11-IDEX-0002-02 +ALGUE project. diff --git a/doc/schiff-output.5 b/doc/schiff-output.5 @@ -1,183 +1,293 @@ -.\" Copying and distribution of this file, with or without modification, -.\" are permitted in any medium without royalty provided the copyright -.\" notice and this notice are preserved. This file is offered as-is, -.\" without any warranty. -.TH SCHIFF-OUTPUT 5 -.SH NAME -schiff\-output \- format of -.BR schiff (1) -results. -.SH DESCRIPTION +.\" Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique +.\" Copyright (C) 2026 Clermont Auvergne INP +.\" Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux +.\" Copyright (C) 2017, 2019-2021, 2026 |Méso|Star> (contact@meso-star.com) +.\" Copyright (C) 2026 Université de Lorraine +.\" Copyright (C) 2026 Université de Toulouse +.\" +.\" This program is free software: you can redistribute it and/or modify +.\" it under the terms of the GNU General Public License as published by +.\" the Free Software Foundation, either version 3 of the License, or +.\" (at your option) any later version. +.\" +.\" This program is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" 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 May 18, 2026 +.Dt SCHIFF-OUTPUT 5 +.Os +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh NAME +.Nm schiff-output +.Nd schiff's results format +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh DESCRIPTION The output result of the -.BR schiff (1) -program is a collection of ASCII floating point data. Each set of floating -point values are separated by an empty line. The first set is a list of per -wavelength cross\-sections. Each line stores the estimated cross\-section for a -wavelength submitted by the \fB\-w\fR option of -.BR schiff (1). -It is formatted as "W E e A a S s P p" with "W" the wavelength in vacuum -(expressed in microns), "E", "A" and "S" the estimation of the extinction, -absorption and scattering cross\-sections, respectively, in square microns per -particle, and "P" the estimated average projected area of the soft particles -expressed in square microns per particle. The "e", "a", "s" and "p" values are -the standard error of the aforementioned estimations. -.PP -Following the list of cross\-sections comes the list of phase function -descriptors. Each descriptor is a line that gives informations on the -[[inverse] cumulative] phase functions. It is formatted as "W theta-l Ws Ws-SE -Wc Wc-SE n nangles nangles\-inv" with "W" the wavelength in vacuum (expressed in -microns) of the inverse cumulative phase function, "theta-l" the scattering -angle in radians from which the phase function was analytically computed, "Ws" -and "Wc" the values of the differential cross\-section and its cumulative at -"theta-l", "n" the parameter of the model used to analytically evaluate the -phase function for large scattering angles (i.e. angles greater than "theta-l"), -"nangles" the number of scattering angles (\fB\-a\fR option of -.BR schiff (1)) -and "nangles\-inv" the number of inverse cumulative phase function values -(\fB\-A\fR option of -.BR schiff (1)). -The "Ws-SE" and "Wc-SE" values are the standard error of the "Ws" and "Wc" -estimations, respectively. -.PP -Then there is the list of phase functions, each stored as a list of lines -formatted as "A E SE" where "E" is the expected value of the phase function for -the input scattering angle "A" in radians, and "SE" its standard error. The -number of scattering angles is controlled by the \fB\-a\fR option of -.BR schiff (1). -.PP -After the phase functions come the cumulative phase functions that follow the -format of the phase functions, i.e. each cumulative phase function is a list a -lines \- one per scattering angle \- that defines the input scattering angle in -radians, followed by the expected value and the standard error of its cumulative -phase function. -.PP -Finally, there is the inverse cumulative phase functions. Each of these -functions lists a set of N probabilities in [0, 1] and its corresponding -scattering angles in [0, PI]. The number of entries of the inverse cumulative -phase functions is controlled by the \fB\-A\fR option of -.BR schiff (1). -Assuming a set of N angles, the i^th angle (i in [0, N\-1]) is the angle whose -probability is i/(N\-1). -.PP -Note that the cross sections, the phase function descriptors, the phase -functions, their cumulative and their inverse cumulative are all sorted in -ascending order with respect to their associated wavelength. -.SH GRAMMAR -The following grammar formally describes the -.BR schiff (1) -output format. -The output values are ASCII data formatted line by line. By convention, in the -following grammar the line data are listed between quote marks. The grammar may -use new lines for formatting constraints, but data are actually on the same -line while a closed quote mark is not defined. -.PP -.RS 4 -.nf -<schiff\-output> ::= <cross\-sections> - EMPTY\-LINE - <phase\-function\-descriptor> - EMPTY\-LINE - <phase\-functions> - EMPTY-LINE - <cumulative\-phase\-functions> - EMPTY\-LINE - <inverse\-cumulative\-phase\-functions> - EMPTY\-LINE - -\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- - -<cross\-sections> ::= "WAVELENGTH <extinction> <absorption> - <scattering> <area>" - [ <cross\-sections> ] - -<extinction> ::= ESTIMATION STANDARD\-ERROR -<absorption> ::= ESTIMATION STANDARD\-ERROR -<scattering> ::= ESTIMATION STANDARD\-ERROR -<area> ::= ESTIMATION STANDARD\-ERROR - -\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- - -<phase\-functions\-descriptors> - ::= "WAVELENGTH THETA <PF(THETA)> <CDF(THETA)> - N #ANGLES #INVCUM" - [ <phase\-functions\-descriptors> ] - -<CDF(THETA)> ::= ESTIMATION STANDARD\-ERROR -<PF(THETA)> ::= ESTIMATION STANDARD\-ERROR - -\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- - -<phase\-functions> ::= <function\-entries> - [ EMPTY-LINE - <phase\-functions> ] - -<cumulative\-phase\-functions> - ::= <function\-entries> - [ EMPTY-LINE - <cumulative\-phase\-functions> ] - -<function\-entries> ::= ANGLE ESTIMATION STANDARD-ERROR - [ <phase\-function\-entries> ] - -<inverse\-cumulative\-phase\-functions> - ::= <inverse\-function\-entries> - [ EMPTY-LINE - <inverse\-cumulative\-phase\-functions> ] - -<inverse\-function\-entries> - ::= PROBABILITY ANGLE - [ <inverse\-function\-entries> ] -.fi -.SH EXAMPLE +.Xr schiff 1 +program is a collection of ASCII floating point data. +Each set of floating point values are separated by an empty line. +.Bl -column (invcumul-phase-func-list) (::=) () +.It Ao Va schiff-output Ac Ta ::= Ta Aq Va cross-sections +.It Ta Ta EMPTY-LINE +.It Ta Ta Aq Va phase-func-desc +.It Ta Ta EMPTY-LINE +.It Ta Ta Aq Va phase-func-list +.It Ta Ta EMPTY-LINE +.It Ta Ta Aq Va cumul-phase-func-list +.It Ta Ta EMPTY-LINE +.It Ta Ta Aq Va invcumul-phase-func-list +.It Ta Ta EMPTY-LINE +.El +.\"""""""""""""""""""""""""""""""""" +.Ss Cross sections +The first set is a list of per wavelength cross-sections. +Each line stores the estimated cross-section for a wavelength submitted +by the +.Fl w +option of +.Xr schiff 1 . +.Pp +Its grammar is as follows: +.Bl -column (invcumul-phase-func-list) (::=) () +.It Ao Va cross-sections Ac Ta ::= Ta +.Aq Va wavelength +.Aq Va extinction +\e +.It Ta Ta +.Aq Va absorption +.Aq Va scattering +.Aq Va area +.It Ta Ta ... +.It \ Ta Ta +.It Ao Va extinction Ac Ta ::= Ta Aq Va estimation +.It Ao Va absorption Ac Ta ::= Ta Aq Va estimation +.It Ao Va scattering Ac Ta ::= Ta Aq Va estimation +.It Ao Va area Ac Ta ::= Ta Aq Va estimation +.It \ Ta Ta +.It Ao Va estimation Ac Ta ::= Ta +.Aq Va mean-value +.Aq Va standard-error +.It \ Ta Ta +.It Ao Va wavelength Ac Ta ::= Ta Vt real +.It Ao Va mean-value Ac Ta ::= Ta Vt real +.It Ao Va standard-error Ac Ta ::= Ta Vt real +.El +.Pp +A line is a set of 9 reals: a +.Ql wavelength +in vacuum +.Pq in microns , +followed by the estimations +.Pq i.e., the mean values and standard errors +of the +.Ql extinction , +.Ql absorption +and +.Ql scattering +cross-sections in square microns per particle, and finally the +estimation of the projected +.Ql area +of the soft particles, also in square microns per particle. +.\"""""""""""""""""""""""""""""""""" +.Ss Phase function descriptor +Following the list of cross-sections comes the list of phase function +descriptors. +Each descriptor is a line that gives informations on the +.Bq Bo inverse- Bc Ns cumulative +phase functions. +.Pp +Its grammar is as follows: +.Bl -column (invcumul-phase-func-list) (::=) () +.It Ao Va phase-funcs-desc Ac Ta ::= Ta +.Aq Va wavelength +.Aq Va theta +\e +.It Ta Ta +.Aq Va pf Ns Pq theta +.Aq Va cdf Ns Pq theta +\e +.It Ta Ta +.Aq Va n +.Aq Va nangles +.Aq Va nangles-inv +.It Ta Ta ... +.It \ Ta Ta +.It Ao Va pf Ns Po theta Pc Ac Ta ::= Ta Aq Va estimation +.It Ao Va cdf Ns Po theta Pc Ac Ta ::= Ta Aq Va estimation +.El +.Pp +The first value of a descriptor is the wavelength in vacuum +.Pq in microns +of the inverse cumulative phase function. +It is followed by +.Ql theta +that is the scattering angle in radians from which the phase function was +analytically computed. +Then come the estimation of the differential cross-section +.Ql pf Ns Pq theta +and its cumulative +.Ql cdf Ns Pq theta +at the angle +.Ql theta . +.Ql n +is the parameter of the model used to analytically evaluate the phase +function for large scattering angles +.Pq i.e. angles greater than Ql theta . +The last 2 values, +.Ql nangles +and +.Ql nangles-inv , +are integers that correspond to the number of scattering angles +.Pq option Fl a No of Xr schiff 1 +and the number of inverse cumulative phase function values +.Pq option Fl A No of Xr schiff 1 . +.\"""""""""""""""""""""""""""""""""" +.Ss List of phase functions +The list of phase functions contains as many phase functions as there +are wavelengths associated with the result +.Pq option Fl w No of Xr schiff 1 . +They are sorted in ascending order by their associated wavelengths. +The phase functions are separated from one another by a blank line. +.Bl -column (invcumul-phase-func-list) (::=) () +.It Ao Va phase-func-list Ac Ta ::= Ta \& \& Aq Va phase-func +.It Ta Ta [\& EMPTY-LINE +.It Ta Ta \& \& Ao Va phase-func Ac \& ] ... +.El +.Pp +A phase function is a list of lines starting with a scattering angle in +radians, followed by an estimate of the phase function's value - that +is, its mean value and standard error. +The number of scattering angles, and thus the number of lines describing +the phase function, is controlled by the +.Fl a +option of +.Xr schiff 1 . +.Bl -column (invcumul-phase-func-list) (::=) () +.It Ao Va phase-func Ac Ta ::= Ta +.Aq Va angle +.Aq Va estimation +.It Ta Ta ... +.It Ao Va angle Ac Ta ::= Ta Vt real No # \&In [0,PI] +.El +.\"""""""""""""""""""""""""""""""""" +.Ss List of cumulative phase functions +The list of cumulative phase functions is formatted in the same way as +the list of phase functions, that is, it contains as many functions as +there are wavelengths associated with the result +.Pq option Fl w No of Xr schiff 1 , +sorted in ascending order of wavelength, and separated by a blank line. +.Bl -column (invcumul-phase-func-list) (::=) () +.It Ao Va cumul-phase-func-list Ac Ta ::= Ta \& \& Aq Va cumul-phase-func +.It Ta Ta [\& EMPTY-LINE +.It Ta Ta \& \& Ao Va cumul-phase-func Ac \& ] ... +.El +.Pp +Similarly, a cumulative phase function follows the same data structure +as a phase function, namely as many lines as there are scattering angles +.Pq see the Fl a No option of Xr schiff 1 , +where each line begins with the value of the scattering angle in radians +followed by the estimate of the cumulative phase function, namely its +mean value and standard error. +.Bl -column (invcumul-phase-func-list) (::=) () +.It Ao Va cumul-phase-func Ac Ta ::= Ta +.Aq Va angle +.Aq Va estimation +.It Ta Ta ... +.El +.\"""""""""""""""""""""""""""""""""" +.Ss List of inverse cumulative phase function +The last data set consists of a list of inverse cumulative phase +functions which, like the previous function lists, contains as many +entries as there are wavelengths used in the calculation +.Pq option Fl w No of Xr schiff 1 . +The functions in this list are sorted in ascending order of these +wavelengths, and separated by a blank line. +.Bl -column (invcumul-phase-func-list) (::=) () +.It Ao Va invcumul-phase-func-list Ac Ta ::= Ta +.No \& \& Aq Va invcumul-phase-func +.It Ta Ta [\& EMPTY-LINE +.It Ta Ta \& \& Ao Va invcumul-phase-func Ac \& ] ... +.El +.Pp +Each function corresponds to a list of lines, the number of which equals +the number of scattering angles used to discretize the function +.Pq option Fl A No in Xr schiff 1 . +Each line of an inverse cumulative phase function contains two values: +the scattering angle in radians +.Pq in Bq 0,PI +and its probability, which is equal to i/(N-1) for the i^th angle +.Pq i in Bq 0,N-1 , +where N is the number of angles used to discretize the function. +.Bl -column (invcumul-phase-func-list) (::=) () +.It Ao Va invcumul-phase-func Ac Ta ::= Ta +.Aq Va angle +.Aq Va proba +.It Ta Ta ... +.It \ Ta Ta +.It Ao Va proba Ac Ta ::= Ta Vt real No # \&In [0,1] +.El +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh EXAMPLES The following output is emitted by the -.BR schiff (1) +.Xr schiff 1 program invoked on the wavelengths 0.3 and 0.6 micron. Note that actually, -.BR schiff (1) -does not write comments, i.e. text preceeded by the "#" character. However -comments are added in order to help in understanding the data layout. -.RS 4 -.PP -.nf -0.3 10.61 0.20 9.51e-3 2.37e-4 10.6 0.20 5.25 0.10 \fB# X\-sections\fR -0.6 11.15 0.25 4.76e-3 1.19e-4 11.1 0.25 5.25 0.10 \fB# X\-sections\fR -0.3 0.18 1.37 17.6 7.74 0.73 0.80 1000 2000 \fB# descriptor\fR -0.6 0.26 9.81 5.26 7.65 0.48 2.90 1000 2000 \fB# descriptor\fR -0 520.23 64.2971 \fB# Phase function (0.3 micron)\fR -0.00314474 474.315 50.6471 - ... -3.13845 0.0196258 0 -3.14159 0.0196259 0 -.PP -0 150.183 25.4822 \fB# Phase function (0.6 micron)\fR -0.00314474 145.969 23.7955 - ... -3.13845 0.00262338 0 -3.14159 0.00262338 0 -.PP -0 0 0 \fB# Cumulative (0.3 micron)\fR -0.00314474 0.0154297 0.00177366 - ... -3.13845 0.999999 0 -3.14159 1 0 -.PP -0 0 0 \fB# Cumulative (0.6 micron)\fR -0.00314474 0.00460001 0.000765182 - ... -3.13845 1 0 -3.14159 1 0 -.PP -0 0 \fB# Inverse cumulative (0.3 micron)\fR -0.00050025 0.000101956 - ... -0.9995 3.05143 -1 3.14159 -.PP -0 0 \fB# Inverse cumulative (0.6 micron)\fR -0.00050025 0.00034199 - ... -0.9995 2.89409 -1 3.14159 -.fi -.SH SEE ALSO -.BR schiff (1) +.Xr schiff 1 +does not write comments, i.e. text preceeded by the hash character +.Pq # . +The comments here are intended to help in the understanding of the data +structure. +.Bl -column -offset Ds +.It 0.3 10.61 0.20 9.51e-3 2.37e-4 10.6 0.20 5.25 0.10 Em # X-sections +.It 0.6 11.15 0.25 4.76e-3 1.19e-4 11.1 0.25 5.25 0.10 Em # X-sections +.It 0.3 0.18 1.37 17.6 7.74 0.73 0.80 1000 2000 Em # descriptor +.It 0.6 0.26 9.81 5.26 7.65 0.48 2.90 1000 2000 Em # descriptor +.It 0 520.23 64.2971 Em # Phase function (0.3 micron) +.It 0.00314474 474.315 50.6471 +.It ... +.It 3.13845 0.0196258 0 +.It 3.14159 0.0196259 0 +.It \& +.It 0 150.183 25.4822 Em # Phase function (0.6 micron) +.It 0.00314474 145.969 23.7955 +.It ... +.It 3.13845 0.00262338 0 +.It 3.14159 0.00262338 0 +.It \& +.It 0 0 0 Em # Cumulative (0.3 micron) +.It 0.00314474 0.0154297 0.00177366 +.It ... +.It 3.13845 0.999999 0 +.It 3.14159 1 0 +.It \& +.It 0 0 0 Em # Cumulative (0.6 micron) +.It 0.00314474 0.00460001 0.000765182 +.It ... +.It 3.13845 1 0 +.It 3.14159 1 0 +.It \& +.It 0 0 Em # Inverse cumulative (0.3 micron) +.It 0.00050025 0.000101956 +.It ... +.It 0.9995 3.05143 +.It 1 3.14159 +.It \& +.It 0 0 Em # Inverse cumulative (0.6 micron) +.It 0.00050025 0.00034199 +.It ... +.It 0.9995 2.89409 +.It 1 3.14159 +.El +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh SEE ALSO +.Xr schiff 1 +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh HISTORY +.Nm +has been developed as part of +.Li ANR-11-IDEX-0002-02 +ALGUE project. diff --git a/doc/schiff.1.in b/doc/schiff.1.in @@ -1,161 +1,286 @@ -.\" Copying and distribution of this file, with or without modification, -.\" are permitted in any medium without royalty provided the copyright -.\" notice and this notice are preserved. This file is offered as-is, -.\" without any warranty. -.TH SCHIFF 1 -.SH NAME -schiff \- estimate radiative properties of soft particles -.SH SYNOPSIS -.nf -\fBschiff \fR[\fIOPTIONS\fR]... [\fIFILE\fR] -.fi -.SH DESCRIPTION -\fBschiff\fR computes the radiative properties of soft particles with an -"Approximation Method for Short Wavelength or High Energy Scattering" [1]. The -implemented model is detailed in [2]. It relies on the Monte\-Carlo method to -solve Maxwell's equations within Schiff's approximation; it estimates total -cross sections (extinction, absorption and scattering cross-sections) in -addition of the inverse cumulative phase function. -.PP +.\" Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique +.\" Copyright (C) 2026 Clermont Auvergne INP +.\" Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux +.\" Copyright (C) 2017, 2019-2021, 2026 |Méso|Star> (contact@meso-star.com) +.\" Copyright (C) 2026 Université de Lorraine +.\" Copyright (C) 2026 Université de Toulouse +.\" +.\" This program is free software: you can redistribute it and/or modify +.\" it under the terms of the GNU General Public License as published by +.\" the Free Software Foundation, either version 3 of the License, or +.\" (at your option) any later version. +.\" +.\" This program is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" 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 May 15, 2026 +.Dt SCHIFF 1 +.Os +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh NAME +.Nm schiff +.Nd estimate radiative properties of soft particles +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh SYNOPSIS +.Nm +.Op Fl Dhqv +.Op Fl a Ar nangles_phase_func +.Op Fl A Ar nangles_phase_func_invcumul +.Op Fl d Ar ninner_samples +.Op Fl g Ar nrealisations +.Op Fl G Ar nparticles +.Op Fl i Ar distribution +.Op Fl l Ar particles_length +.Op Fl n Ar nthreads +.Op Fl o Ar output +.Op Fl w Ar wavelelength Ns Op : Ns Ar wavelelength No ... +.Op Ar optical_props +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh DESCRIPTION +.Nm +computes the radiative properties of soft particles with an +.Dq Approximation Method for Short Wavelength or High Energy Scattering +.Pq Schiff, 1956 . +The implemented model is detailed in +.Dq Monte Carlo Implementation of Schiff's Approximation for \ +Estimating Radiative Properties of Homogeneous, Simple-Shaped and \ +Optically Soft Particles: Application to Photosynthetic \ +Micro-Organisms +.Pq Charon et al., 2015 . +It relies on the Monte Carlo method to solve Maxwell's equations within +Schiff's approximation; it estimates total cross sections +.Pq extinction, absorption and scattering cross-sections +in addition of the inverse cumulative phase function. +.Pp The shapes of the soft particles are controlled by the -.BR schiff-geometry (5) -file submitted by the \fB\-i\fR option. The per wavelength optical properties -of the soft particles are stored in \fIFILE\fR where each line is formatted as -"W N K Ne" whith "W" is the wavelength in vacuum expressed in micron, "N" and -"K" are the real and imaginary parts, respectively, of the refractive index, -and "Ne" the refractive index of the medium. With no \fIFILE\fR, the optical -properties are read from standard input. -.PP +.Xr schiff-geometry 5 +file submitted by the +.Fl i +option. +The per wavelength optical properties +of the soft particles are stored in +.Ar optical_props +where each line is formatted as +.Dq W N K Ne +with +.Dq W +is the wavelength in vacuum expressed in micron, +.Dq N +and +.Dq K +are the real and imaginary parts, respectively, of the refractive index, +and +.Dq Ne +the refractive index of the medium. +With no +.Ar optical_props , +the optical properties are read from standard input. +.Pp The estimated results follows the -.BR schiff-output (5) -format and are written to the \fIOUTPUT\fR file or to standard ouptut whether -the \fB\-o \fIOUTPUT\fR option is defined or not, respectively. -.SH OPTIONS -.TP -.B \-a \fINUM_ANGLES\fR -number of phase function scattering angles to estimate. These angles are -uniformaly distributed in [0, PI], i.e. the value of the i^th angle, i in [0, -\fINUM_ANGLES\fR-1], is i*PI/(\fINUM_ANGLES\fR-1). Default is -@SCHIFF_ARGS_DEFAULT_NANGLES@. -.TP -.B \-A \fINUM_ANGLES\fR -number of scattering angles computed from the inverse cumulative phase -function. The value of the i^th angle, i in [0, \fINUM_ANGLES\fR-1], is -CDF^-1(i/(\fINUM_ANGLES-1\fR). Default is @SCHIFF_ARGS_DEFAULT_NANGLES_INV@. -.TP -.B \-d \fINUM_INNER_SAMPLES\fR -number of conditioned integration variable sampling (incident direction, -volume, ray(s)) for each sampled particle-shape. Default is -@SCHIFF_ARGS_DEFAULT_NINSAMPLES@. Calculation of optimal value is presented in -[3]. -.TP -.B \-D -discard computations of the [[inverse] cumulative] phase functions for large -scattering angles. See the \fB\-l\fR option for the definition of large -scattering angles. -.TP -.B \-g \fINUM_PARTICLES\fR -number of sampled particle-shapes. This is actually the number of realizations -of the Monte Carlo algorithm. Default is @SCHIFF_ARGS_DEFAULT_NREALISATIONS@. -.TP -.B \-G \fICOUNT\fR -sample \fICOUNT\fR soft particles with respect to the defined distribution, -dump their geometric data and exit. The data are written to \fIOUTPUT\fR or the -standard output whether the \fB-o\fR \fIOUTPUT\fR option is defined or not, -respectively. The outputted data followed the Alias Wavefront obj file format. -.TP -.B \-h -display short help and exit. -.TP -.B \-i \fIDISTRIBUTION\fR -define the -.BR schiff-geometry (5) +.Xr schiff-output 5 +format and are written to the +.Ar output +file or to standard ouptut whether +the +.Fl o +is defined or not, respectively. +.Pp +The options are as follows: +.Bl -tag -width Ds +.\"""""""""""""""""""""""""""""""""" +.It Fl a Ar nangles_phase_func +Number of phase function scattering angles to estimate. +These angles are +uniformaly distributed in +.Bq 0,PI , +i.e. the value of the i^th angle +.Pq i in Bq 0, Ns Ar nangles_phase_func +is +.No i*PI/ Ns Pq Ar nangles_phase_func Ns -1 . +Default is @SCHIFF_ARGS_DEFAULT_NANGLES@. +.\"""""""""""""""""""""""""""""""""" +.It Fl A Ar nangles_phase_func_invcumul +Number of scattering angles computed from the inverse cumulative phase +function. +The value of the i^th angle +.Pq i in Bq 0, Ns Ar nangles_phase_func_invcumul Ns -1 +is +.No CDF^-1 Ns Po i/ Ns Po Ar nangles_phase_func_invcumul Ns -1 Pc Pc . +Default is @SCHIFF_ARGS_DEFAULT_NANGLES_INV@. +.\"""""""""""""""""""""""""""""""""" +.It Fl d Ar ninner_samples +Number of conditioned integration variable sampling +.Pq incident direction, volume, ray Ns Pq s +for each sampled particle-shape. +Calculation of optimal value is presented in +.Dq Monte Carlo efficiency improvement by multiple sampling \ +of conditioned integration variables +.Pq Weitz et al., 2016 . +Default is @SCHIFF_ARGS_DEFAULT_NINSAMPLES@. +.\"""""""""""""""""""""""""""""""""" +.It Fl D +discard computations of the +.Bq Ns Bo inverse- Bc Ns cumulative +phase functions for large scattering angles. +See the +.Fl l +option for the definition of large scattering angles. +.\"""""""""""""""""""""""""""""""""" +.It Fl g Ar nrealisations +Number of sampled particle-shapes. +This the number of realisations of the Monte Carlo algorithm. +Default is @SCHIFF_ARGS_DEFAULT_NREALISATIONS@. +.\"""""""""""""""""""""""""""""""""" +.It Fl G Ar nparticles +Sample +.Ar nparticles +soft particles with respect to the defined distribution, dump their +geometric data and exit. +The data are written to +.Ar output +or the standard output whether the +.Fl o +option is defined or not, respectively. +The outputted data followed the Alias Wavefront obj file format. +.\"""""""""""""""""""""""""""""""""" +.It Fl h +Display short help and exit. +.\"""""""""""""""""""""""""""""""""" +.It Fl i Ar distribution +Define the +.Xr schiff-geometry 5 file that controls the geometry distribution of the soft particles. -.TP -.B \-l \fILENGTH\fR -characteristic length in micron of the soft particles. Used for the definition -of the angle that sets the limit between small and large scattering angles (see -equation. 7 in [2]). -.TP -.B \-n \fINUM_THREADS\fR -hint on the number of threads to use during the integration. By default use as -many threads as CPU cores. -.TP -.B \-o \fIOUTPUT\fR -write results to \fIOUTPUT\fR with respect to the -.BR schiff-output (5) -format. If not defined, write results to standard output. -.TP -.B \-q -do not print the helper message when no \fIFILE\fR is submitted. -.TP -.B \-w \fIW0\fR[\fB:\fIW1\fR]... -list of wavelengths in vacuum (expressed in micron) to integrate. -.TP -.B \-\-version -display version information and exit. -.SH EXAMPLES -Estimate the radiative properties of soft particles whose shape is described in -the \fBgeometry.yaml\fR file and its optical properties in the \fBproperties\fR -file. The characteristic length of the soft particle shapes is \fB2.3\fR -microns and the estimations is performed for the wavelengths \fB0.45\fR and -\fB0.6\fR microns. The results are written to the standard output: -.PP -.RS 4 -.nf -$ schiff -i geometry.yaml -l 2.3 -w 0.45:0.6 properties -.fi -.RE -.PP -The soft particles have a characteristic length of \fB1\fR and their shape is -controlled by the \fBmy_geom.yaml\fR file. Their optical properties are read -from the standard input. The estimated wavelelength is \fB0.66\fR microns and -the results are written to the \fBmy_result\fR file: -.PP -.RS 4 -.nf -$ schiff -w 0.66 -l 1.0 -i my_geom.yaml -o my_result -.fi -.RE -.PP -Sample \fB10\fR soft particles whose shape is defined by the \fBgeometry.yaml\fR -file and write their triangulated geometric data to the \fBtemp_output\fR file. +.\"""""""""""""""""""""""""""""""""" +.It Fl l Ar particles_length +Characteristic length in micron of the soft particles. +Used for the definition of the angle that sets the limit between small +and large scattering angles +.Po +see equation 7 in +.Dq Approximation for Estimating Radiative Properties of Homogeneous, \ +Simple-Shaped and Optically Soft Particles: Application to \ +Photosynthetic Micro-Organisms , +Charon et al. 2015 +.Pc . +.\"""""""""""""""""""""""""""""""""" +.It Fl n Ar nthreads +Hint on the number of threads to use during the integration. +Advice on the number of threads to use. +By default, +.Nm +uses as many threads as processor cores. +.\"""""""""""""""""""""""""""""""""" +.It Fl o Ar output +Output file. +If not defined, the results are written to standard output. +.\"""""""""""""""""""""""""""""""""" +.It Fl q +Do not print the helper message when no +.Ar optical_props +is submitted. +.\"""""""""""""""""""""""""""""""""" +.It Fl w Ar wavelelength Ns Op : Ns Ar wavelelength No ... +List of wavelengths in vacuum +.Pq expressed in micron +to integrate. +.\"""""""""""""""""""""""""""""""""" +.It Fl v +Display version information and exit. +.El +.Sh EXIT STATUS +.Ex -std +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh EXAMPLES +Estimate the radiative properties of soft particles whose shape is +described in the +.Pa geometry.yaml +file and its optical properties in the +.Pa properties +file. +The characteristic length of the soft particle shapes is 2.3 microns +and the estimations is performed for the wavelengths 0.45 and 0.6 +microns. +The results are written to the standard output: +.Bd -literal -offset Ds +schiff -i geometry.yaml -l 2.3 -w 0.45:0.6 properties +.Ed +.\"""""""""""""""""""""""""""""""""" +.Pp +The soft particles have a characteristic length of 1 and their shape is +controlled by the +.Pa my_geom.yaml +file. +Their optical properties are read from the standard input. +The estimated wavelelength is 0.66 microns and the results are written +to the +.Pa my_result +file: +.Bd -literal -offset Ds +schiff -w 0.66 -l 1.0 -i my_geom.yaml -o my_result +.Ed +.\"""""""""""""""""""""""""""""""""" +.Pp +Sample 10 +soft particles whose shape is defined by the +.Pa geometry.yaml +file and write their triangulated geometric data to the +.Pa output +file. Use the -.BR csplit (1) -Unix command to split the \fBtemp_output\fR file in 10 files named -particle<\fINUM\fR>.obj, with NUM in [0, 9], each storing the geometric data of -a sampled soft particle: -.PP -.RS 4 -.nf -$ schiff -i geometry.yaml -G 10 -o temp_output -$ csplit temp_output -z /^g\\ / {*} -f particle -b %d.obj -.fi -.RE -.PP -.SH NOTES -.PP -[1] L. I. Schiff, 1956. Approximation Method for Short Wavelength or High\-Energy -Scattering. Phys. Rev. 104 \- 1481\-1485. -.PP -[2] J. Charon, S. Blanco, J. F. Cornet, J. Dauchet, M. El Hafi, R. Fournier, M. -Kaissar Abboud, S. Weitz, 2015. Monte Carlo Implementation of Schiff's -Approximation for Estimating Radiative Properties of Homogeneous, -Simple\-Shaped and Optically Soft Particles: Application to Photosynthetic -Micro-Organisms. Journal of Quantitative Spectroscopy and Radiative Transfer -172 \- 3\-23. -.PP -[3] S. Weitz, S. Blanco, J. Charon, J. Dauchet, M. El Hafi, V. Eymet, O. -Farges, R. Fournier, and J. Gautrais, 2016. Monte Carlo efficiency -improvement by multiple sampling of conditioned integration variables. Journal -of Computational Physics 326 \- 30\-34. -.SH COPYRIGHT -Copyright \(co 2020 |Meso|Star> <contact@meso-star.com>. Copyright \(co 2015, -2016 CNRS. License GPLv3+: GNU GPL version 3 or later -<http://gnu.org/licenses/gpl.html>. This is free software: you are free to -change and redistribute it. There is NO WARRANTY, to the extent permitted by -law. -.SH SEE ALSO -.BR csplit (1), -.BR schiff-geometry (5), -.BR schiff-output (5) +.Xr csplit 1 +command to split the +.Pa output +file in 10 files named +.No particle Ns Ar N , +with +.Ar N +in +.Bq 0,9 , +each storing the geometric data of a sampled soft particle: +.Bd -literal -offset Ds +schiff -i geometry.yaml -G 10 -o output +N="$(grep -ce "^g " output)" +csplit -f particle -k -n1 output %^g\e % /^g\e / {$((N-2))} +.Ed +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh SEE ALSO +.Xr csplit 1 , +.Xr schiff-geometry 5 , +.Xr schiff-output 5 +.Rs +.%A Leonard Isaac Schiff +.%T Approximation Method for Short Wavelength or High-Energy Scattering +.%J Physical Review +.%V 104 +.%P pp. 1481\(en1485 +.%D 1956 +.Re +.Rs +.%A Julien Charon et al. +.%T Approximation for Estimating Radiative Properties of Homogeneous, \ +Simple-Shaped and Optically Soft Particles: Application to \ +Photosynthetic Micro-Organisms +.%J Journal of Quantitative Spectroscopy and Radiative Transfer +.%V 172 +.%P pp. 3\(en23 +.%D 2015 +.Re +.Rs +.%A Sebastian Weitz et al. +.%T Monte Carlo efficiency improvement by multiple sampling of \ +conditioned integration variables +.%J Journal of Computational Physics +.%V 326 +.%P pp. 30\(en34 +.%D 2016 +.Re +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh HISTORY +.Nm +has been developed as part of +.Li ANR-11-IDEX-0002-02 +ALGUE project. diff --git a/src/schiff.c b/src/schiff.c @@ -1,5 +1,9 @@ -/* Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com) - * Copyright (C) 2015, 2016 CNRS +/* Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique + * Copyright (C) 2026 Clermont Auvergne INP + * Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux + * Copyright (C) 2017, 2019-2021, 2026 |Méso|Star> (contact@meso-star.com) + * Copyright (C) 2026 Université de Lorraine + * Copyright (C) 2026 Université de Toulouse * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/schiff_args.c b/src/schiff_args.c @@ -1,5 +1,9 @@ -/* Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com) - * Copyright (C) 2015, 2016 CNRS +/* Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique + * Copyright (C) 2026 Clermont Auvergne INP + * Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux + * Copyright (C) 2017, 2019-2021, 2026 |Méso|Star> (contact@meso-star.com) + * Copyright (C) 2026 Université de Lorraine + * Copyright (C) 2026 Université de Toulouse * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -32,81 +36,28 @@ #define MIN_NANGLES 2 #define MIN_NANGLES_INV 2 -#ifdef COMPILER_CL - #include <getopt.h> - #define strtok_r strtok_s -#else - #include <unistd.h> -#endif +#include <unistd.h> /******************************************************************************* * Helper function ******************************************************************************/ static void -print_help(const char* binary) +usage(FILE* stream) { - printf( -"Usage: %s [OPTIONS] [FILE]\n" -"Estimate the radiative properties of soft particles whose per wavelength\n" -"optical properties are stored in FILE. If not defined, optical\n" -"porperties are read from standard input. Implement the model described\n" -"in \"Monte Carlo Implementation of Schiff's Approximation for Estimating\n" -"Radiative Properties of Homogeneous, Simple-Shaped and Optically Soft\n" -"Particles: Application to Photosynthetic Micro-Organisms\" (Charon et\n" -"al. 2015).\n\n", - binary); - printf( -" -a NUM_ANGLES number of phase function scattering angles.\n" -" Default is %u.\n", - SCHIFF_ARGS_NULL.nangles); - printf( -" -A NUM_ANGLES number of computed inverse cumulative phase function\n" -" values. Default is %u.\n", - SCHIFF_ARGS_NULL.nangles_inv); - printf( -" -d NUM_INSAMPS number of (incident direction, volume, ray(s)) sampling\n" -" for each sampled particle-shape. Default is %u.\n", - SCHIFF_ARGS_NULL.ninsamps); - printf( -" -D discard computations of the [[inverse] cumulative]\n" -" phase functions for large scattering angles.\n"); - printf( -" -g NUM_SHAPES number of sampled particle-shapes. This is actually the\n" -" number of realizations of the Monte Carlo algorithm.\n" -" Default is %u.\n", - SCHIFF_ARGS_NULL.nrealisations); - printf( -" -G NUM sampled `NUM' particle shapes with respect to the\n" -" defined distribution, dump their geometry and exit.\n"); - printf( -" -h display this help and exit.\n"); - printf( -" -i DISTRIB YAML file that defines the geometry distributions of\n" -" the soft particles.\n"); - printf( -" -l LENGTH characteristic length of the soft particles.\n"); - printf( -" -n NTHREADS hint on the number of threads to use during the\n" -" integration. By default use as many threads as CPU\n" -" cores.\n"); - printf( -" -o OUTPUT write results to OUTPUT. If not defined, write results\n" -" to standard output.\n"); - printf( -" -q do not print the helper message when no FILE is\n" -" submitted.\n"); - printf( -" -w A[:B]... list of wavelengths in vacuum (expressed in micron) to\n" -" integrate.\n"); - printf( -" --version display version information and exit.\n"); - printf("\n"); - printf( -"Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com).\n" -"Copyright (C) 2015, 2016 CNRS. This is free software released under the\n" -"GNU GPL license, version 3 or later. You are free to change or\n" -"redistribute it under certain conditions\n" -"<http://gnu.org/licenses/gpl.html>\n"); + fprintf(stream, +"schiff [-Dhqv] [-a nangles_phase_func] [-A nangles_phase_func_invcumul]\n" +" [-d ninner_samples] [-g nrealisations] [-G nparticles]\n" +" [-i distribution] [-l particles_length] [-n nthreads] [-o output]\n" +" [-w wavelelength[:wavelelength ...]] [optical_props]\n"); +} + +static INLINE void +print_version(void) +{ + printf("Schiff %d.%d.%d\n", + SCHIFF_VERSION_MAJOR, + SCHIFF_VERSION_MINOR, + SCHIFF_VERSION_PATCH); } static int @@ -1467,23 +1418,12 @@ schiff_args_init { int quiet = 0; int opt; - int i; res_T res = RES_OK; ASSERT(argc && argv && args); *args = SCHIFF_ARGS_NULL; - FOR_EACH(i, 1, argc) { - if(!strcmp(argv[i], "--version")) { - printf("Schiff %d.%d.%d\n", - SCHIFF_VERSION_MAJOR, - SCHIFF_VERSION_MINOR, - SCHIFF_VERSION_PATCH); - goto exit; - } - } - - while((opt = getopt(argc, argv, "a:A:d:Dg:G:hi:l:n:o:qw:")) != -1) { + while((opt = getopt(argc, argv, "a:A:d:Dg:G:hi:l:n:o:qvw:")) != -1) { switch(opt) { case 'a': res = cstr_to_uint(optarg, &args->nangles); @@ -1523,7 +1463,7 @@ schiff_args_init break; case 'G': res = cstr_to_uint(optarg, &args->ngeoms_dump); break; case 'h': - print_help(argv[0]); + usage(stderr); schiff_args_release(args); return RES_OK; case 'i': @@ -1542,6 +1482,10 @@ schiff_args_init case 'o': args->output_filename = optarg; break; case 'q': quiet = 1; break; case 'w': res = parse_wavelengths(optarg, args); break; + case 'v': + print_version(); + schiff_args_release(args); + return RES_OK; default: res = RES_BAD_ARG; break; } if(res != RES_OK) { @@ -1553,45 +1497,27 @@ schiff_args_init } } - if(args->geoms == NULL) { - fprintf(stderr, - "%s: missing geometry distribution.\nTry '%s -h' for more informations.\n", - argv[0], argv[0]); - res = RES_BAD_ARG; - goto error; - } - + #define MANDATORY(Cond, Name, Opt) { \ + if(!(Cond)) { \ + fprintf(stderr, "%s: %s missing -- option '-%c'\n", argv[0], (Name), (Opt)); \ + res = RES_BAD_ARG; \ + goto error; \ + } \ + } (void)0 + MANDATORY(args->geoms != NULL, "geometry distribution", 'i'); if(args->ngeoms_dump) goto exit; + MANDATORY(args->wavelengths != NULL, "wavelengths", 'w'); + MANDATORY(args->characteristic_length >= 0, "characteristic length", 'l'); + #undef MANDATORY - if(!args->wavelengths) { - fprintf(stderr, - "%s: missing wavelengths.\nTry '%s -h' for more informations.\n", - argv[0], argv[0]); - res = RES_BAD_ARG; - goto error; - } /* Sort the submitted wavelengths in ascending order */ qsort(args->wavelengths, sa_size(args->wavelengths), sizeof(args->wavelengths[0]), cmp_double); - if(args->characteristic_length < 0.0) { - fprintf(stderr, -"%s: missing the characteristic length.\nTry '%s -h' for more informations\n", - argv[0], argv[0]); - res = RES_BAD_ARG; - goto error; - } - if(optind == argc) { if(!quiet) { -#ifdef OS_WINDOWS - fprintf(stderr, - "Enter the optical properties. " - "Type ^Z (i.e. CTRL+z) and return to stop:\n"); -#else fprintf(stderr, "Enter the optical properties. Type ^D (i.e. CTRL+d) to stop:\n"); -#endif } res = schiff_optical_properties_load_stream(&args->properties, stdin, "stdin"); } else { @@ -1600,9 +1526,7 @@ schiff_args_init if(res != RES_OK) goto error; if(!args->properties) { - fprintf(stderr, - "%s: missing optical properties.\nTry '%s -h' for more information.\n", - argv[0], argv[0]); + fprintf(stderr, "%s: missing optical properties.\n", argv[0]); res = RES_BAD_ARG; goto error; } @@ -1610,6 +1534,7 @@ schiff_args_init exit: return res; error: + usage(stderr); schiff_args_release(args); *args = SCHIFF_ARGS_NULL; goto exit; diff --git a/src/schiff_geometry.c b/src/schiff_geometry.c @@ -1,5 +1,9 @@ -/* Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com) - * Copyright (C) 2015, 2016 CNRS +/* Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique + * Copyright (C) 2026 Clermont Auvergne INP + * Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux + * Copyright (C) 2017, 2019-2021, 2026 |Méso|Star> (contact@meso-star.com) + * Copyright (C) 2026 Université de Lorraine + * Copyright (C) 2026 Université de Toulouse * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/schiff_geometry.h b/src/schiff_geometry.h @@ -1,5 +1,9 @@ -/* Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com) - * Copyright (C) 2015, 2016 CNRS +/* Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique + * Copyright (C) 2026 Clermont Auvergne INP + * Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux + * Copyright (C) 2017, 2019-2021, 2026 |Méso|Star> (contact@meso-star.com) + * Copyright (C) 2026 Université de Lorraine + * Copyright (C) 2026 Université de Toulouse * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/schiff_mesh.c b/src/schiff_mesh.c @@ -1,5 +1,9 @@ -/* Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com) - * Copyright (C) 2015, 2016 CNRS +/* Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique + * Copyright (C) 2026 Clermont Auvergne INP + * Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux + * Copyright (C) 2017, 2019-2021, 2026 |Méso|Star> (contact@meso-star.com) + * Copyright (C) 2026 Université de Lorraine + * Copyright (C) 2026 Université de Toulouse * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/schiff_mesh.h b/src/schiff_mesh.h @@ -1,5 +1,9 @@ -/* Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com) - * Copyright (C) 2015, 2016 CNRS +/* Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique + * Copyright (C) 2026 Clermont Auvergne INP + * Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux + * Copyright (C) 2017, 2019-2021, 2026 |Méso|Star> (contact@meso-star.com) + * Copyright (C) 2026 Université de Lorraine + * Copyright (C) 2026 Université de Toulouse * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/schiff_optical_properties.c b/src/schiff_optical_properties.c @@ -1,5 +1,9 @@ -/* Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com) - * Copyright (C) 2015, 2016 CNRS +/* Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique + * Copyright (C) 2026 Clermont Auvergne INP + * Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux + * Copyright (C) 2017, 2019-2021, 2026 |Méso|Star> (contact@meso-star.com) + * Copyright (C) 2026 Université de Lorraine + * Copyright (C) 2026 Université de Toulouse * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/schiff_optical_properties.h b/src/schiff_optical_properties.h @@ -1,5 +1,9 @@ -/* Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com) - * Copyright (C) 2015, 2016 CNRS +/* Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique + * Copyright (C) 2026 Clermont Auvergne INP + * Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux + * Copyright (C) 2017, 2019-2021, 2026 |Méso|Star> (contact@meso-star.com) + * Copyright (C) 2026 Université de Lorraine + * Copyright (C) 2026 Université de Toulouse * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/schiff_streambuf.h b/src/schiff_streambuf.h @@ -1,5 +1,9 @@ -/* Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com) - * Copyright (C) 2015, 2016 CNRS +/* Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique + * Copyright (C) 2026 Clermont Auvergne INP + * Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux + * Copyright (C) 2017, 2019-2021, 2026 |Méso|Star> (contact@meso-star.com) + * Copyright (C) 2026 Université de Lorraine + * Copyright (C) 2026 Université de Toulouse * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/schiff_streamline.h b/src/schiff_streamline.h @@ -1,5 +1,9 @@ -/* Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com) - * Copyright (C) 2015, 2016 CNRS +/* Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique + * Copyright (C) 2026 Clermont Auvergne INP + * Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux + * Copyright (C) 2017, 2019-2021, 2026 |Méso|Star> (contact@meso-star.com) + * Copyright (C) 2026 Université de Lorraine + * Copyright (C) 2026 Université de Toulouse * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,7 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef SCHIFF_STREAMLINE_H -#define SHCIFF_STREAMLINE_H +#define SCHIFF_STREAMLINE_H #include <rsys/stretchy_array.h> #include <string.h> @@ -76,4 +80,3 @@ error: } #endif /* SCHIFF_STREAMLINE_H */ - diff --git a/src/schiff_version.h.in b/src/schiff_version.h.in @@ -1,5 +1,9 @@ -/* Copyright (C) 2015, 2016 CNRS - * Copyright (C) 2019 |Meso|Star> +/* Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique + * Copyright (C) 2026 Clermont Auvergne INP + * Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux + * Copyright (C) 2017, 2019-2021, 2026 |Méso|Star> (contact@meso-star.com) + * Copyright (C) 2026 Université de Lorraine + * Copyright (C) 2026 Université de Toulouse * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/test_schiff_cylinder.sh b/src/test_schiff_cylinder.sh @@ -1,6 +1,11 @@ -#!/bin/bash -# Copyright (C) 2015, 2016 CNRS -# Copyright (C) 2019 |Meso|Star> +#!/bin/sh + +# Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique +# Copyright (C) 2026 Clermont Auvergne INP +# Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux +# Copyright (C) 2017, 2019-2021, 2026 |Méso|Star> (contact@meso-star.com) +# Copyright (C) 2026 Université de Lorraine +# Copyright (C) 2026 Université de Toulouse # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,9 +20,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. */ +set -e + tmpfile=schiff_result tmppipe=schiff_pipe -tmpprefix=xxschiff nrealisations=1000 nangles=1000 @@ -31,252 +37,251 @@ sigma=1.18 R=0.837 # extinction extinction-SE absorption absorption-SE scattering scattering-SE area area-SE -references=( - "1.16026E-04 9.45526E-08 1.13812E-04 9.18322E-08 2.21384E-06 2.82025E-09 1.37239E-02 1.52125E-06" - "9.40822E-04 7.71882E-07 9.05619E-04 7.28692E-07 3.52032E-05 4.47348E-08 5.48945E-02 6.08489E-06" - "3.21730E-03 2.65641E-06 3.04018E-03 2.43947E-06 1.77116E-04 2.24508E-07 1.23512E-01 1.36909E-05" - "7.72440E-03 6.41615E-06 7.16810E-03 5.73592E-06 5.56304E-04 7.03373E-07 2.19576E-01 2.43394E-05" - "1.52758E-02 1.27606E-05 1.39261E-02 1.11131E-05 1.34971E-03 1.70216E-06 3.43087E-01 3.80302E-05" - "2.67186E-02 2.24385E-05 2.39373E-02 1.90499E-05 2.78123E-03 3.49844E-06 4.94045E-01 5.47634E-05" - "4.29318E-02 3.62361E-05 3.78116E-02 3.00096E-05 5.12017E-03 6.42370E-06 6.72450E-01 7.45390E-05" - "6.48252E-02 5.49743E-05 5.61457E-02 4.44398E-05 8.67959E-03 1.08606E-05 8.78301E-01 9.73571E-05" - "9.33382E-02 7.95073E-05 7.95235E-02 6.27738E-05 1.38147E-02 1.72400E-05 1.11160E+00 1.23217E-04" - "1.29438E-01 1.10720E-04 1.08517E-01 8.54299E-05 2.09215E-02 2.60386E-05 1.37234E+00 1.52120E-04" - "1.74119E-01 1.49525E-04 1.43684E-01 1.12813E-04 3.04347E-02 3.77758E-05 1.66054E+00 1.84065E-04" - "2.28400E-01 1.96862E-04 1.85573E-01 1.45313E-04 4.28269E-02 5.30113E-05 1.97617E+00 2.19053E-04" - "2.93325E-01 2.53696E-04 2.34719E-01 1.83309E-04 5.86064E-02 7.23425E-05 2.31926E+00 2.57083E-04" - "3.69961E-01 3.21011E-04 2.91645E-01 2.27165E-04 7.83160E-02 9.64016E-05 2.68979E+00 2.98155E-04" - "4.59396E-01 3.99816E-04 3.56865E-01 2.77233E-04 1.02531E-01 1.25854E-04 3.08777E+00 3.42270E-04" - "5.62739E-01 4.91132E-04 4.30879E-01 3.33853E-04 1.31860E-01 1.61393E-04 3.51320E+00 3.89427E-04" - "6.81116E-01 5.96001E-04 5.14178E-01 3.97355E-04 1.66938E-01 2.03742E-04 3.96607E+00 4.39627E-04" - "8.15674E-01 7.15476E-04 6.07243E-01 4.68053E-04 2.08431E-01 2.53648E-04 4.44639E+00 4.92869E-04" - "9.67574E-01 8.50622E-04 7.10542E-01 5.46255E-04 2.57033E-01 3.11882E-04 4.95415E+00 5.49153E-04" - "1.13799E+00 1.00252E-03 8.24534E-01 6.32256E-04 3.13460E-01 3.79232E-04 5.48937E+00 6.08480E-04" - "1.32813E+00 1.17224E-03 9.49670E-01 7.26339E-04 3.78455E-01 4.56509E-04 6.05203E+00 6.70849E-04" - "1.53917E+00 1.36088E-03 1.08639E+00 8.28779E-04 4.52783E-01 5.44535E-04 6.64213E+00 7.36261E-04" - "1.77235E+00 1.56954E-03 1.23512E+00 9.39839E-04 5.37230E-01 6.44150E-04 7.25969E+00 8.04715E-04" - "2.02888E+00 1.79931E-03 1.39628E+00 1.05978E-03 6.32603E-01 7.56203E-04 7.90469E+00 8.76211E-04" - "2.31001E+00 2.05129E-03 1.57029E+00 1.18883E-03 7.39725E-01 8.81552E-04 8.57713E+00 9.50750E-04" - "2.61698E+00 2.32657E-03 1.75754E+00 1.32725E-03 8.59440E-01 1.02107E-03 9.27703E+00 1.02833E-03" - "2.95104E+00 2.62624E-03 1.95844E+00 1.47525E-03 9.92605E-01 1.17562E-03 1.00044E+01 1.10895E-03" - "3.31344E+00 2.95141E-03 2.17335E+00 1.63305E-03 1.14009E+00 1.34608E-03 1.07592E+01 1.19262E-03" - "3.70546E+00 3.30314E-03 2.40267E+00 1.80087E-03 1.30279E+00 1.53333E-03 1.15414E+01 1.27933E-03" - "4.12835E+00 3.68251E-03 2.64676E+00 1.97891E-03 1.48159E+00 1.73825E-03 1.23511E+01 1.36908E-03" - "4.58338E+00 4.09060E-03 2.90597E+00 2.16735E-03 1.67741E+00 1.96171E-03 1.31882E+01 1.46187E-03" - "5.07183E+00 4.52845E-03 3.18066E+00 2.36640E-03 1.89117E+00 2.20460E-03 1.40528E+01 1.55771E-03" - "5.59497E+00 4.99711E-03 3.47118E+00 2.57622E-03 2.12379E+00 2.46776E-03 1.49448E+01 1.65659E-03" - "6.15407E+00 5.49762E-03 3.77786E+00 2.79699E-03 2.37621E+00 2.75208E-03 1.58643E+01 1.75851E-03" - "6.75039E+00 6.03099E-03 4.10102E+00 3.02889E-03 2.64937E+00 3.05839E-03 1.68112E+01 1.86347E-03" - "7.38521E+00 6.59822E-03 4.44100E+00 3.27205E-03 2.94421E+00 3.38755E-03 1.77855E+01 1.97147E-03" - "8.05979E+00 7.20030E-03 4.79810E+00 3.52665E-03 3.26169E+00 3.74039E-03 1.87873E+01 2.08252E-03" - "8.77539E+00 7.83819E-03 5.17263E+00 3.79282E-03 3.60277E+00 4.11772E-03 1.98166E+01 2.19661E-03" - "9.53327E+00 8.51284E-03 5.56489E+00 4.07070E-03 3.96838E+00 4.52037E-03 2.08733E+01 2.31374E-03" - "1.03347E+01 9.22518E-03 5.97518E+00 4.36043E-03 4.35950E+00 4.94911E-03 2.19575E+01 2.43392E-03" - "1.11809E+01 9.97612E-03 6.40378E+00 4.66214E-03 4.77708E+00 5.40474E-03 2.30690E+01 2.55714E-03" - "1.20730E+01 1.07665E-02 6.85097E+00 4.97595E-03 5.22207E+00 5.88800E-03 2.42081E+01 2.68339E-03" - "1.30125E+01 1.15973E-02 7.31703E+00 5.30197E-03 5.69542E+00 6.39965E-03 2.53746E+01 2.81270E-03" - "1.40003E+01 1.24693E-02 7.80222E+00 5.64032E-03 6.19810E+00 6.94041E-03 2.65685E+01 2.94504E-03" - "1.50378E+01 1.33832E-02 8.30681E+00 5.99110E-03 6.73103E+00 7.51098E-03 2.77899E+01 3.08043E-03" - "1.61262E+01 1.43399E-02 8.83105E+00 6.35442E-03 7.29517E+00 8.11205E-03 2.90387E+01 3.21886E-03" - "1.72666E+01 1.53402E-02 9.37519E+00 6.73037E-03 7.89146E+00 8.74428E-03 3.03150E+01 3.36033E-03" - "1.84603E+01 1.63848E-02 9.93948E+00 7.11905E-03 8.52081E+00 9.40831E-03 3.16187E+01 3.50484E-03" - "1.97083E+01 1.74744E-02 1.05241E+01 7.52055E-03 9.18416E+00 1.01048E-02 3.29499E+01 3.65240E-03" - "2.10118E+01 1.86096E-02 1.11294E+01 7.93493E-03 9.88241E+00 1.08342E-02 3.43085E+01 3.80300E-03" - "2.23720E+01 1.97912E-02 1.17556E+01 8.36230E-03 1.06165E+01 1.15973E-02 3.56946E+01 3.95664E-03" - "2.37900E+01 2.10198E-02 1.24028E+01 8.80272E-03 1.13873E+01 1.23945E-02 3.71081E+01 4.11332E-03" - "2.52669E+01 2.22959E-02 1.30712E+01 9.25625E-03 1.21956E+01 1.32263E-02 3.85490E+01 4.27305E-03" - "2.68037E+01 2.36201E-02 1.37612E+01 9.72298E-03 1.30425E+01 1.40933E-02 4.00174E+01 4.43582E-03" - "2.84016E+01 2.49931E-02 1.44729E+01 1.02030E-02 1.39287E+01 1.49959E-02 4.15133E+01 4.60163E-03" - "3.00616E+01 2.64152E-02 1.52065E+01 1.06963E-02 1.48550E+01 1.59346E-02 4.30366E+01 4.77048E-03" - "3.17846E+01 2.78869E-02 1.59622E+01 1.12029E-02 1.58225E+01 1.69097E-02 4.45873E+01 4.94237E-03" - "3.35719E+01 2.94088E-02 1.67402E+01 1.17230E-02 1.68317E+01 1.79217E-02 4.61655E+01 5.11731E-03" - "3.54243E+01 3.09811E-02 1.75407E+01 1.22566E-02 1.78836E+01 1.89710E-02 4.77712E+01 5.29529E-03" - "3.73428E+01 3.26045E-02 1.83638E+01 1.28036E-02 1.89790E+01 2.00578E-02 4.94043E+01 5.47631E-03" - "3.93284E+01 3.42790E-02 1.92098E+01 1.33643E-02 2.01186E+01 2.11824E-02 5.10648E+01 5.66038E-03" - "4.13821E+01 3.60052E-02 2.00788E+01 1.39385E-02 2.13033E+01 2.23453E-02 5.27528E+01 5.84749E-03" - "4.35047E+01 3.77833E-02 2.09710E+01 1.45264E-02 2.25337E+01 2.35465E-02 5.44682E+01 6.03764E-03" - "4.56972E+01 3.96136E-02 2.18866E+01 1.51280E-02 2.38106E+01 2.47864E-02 5.62111E+01 6.23083E-03" - "4.79604E+01 4.14962E-02 2.28257E+01 1.57432E-02 2.51347E+01 2.60651E-02 5.79814E+01 6.42706E-03" - "5.02952E+01 4.34315E-02 2.37885E+01 1.63722E-02 2.65067E+01 2.73829E-02 5.97791E+01 6.62634E-03" - "5.27025E+01 4.54196E-02 2.47751E+01 1.70150E-02 2.79274E+01 2.87397E-02 6.16044E+01 6.82866E-03" - "5.51830E+01 4.74606E-02 2.57857E+01 1.76715E-02 2.93973E+01 3.01359E-02 6.34570E+01 7.03402E-03" - "5.77375E+01 4.95546E-02 2.68205E+01 1.83419E-02 3.09171E+01 3.15714E-02 6.53371E+01 7.24243E-03" - "6.03669E+01 5.17018E-02 2.78795E+01 1.90261E-02 3.24874E+01 3.30463E-02 6.72447E+01 7.45387E-03" - "6.30719E+01 5.39023E-02 2.89630E+01 1.97242E-02 3.41089E+01 3.45606E-02 6.91797E+01 7.66836E-03" - "6.58531E+01 5.61559E-02 3.00710E+01 2.04361E-02 3.57822E+01 3.61145E-02 7.11421E+01 7.88589E-03" - "6.87114E+01 5.84628E-02 3.12037E+01 2.11619E-02 3.75077E+01 3.77077E-02 7.31320E+01 8.10647E-03" - "7.16474E+01 6.08230E-02 3.23612E+01 2.19015E-02 3.92861E+01 3.93404E-02 7.51494E+01 8.33008E-03" - "7.46617E+01 6.32362E-02 3.35437E+01 2.26551E-02 4.11179E+01 4.10124E-02 7.71941E+01 8.55674E-03" - "7.77550E+01 6.57026E-02 3.47513E+01 2.34226E-02 4.30036E+01 4.27236E-02 7.92664E+01 8.78644E-03" - "8.09278E+01 6.82220E-02 3.59841E+01 2.42040E-02 4.49438E+01 4.44740E-02 8.13661E+01 9.01918E-03" - "8.41809E+01 7.07942E-02 3.72422E+01 2.49994E-02 4.69387E+01 4.62633E-02 8.34932E+01 9.25497E-03" - "8.75147E+01 7.34190E-02 3.85257E+01 2.58086E-02 4.89890E+01 4.80915E-02 8.56478E+01 9.49380E-03" - "9.09298E+01 7.60964E-02 3.98347E+01 2.66318E-02 5.10951E+01 4.99583E-02 8.78298E+01 9.73567E-03" - "9.44268E+01 7.88261E-02 4.11695E+01 2.74689E-02 5.32573E+01 5.18635E-02 9.00392E+01 9.98058E-03" - "9.80060E+01 8.16078E-02 4.25299E+01 2.83199E-02 5.54761E+01 5.38068E-02 9.22762E+01 1.02285E-02" - "1.01668E+02 8.44413E-02 4.39163E+01 2.91849E-02 5.77517E+01 5.57881E-02 9.45405E+01 1.04795E-02" - "1.05413E+02 8.73264E-02 4.53286E+01 3.00637E-02 6.00847E+01 5.78070E-02 9.68323E+01 1.07336E-02" - "1.09242E+02 9.02627E-02 4.67669E+01 3.09565E-02 6.24752E+01 5.98633E-02 9.91516E+01 1.09907E-02" - "1.13155E+02 9.32498E-02 4.82314E+01 3.18632E-02 6.49236E+01 6.19566E-02 1.01498E+02 1.12508E-02" - "1.17152E+02 9.62875E-02 4.97222E+01 3.27838E-02 6.74302E+01 6.40865E-02 1.03872E+02 1.15139E-02" - "1.21235E+02 9.93754E-02 5.12393E+01 3.37182E-02 6.99952E+01 6.62528E-02 1.06274E+02 1.17802E-02" - "1.25402E+02 1.02513E-01 5.27829E+01 3.46665E-02 7.26189E+01 6.84550E-02 1.08703E+02 1.20494E-02" - "1.29654E+02 1.05700E-01 5.43529E+01 3.56287E-02 7.53015E+01 7.06928E-02 1.11160E+02 1.23217E-02" - "1.33993E+02 1.08936E-01 5.59496E+01 3.66048E-02 7.80432E+01 7.29657E-02 1.13643E+02 1.25970E-02" - "1.38417E+02 1.12220E-01 5.75729E+01 3.75947E-02 8.08442E+01 7.52733E-02 1.16155E+02 1.28754E-02" - "1.42928E+02 1.15553E-01 5.92230E+01 3.85984E-02 8.37046E+01 7.76152E-02 1.18694E+02 1.31568E-02" - "1.47525E+02 1.18933E-01 6.09000E+01 3.96159E-02 8.66246E+01 7.99908E-02 1.21260E+02 1.34413E-02" - "1.52208E+02 1.22360E-01 6.26039E+01 4.06472E-02 8.96044E+01 8.23998E-02 1.23854E+02 1.37288E-02" - "1.56979E+02 1.25834E-01 6.43347E+01 4.16923E-02 9.26439E+01 8.48416E-02 1.26475E+02 1.40194E-02" - "1.61836E+02 1.29353E-01 6.60926E+01 4.27512E-02 9.57432E+01 8.73157E-02 1.29123E+02 1.43130E-02" - "1.66780E+02 1.32919E-01 6.78777E+01 4.38238E-02 9.89026E+01 8.98216E-02 1.31800E+02 1.46096E-02" - "1.71812E+02 1.36529E-01 6.96899E+01 4.49101E-02 1.02122E+02 9.23587E-02 1.34503E+02 1.49093E-02" - "1.76931E+02 1.40183E-01 7.15294E+01 4.60101E-02 1.05401E+02 9.49266E-02 1.37234E+02 1.52120E-02" - "1.82137E+02 1.43881E-01 7.33962E+01 4.71238E-02 1.08740E+02 9.75247E-02 1.39992E+02 1.55177E-02" - "1.87430E+02 1.47622E-01 7.52904E+01 4.82512E-02 1.12140E+02 1.00152E-01 1.42778E+02 1.58265E-02" - "1.92811E+02 1.51406E-01 7.72121E+01 4.93922E-02 1.15599E+02 1.02809E-01 1.45592E+02 1.61384E-02" - "1.98279E+02 1.55232E-01 7.91612E+01 5.05468E-02 1.19118E+02 1.05494E-01 1.48432E+02 1.64533E-02" - "2.03835E+02 1.59099E-01 8.11380E+01 5.17150E-02 1.22697E+02 1.08207E-01 1.51300E+02 1.67712E-02" - "2.09478E+02 1.63007E-01 8.31423E+01 5.28967E-02 1.26335E+02 1.10947E-01 1.54196E+02 1.70922E-02" - "2.15208E+02 1.66954E-01 8.51743E+01 5.40921E-02 1.30033E+02 1.13714E-01 1.57119E+02 1.74162E-02" - "2.21025E+02 1.70941E-01 8.72341E+01 5.53009E-02 1.33791E+02 1.16507E-01 1.60070E+02 1.77433E-02" - "2.26930E+02 1.74967E-01 8.93216E+01 5.65232E-02 1.37608E+02 1.19325E-01 1.63048E+02 1.80734E-02" - "2.32921E+02 1.79031E-01 9.14369E+01 5.77590E-02 1.41484E+02 1.22168E-01 1.66053E+02 1.84065E-02" - "2.38999E+02 1.83132E-01 9.35801E+01 5.90083E-02 1.45419E+02 1.25036E-01 1.69086E+02 1.87427E-02" - "2.45164E+02 1.87269E-01 9.57512E+01 6.02710E-02 1.49413E+02 1.27926E-01 1.72146E+02 1.90819E-02" - "2.51416E+02 1.91443E-01 9.79503E+01 6.15471E-02 1.53465E+02 1.30840E-01 1.75234E+02 1.94242E-02" - "2.57754E+02 1.95652E-01 1.00177E+02 6.28365E-02 1.57576E+02 1.33776E-01 1.78349E+02 1.97695E-02" - "2.64178E+02 1.99896E-01 1.02432E+02 6.41393E-02 1.61745E+02 1.36733E-01 1.81492E+02 2.01178E-02" - "2.70687E+02 2.04173E-01 1.04716E+02 6.54554E-02 1.65972E+02 1.39711E-01 1.84662E+02 2.04692E-02" - "2.77283E+02 2.08484E-01 1.07027E+02 6.67848E-02 1.70256E+02 1.42710E-01 1.87860E+02 2.08237E-02" - "2.83964E+02 2.12827E-01 1.09366E+02 6.81274E-02 1.74597E+02 1.45728E-01 1.91085E+02 2.11812E-02" - "2.90730E+02 2.17202E-01 1.11734E+02 6.94833E-02 1.78996E+02 1.48765E-01 1.94337E+02 2.15417E-02" - "2.97581E+02 2.21608E-01 1.14130E+02 7.08524E-02 1.83451E+02 1.51821E-01 1.97617E+02 2.19053E-02" - "3.04516E+02 2.26044E-01 1.16554E+02 7.22346E-02 1.87962E+02 1.54894E-01 2.00924E+02 2.22719E-02" - "3.11536E+02 2.30510E-01 1.19007E+02 7.36300E-02 1.92529E+02 1.57984E-01 2.04259E+02 2.26415E-02" - "3.18640E+02 2.35005E-01 1.21488E+02 7.50386E-02 1.97152E+02 1.61091E-01 2.07621E+02 2.30142E-02" - "3.25827E+02 2.39528E-01 1.23997E+02 7.64602E-02 2.01830E+02 1.64213E-01 2.11011E+02 2.33899E-02" - "3.33098E+02 2.44079E-01 1.26534E+02 7.78949E-02 2.06563E+02 1.67351E-01 2.14428E+02 2.37687E-02" - "3.40451E+02 2.48656E-01 1.29100E+02 7.93426E-02 2.11351E+02 1.70503E-01 2.17873E+02 2.41505E-02" - "3.47887E+02 2.53260E-01 1.31695E+02 8.08033E-02 2.16192E+02 1.73669E-01 2.21345E+02 2.45354E-02" - "3.55405E+02 2.57889E-01 1.34318E+02 8.22770E-02 2.21087E+02 1.76848E-01 2.24844E+02 2.49233E-02" - "3.63004E+02 2.62543E-01 1.36969E+02 8.37636E-02 2.26035E+02 1.80039E-01 2.28371E+02 2.53143E-02" - "3.70685E+02 2.67221E-01 1.39649E+02 8.52632E-02 2.31036E+02 1.83243E-01 2.31925E+02 2.57082E-02" - "3.78447E+02 2.71922E-01 1.42358E+02 8.67757E-02 2.36089E+02 1.86458E-01 2.35507E+02 2.61053E-02" - "3.86289E+02 2.76646E-01 1.45095E+02 8.83010E-02 2.41195E+02 1.89684E-01 2.39117E+02 2.65054E-02" - "3.94211E+02 2.81392E-01 1.47860E+02 8.98391E-02 2.46351E+02 1.92920E-01 2.42753E+02 2.69085E-02" - "4.02213E+02 2.86159E-01 1.50655E+02 9.13901E-02 2.51558E+02 1.96165E-01 2.46417E+02 2.73146E-02" - "4.10293E+02 2.90947E-01 1.53478E+02 9.29538E-02 2.56816E+02 1.99419E-01 2.50109E+02 2.77238E-02" - "4.18453E+02 2.95755E-01 1.56329E+02 9.45302E-02 2.62123E+02 2.02682E-01 2.53828E+02 2.81361E-02" - "4.26690E+02 3.00583E-01 1.59209E+02 9.61194E-02 2.67480E+02 2.05953E-01 2.57574E+02 2.85514E-02" - "4.35005E+02 3.05429E-01 1.62118E+02 9.77213E-02 2.72886E+02 2.09231E-01 2.61348E+02 2.89697E-02" - "4.43397E+02 3.10294E-01 1.65056E+02 9.93358E-02 2.78340E+02 2.12515E-01 2.65150E+02 2.93911E-02" - "4.51865E+02 3.15175E-01 1.68023E+02 1.00963E-01 2.83842E+02 2.15806E-01 2.68979E+02 2.98155E-02" - "4.60409E+02 3.20074E-01 1.71018E+02 1.02603E-01 2.89392E+02 2.19103E-01 2.72835E+02 3.02429E-02" - "4.69029E+02 3.24989E-01 1.74042E+02 1.04255E-01 2.94988E+02 2.22404E-01 2.76719E+02 3.06734E-02" - "4.77724E+02 3.29920E-01 1.77094E+02 1.05920E-01 3.00630E+02 2.25710E-01 2.80630E+02 3.11070E-02" - "4.86494E+02 3.34866E-01 1.80176E+02 1.07597E-01 3.06318E+02 2.29020E-01 2.84568E+02 3.15436E-02" - "4.95337E+02 3.39826E-01 1.83286E+02 1.09287E-01 3.12051E+02 2.32334E-01 2.88534E+02 3.19832E-02" - "5.04254E+02 3.44800E-01 1.86425E+02 1.10989E-01 3.17828E+02 2.35651E-01 2.92528E+02 3.24259E-02" - "5.13243E+02 3.49788E-01 1.89593E+02 1.12704E-01 3.23650E+02 2.38971E-01 2.96549E+02 3.28716E-02" - "5.22305E+02 3.54788E-01 1.92790E+02 1.14431E-01 3.29515E+02 2.42292E-01 3.00597E+02 3.33203E-02" - "5.31438E+02 3.59801E-01 1.96016E+02 1.16171E-01 3.35423E+02 2.45616E-01 3.04673E+02 3.37721E-02" - "5.40643E+02 3.64825E-01 1.99270E+02 1.17922E-01 3.41373E+02 2.48940E-01 3.08776E+02 3.42270E-02" - "5.49918E+02 3.69861E-01 2.02554E+02 1.19687E-01 3.47364E+02 2.52266E-01 3.12907E+02 3.46848E-02" - "5.59263E+02 3.74907E-01 2.05866E+02 1.21463E-01 3.53397E+02 2.55592E-01 3.17065E+02 3.51458E-02" - "5.68678E+02 3.79963E-01 2.09207E+02 1.23252E-01 3.59470E+02 2.58918E-01 3.21251E+02 3.56097E-02" - "5.78161E+02 3.85030E-01 2.12577E+02 1.25053E-01 3.65584E+02 2.62244E-01 3.25464E+02 3.60767E-02" - "5.87712E+02 3.90105E-01 2.15976E+02 1.26866E-01 3.71736E+02 2.65568E-01 3.29705E+02 3.65468E-02" - "5.97332E+02 3.95189E-01 2.19404E+02 1.28691E-01 3.77928E+02 2.68892E-01 3.33973E+02 3.70199E-02" - "6.07018E+02 4.00282E-01 2.22861E+02 1.30528E-01 3.84157E+02 2.72215E-01 3.38268E+02 3.74960E-02" - "6.16771E+02 4.05382E-01 2.26346E+02 1.32378E-01 3.90424E+02 2.75535E-01 3.42591E+02 3.79752E-02" - "6.26589E+02 4.10490E-01 2.29861E+02 1.34240E-01 3.96728E+02 2.78853E-01 3.46941E+02 3.84574E-02" - "6.36473E+02 4.15605E-01 2.33405E+02 1.36113E-01 4.03069E+02 2.82169E-01 3.51319E+02 3.89427E-02" - "6.46422E+02 4.20727E-01 2.36977E+02 1.37999E-01 4.09445E+02 2.85482E-01 3.55724E+02 3.94310E-02" - "6.56435E+02 4.25855E-01 2.40578E+02 1.39897E-01 4.15856E+02 2.88792E-01 3.60157E+02 3.99223E-02" - "6.66511E+02 4.30988E-01 2.44209E+02 1.41807E-01 4.22302E+02 2.92099E-01 3.64617E+02 4.04167E-02" - "6.76651E+02 4.36127E-01 2.47868E+02 1.43728E-01 4.28783E+02 2.95402E-01 3.69105E+02 4.09141E-02" - "6.86853E+02 4.41272E-01 2.51557E+02 1.45662E-01 4.35296E+02 2.98701E-01 3.73620E+02 4.14146E-02" - "6.97116E+02 4.46421E-01 2.55274E+02 1.47608E-01 4.41842E+02 3.01996E-01 3.78162E+02 4.19181E-02" - "7.07441E+02 4.51574E-01 2.59020E+02 1.49565E-01 4.48421E+02 3.05287E-01 3.82732E+02 4.24247E-02" - "7.17827E+02 4.56732E-01 2.62795E+02 1.51534E-01 4.55031E+02 3.08573E-01 3.87329E+02 4.29343E-02" - "7.28272E+02 4.61893E-01 2.66599E+02 1.53516E-01 4.61673E+02 3.11854E-01 3.91954E+02 4.34469E-02" - "7.38777E+02 4.67058E-01 2.70432E+02 1.55509E-01 4.68345E+02 3.15131E-01 3.96606E+02 4.39626E-02" - "7.49341E+02 4.72227E-01 2.74294E+02 1.57513E-01 4.75047E+02 3.18402E-01 4.01286E+02 4.44814E-02" - "7.59963E+02 4.77398E-01 2.78185E+02 1.59530E-01 4.81778E+02 3.21668E-01 4.05993E+02 4.50031E-02" - "7.70643E+02 4.82572E-01 2.82105E+02 1.61558E-01 4.88538E+02 3.24928E-01 4.10728E+02 4.55279E-02" - "7.81381E+02 4.87749E-01 2.86054E+02 1.63598E-01 4.95326E+02 3.28183E-01 4.15490E+02 4.60558E-02" - "7.92175E+02 4.92927E-01 2.90032E+02 1.65650E-01 5.02142E+02 3.31432E-01 4.20279E+02 4.65867E-02" - "8.03025E+02 4.98108E-01 2.94039E+02 1.67713E-01 5.08986E+02 3.34676E-01 4.25096E+02 4.71206E-02" - "8.13930E+02 5.03291E-01 2.98075E+02 1.69788E-01 5.15855E+02 3.37913E-01 4.29940E+02 4.76576E-02" - "8.24891E+02 5.08475E-01 3.02140E+02 1.71874E-01 5.22751E+02 3.41144E-01 4.34812E+02 4.81976E-02" - "8.35906E+02 5.13661E-01 3.06234E+02 1.73973E-01 5.29672E+02 3.44369E-01 4.39711E+02 4.87407E-02" - "8.46975E+02 5.18848E-01 3.10356E+02 1.76082E-01 5.36619E+02 3.47588E-01 4.44638E+02 4.92868E-02" - "8.58097E+02 5.24036E-01 3.14508E+02 1.78204E-01 5.43589E+02 3.50801E-01 4.49592E+02 4.98360E-02" - "8.69273E+02 5.29225E-01 3.18689E+02 1.80336E-01 5.50584E+02 3.54008E-01 4.54574E+02 5.03882E-02" - "8.80500E+02 5.34415E-01 3.22898E+02 1.82481E-01 5.57602E+02 3.57208E-01 4.59583E+02 5.09434E-02" - "8.91779E+02 5.39605E-01 3.27137E+02 1.84637E-01 5.64643E+02 3.60401E-01 4.64619E+02 5.15017E-02" - "9.03110E+02 5.44797E-01 3.31404E+02 1.86804E-01 5.71706E+02 3.63589E-01 4.69683E+02 5.20630E-02" - "9.14491E+02 5.49988E-01 3.35701E+02 1.88983E-01 5.78791E+02 3.66770E-01 4.74775E+02 5.26274E-02" - "9.25923E+02 5.55180E-01 3.40026E+02 1.91173E-01 5.85897E+02 3.69944E-01 4.79894E+02 5.31948E-02" - "9.37405E+02 5.60373E-01 3.44381E+02 1.93374E-01 5.93024E+02 3.73113E-01 4.85040E+02 5.37652E-02" - "9.48935E+02 5.65566E-01 3.48764E+02 1.95587E-01 6.00172E+02 3.76275E-01 4.90214E+02 5.43387E-02" - "9.60515E+02 5.70759E-01 3.53176E+02 1.97811E-01 6.07339E+02 3.79430E-01 4.95415E+02 5.49152E-02" - "9.72143E+02 5.75952E-01 3.57617E+02 2.00047E-01 6.14526E+02 3.82580E-01 5.00643E+02 5.54948E-02" - "9.83819E+02 5.81145E-01 3.62087E+02 2.02294E-01 6.21732E+02 3.85723E-01 5.05899E+02 5.60774E-02" - "9.95542E+02 5.86339E-01 3.66586E+02 2.04552E-01 6.28956E+02 3.88861E-01 5.11183E+02 5.66631E-02" - "1.00731E+03 5.91532E-01 3.71114E+02 2.06821E-01 6.36198E+02 3.91992E-01 5.16494E+02 5.72518E-02" - "1.01913E+03 5.96726E-01 3.75671E+02 2.09102E-01 6.43458E+02 3.95117E-01 5.21832E+02 5.78436E-02" - "1.03099E+03 6.01920E-01 3.80257E+02 2.11394E-01 6.50736E+02 3.98237E-01 5.27198E+02 5.84383E-02" - "1.04290E+03 6.07113E-01 3.84871E+02 2.13697E-01 6.58029E+02 4.01351E-01 5.32591E+02 5.90362E-02" - "1.05485E+03 6.12307E-01 3.89515E+02 2.16011E-01 6.65340E+02 4.04459E-01 5.38012E+02 5.96370E-02" - "1.06685E+03 6.17502E-01 3.94187E+02 2.18337E-01 6.72666E+02 4.07562E-01 5.43460E+02 6.02410E-02" - "1.07890E+03 6.22696E-01 3.98888E+02 2.20673E-01 6.80007E+02 4.10659E-01 5.48936E+02 6.08479E-02" - "1.09098E+03 6.27891E-01 4.03618E+02 2.23021E-01 6.87364E+02 4.13751E-01 5.54439E+02 6.14579E-02" - "1.10311E+03 6.33086E-01 4.08377E+02 2.25380E-01 6.94736E+02 4.16839E-01 5.59970E+02 6.20710E-02" - "1.11529E+03 6.38282E-01 4.13165E+02 2.27750E-01 7.02121E+02 4.19921E-01 5.65528E+02 6.26870E-02" - "1.12750E+03 6.43478E-01 4.17982E+02 2.30131E-01 7.09521E+02 4.22999E-01 5.71113E+02 6.33062E-02" - "1.13976E+03 6.48675E-01 4.22828E+02 2.32523E-01 7.16935E+02 4.26072E-01 5.76726E+02 6.39283E-02" - "1.15206E+03 6.53873E-01 4.27702E+02 2.34926E-01 7.24361E+02 4.29141E-01 5.82366E+02 6.45536E-02" - "1.16441E+03 6.59071E-01 4.32606E+02 2.37341E-01 7.31801E+02 4.32205E-01 5.88034E+02 6.51818E-02" - "1.17679E+03 6.64270E-01 4.37538E+02 2.39766E-01 7.39253E+02 4.35266E-01 5.93729E+02 6.58131E-02" - "1.18922E+03 6.69471E-01 4.42499E+02 2.42202E-01 7.46717E+02 4.38323E-01 5.99452E+02 6.64474E-02" - "1.20168E+03 6.74672E-01 4.47488E+02 2.44649E-01 7.54193E+02 4.41376E-01 6.05202E+02 6.70848E-02" - "1.21419E+03 6.79876E-01 4.52507E+02 2.47107E-01 7.61681E+02 4.44426E-01 6.10979E+02 6.77253E-02" - "1.22673E+03 6.85080E-01 4.57555E+02 2.49577E-01 7.69180E+02 4.47473E-01 6.16784E+02 6.83687E-02" - "1.23932E+03 6.90286E-01 4.62631E+02 2.52057E-01 7.76690E+02 4.50516E-01 6.22617E+02 6.90152E-02" - "1.25195E+03 6.95495E-01 4.67736E+02 2.54547E-01 7.84211E+02 4.53557E-01 6.28477E+02 6.96648E-02" - "1.26461E+03 7.00705E-01 4.72870E+02 2.57049E-01 7.91743E+02 4.56596E-01 6.34364E+02 7.03174E-02" - "1.27732E+03 7.05917E-01 4.78032E+02 2.59562E-01 7.99284E+02 4.59632E-01 6.40279E+02 7.09730E-02" - "1.29006E+03 7.11132E-01 4.83224E+02 2.62086E-01 8.06835E+02 4.62667E-01 6.46221E+02 7.16317E-02" - "1.30284E+03 7.16349E-01 4.88444E+02 2.64620E-01 8.14396E+02 4.65699E-01 6.52191E+02 7.22934E-02" - "1.31566E+03 7.21569E-01 4.93693E+02 2.67165E-01 8.21967E+02 4.68730E-01 6.58188E+02 7.29582E-02" - "1.32852E+03 7.26792E-01 4.98971E+02 2.69721E-01 8.29546E+02 4.71760E-01 6.64212E+02 7.36260E-02" - "1.34141E+03 7.32019E-01 5.04277E+02 2.72288E-01 8.37135E+02 4.74789E-01 6.70265E+02 7.42968E-02" - "1.35434E+03 7.37248E-01 5.09612E+02 2.74866E-01 8.44732E+02 4.77817E-01 6.76344E+02 7.49707E-02" - "1.36731E+03 7.42481E-01 5.14976E+02 2.77454E-01 8.52338E+02 4.80845E-01 6.82451E+02 7.56477E-02" - "1.38032E+03 7.47719E-01 5.20369E+02 2.80053E-01 8.59952E+02 4.83872E-01 6.88585E+02 7.63276E-02" - "1.39336E+03 7.52960E-01 5.25790E+02 2.82663E-01 8.67574E+02 4.86899E-01 6.94747E+02 7.70106E-02" - "1.40644E+03 7.58205E-01 5.31240E+02 2.85284E-01 8.75204E+02 4.89927E-01 7.00936E+02 7.76967E-02" - "1.41956E+03 7.63456E-01 5.36719E+02 2.87915E-01 8.82842E+02 4.92955E-01 7.07153E+02 7.83858E-02" - "1.43271E+03 7.68710E-01 5.42227E+02 2.90557E-01 8.90488E+02 4.95985E-01 7.13397E+02 7.90780E-02" - "1.44590E+03 7.73970E-01 5.47763E+02 2.93210E-01 8.98141E+02 4.99015E-01 7.19669E+02 7.97731E-02" - "1.45913E+03 7.79236E-01 5.53328E+02 2.95874E-01 9.05801E+02 5.02047E-01 7.25968E+02 8.04714E-02" - "1.47239E+03 7.84507E-01 5.58921E+02 2.98548E-01 9.13468E+02 5.05080E-01 7.32294E+02 8.11726E-02" - "1.48569E+03 7.89783E-01 5.64544E+02 3.01232E-01 9.21143E+02 5.08115E-01 7.38648E+02 8.18770E-02" - "1.49902E+03 7.95066E-01 5.70195E+02 3.03928E-01 9.28824E+02 5.11153E-01 7.45030E+02 8.25843E-02" - "1.51239E+03 8.00355E-01 5.75874E+02 3.06634E-01 9.36512E+02 5.14193E-01 7.51438E+02 8.32947E-02" - "1.52579E+03 8.05651E-01 5.81582E+02 3.09350E-01 9.44207E+02 5.17236E-01 7.57875E+02 8.40082E-02" - "1.53923E+03 8.10954E-01 5.87319E+02 3.12078E-01 9.51908E+02 5.20282E-01 7.64338E+02 8.47246E-02" - "1.55270E+03 8.16264E-01 5.93085E+02 3.14816E-01 9.59616E+02 5.23332E-01 7.70830E+02 8.54442E-02" - "1.56621E+03 8.21581E-01 5.98879E+02 3.17564E-01 9.67330E+02 5.26385E-01 7.77348E+02 8.61667E-02" - "1.57975E+03 8.26906E-01 6.04701E+02 3.20323E-01 9.75051E+02 5.29442E-01 7.83894E+02 8.68923E-02" - "1.59333E+03 8.32240E-01 6.10553E+02 3.23092E-01 9.82777E+02 5.32503E-01 7.90468E+02 8.76210E-02" - "1.60694E+03 8.37581E-01 6.16433E+02 3.25872E-01 9.90510E+02 5.35568E-01 7.97069E+02 8.83527E-02" - "1.62059E+03 8.42932E-01 6.22341E+02 3.28663E-01 9.98250E+02 5.38639E-01 8.03697E+02 8.90874E-02" -) +references="\ + 1.16026E-04 9.45526E-08 1.13812E-04 9.18322E-08 2.21384E-06 2.82025E-09 1.37239E-02 1.52125E-06 + 9.40822E-04 7.71882E-07 9.05619E-04 7.28692E-07 3.52032E-05 4.47348E-08 5.48945E-02 6.08489E-06 + 3.21730E-03 2.65641E-06 3.04018E-03 2.43947E-06 1.77116E-04 2.24508E-07 1.23512E-01 1.36909E-05 + 7.72440E-03 6.41615E-06 7.16810E-03 5.73592E-06 5.56304E-04 7.03373E-07 2.19576E-01 2.43394E-05 + 1.52758E-02 1.27606E-05 1.39261E-02 1.11131E-05 1.34971E-03 1.70216E-06 3.43087E-01 3.80302E-05 + 2.67186E-02 2.24385E-05 2.39373E-02 1.90499E-05 2.78123E-03 3.49844E-06 4.94045E-01 5.47634E-05 + 4.29318E-02 3.62361E-05 3.78116E-02 3.00096E-05 5.12017E-03 6.42370E-06 6.72450E-01 7.45390E-05 + 6.48252E-02 5.49743E-05 5.61457E-02 4.44398E-05 8.67959E-03 1.08606E-05 8.78301E-01 9.73571E-05 + 9.33382E-02 7.95073E-05 7.95235E-02 6.27738E-05 1.38147E-02 1.72400E-05 1.11160E+00 1.23217E-04 + 1.29438E-01 1.10720E-04 1.08517E-01 8.54299E-05 2.09215E-02 2.60386E-05 1.37234E+00 1.52120E-04 + 1.74119E-01 1.49525E-04 1.43684E-01 1.12813E-04 3.04347E-02 3.77758E-05 1.66054E+00 1.84065E-04 + 2.28400E-01 1.96862E-04 1.85573E-01 1.45313E-04 4.28269E-02 5.30113E-05 1.97617E+00 2.19053E-04 + 2.93325E-01 2.53696E-04 2.34719E-01 1.83309E-04 5.86064E-02 7.23425E-05 2.31926E+00 2.57083E-04 + 3.69961E-01 3.21011E-04 2.91645E-01 2.27165E-04 7.83160E-02 9.64016E-05 2.68979E+00 2.98155E-04 + 4.59396E-01 3.99816E-04 3.56865E-01 2.77233E-04 1.02531E-01 1.25854E-04 3.08777E+00 3.42270E-04 + 5.62739E-01 4.91132E-04 4.30879E-01 3.33853E-04 1.31860E-01 1.61393E-04 3.51320E+00 3.89427E-04 + 6.81116E-01 5.96001E-04 5.14178E-01 3.97355E-04 1.66938E-01 2.03742E-04 3.96607E+00 4.39627E-04 + 8.15674E-01 7.15476E-04 6.07243E-01 4.68053E-04 2.08431E-01 2.53648E-04 4.44639E+00 4.92869E-04 + 9.67574E-01 8.50622E-04 7.10542E-01 5.46255E-04 2.57033E-01 3.11882E-04 4.95415E+00 5.49153E-04 + 1.13799E+00 1.00252E-03 8.24534E-01 6.32256E-04 3.13460E-01 3.79232E-04 5.48937E+00 6.08480E-04 + 1.32813E+00 1.17224E-03 9.49670E-01 7.26339E-04 3.78455E-01 4.56509E-04 6.05203E+00 6.70849E-04 + 1.53917E+00 1.36088E-03 1.08639E+00 8.28779E-04 4.52783E-01 5.44535E-04 6.64213E+00 7.36261E-04 + 1.77235E+00 1.56954E-03 1.23512E+00 9.39839E-04 5.37230E-01 6.44150E-04 7.25969E+00 8.04715E-04 + 2.02888E+00 1.79931E-03 1.39628E+00 1.05978E-03 6.32603E-01 7.56203E-04 7.90469E+00 8.76211E-04 + 2.31001E+00 2.05129E-03 1.57029E+00 1.18883E-03 7.39725E-01 8.81552E-04 8.57713E+00 9.50750E-04 + 2.61698E+00 2.32657E-03 1.75754E+00 1.32725E-03 8.59440E-01 1.02107E-03 9.27703E+00 1.02833E-03 + 2.95104E+00 2.62624E-03 1.95844E+00 1.47525E-03 9.92605E-01 1.17562E-03 1.00044E+01 1.10895E-03 + 3.31344E+00 2.95141E-03 2.17335E+00 1.63305E-03 1.14009E+00 1.34608E-03 1.07592E+01 1.19262E-03 + 3.70546E+00 3.30314E-03 2.40267E+00 1.80087E-03 1.30279E+00 1.53333E-03 1.15414E+01 1.27933E-03 + 4.12835E+00 3.68251E-03 2.64676E+00 1.97891E-03 1.48159E+00 1.73825E-03 1.23511E+01 1.36908E-03 + 4.58338E+00 4.09060E-03 2.90597E+00 2.16735E-03 1.67741E+00 1.96171E-03 1.31882E+01 1.46187E-03 + 5.07183E+00 4.52845E-03 3.18066E+00 2.36640E-03 1.89117E+00 2.20460E-03 1.40528E+01 1.55771E-03 + 5.59497E+00 4.99711E-03 3.47118E+00 2.57622E-03 2.12379E+00 2.46776E-03 1.49448E+01 1.65659E-03 + 6.15407E+00 5.49762E-03 3.77786E+00 2.79699E-03 2.37621E+00 2.75208E-03 1.58643E+01 1.75851E-03 + 6.75039E+00 6.03099E-03 4.10102E+00 3.02889E-03 2.64937E+00 3.05839E-03 1.68112E+01 1.86347E-03 + 7.38521E+00 6.59822E-03 4.44100E+00 3.27205E-03 2.94421E+00 3.38755E-03 1.77855E+01 1.97147E-03 + 8.05979E+00 7.20030E-03 4.79810E+00 3.52665E-03 3.26169E+00 3.74039E-03 1.87873E+01 2.08252E-03 + 8.77539E+00 7.83819E-03 5.17263E+00 3.79282E-03 3.60277E+00 4.11772E-03 1.98166E+01 2.19661E-03 + 9.53327E+00 8.51284E-03 5.56489E+00 4.07070E-03 3.96838E+00 4.52037E-03 2.08733E+01 2.31374E-03 + 1.03347E+01 9.22518E-03 5.97518E+00 4.36043E-03 4.35950E+00 4.94911E-03 2.19575E+01 2.43392E-03 + 1.11809E+01 9.97612E-03 6.40378E+00 4.66214E-03 4.77708E+00 5.40474E-03 2.30690E+01 2.55714E-03 + 1.20730E+01 1.07665E-02 6.85097E+00 4.97595E-03 5.22207E+00 5.88800E-03 2.42081E+01 2.68339E-03 + 1.30125E+01 1.15973E-02 7.31703E+00 5.30197E-03 5.69542E+00 6.39965E-03 2.53746E+01 2.81270E-03 + 1.40003E+01 1.24693E-02 7.80222E+00 5.64032E-03 6.19810E+00 6.94041E-03 2.65685E+01 2.94504E-03 + 1.50378E+01 1.33832E-02 8.30681E+00 5.99110E-03 6.73103E+00 7.51098E-03 2.77899E+01 3.08043E-03 + 1.61262E+01 1.43399E-02 8.83105E+00 6.35442E-03 7.29517E+00 8.11205E-03 2.90387E+01 3.21886E-03 + 1.72666E+01 1.53402E-02 9.37519E+00 6.73037E-03 7.89146E+00 8.74428E-03 3.03150E+01 3.36033E-03 + 1.84603E+01 1.63848E-02 9.93948E+00 7.11905E-03 8.52081E+00 9.40831E-03 3.16187E+01 3.50484E-03 + 1.97083E+01 1.74744E-02 1.05241E+01 7.52055E-03 9.18416E+00 1.01048E-02 3.29499E+01 3.65240E-03 + 2.10118E+01 1.86096E-02 1.11294E+01 7.93493E-03 9.88241E+00 1.08342E-02 3.43085E+01 3.80300E-03 + 2.23720E+01 1.97912E-02 1.17556E+01 8.36230E-03 1.06165E+01 1.15973E-02 3.56946E+01 3.95664E-03 + 2.37900E+01 2.10198E-02 1.24028E+01 8.80272E-03 1.13873E+01 1.23945E-02 3.71081E+01 4.11332E-03 + 2.52669E+01 2.22959E-02 1.30712E+01 9.25625E-03 1.21956E+01 1.32263E-02 3.85490E+01 4.27305E-03 + 2.68037E+01 2.36201E-02 1.37612E+01 9.72298E-03 1.30425E+01 1.40933E-02 4.00174E+01 4.43582E-03 + 2.84016E+01 2.49931E-02 1.44729E+01 1.02030E-02 1.39287E+01 1.49959E-02 4.15133E+01 4.60163E-03 + 3.00616E+01 2.64152E-02 1.52065E+01 1.06963E-02 1.48550E+01 1.59346E-02 4.30366E+01 4.77048E-03 + 3.17846E+01 2.78869E-02 1.59622E+01 1.12029E-02 1.58225E+01 1.69097E-02 4.45873E+01 4.94237E-03 + 3.35719E+01 2.94088E-02 1.67402E+01 1.17230E-02 1.68317E+01 1.79217E-02 4.61655E+01 5.11731E-03 + 3.54243E+01 3.09811E-02 1.75407E+01 1.22566E-02 1.78836E+01 1.89710E-02 4.77712E+01 5.29529E-03 + 3.73428E+01 3.26045E-02 1.83638E+01 1.28036E-02 1.89790E+01 2.00578E-02 4.94043E+01 5.47631E-03 + 3.93284E+01 3.42790E-02 1.92098E+01 1.33643E-02 2.01186E+01 2.11824E-02 5.10648E+01 5.66038E-03 + 4.13821E+01 3.60052E-02 2.00788E+01 1.39385E-02 2.13033E+01 2.23453E-02 5.27528E+01 5.84749E-03 + 4.35047E+01 3.77833E-02 2.09710E+01 1.45264E-02 2.25337E+01 2.35465E-02 5.44682E+01 6.03764E-03 + 4.56972E+01 3.96136E-02 2.18866E+01 1.51280E-02 2.38106E+01 2.47864E-02 5.62111E+01 6.23083E-03 + 4.79604E+01 4.14962E-02 2.28257E+01 1.57432E-02 2.51347E+01 2.60651E-02 5.79814E+01 6.42706E-03 + 5.02952E+01 4.34315E-02 2.37885E+01 1.63722E-02 2.65067E+01 2.73829E-02 5.97791E+01 6.62634E-03 + 5.27025E+01 4.54196E-02 2.47751E+01 1.70150E-02 2.79274E+01 2.87397E-02 6.16044E+01 6.82866E-03 + 5.51830E+01 4.74606E-02 2.57857E+01 1.76715E-02 2.93973E+01 3.01359E-02 6.34570E+01 7.03402E-03 + 5.77375E+01 4.95546E-02 2.68205E+01 1.83419E-02 3.09171E+01 3.15714E-02 6.53371E+01 7.24243E-03 + 6.03669E+01 5.17018E-02 2.78795E+01 1.90261E-02 3.24874E+01 3.30463E-02 6.72447E+01 7.45387E-03 + 6.30719E+01 5.39023E-02 2.89630E+01 1.97242E-02 3.41089E+01 3.45606E-02 6.91797E+01 7.66836E-03 + 6.58531E+01 5.61559E-02 3.00710E+01 2.04361E-02 3.57822E+01 3.61145E-02 7.11421E+01 7.88589E-03 + 6.87114E+01 5.84628E-02 3.12037E+01 2.11619E-02 3.75077E+01 3.77077E-02 7.31320E+01 8.10647E-03 + 7.16474E+01 6.08230E-02 3.23612E+01 2.19015E-02 3.92861E+01 3.93404E-02 7.51494E+01 8.33008E-03 + 7.46617E+01 6.32362E-02 3.35437E+01 2.26551E-02 4.11179E+01 4.10124E-02 7.71941E+01 8.55674E-03 + 7.77550E+01 6.57026E-02 3.47513E+01 2.34226E-02 4.30036E+01 4.27236E-02 7.92664E+01 8.78644E-03 + 8.09278E+01 6.82220E-02 3.59841E+01 2.42040E-02 4.49438E+01 4.44740E-02 8.13661E+01 9.01918E-03 + 8.41809E+01 7.07942E-02 3.72422E+01 2.49994E-02 4.69387E+01 4.62633E-02 8.34932E+01 9.25497E-03 + 8.75147E+01 7.34190E-02 3.85257E+01 2.58086E-02 4.89890E+01 4.80915E-02 8.56478E+01 9.49380E-03 + 9.09298E+01 7.60964E-02 3.98347E+01 2.66318E-02 5.10951E+01 4.99583E-02 8.78298E+01 9.73567E-03 + 9.44268E+01 7.88261E-02 4.11695E+01 2.74689E-02 5.32573E+01 5.18635E-02 9.00392E+01 9.98058E-03 + 9.80060E+01 8.16078E-02 4.25299E+01 2.83199E-02 5.54761E+01 5.38068E-02 9.22762E+01 1.02285E-02 + 1.01668E+02 8.44413E-02 4.39163E+01 2.91849E-02 5.77517E+01 5.57881E-02 9.45405E+01 1.04795E-02 + 1.05413E+02 8.73264E-02 4.53286E+01 3.00637E-02 6.00847E+01 5.78070E-02 9.68323E+01 1.07336E-02 + 1.09242E+02 9.02627E-02 4.67669E+01 3.09565E-02 6.24752E+01 5.98633E-02 9.91516E+01 1.09907E-02 + 1.13155E+02 9.32498E-02 4.82314E+01 3.18632E-02 6.49236E+01 6.19566E-02 1.01498E+02 1.12508E-02 + 1.17152E+02 9.62875E-02 4.97222E+01 3.27838E-02 6.74302E+01 6.40865E-02 1.03872E+02 1.15139E-02 + 1.21235E+02 9.93754E-02 5.12393E+01 3.37182E-02 6.99952E+01 6.62528E-02 1.06274E+02 1.17802E-02 + 1.25402E+02 1.02513E-01 5.27829E+01 3.46665E-02 7.26189E+01 6.84550E-02 1.08703E+02 1.20494E-02 + 1.29654E+02 1.05700E-01 5.43529E+01 3.56287E-02 7.53015E+01 7.06928E-02 1.11160E+02 1.23217E-02 + 1.33993E+02 1.08936E-01 5.59496E+01 3.66048E-02 7.80432E+01 7.29657E-02 1.13643E+02 1.25970E-02 + 1.38417E+02 1.12220E-01 5.75729E+01 3.75947E-02 8.08442E+01 7.52733E-02 1.16155E+02 1.28754E-02 + 1.42928E+02 1.15553E-01 5.92230E+01 3.85984E-02 8.37046E+01 7.76152E-02 1.18694E+02 1.31568E-02 + 1.47525E+02 1.18933E-01 6.09000E+01 3.96159E-02 8.66246E+01 7.99908E-02 1.21260E+02 1.34413E-02 + 1.52208E+02 1.22360E-01 6.26039E+01 4.06472E-02 8.96044E+01 8.23998E-02 1.23854E+02 1.37288E-02 + 1.56979E+02 1.25834E-01 6.43347E+01 4.16923E-02 9.26439E+01 8.48416E-02 1.26475E+02 1.40194E-02 + 1.61836E+02 1.29353E-01 6.60926E+01 4.27512E-02 9.57432E+01 8.73157E-02 1.29123E+02 1.43130E-02 + 1.66780E+02 1.32919E-01 6.78777E+01 4.38238E-02 9.89026E+01 8.98216E-02 1.31800E+02 1.46096E-02 + 1.71812E+02 1.36529E-01 6.96899E+01 4.49101E-02 1.02122E+02 9.23587E-02 1.34503E+02 1.49093E-02 + 1.76931E+02 1.40183E-01 7.15294E+01 4.60101E-02 1.05401E+02 9.49266E-02 1.37234E+02 1.52120E-02 + 1.82137E+02 1.43881E-01 7.33962E+01 4.71238E-02 1.08740E+02 9.75247E-02 1.39992E+02 1.55177E-02 + 1.87430E+02 1.47622E-01 7.52904E+01 4.82512E-02 1.12140E+02 1.00152E-01 1.42778E+02 1.58265E-02 + 1.92811E+02 1.51406E-01 7.72121E+01 4.93922E-02 1.15599E+02 1.02809E-01 1.45592E+02 1.61384E-02 + 1.98279E+02 1.55232E-01 7.91612E+01 5.05468E-02 1.19118E+02 1.05494E-01 1.48432E+02 1.64533E-02 + 2.03835E+02 1.59099E-01 8.11380E+01 5.17150E-02 1.22697E+02 1.08207E-01 1.51300E+02 1.67712E-02 + 2.09478E+02 1.63007E-01 8.31423E+01 5.28967E-02 1.26335E+02 1.10947E-01 1.54196E+02 1.70922E-02 + 2.15208E+02 1.66954E-01 8.51743E+01 5.40921E-02 1.30033E+02 1.13714E-01 1.57119E+02 1.74162E-02 + 2.21025E+02 1.70941E-01 8.72341E+01 5.53009E-02 1.33791E+02 1.16507E-01 1.60070E+02 1.77433E-02 + 2.26930E+02 1.74967E-01 8.93216E+01 5.65232E-02 1.37608E+02 1.19325E-01 1.63048E+02 1.80734E-02 + 2.32921E+02 1.79031E-01 9.14369E+01 5.77590E-02 1.41484E+02 1.22168E-01 1.66053E+02 1.84065E-02 + 2.38999E+02 1.83132E-01 9.35801E+01 5.90083E-02 1.45419E+02 1.25036E-01 1.69086E+02 1.87427E-02 + 2.45164E+02 1.87269E-01 9.57512E+01 6.02710E-02 1.49413E+02 1.27926E-01 1.72146E+02 1.90819E-02 + 2.51416E+02 1.91443E-01 9.79503E+01 6.15471E-02 1.53465E+02 1.30840E-01 1.75234E+02 1.94242E-02 + 2.57754E+02 1.95652E-01 1.00177E+02 6.28365E-02 1.57576E+02 1.33776E-01 1.78349E+02 1.97695E-02 + 2.64178E+02 1.99896E-01 1.02432E+02 6.41393E-02 1.61745E+02 1.36733E-01 1.81492E+02 2.01178E-02 + 2.70687E+02 2.04173E-01 1.04716E+02 6.54554E-02 1.65972E+02 1.39711E-01 1.84662E+02 2.04692E-02 + 2.77283E+02 2.08484E-01 1.07027E+02 6.67848E-02 1.70256E+02 1.42710E-01 1.87860E+02 2.08237E-02 + 2.83964E+02 2.12827E-01 1.09366E+02 6.81274E-02 1.74597E+02 1.45728E-01 1.91085E+02 2.11812E-02 + 2.90730E+02 2.17202E-01 1.11734E+02 6.94833E-02 1.78996E+02 1.48765E-01 1.94337E+02 2.15417E-02 + 2.97581E+02 2.21608E-01 1.14130E+02 7.08524E-02 1.83451E+02 1.51821E-01 1.97617E+02 2.19053E-02 + 3.04516E+02 2.26044E-01 1.16554E+02 7.22346E-02 1.87962E+02 1.54894E-01 2.00924E+02 2.22719E-02 + 3.11536E+02 2.30510E-01 1.19007E+02 7.36300E-02 1.92529E+02 1.57984E-01 2.04259E+02 2.26415E-02 + 3.18640E+02 2.35005E-01 1.21488E+02 7.50386E-02 1.97152E+02 1.61091E-01 2.07621E+02 2.30142E-02 + 3.25827E+02 2.39528E-01 1.23997E+02 7.64602E-02 2.01830E+02 1.64213E-01 2.11011E+02 2.33899E-02 + 3.33098E+02 2.44079E-01 1.26534E+02 7.78949E-02 2.06563E+02 1.67351E-01 2.14428E+02 2.37687E-02 + 3.40451E+02 2.48656E-01 1.29100E+02 7.93426E-02 2.11351E+02 1.70503E-01 2.17873E+02 2.41505E-02 + 3.47887E+02 2.53260E-01 1.31695E+02 8.08033E-02 2.16192E+02 1.73669E-01 2.21345E+02 2.45354E-02 + 3.55405E+02 2.57889E-01 1.34318E+02 8.22770E-02 2.21087E+02 1.76848E-01 2.24844E+02 2.49233E-02 + 3.63004E+02 2.62543E-01 1.36969E+02 8.37636E-02 2.26035E+02 1.80039E-01 2.28371E+02 2.53143E-02 + 3.70685E+02 2.67221E-01 1.39649E+02 8.52632E-02 2.31036E+02 1.83243E-01 2.31925E+02 2.57082E-02 + 3.78447E+02 2.71922E-01 1.42358E+02 8.67757E-02 2.36089E+02 1.86458E-01 2.35507E+02 2.61053E-02 + 3.86289E+02 2.76646E-01 1.45095E+02 8.83010E-02 2.41195E+02 1.89684E-01 2.39117E+02 2.65054E-02 + 3.94211E+02 2.81392E-01 1.47860E+02 8.98391E-02 2.46351E+02 1.92920E-01 2.42753E+02 2.69085E-02 + 4.02213E+02 2.86159E-01 1.50655E+02 9.13901E-02 2.51558E+02 1.96165E-01 2.46417E+02 2.73146E-02 + 4.10293E+02 2.90947E-01 1.53478E+02 9.29538E-02 2.56816E+02 1.99419E-01 2.50109E+02 2.77238E-02 + 4.18453E+02 2.95755E-01 1.56329E+02 9.45302E-02 2.62123E+02 2.02682E-01 2.53828E+02 2.81361E-02 + 4.26690E+02 3.00583E-01 1.59209E+02 9.61194E-02 2.67480E+02 2.05953E-01 2.57574E+02 2.85514E-02 + 4.35005E+02 3.05429E-01 1.62118E+02 9.77213E-02 2.72886E+02 2.09231E-01 2.61348E+02 2.89697E-02 + 4.43397E+02 3.10294E-01 1.65056E+02 9.93358E-02 2.78340E+02 2.12515E-01 2.65150E+02 2.93911E-02 + 4.51865E+02 3.15175E-01 1.68023E+02 1.00963E-01 2.83842E+02 2.15806E-01 2.68979E+02 2.98155E-02 + 4.60409E+02 3.20074E-01 1.71018E+02 1.02603E-01 2.89392E+02 2.19103E-01 2.72835E+02 3.02429E-02 + 4.69029E+02 3.24989E-01 1.74042E+02 1.04255E-01 2.94988E+02 2.22404E-01 2.76719E+02 3.06734E-02 + 4.77724E+02 3.29920E-01 1.77094E+02 1.05920E-01 3.00630E+02 2.25710E-01 2.80630E+02 3.11070E-02 + 4.86494E+02 3.34866E-01 1.80176E+02 1.07597E-01 3.06318E+02 2.29020E-01 2.84568E+02 3.15436E-02 + 4.95337E+02 3.39826E-01 1.83286E+02 1.09287E-01 3.12051E+02 2.32334E-01 2.88534E+02 3.19832E-02 + 5.04254E+02 3.44800E-01 1.86425E+02 1.10989E-01 3.17828E+02 2.35651E-01 2.92528E+02 3.24259E-02 + 5.13243E+02 3.49788E-01 1.89593E+02 1.12704E-01 3.23650E+02 2.38971E-01 2.96549E+02 3.28716E-02 + 5.22305E+02 3.54788E-01 1.92790E+02 1.14431E-01 3.29515E+02 2.42292E-01 3.00597E+02 3.33203E-02 + 5.31438E+02 3.59801E-01 1.96016E+02 1.16171E-01 3.35423E+02 2.45616E-01 3.04673E+02 3.37721E-02 + 5.40643E+02 3.64825E-01 1.99270E+02 1.17922E-01 3.41373E+02 2.48940E-01 3.08776E+02 3.42270E-02 + 5.49918E+02 3.69861E-01 2.02554E+02 1.19687E-01 3.47364E+02 2.52266E-01 3.12907E+02 3.46848E-02 + 5.59263E+02 3.74907E-01 2.05866E+02 1.21463E-01 3.53397E+02 2.55592E-01 3.17065E+02 3.51458E-02 + 5.68678E+02 3.79963E-01 2.09207E+02 1.23252E-01 3.59470E+02 2.58918E-01 3.21251E+02 3.56097E-02 + 5.78161E+02 3.85030E-01 2.12577E+02 1.25053E-01 3.65584E+02 2.62244E-01 3.25464E+02 3.60767E-02 + 5.87712E+02 3.90105E-01 2.15976E+02 1.26866E-01 3.71736E+02 2.65568E-01 3.29705E+02 3.65468E-02 + 5.97332E+02 3.95189E-01 2.19404E+02 1.28691E-01 3.77928E+02 2.68892E-01 3.33973E+02 3.70199E-02 + 6.07018E+02 4.00282E-01 2.22861E+02 1.30528E-01 3.84157E+02 2.72215E-01 3.38268E+02 3.74960E-02 + 6.16771E+02 4.05382E-01 2.26346E+02 1.32378E-01 3.90424E+02 2.75535E-01 3.42591E+02 3.79752E-02 + 6.26589E+02 4.10490E-01 2.29861E+02 1.34240E-01 3.96728E+02 2.78853E-01 3.46941E+02 3.84574E-02 + 6.36473E+02 4.15605E-01 2.33405E+02 1.36113E-01 4.03069E+02 2.82169E-01 3.51319E+02 3.89427E-02 + 6.46422E+02 4.20727E-01 2.36977E+02 1.37999E-01 4.09445E+02 2.85482E-01 3.55724E+02 3.94310E-02 + 6.56435E+02 4.25855E-01 2.40578E+02 1.39897E-01 4.15856E+02 2.88792E-01 3.60157E+02 3.99223E-02 + 6.66511E+02 4.30988E-01 2.44209E+02 1.41807E-01 4.22302E+02 2.92099E-01 3.64617E+02 4.04167E-02 + 6.76651E+02 4.36127E-01 2.47868E+02 1.43728E-01 4.28783E+02 2.95402E-01 3.69105E+02 4.09141E-02 + 6.86853E+02 4.41272E-01 2.51557E+02 1.45662E-01 4.35296E+02 2.98701E-01 3.73620E+02 4.14146E-02 + 6.97116E+02 4.46421E-01 2.55274E+02 1.47608E-01 4.41842E+02 3.01996E-01 3.78162E+02 4.19181E-02 + 7.07441E+02 4.51574E-01 2.59020E+02 1.49565E-01 4.48421E+02 3.05287E-01 3.82732E+02 4.24247E-02 + 7.17827E+02 4.56732E-01 2.62795E+02 1.51534E-01 4.55031E+02 3.08573E-01 3.87329E+02 4.29343E-02 + 7.28272E+02 4.61893E-01 2.66599E+02 1.53516E-01 4.61673E+02 3.11854E-01 3.91954E+02 4.34469E-02 + 7.38777E+02 4.67058E-01 2.70432E+02 1.55509E-01 4.68345E+02 3.15131E-01 3.96606E+02 4.39626E-02 + 7.49341E+02 4.72227E-01 2.74294E+02 1.57513E-01 4.75047E+02 3.18402E-01 4.01286E+02 4.44814E-02 + 7.59963E+02 4.77398E-01 2.78185E+02 1.59530E-01 4.81778E+02 3.21668E-01 4.05993E+02 4.50031E-02 + 7.70643E+02 4.82572E-01 2.82105E+02 1.61558E-01 4.88538E+02 3.24928E-01 4.10728E+02 4.55279E-02 + 7.81381E+02 4.87749E-01 2.86054E+02 1.63598E-01 4.95326E+02 3.28183E-01 4.15490E+02 4.60558E-02 + 7.92175E+02 4.92927E-01 2.90032E+02 1.65650E-01 5.02142E+02 3.31432E-01 4.20279E+02 4.65867E-02 + 8.03025E+02 4.98108E-01 2.94039E+02 1.67713E-01 5.08986E+02 3.34676E-01 4.25096E+02 4.71206E-02 + 8.13930E+02 5.03291E-01 2.98075E+02 1.69788E-01 5.15855E+02 3.37913E-01 4.29940E+02 4.76576E-02 + 8.24891E+02 5.08475E-01 3.02140E+02 1.71874E-01 5.22751E+02 3.41144E-01 4.34812E+02 4.81976E-02 + 8.35906E+02 5.13661E-01 3.06234E+02 1.73973E-01 5.29672E+02 3.44369E-01 4.39711E+02 4.87407E-02 + 8.46975E+02 5.18848E-01 3.10356E+02 1.76082E-01 5.36619E+02 3.47588E-01 4.44638E+02 4.92868E-02 + 8.58097E+02 5.24036E-01 3.14508E+02 1.78204E-01 5.43589E+02 3.50801E-01 4.49592E+02 4.98360E-02 + 8.69273E+02 5.29225E-01 3.18689E+02 1.80336E-01 5.50584E+02 3.54008E-01 4.54574E+02 5.03882E-02 + 8.80500E+02 5.34415E-01 3.22898E+02 1.82481E-01 5.57602E+02 3.57208E-01 4.59583E+02 5.09434E-02 + 8.91779E+02 5.39605E-01 3.27137E+02 1.84637E-01 5.64643E+02 3.60401E-01 4.64619E+02 5.15017E-02 + 9.03110E+02 5.44797E-01 3.31404E+02 1.86804E-01 5.71706E+02 3.63589E-01 4.69683E+02 5.20630E-02 + 9.14491E+02 5.49988E-01 3.35701E+02 1.88983E-01 5.78791E+02 3.66770E-01 4.74775E+02 5.26274E-02 + 9.25923E+02 5.55180E-01 3.40026E+02 1.91173E-01 5.85897E+02 3.69944E-01 4.79894E+02 5.31948E-02 + 9.37405E+02 5.60373E-01 3.44381E+02 1.93374E-01 5.93024E+02 3.73113E-01 4.85040E+02 5.37652E-02 + 9.48935E+02 5.65566E-01 3.48764E+02 1.95587E-01 6.00172E+02 3.76275E-01 4.90214E+02 5.43387E-02 + 9.60515E+02 5.70759E-01 3.53176E+02 1.97811E-01 6.07339E+02 3.79430E-01 4.95415E+02 5.49152E-02 + 9.72143E+02 5.75952E-01 3.57617E+02 2.00047E-01 6.14526E+02 3.82580E-01 5.00643E+02 5.54948E-02 + 9.83819E+02 5.81145E-01 3.62087E+02 2.02294E-01 6.21732E+02 3.85723E-01 5.05899E+02 5.60774E-02 + 9.95542E+02 5.86339E-01 3.66586E+02 2.04552E-01 6.28956E+02 3.88861E-01 5.11183E+02 5.66631E-02 + 1.00731E+03 5.91532E-01 3.71114E+02 2.06821E-01 6.36198E+02 3.91992E-01 5.16494E+02 5.72518E-02 + 1.01913E+03 5.96726E-01 3.75671E+02 2.09102E-01 6.43458E+02 3.95117E-01 5.21832E+02 5.78436E-02 + 1.03099E+03 6.01920E-01 3.80257E+02 2.11394E-01 6.50736E+02 3.98237E-01 5.27198E+02 5.84383E-02 + 1.04290E+03 6.07113E-01 3.84871E+02 2.13697E-01 6.58029E+02 4.01351E-01 5.32591E+02 5.90362E-02 + 1.05485E+03 6.12307E-01 3.89515E+02 2.16011E-01 6.65340E+02 4.04459E-01 5.38012E+02 5.96370E-02 + 1.06685E+03 6.17502E-01 3.94187E+02 2.18337E-01 6.72666E+02 4.07562E-01 5.43460E+02 6.02410E-02 + 1.07890E+03 6.22696E-01 3.98888E+02 2.20673E-01 6.80007E+02 4.10659E-01 5.48936E+02 6.08479E-02 + 1.09098E+03 6.27891E-01 4.03618E+02 2.23021E-01 6.87364E+02 4.13751E-01 5.54439E+02 6.14579E-02 + 1.10311E+03 6.33086E-01 4.08377E+02 2.25380E-01 6.94736E+02 4.16839E-01 5.59970E+02 6.20710E-02 + 1.11529E+03 6.38282E-01 4.13165E+02 2.27750E-01 7.02121E+02 4.19921E-01 5.65528E+02 6.26870E-02 + 1.12750E+03 6.43478E-01 4.17982E+02 2.30131E-01 7.09521E+02 4.22999E-01 5.71113E+02 6.33062E-02 + 1.13976E+03 6.48675E-01 4.22828E+02 2.32523E-01 7.16935E+02 4.26072E-01 5.76726E+02 6.39283E-02 + 1.15206E+03 6.53873E-01 4.27702E+02 2.34926E-01 7.24361E+02 4.29141E-01 5.82366E+02 6.45536E-02 + 1.16441E+03 6.59071E-01 4.32606E+02 2.37341E-01 7.31801E+02 4.32205E-01 5.88034E+02 6.51818E-02 + 1.17679E+03 6.64270E-01 4.37538E+02 2.39766E-01 7.39253E+02 4.35266E-01 5.93729E+02 6.58131E-02 + 1.18922E+03 6.69471E-01 4.42499E+02 2.42202E-01 7.46717E+02 4.38323E-01 5.99452E+02 6.64474E-02 + 1.20168E+03 6.74672E-01 4.47488E+02 2.44649E-01 7.54193E+02 4.41376E-01 6.05202E+02 6.70848E-02 + 1.21419E+03 6.79876E-01 4.52507E+02 2.47107E-01 7.61681E+02 4.44426E-01 6.10979E+02 6.77253E-02 + 1.22673E+03 6.85080E-01 4.57555E+02 2.49577E-01 7.69180E+02 4.47473E-01 6.16784E+02 6.83687E-02 + 1.23932E+03 6.90286E-01 4.62631E+02 2.52057E-01 7.76690E+02 4.50516E-01 6.22617E+02 6.90152E-02 + 1.25195E+03 6.95495E-01 4.67736E+02 2.54547E-01 7.84211E+02 4.53557E-01 6.28477E+02 6.96648E-02 + 1.26461E+03 7.00705E-01 4.72870E+02 2.57049E-01 7.91743E+02 4.56596E-01 6.34364E+02 7.03174E-02 + 1.27732E+03 7.05917E-01 4.78032E+02 2.59562E-01 7.99284E+02 4.59632E-01 6.40279E+02 7.09730E-02 + 1.29006E+03 7.11132E-01 4.83224E+02 2.62086E-01 8.06835E+02 4.62667E-01 6.46221E+02 7.16317E-02 + 1.30284E+03 7.16349E-01 4.88444E+02 2.64620E-01 8.14396E+02 4.65699E-01 6.52191E+02 7.22934E-02 + 1.31566E+03 7.21569E-01 4.93693E+02 2.67165E-01 8.21967E+02 4.68730E-01 6.58188E+02 7.29582E-02 + 1.32852E+03 7.26792E-01 4.98971E+02 2.69721E-01 8.29546E+02 4.71760E-01 6.64212E+02 7.36260E-02 + 1.34141E+03 7.32019E-01 5.04277E+02 2.72288E-01 8.37135E+02 4.74789E-01 6.70265E+02 7.42968E-02 + 1.35434E+03 7.37248E-01 5.09612E+02 2.74866E-01 8.44732E+02 4.77817E-01 6.76344E+02 7.49707E-02 + 1.36731E+03 7.42481E-01 5.14976E+02 2.77454E-01 8.52338E+02 4.80845E-01 6.82451E+02 7.56477E-02 + 1.38032E+03 7.47719E-01 5.20369E+02 2.80053E-01 8.59952E+02 4.83872E-01 6.88585E+02 7.63276E-02 + 1.39336E+03 7.52960E-01 5.25790E+02 2.82663E-01 8.67574E+02 4.86899E-01 6.94747E+02 7.70106E-02 + 1.40644E+03 7.58205E-01 5.31240E+02 2.85284E-01 8.75204E+02 4.89927E-01 7.00936E+02 7.76967E-02 + 1.41956E+03 7.63456E-01 5.36719E+02 2.87915E-01 8.82842E+02 4.92955E-01 7.07153E+02 7.83858E-02 + 1.43271E+03 7.68710E-01 5.42227E+02 2.90557E-01 8.90488E+02 4.95985E-01 7.13397E+02 7.90780E-02 + 1.44590E+03 7.73970E-01 5.47763E+02 2.93210E-01 8.98141E+02 4.99015E-01 7.19669E+02 7.97731E-02 + 1.45913E+03 7.79236E-01 5.53328E+02 2.95874E-01 9.05801E+02 5.02047E-01 7.25968E+02 8.04714E-02 + 1.47239E+03 7.84507E-01 5.58921E+02 2.98548E-01 9.13468E+02 5.05080E-01 7.32294E+02 8.11726E-02 + 1.48569E+03 7.89783E-01 5.64544E+02 3.01232E-01 9.21143E+02 5.08115E-01 7.38648E+02 8.18770E-02 + 1.49902E+03 7.95066E-01 5.70195E+02 3.03928E-01 9.28824E+02 5.11153E-01 7.45030E+02 8.25843E-02 + 1.51239E+03 8.00355E-01 5.75874E+02 3.06634E-01 9.36512E+02 5.14193E-01 7.51438E+02 8.32947E-02 + 1.52579E+03 8.05651E-01 5.81582E+02 3.09350E-01 9.44207E+02 5.17236E-01 7.57875E+02 8.40082E-02 + 1.53923E+03 8.10954E-01 5.87319E+02 3.12078E-01 9.51908E+02 5.20282E-01 7.64338E+02 8.47246E-02 + 1.55270E+03 8.16264E-01 5.93085E+02 3.14816E-01 9.59616E+02 5.23332E-01 7.70830E+02 8.54442E-02 + 1.56621E+03 8.21581E-01 5.98879E+02 3.17564E-01 9.67330E+02 5.26385E-01 7.77348E+02 8.61667E-02 + 1.57975E+03 8.26906E-01 6.04701E+02 3.20323E-01 9.75051E+02 5.29442E-01 7.83894E+02 8.68923E-02 + 1.59333E+03 8.32240E-01 6.10553E+02 3.23092E-01 9.82777E+02 5.32503E-01 7.90468E+02 8.76210E-02 + 1.60694E+03 8.37581E-01 6.16433E+02 3.25872E-01 9.90510E+02 5.35568E-01 7.97069E+02 8.83527E-02 + 1.62059E+03 8.42932E-01 6.22341E+02 3.28663E-01 9.98250E+02 5.38639E-01 8.03697E+02 8.90874E-02" -x=(8.377720036e-1 1.675530045e+0 2.513288086e+0 3.351046126e+0 +x="8.377720036e-1 1.675530045e+0 2.513288086e+0 3.351046126e+0 4.188804167e+0 5.026562208e+0 5.864320249e+0 6.702078290e+0 7.539836331e+0 8.377594372e+0 9.215352413e+0 1.005311045e+1 1.089086850e+1 1.172862654e+1 1.256638458e+1 1.340414262e+1 @@ -336,59 +341,93 @@ x=(8.377720036e-1 1.675530045e+0 2.513288086e+0 3.351046126e+0 1.918466053e+2 1.926843634e+2 1.935221214e+2 1.943598795e+2 1.951976375e+2 1.960353955e+2 1.968731536e+2 1.977109116e+2 1.985486697e+2 1.993864277e+2 2.002241858e+2 2.010619438e+2 - 2.018997018e+2 2.027374599e+2) + 2.018997018e+2 2.027374599e+2" -set -e -cd `mktemp -d` -pwd +######################################################################## +# Helper functions +######################################################################## +die() +{ + rm -rf "${tmpdir}" # cleanup temporary files + exit "${1:-1}" # return status code (default is 1) +} + +# Displays the number of lines in the stream transmitted via standard +# input. This function wraps the "wc -l" command, whose output does not +# directly correspond to the number of lines. Depending on the shell +# being used, there may be leading spaces, and the line count may be +# followed by the filename, even if it is standard input. +wcl() { + wc -l \ + | sed -e 's/^[[:space:]]\{0,\}//g' -e 's/[[:space:]]\{1,\}/ /g' \ + | cut -d' ' -f1 +} -if [ ! -e $tmppipe ]; then mkfifo $tmppipe; fi +# Display the "array" x with one entry per line +listx() +{ + printf '%s\n' "${x}" \ + | sed 's/[[:space:]]/\n/g' \ + | sed '/^[[:space:]]\{0,\}$/d' +} # print whether or not the interval [$1, $2] and [$3, $4] are intersecting -intersect(){ - echo -e\ - "scale=20\n"\ - "i0 = $1 - $2*4\n"\ - "i1 = $1 + $2*4\n"\ - "j0 = $3 - $4*4\n"\ - "j1 = $3 + $4*4\n"\ - "if(i0 > j0) k0 = i0\n"\ - "if(i0 <= j0) k0 = j0\n"\ - "if(i1 < j1) k1 = i1\n"\ - "if(i1 >= j1) k1 = j1\n"\ - "k1 - k0 > 0" | bc -l +intersect() +{ + { + printf 'scale=20\n' + printf 'i0 = %s - %s*4\n' "$1" "$2" + printf 'i1 = %s + %s*4\n' "$1" "$2" + printf 'j0 = %s - %s*4\n' "$3" "$4" + printf 'j1 = %s + %s*4\n' "$3" "$4" + printf 'if(i0 > j0) k0 = i0\n' + printf 'if(i0 <= j0) k0 = j0\n' + printf 'if(i1 < j1) k1 = i1\n' + printf 'if(i1 >= j1) k1 = j1\n' + printf 'k1 - k0 > 0\n' + } | bc -l } +######################################################################## +# The test +######################################################################## +# Configure signal processing +trap 'die $?' EXIT + +tmpdir="$(mktemp -d "${TMPDIR:-/tmp}/schiff_XXXXXX")" +cd "${tmpdir}" + +if [ ! -e "${tmppipe}" ]; then mkfifo "${tmppipe}"; fi + # Launch the schiff estimations -if [ ! -f $tmpfile ] -then - for i in ${x[*]} - do +if [ ! -f "${tmpfile}" ]; then + radius="1.0" + height=$(printf '%f / %f * 2.0\n' "${radius}" "${R}" | bc -l) + + listx | while read -r i; do # Compute the mean radius - r=`echo $i | sed "s/[eE]+*/*10^/g"` - mean_radius=$(echo -e "scale=10\n($r*0.450) / (8*a(1))" | bc -l) - radius=1.0 - height=$(echo "$radius / $R * 2.0" | bc -l) + r="$(printf '%s\n' "${i}" | sed 's/[eE]+\{0,1\}/*10^/g')" + mean_radius="$(printf 'scale=10\n(%s*0.450) / (8*a(1))\n' "${r}" | bc -l)" # Generate the geometry distribution into the pipe - echo -e \ - "cylinder:\n" \ - " height: $height\n" \ - " radius: $radius\n" \ - " radius_sphere: { lognormal: { sigma: $sigma, mu: $mean_radius } }\n" \ - > $tmppipe & + { + printf 'cylinder:\n' + printf ' height: %f\n' "${height}" + printf ' radius: %f\n' "${radius}" + printf ' radius_sphere: { lognormal: { sigma: %f, mu: %f } }\n' \ + "${sigma}" "${mean_radius}" + } > "${tmppipe}" & # Invoke the schiff command - echo $wavelength $N $K $Ne | \ + printf "%f %f %f %f\n" "${wavelength}" "${N}" "${K}" "${Ne}" | \ schiff -q \ - -a $nangles \ - -A $ninvcum \ - -l $mean_radius \ - -i $tmppipe \ - -w $wavelength \ - -g $nrealisations \ - -d $ndirs >> $tmpfile \ - || true # inhibit the "set -e" comportment on failure + -a "${nangles}" \ + -A "${ninvcum}" \ + -l "${mean_radius}" \ + -i "${tmppipe}" \ + -w "${wavelength}" \ + -g "${nrealisations}" \ + -d "${ndirs}" >> "${tmpfile}" done fi @@ -396,45 +435,67 @@ err=0 # error code # Check the estimated cross sections against the references lines="" -for ((i=0; i < ${#x[@]}; ++i)) -do - iline=$(($i*(2*$nangles+$ninvcum+7)+1)) - if [ -n $lines ] - then - lines+=";" +nx="$(listx | wcl)" +i=0 +while [ "${i}" -lt "${nx}" ]; do + iline="$((i*(2*nangles+ninvcum+7)+1))" + if [ -n "${lines}" ]; then + lines="${lines};" fi - lines+="$(($iline))p" + lines="${lines}${iline}p" + i=$((i+1)) done -sed -n "$lines" $tmpfile > $tmppipe & + +sed -n "${lines}" "${tmpfile}" > "${tmppipe}" & i=0 -while read line -do - xsection=(`echo $line | sed 's/^\S*\(.*\)$/\1/g' | sed 's/[eE]+*/*10^/g'`) - reference=(`echo ${references[$i]} | sed 's/[eE]+*/*10^/g'`) +while read -r line; do + xsec="$(printf '%s\n' "${line}" \ + | cut -d' ' -f 2- \ + | sed 's/[eE]+\{0,1\}/*10^/g')" + xsec0="$(printf '%s\n' "${xsec}" | cut -d' ' -f1)" + xsec1="$(printf '%s\n' "${xsec}" | cut -d' ' -f2)" + xsec2="$(printf '%s\n' "${xsec}" | cut -d' ' -f3)" + xsec3="$(printf '%s\n' "${xsec}" | cut -d' ' -f4)" + xsec4="$(printf '%s\n' "${xsec}" | cut -d' ' -f5)" + xsec5="$(printf '%s\n' "${xsec}" | cut -d' ' -f6)" + xsec6="$(printf '%s\n' "${xsec}" | cut -d' ' -f7)" + xsec7="$(printf '%s\n' "${xsec}" | cut -d' ' -f8)" - extinction=$(intersect ${xsection[0]} ${xsection[1]} ${reference[0]} ${reference[1]}) - absorption=$(intersect ${xsection[2]} ${xsection[3]} ${reference[2]} ${reference[3]}) - scattering=$(intersect ${xsection[4]} ${xsection[5]} ${reference[4]} ${reference[5]}) - avg_area=$(intersect ${xsection[6]} ${xsection[7]} ${reference[6]} ${reference[7]}) + ref="$(printf '%s\n' "${references}" \ + | sed -n "$((i+1))p" \ + | sed -e 's/^[[:space:]]\{1,\}//g' -e 's/[eE]+\{0,1\}/*10^/g')" + ref0="$(printf '%s\n' "${ref}" | cut -d' ' -f1)" + ref1="$(printf '%s\n' "${ref}" | cut -d' ' -f2)" + ref2="$(printf '%s\n' "${ref}" | cut -d' ' -f3)" + ref3="$(printf '%s\n' "${ref}" | cut -d' ' -f4)" + ref4="$(printf '%s\n' "${ref}" | cut -d' ' -f5)" + ref5="$(printf '%s\n' "${ref}" | cut -d' ' -f6)" + ref6="$(printf '%s\n' "${ref}" | cut -d' ' -f7)" + ref7="$(printf '%s\n' "${ref}" | cut -d' ' -f8)" - echo -n "${x[$i]} " - if [ $extinction -eq 0 -o $absorption -eq 0 -o $scattering -eq 0 -o $avg_area -eq 0 ] - then - echo FAILURE + extinction="$(intersect "${xsec0}" "${xsec1}" "${ref0}" "${ref1}")" + absorption="$(intersect "${xsec2}" "${xsec3}" "${ref2}" "${ref3}")" + scattering="$(intersect "${xsec4}" "${xsec5}" "${ref4}" "${ref5}")" + avg_area="$(intersect "${xsec6}" "${xsec7}" "${ref6}" "${ref7}")" + + cx="$(listx | sed -n "$((i+1))p")" + if [ "${extinction}" -eq 0 ] \ + || [ "${absorption}" -eq 0 ] \ + || [ "${scattering}" -eq 0 ] \ + || [ "${avg_area}" -eq 0 ]; then + printf '%e FAILURE\n' "${cx}" err=1 # notify the error else - echo OK + printf '%e OK\n' "${cx}" fi - i=$(($i+1)) -done < $tmppipe + i="$((i+1))" +done < "${tmppipe}" -rm $tmppipe +rm "${tmppipe}" -if [ ! $i -eq ${#x[@]} ] -then +if [ "${i}" -ne "${nx}" ]; then err=1 # notify the error fi -exit $err - +die "${err}" diff --git a/src/test_schiff_sphere.sh b/src/test_schiff_sphere.sh @@ -1,6 +1,11 @@ -#!/bin/bash -# Copyright (C) 2015, 2016 CNRS -# Copyright (C) 2019 |Meso|Star> +#!/bin/sh + +# Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique +# Copyright (C) 2026 Clermont Auvergne INP +# Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux +# Copyright (C) 2017, 2019-2021, 2026 |Méso|Star> (contact@meso-star.com) +# Copyright (C) 2026 Université de Lorraine +# Copyright (C) 2026 Université de Toulouse # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,9 +20,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. */ +set -e + tmpfile=schiff_result tmppipe=schiff_pipe -tmpprefix=xxschiff nrealisations=1000 nangles=1000 @@ -28,84 +34,138 @@ N=1.4666666666666666666666666 # Real refractive index K=0.0053333333333333333333333 # Imaginary refractive index Ne=1.3333333333333333333333333 # Refractive index of the medium sigma=1.18 -mean_radius=(1.0 3.22 5.44 7.67 9.89 12.1 14.3 16.6 19.0 21.0) +mean_radius="1.0 3.22 5.44 7.67 9.89 12.1 14.3 16.6 19.0 21.0" # Extinction Absorption Scattering -references=( - "8.39 0.484 7.90" - "69.3 13.4 55.9" - "197 54.6 143" - "392 131 261" - "651 243 408" - "975 393 582" - "1370 578 787" - "1820 799 1020" - "2390 1080 1310" - "2930 1350 1580" -) +references="\ + 8.39 0.484 7.90 + 69.3 13.4 55.9 + 197 54.6 143 + 392 131 261 + 651 243 408 + 975 393 582 + 1370 578 787 + 1820 799 1020 + 2390 1080 1310 + 2930 1350 1580" + +######################################################################## +# Helper functions +######################################################################## +die() +{ + rm -rf "${tmpdir}" # cleanup temporary files + exit "${1:-1}" # return status code (default is 1) +} + +# Displays the number of lines in the stream transmitted via standard +# input. This function wraps the "wc -l" command, whose output does not +# directly correspond to the number of lines. Depending on the shell +# being used, there may be leading spaces, and the line count may be +# followed by the filename, even if it is standard input. +wcl() +{ + wc -l \ + | sed -e 's/^[[:space:]]\{0,\}//g' -e 's/[[:space:]]\{1,\}/ /g' \ + | cut -d' ' -f1 +} # print whether or not the $1 is equal to $2 +/- 4*$3 -eq_eps(){ - echo -e\ - "scale=20\n"\ - "dst = $1 - $2\n"\ - "if(dst <0) dst = -dst\n"\ - "dst < 4*$3\n" | bc -l +eq_eps() +{ + { + printf 'scale=20\n' + printf 'dst = %s - %s\n' "$1" "$2" + printf 'if(dst <0) dst = -dst\n' + printf 'dst < 4*%s\n' "$3" + } | bc -l } -set -e -cd `mktemp -d` -pwd +# Display the "array" mean_radius with one entry per line +listmu() +{ + printf '%s\n' "${mean_radius}" \ + | sed 's/[[:space:]]/\n/g' \ + | sed '/^[[:space:]]\{0,\}$/d' +} -if [ ! -e $tmppipe ]; then mkfifo $tmppipe; fi +######################################################################## +# The test +######################################################################## -if [ ! -f $tmpfile ] -then - for mu in ${mean_radius[*]} - do +# Configure signal processing +trap 'die $?' EXIT + +tmpdir="$(mktemp -d "${TMPDIR:-/tmp}/schiff_XXXXXX")" +cd "${tmpdir}" + +if [ ! -e "${tmppipe}" ]; then mkfifo "${tmppipe}"; fi + +if [ ! -f "${tmpfile}" ]; then + listmu | while read -r mu; do # Generate the geometry distribution into the pipe - echo -e \ - "sphere:\n" \ - " radius: { lognormal: { mu: $mu, sigma: $sigma } }" \ - > $tmppipe & + { + printf 'sphere:\n' + printf ' radius: { lognormal: { mu: %f, sigma: %f } }\n' \ + "${mu}" "${sigma}" + } > "${tmppipe}" & # invoke the schiff command - echo $wavelength $N $K $Ne | \ + printf "%f %f %f %f\n" "${wavelength}" "${N}" "${K}" "${Ne}" | \ schiff -q \ - -a $nangles \ - -A $ninvcum \ - -l $mu \ - -i $tmppipe \ - -w $wavelength \ - -g $nrealisations \ - -d $ndirs >> $tmpfile \ - || true # inhibit the "set -e" comportment on failure + -a "${nangles}" \ + -A "${ninvcum}" \ + -l "${mu}" \ + -i "${tmppipe}" \ + -w "${wavelength}" \ + -g "${nrealisations}" \ + -d "${ndirs}" >> "${tmpfile}" done fi err=0 # error code # Check the estimated cross sections against the references -for ((i=0; i < ${#mean_radius[@]}; ++i)) -do - iline=$(($i*(2*$nangles+$ninvcum+7)+1)) - xsection=(`sed -n "$(($iline))p" $tmpfile | sed 's/^\S*\(.*\)$/\1/g'`) - reference=(`echo ${references[$i]}`) - - extinction=$(eq_eps ${reference[0]} ${xsection[0]} ${xsection[1]}) - absorption=$(eq_eps ${reference[1]} ${xsection[2]} ${xsection[3]}) - scattering=$(eq_eps ${reference[2]} ${xsection[4]} ${xsection[5]}) - - echo -n "${mean_radius[$i]} " - if [ $extinction -eq 0 -o $absorption -eq 0 -o $scattering -eq 0 ] - then - echo FAILURE +nmu="$(listmu | wcl)" +i=0 +while [ "${i}" -lt "${nmu}" ]; do + iline=$((i*(2*nangles+ninvcum+7)+1)) + + xsec="$(sed -n "${iline}p" "${tmpfile}" \ + | cut -d' ' -f 2- \ + | sed 's/[eE]+\{0,1\}/*10^/g')" + xsec0="$(printf '%s\n' "${xsec}" | cut -d' ' -f1)" + xsec1="$(printf '%s\n' "${xsec}" | cut -d' ' -f2)" + xsec2="$(printf '%s\n' "${xsec}" | cut -d' ' -f3)" + xsec3="$(printf '%s\n' "${xsec}" | cut -d' ' -f4)" + xsec4="$(printf '%s\n' "${xsec}" | cut -d' ' -f5)" + xsec5="$(printf '%s\n' "${xsec}" | cut -d' ' -f6)" + + ref="$(printf '%s\n' "${references}" \ + | sed -n "$((i+1))p" \ + | sed -e 's/^[[:space:]]\{1,\}//g' -e 's/[eE]+\{0,1\}/*10^/g')" + ref0="$(printf '%s\n' "${ref}" | cut -d' ' -f1)" + ref1="$(printf '%s\n' "${ref}" | cut -d' ' -f2)" + ref2="$(printf '%s\n' "${ref}" | cut -d' ' -f3)" + + extinction="$(eq_eps "${ref0}" "${xsec0}" "${xsec1}")" + absorption="$(eq_eps "${ref1}" "${xsec2}" "${xsec3}")" + scattering="$(eq_eps "${ref2}" "${xsec4}" "${xsec5}")" + + cmu="$(listmu | sed -n "$((i+1))p")" + if [ "${extinction}" -eq 0 ] \ + || [ "${absorption}" -eq 0 ] \ + || [ "${scattering}" -eq 0 ]; then + printf '%e FAILURE\n' "${cmu}" err=1 # notify the error else - echo OK + printf '%e OK\n' "${cmu}" fi + i="$((i+1))" done -rm $tmppipe +if [ "${i}" -ne "${nmu}" ]; then + err=1 # notify the error +fi -exit $err +die "${err}"