Dauchet et al.
(Optics Letters 2023)
The Schiff program computes the radiative properties of soft particles. It uses the Monte-Carlo method to solve Maxwell's equations within the L. Schiff's approximation as presented in Charon et al. 2015.The main advantages of using Monte-Carlo are: the possibility to address any shape of particle, and the results are provided with a numerical accuracy.
For a mixture of soft particles, Schiff estimates the total cross-sections (absorption, scattering and extinction cross-sections) in addition of the phase function, its cumulative and its inverse cumulative.
The set of particles to simulate is defined by its refractive index - provided at various wavelengths - and a geometry distribution that controls how the particles look like into the mixture. More precisely, this distribution describes the main shapes of the particles (sphere, cylinder, helical pipe, etc.) and their statistical variation according to the distribution of their parameters (gaussian, lognormal, etc.).
A straight interface
The Schiff program is a command-line tool that processes input data, performs computations, write results and that's all. It makes no assumptions on how the input data are created excepted that it has to follow the expected file formats. The simulation results are also provided as is, in a raw ASCII format.
This thin interface is particularly well suited to be extended and integrated into any toolchain. According to the user needs, the optical properties of the particles can be entered manually or generated by an external program. In the same way, the output data can either be directly interpreted or post-processed by any script with respect to the targeted toolchain.
Download the desired archive of Schiff and verify its integrity against its
PGP signature. Then extract it. Finally
source the provided
schiff.profile file to register the Schiff
installation for the current shell priorly to the invocation of the
$ source ~/Schiff-0.4.2-GNU-Linux64/etc/schiff.profile $ schiff -h
The Schiff reference documentation is provided trough man pages.
man command-line to consult it.
$ man schiff $ man schiff-geometry $ man schiff-output
Build from sources
Schiff can be built directly from its source tree. The simplest way to do
this is to rely on the
schiff branch of the Star-Engine
project: it provides CMake scripts that automate the download, the compilation
and the installation of Schiff and its dependencies. This build procedure
assumes the following prerequisites:
- git source control.
- GNU Compiler Collection in version 4.9.2 or higher.
- CMake in version 3.1 or higher.
Assuming that the aforementioned prerequisites are available, the build procedure is summed up to:
~ $ git clone -b Schiff-0.4.2 \ https://gitlab.com/meso-star/star-engine.git Schiff-0.4.2 ~ $ mkdir Schiff-0.4.2/build; cd Schiff-0.4.2/build ~/Schiff-0.4.2/build $ cmake ../cmake ~/Schiff-0.4.2/build $ make
By default Schiff is installed in the
local subdirectory of
Schiff-0.4.2. Source the provided
file to register Schiff against the current shell.
$ source ~/Schiff-0.4.2/local/etc/schiff.profile $ schiff -h
Once built, the Schiff installation can be packaged in an archive that can then be deployed on compatible systems, i.e. systems whose C library is compatible with the one available on the system used to build Schiff.
~/Schiff-0.4.2/build $ make pkg ~/Schiff-0.4.2/build $ ls package/Schiff-0.4.2* # list packages
The following Bash script illustrates how to post-process the Schiff results. It is an example, provided as is, without additional support. According to your needs, you can study, modify, extend or redistribute it freely.
This script reads an output file generated by the
command line and split its raw ASCII results in several human readable text
files in order to simplify their analysis.
$ schiff -i geom-distrib.yaml -l 2.3 -w0.5:0.6 -o output properties $ bash ./schiff_pretty_results.sh output Write xsections.txt Write descs.txt Write func_0.5.txt Write func_0.6.txt Write cumul_0.5.txt Write cumul_0.6.txt Write invcumul_0.5.txt Write invcumul_0.6.txt
The first generated file, named
xsections.txt, lists for each
wavelength submitted with the
-w option, its associated
absorption, extinction and scattering cross sections. The second file,
descs.txt, gives overall informations for each simulated
wavelengths, like the limit scattering angles from which its phase function was
analytically computed. Then for each wavelength, the script generates 3 files
invcumul_<WLEN>.txt that store for the wavelength
<WLEN>, the value of its associated phase function as well
as its cumulative and its inverse cumulative, respectively.
Copyright © 2020, 2021
Copyright © 2015, 2016 Centre National de la Recherche Scientifique (CNRS).
Schiff is free software released under the GPLv3+ license: GNU GPL version 3 or later. You are welcome to redistribute it under certain conditions; refer to the license for details.