Commit dd6aa1f5 authored by Plaszczynski Stephane's avatar Plaszczynski Stephane
Browse files

fix mprof2- chnage to quadratic interpolation

parent 314ca39b
......@@ -67,6 +67,11 @@ QSUB_CMD="qsub -P P_$GROUP -pe multicores $NCORE -q mc_long -R y -j y -l sps=1"
fi
echo "QSUB command will be: ${QSUB_CMD} -t $range"
parbase=$(basename $file)
dirout=${parbase%".par"}_mprof_"${var}"
echo "output will be in: $PWD/$dirout"
echo "Is this OK? [y/n]"
read answer
if [ $answer != 'y' ] ; then
......@@ -74,10 +79,6 @@ echo "exiting"
exit 1
fi
parbase=$(basename $file)
dirout=${parbase%".par"}_mprof_"${var}"
if [ -d "$dirout" ] ; then
echo "directory $dirout exists: still want to run? (y/n)"
read answer
......@@ -156,7 +157,7 @@ cat bestfit_pico
cp -f bestfit_pico "$OUTDIR"/pico_bf\${SGE_TASK_ID}
#MODIFY par BESTFIT
grep -v "$var" $file > parfile2
grep -v "${var/\*/\\*}" $file > parfile2
echo "fix $var cosmo $zeval" >> parfile2
python ./changepars.py parfile2 bestfit_pico > parfile3
......
......@@ -27,7 +27,7 @@ chi2=chi2[w]
var=var[w]
#interpolated function
f=interp1d(var,chi2,kind='cubic')
f=interp1d(var,chi2,kind='quadratic')
#minimum
res=minimize_scalar(f,bounds=(var[0],var[-1]),method='bounded')
xmin=res.x
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment