schiff

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

commit fe8167d2270ca06da4aa6cce9ac2080eebcf25ba
parent c752b0f60cd9e760bc9c24a76082a0da8a71fe36
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed, 30 Mar 2016 11:15:04 +0200

Improve the efficiency of the test cylinder script

Diffstat:
Msrc/test_schiff_cylinder.sh | 14+++++++++++++-
Msrc/test_schiff_sphere.sh | 2+-
2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/test_schiff_cylinder.sh b/src/test_schiff_cylinder.sh @@ -391,10 +391,21 @@ fi err=0 # error code # Check the estimated cross sections against the references +lines="" for ((i=0; i < ${#x[@]}; ++i)) do iline=$(($i*(2*$nangles+$ninvcum+7)+1)) - xsection=(`sed -n "$(($iline))p" $tmpfile | sed 's/^\S*\(.*\)$/\1/g' | sed 's/[eE]+*/*10^/g'`) + if [ -n $lines ] + then + lines+=";" + fi + lines+="$(($iline))p" +done + +i=0 +sed -n "$lines" $tmpfile | while read line +do + xsection=(`echo $line | 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]}) @@ -410,6 +421,7 @@ do else echo OK fi + i=$(($i+1)) done rm $tmppipe diff --git a/src/test_schiff_sphere.sh b/src/test_schiff_sphere.sh @@ -84,7 +84,7 @@ fi err=0 # error code -# Check the estimated cross sections against the references +# Check the estimated cross sections against the references for ((i=0; i < ${#mean_radius[@]}; ++i)) do iline=$(($i*(2*$nangles+$ninvcum+7)+1))