Astronomska skupina Fakultete za matematiko in fiziko Univerze v Ljubljani
Teleskop Vega
 #!/bin/sh
 #
 # Ta program sesteje serijo slik
 # slike morajo imeti vpisane WCS koordinate, to je 
 # narejen match (plate solution) npr. s programom fitsblink
 #
 # dec 2003, B.Dintinjana
 #
 ARGS=2
 E_WRONGARGS=65
 export TERM=xterm
 if [ $# -lt "$ARGS" ]
 then
   echo "Usage: `basename $0` <out-image> <input images list>"
   exit $E_WRONGARGS
 fi
 # najprej pocisti
 if [ -e $1 ]
 then
    rm -f $1
 fi
 # pripravi parametre
 outimage=$1
 refimage=$2         # prva slika na spisku za sestet
 datapath=$(pwd)
 shift
 # pripravi spisek slik v datoteki
 rm -f imlist
 rm -f outlist
 until [ -z "$1" ]
 do
  lastimage=$1
  if grep MATCHED`?
  then  
     echo "$1 " >> imlist
     echo `basename $1 | sed -e 's/.fts/-wcs.fts/'` >> outlist
  else
     echo "Pozor slika $1 nima matcha, izlocim."
  fi
  shift
 done


 cd $HOME
 pwd
 echo ------Iraf------------
 cl -o <<Iraf-Process
    # zacetek iraf programa

    real jdlast
    real jdfirst
    real expo
    real evalue
    cd $datapath
    # slike najprej poravnam po wcs
    unlearn wregister
    wregister.function = "legendre"
    wregister.xxorder = 6
    wregister.xyorder = 6
    wregister.xxterms = "half"
    wregister.yxorder = 6
    wregister.yyorder = 6
    wregister.yxterms = "half"
    wregister.reject = INDEF
    wregister.calctype = "real"
    wregister.geometry = "geometric"
    wregister.xsample = 1.
    wregister.ysample = 1.
    wregister.interpolant = "nearest"
    wregister.boundary = "constant"
    wregister.constant = 1.
    wregister.fluxconserve = yes
    wregister @imlist $refimage @outlist
    # poravnane slike zlozim skupaj
    unlearn imcombine
    imcombine.outtype = "ushort"
    imcombine.lthreshold = 2
    imcombine.combine = "median"
    imcombine.expname = "EXPOSURE"
    imcombine.weight = "exposure"
    imcombine @outlist $outimage
    # popravim vrednost EXPOSURE v glavi, je cas od prve do
    # konca zadnje slike, to ni dobro,
    imgets $lastimage "JD"
    jdlast=real(imgets.value)
    imgets $refimage "JD"
    jdfirst=real(imgets.value)
    imgets $outimage "EXPOSURE"
    expo=real(imgets.value)
    evalue=expo+(jdlast-jdfirst)*86400.0
    #hedit $outimage "EXPOSURE" value=real(evalue) verify=no
    #hedit $outimage "EXPTIME"  value=real(evalue) verify=no
    logout
    # konec iraf programa
 Iraf-Process
 cd $datapath
 # pocisti za seboj
 for i in $(cat outlist)
 do
    echo $i
    # rm -f $i
 done
 exit
Zadnja sprememba 05.06.2014 17:15 UTC
© Copyright 2004-2022
B.Dintinjana
Univerza v Ljubljani, F M F
Pot na Golovec 25
1000 Ljubljana, Slovenija