commit c752b0f60cd9e760bc9c24a76082a0da8a71fe36
parent 589b7e6ed937fa8f080d0b0d11a3f85ff3856717
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 30 Mar 2016 10:49:12 +0200
Fix the test_schiff bash scripts
Handle update of the schiff-output format
Diffstat:
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/src/test_schiff_cylinder.sh b/src/test_schiff_cylinder.sh
@@ -19,7 +19,8 @@ tmppipe=schiff_pipe
tmpprefix=xxschiff
nrealisations=1000
-nangles=100
+nangles=1000
+ninvcum=100
ndirs=100
wavelength=0.6 # in micron (in vacuum)
Nr=1.01 # Real relative refractive index
@@ -376,7 +377,8 @@ then
# Invoke the schiff command
echo $wavelength $Nr $Kr $Ne | \
schiff -q \
- -A $nangles \
+ -a $nangles \
+ -A $ninvcum \
-l $mean_radius \
-i $tmppipe \
-w $wavelength \
@@ -391,7 +393,8 @@ err=0 # error code
# Check the estimated cross sections against the references
for ((i=0; i < ${#x[@]}; ++i))
do
- xsection=(`sed -n "$(($i*($nangles+4)+1))p" $tmpfile | sed 's/^\S*\(.*\)$/\1/g' | sed 's/[eE]+*/*10^/g'`)
+ iline=$(($i*(2*$nangles+$ninvcum+7)+1))
+ xsection=(`sed -n "$(($iline))p" $tmpfile | sed 's/^\S*\(.*\)$/\1/g' | sed 's/[eE]+*/*10^/g'`)
reference=(`echo ${references[$i]} | sed 's/[eE]+*/*10^/g'`)
extinction=$(intersect ${xsection[0]} ${xsection[1]} ${reference[0]} ${reference[1]})
diff --git a/src/test_schiff_sphere.sh b/src/test_schiff_sphere.sh
@@ -19,7 +19,8 @@ tmppipe=schiff_pipe
tmpprefix=xxschiff
nrealisations=1000
-nangles=100
+nangles=1000
+ninvcum=100
ndirs=100
wavelength=0.6 # in micron (in vacuum)
Nr=1.1 # Real relative refractive index
@@ -70,7 +71,8 @@ then
# invoke the schiff command
echo $wavelength $Nr $Kr $Ne | \
schiff -q \
- -A $nangles \
+ -a $nangles \
+ -A $ninvcum \
-l $mu \
-i $tmppipe \
-w $wavelength \
@@ -85,7 +87,8 @@ err=0 # error code
# Check the estimated cross sections against the references
for ((i=0; i < ${#mean_radius[@]}; ++i))
do
- xsection=(`sed -n "$(($i*($nangles+4)+1))p" $tmpfile | sed 's/^\S*\(.*\)$/\1/g'`)
+ 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]})