added bulk interpolation fix script

This commit is contained in:
caes 2016-06-10 01:05:29 -04:00
parent 83dcad1348
commit 84c621f35e
3 changed files with 43 additions and 18 deletions

View File

@ -0,0 +1,25 @@
#!/bin/bash
script_dir=$( cd $(dirname $0) ; pwd -P |sed 's@^\(.*\)/scripts.*@\1/scripts@')
basedir=`pwd`
if [[ -x $script_dir/../bin/interpolate_fix]];
then
echo "Binary available. Proceeding."
else
echo "Binary unavailable. Exiting."
exit 9
fi
#for fortfile in $(echo fort.*);
for fortfile in $@
do
if [[ -e $(basename $fortfile) ]]
then
mkdir -p uninterpolated
mv $fortfile uninterpolated
echo $script_dir/../bin/interpolate_fix uninterpolated/$(basename $fortfile) $fortfile
else
echo $script_dir/../bin/interpolate_fix $fortfile $(basename $fortfile)
fi
exit 0

View File

@ -43,7 +43,7 @@ int main(int argc, char const *argv[]) {
outlier_it++;
}
std::ofstream smoothed_table_file;
smoothed_table_file.open("smoothed_eqwidth_table");
smoothed_table_file.open(argv[2]);
smoothed_table_file << agn::format_eqwidth_table(smooth_table);
smoothed_table_file.close();