schiff

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

commit c49d0810c7282b90198f125992935c9a63524f2a
parent 050eda4e4cff99a4496c35b8a5de6b03fca0f847
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Tue, 17 Sep 2019 16:05:15 +0200

Add the -D option that discards large angles

Diffstat:
Mdoc/schiff.1 | 11+++++++++++
Msrc/schiff.c | 2+-
Msrc/schiff_args.c | 6+++++-
Msrc/schiff_args.h | 2++
4 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/doc/schiff.1 b/doc/schiff.1 @@ -44,6 +44,12 @@ CDF^-1(i/(\fINUM_ANGLES-1\fR). Default is 2000. .TP .B \-d \fINUM_DIRS\fR number of sampled directions for each sampled geometry. Default is 100. +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 soft particle instances. This is actually the number of @@ -132,6 +138,11 @@ 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 \fBschiff\fR is copyright \(co CNRS 2015-2016. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are diff --git a/src/schiff.c b/src/schiff.c @@ -330,7 +330,7 @@ run_integration nwlens = sa_size(args->wavelengths); res = sschiff_integrate(sschiff, rng, distrib, args->wavelengths, nwlens, sschiff_uniform_scattering_angles, args->nangles, args->nrealisations, - args->ndirs, &estimator); + args->ndirs, args->discard_large_angles, &estimator); if(res != RES_OK) { fprintf(stderr, "Schiff integration error.\n"); goto error; diff --git a/src/schiff_args.c b/src/schiff_args.c @@ -63,6 +63,9 @@ print_help(const char* binary) " Default is %u.\n", SCHIFF_ARGS_NULL.ndirs); printf( +" -D discard computations of the [[inverse] cumulative] phase" +" functions for large scattering angles.\n"); + printf( " -g GOEMS number of sampled geometries. This is actually the number of\n" " realisations. Default is %u.\n", SCHIFF_ARGS_NULL.nrealisations); @@ -1446,7 +1449,7 @@ schiff_args_init ASSERT(argc && argv && args); *args = SCHIFF_ARGS_NULL; - while((opt = getopt(argc, argv, "a:A:d:g:G:hi:l:n:o:qw:")) != -1) { + while((opt = getopt(argc, argv, "a:A:d:Dg:G:hi:l:n:o:qw:")) != -1) { switch(opt) { case 'a': res = cstr_to_uint(optarg, &args->nangles); @@ -1475,6 +1478,7 @@ schiff_args_init res = RES_BAD_ARG; } break; + case 'D': args->discard_large_angles = 1; break; case 'g': res = cstr_to_uint(optarg, &args->nrealisations); if(res == RES_OK && !args->nrealisations) { diff --git a/src/schiff_args.h b/src/schiff_args.h @@ -26,6 +26,7 @@ struct schiff_args { double* wavelengths; /* List of wavelengths to integrate */ double characteristic_length; /* Characteristic length of the soft particles */ + int discard_large_angles; /* Avoid analytic model for large angles */ /* List of parsed geometry distribution parameters and its associated random * variate */ @@ -46,6 +47,7 @@ static const struct schiff_args SCHIFF_ARGS_NULL = { NULL, /* List of optical properties */ NULL, /* List of wavelength to integrate */ -1.0, /* Caracteristic length */ + 0, /* Discard large angles */ NULL, /* List of Schiff geometries */ NULL, /* Schiff geometry random variates */ 0, /* # Dumped geometries */