commit 4a0eadada0928281eb8a9bcb5d47037f8ecc9c8f
parent ae06330ea8bbb88d6ac48d94eba4df92f96cc1b9
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Tue, 22 Mar 2016 16:35:22 +0100
Rename the zeta lognormal attribute in mu
Diffstat:
6 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/doc/schiff-geometry.5 b/doc/schiff-geometry.5
@@ -60,10 +60,10 @@ aforementioned cumulative before linearly interpolating its bounds with respect
to "r";
.IP \(bu 4
with the \fBlognormal\fR distribution, the parameter is distributed with respect
-to a mean value \fBzeta\fR and a standard deviation \fBsigma\fR as follow:
+to a mean value \fBmu\fR and a standard deviation \fBsigma\fR as follow:
.IP " " 8
P(x) dx = 1/(log(\fBsigma\fR)*x*sqrt(2*PI) *
- exp(-(ln(x)-log(\fBzeta\fR))^2 / (2*log(\fBsigma\fR)^2)) dx
+ exp(-(ln(x)-log(\fBmu\fR))^2 / (2*log(\fBsigma\fR)^2)) dx
.SS 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
@@ -118,7 +118,7 @@ the example section for illustrations of such alternatives.
.TP
<\fIlognormal\fR> ::=
\fBlognormal:
- zeta: \fIREAL\fB
+ mu: \fIREAL\fB
sigma: \fIREAL\fB
.TP
<\fIhistogram\fR> ::=
@@ -156,7 +156,7 @@ distributed with respect to a lognormal distribution:
c:
lognormal:
sigma: 0.2
- zeta: 1.3\fR
+ mu: 1.3\fR
.PP
Soft particles are ellipsoids whose aspect ratio of its semi\-principal axis is
fixed. Its volume is equal to the volume of an equivalent sphere whose radius
@@ -177,7 +177,7 @@ discretized in 64 slices along 2PI:
\fBcylinder:
slices: 64
radius: 1
- height: { lognormal: { zeta: 1.3, sigma: 0.84 } }\fR
+ height: { lognormal: { mu: 1.3, sigma: 0.84 } }\fR
.PP
Soft particles are cylinders whose height/radius ratio is fixed. Their volume
is equal to the volume of a sphere whose radius is distributed with respect to
@@ -198,8 +198,8 @@ and spherical soft particles have a fixed radius:
\fB- sphere: { radius 1.12, proba: 2.0, slices: 64 }
.IP " " 4
\fB- cylinder:
- radius: {lognormal: { sigma: 2.3, zeta: 0.2 } }
- height: {lognormal: { zeta: 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\fR
.SH NOTE
diff --git a/src/schiff_args.c b/src/schiff_args.c
@@ -276,16 +276,16 @@ parse_yaml_param_lognormal
val=yaml_document_get_node(doc, lognormal->data.mapping.pairs.start[i].value);
ASSERT(key->type == YAML_SCALAR_NODE);
- /* lognormal zeta attribute */
- if(!strcmp((char*)key->data.scalar.value, "zeta")) {
+ /* lognormal mu attribute */
+ if(!strcmp((char*)key->data.scalar.value, "mu")) {
if(mask & ZETA) {
log_err(filename, key,
- "the `zeta' lognormal attribute is already defined.\n");
+ "the `mu' lognormal attribute is already defined.\n");
return RES_BAD_ARG;
}
mask |= ZETA;
res = parse_yaml_double /* mean value */
- (filename, val, min_val, max_val, ¶m->data.lognormal.zeta);
+ (filename, val, min_val, max_val, ¶m->data.lognormal.mu);
/* lognormal sigma attribute */
} else if(!strcmp((char*)key->data.scalar.value, "sigma")) {
@@ -309,7 +309,7 @@ parse_yaml_param_lognormal
/* Ensure that the lognormal attributes are all parsed */
if(!(mask & ZETA)) {
- log_err(filename, lognormal, "missing the zeta lognormal attribute.\n");
+ log_err(filename, lognormal, "missing the mu lognormal attribute.\n");
return RES_BAD_ARG;
} else if(!(mask & SIGMA)) {
log_err(filename, lognormal, "missing the sigma lognormal attribute.\n");
diff --git a/src/schiff_geometry.c b/src/schiff_geometry.c
@@ -139,7 +139,7 @@ eval_param(const struct schiff_param* param, struct ssp_rng* rng)
val = param->data.constant;
break;
case SCHIFF_PARAM_LOGNORMAL:
- val = ssp_ran_lognormal(rng, log(param->data.lognormal.zeta),
+ val = ssp_ran_lognormal(rng, log(param->data.lognormal.mu),
log(param->data.lognormal.sigma));
break;
case SCHIFF_PARAM_HISTOGRAM:
diff --git a/src/schiff_geometry.h b/src/schiff_geometry.h
@@ -30,7 +30,7 @@ struct schiff_param {
enum schiff_param_distribution distribution;
union {
double constant;
- struct { double zeta, sigma; } lognormal;
+ struct { double mu, sigma; } lognormal;
struct { double *entries, lower, upper; } histogram;
} data;
};
diff --git a/src/test_schiff_cylinder.sh b/src/test_schiff_cylinder.sh
@@ -370,7 +370,7 @@ then
echo -e \
"cylinder:\n" \
" aspect_ratio: $R\n" \
- " radius: { lognormal: { sigma: $sigma, zeta: $mean_radius } }\n" \
+ " radius: { lognormal: { sigma: $sigma, mu: $mean_radius } }\n" \
> $tmppipe &
# Invoke the schiff command
diff --git a/src/test_schiff_sphere.sh b/src/test_schiff_sphere.sh
@@ -59,19 +59,19 @@ if [ ! -e $tmppipe ]; then mkfifo $tmppipe; fi
if [ ! -f $tmpfile ]
then
- for zeta in ${mean_radius[*]}
+ for mu in ${mean_radius[*]}
do
# Generate the geometry distribution into the pipe
echo -e \
"sphere:\n" \
- " radius: { lognormal: { zeta: $zeta, sigma: $sigma } }" \
+ " radius: { lognormal: { mu: $mu, sigma: $sigma } }" \
> $tmppipe &
# invoke the schiff command
echo $wavelength $Nr $Kr $Ne | \
schiff -q \
-A $nangles \
- -l $zeta \
+ -l $mu \
-i $tmppipe \
-w $wavelength \
-g $nrealisations \