Hi

mischa hat geschrieben:ich wuerde die '~' durch den kompletten pfad ersetzen. manche shells loesen das nicht richtig auf,
da hatte ich mal probleme.
Upps ! Dann ist das Script aber von Haus aus nicht sauber :
USERDIR=~/.theli/scripts/
Das kommt nicht von mir
OK, noch was vergessen. Den coadd.head sollte man auch mit temporär kopieren, da sonst die Imagegröße (und vermutlich noch so einiges) nicht mitgenommen wird. Hier das "neue" Script, das jetzt hoffentlich auch funktioniert :
- Code: Alles auswählen
#!/bin/bash -xv
# the script coadds images with
# Emmanuels swarp program. It takes
# the resampled images created by
# resample_coadd_swarp_para.sh.
# So far it cannot be parallelised!
#
# Note that a coaddition with another header
# than that created by prepare_coadd_swarp.sh
# and later used by resample_coadd_swarp_para.sh
# leads to false results !!!
# 02.03.2004:
# The ending of the resampled FITS images is now
# "COADIDENT".resamp.fits instead of simply .resamp.fits
#
# 04.11.2011:
# placing coadd.fits and coadd.weight.fits temporarily
# in the tmp-folder to speed up the coadd-process
#$1: main dir.
#$2: science dir.
INSTDIR=instruments_professional
if [ ! -f ${INSTDIR}/${INSTRUMENT}.ini ]; then
INSTDIR=instruments_commercial
fi
if [ ! -f ${INSTDIR}/${INSTRUMENT}.ini ]; then
INSTDIR=~/.theli/instruments_user/
fi
. ${INSTDIR}/${INSTRUMENT:?}.ini
DIR=`pwd`
PSCALE=${PIXSCALE}
if [ ! "${V_COADD_PIXSCALE}_A" = "_A" ]; then
PSCALE=${V_COADD_PIXSCALE}
fi
USERDIR=~/.theli/scripts/
if [ "${V_COADD_IDENT}_A" = "_A" ]; then
V_COADD_IDENT="default"
fi
cd /$1/$2/coadd_${V_COADD_IDENT}
# cp ${USERDIR}/coadd.head .
cp ${USERDIR}/coadd.head ~/.theli/tmp/
# and simply go!!!
SWARPCONF=${DATACONF}/create_coadd_swarp2.swarp
${P_SWARP} -c ${SWARPCONF} \
*.${V_COADD_IDENT}.resamp.fits \
-RESAMPLE N -COMBINE Y -IMAGEOUT_NAME ~/.theli/tmp/coadd.fits \
-PIXEL_SCALE ${PSCALE} \
-WEIGHTOUT_NAME ~/.theli/tmp/coadd.weight.fits \
-WEIGHT_TYPE MAP_WEIGHT \
-CELESTIAL_TYPE ${V_COADD_CELESTIALTYPE} \
-PROJECTION_TYPE ${V_COADD_PROJECTION} \
-RESAMPLING_TYPE ${V_COADD_KERNEL} \
-COMBINE_TYPE ${V_COADD_COMBINETYPE} \
-NTHREADS ${NPARA} \
-BLANK_BADPIXELS Y
mv ~/.theli/tmp/coadd.fits .
mv ~/.theli/tmp/coadd.weight.fits .
# rm coadd.head
rm ~/.theli/tmp/coadd.head
if [ ! "${V_COADD_SKYPOSANGLE}_A" = "_A" ]; then
${P_REPLACEKEY} coadd.fits "CROTA2 = ${V_COADD_SKYPOSANGLE}" "DUMMY1"
fi
cd ${DIR}
Ob das Script jemals den Weg in eine neue Theli-Release finden wird, sei mal dahin gestellt
Thomas