commit 9f5f3f99b41fddd8704eebbb8f2ace783f4ed0e0
parent fe8167d2270ca06da4aa6cce9ac2080eebcf25ba
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 30 Mar 2016 11:45:33 +0200
Replace the relative refractive indices
The submitted relative refractive indices must be absolute and no more
relative to the medium.
Diffstat:
4 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/doc/schiff.1 b/doc/schiff.1
@@ -21,10 +21,10 @@ 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 Nr Kr Ne" whith "W" is the wavelength in vacuum expressed in micron, "Nr"
-and "Kr" are the real and imaginary parts, respectively, of the relative
-refractive index, and "Ne" the refractive index of the medium. With no
-\fIFILE\fR, the optical properties are read from standard input.
+"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
The estimated results follows the
.BR schiff-output (5)
diff --git a/src/schiff_optical_properties.c b/src/schiff_optical_properties.c
@@ -65,9 +65,9 @@ parse_optical_properties
}
out_props->W = props[0];
- out_props->Nr = props[1];
- out_props->Kr = props[2];
out_props->Ne = props[3];
+ out_props->Nr = props[1] / out_props->Ne; /* Absolute to relative */
+ out_props->Kr = props[2] / out_props->Ne; /* Absolute to relative */
if(!schiff_optical_properties_check(out_props)) {
fprintf(stderr, "%s:%lu: invalid optical properties `%s'.\n",
filename, (unsigned long)iline, str);
diff --git a/src/test_schiff_cylinder.sh b/src/test_schiff_cylinder.sh
@@ -23,9 +23,9 @@ nangles=1000
ninvcum=100
ndirs=100
wavelength=0.6 # in micron (in vacuum)
-Nr=1.01 # Real relative refractive index
-Kr=0.004 # Imaginary relative refractive index
-Ne=1.3333333333333333333 # Refractive index of the medium
+N=1.3466666666666666666666666 # Real refractive index
+K=0.0053333333333333333333333 # Imaginary refractive index
+Ne=1.3333333333333333333333333 # Refractive index of the medium
sigma=1.18
R=0.837
@@ -375,7 +375,7 @@ then
> $tmppipe &
# Invoke the schiff command
- echo $wavelength $Nr $Kr $Ne | \
+ echo $wavelength $N $K $Ne | \
schiff -q \
-a $nangles \
-A $ninvcum \
diff --git a/src/test_schiff_sphere.sh b/src/test_schiff_sphere.sh
@@ -23,9 +23,9 @@ nangles=1000
ninvcum=100
ndirs=100
wavelength=0.6 # in micron (in vacuum)
-Nr=1.1 # Real relative refractive index
-Kr=0.004 # Imaginary relative refractive index
-Ne=1.33333 # Refractive index of the medium
+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)
@@ -69,7 +69,7 @@ then
> $tmppipe &
# invoke the schiff command
- echo $wavelength $Nr $Kr $Ne | \
+ echo $wavelength $N $K $Ne | \
schiff -q \
-a $nangles \
-A $ninvcum \