!******************************************************************************* ! E.S.O. - VLT project ! ! "@(#) $Id: midas2skycat.prg,v 2.43 2004/06/17 23:04:35 vltsccm Exp $" ! ! who when what ! -------- -------- ---------------------------------------------- ! hummel 08/12/99 created ! !************************************************************************ ! NAME ! midas2skycat - creates target list for ESO-SkyCat ! ! SYNOPSIS ! midas2skycat image file ! ! DESCRIPTION ! This interactive ESO-MIDAS batch does ! -SEARCH/INVENT on the input frame ! -corrects the WCS in the output table ! -saves the table into the default output ascii file 'mid2skcat.asc' ! This ascii file can be converted to a ESO-SkyCat readable ! catalog to be used by FIMS for MOS/MXU automatic slit ! positioning. ! ! FILES ! midas2skycat.prg ! midas2skycat.sh ! mid2skcat.asc (default output file) ! ! ENVIRONMENT ! ESO-MIDAS ! ESO-SkyCat ! ESO-FIMS ! ! RETURN VALUES ! none ! ! CAUTIONS ! The input image must be a raw FORS1/2 image with world coordinates ! without any rotation (CROTA1/2 == 0) ! ! EXAMPLES ! midas2skycat FORS2_IMG_0815.fits NGC_0815.targ ! ! SEE ALSO ! midas2skycat.sh ! ! BUGS ! !------------------------------------------------------------------------ ! ! signal trap (if any) ! ! ___oOo___ clear/channel over DEFINE/PARAMETER P1 FORSFieldAcq321.1.fits I "Enter wcs image>" DEFINE/PARAMETER P2 mid2skcat.asc I "Enter output asciifile>" show/contexts set/context invent show/commands ! statistics/ima {P1} show/inve S A set/inve S A ! +++++++++++++++++++++++++++++++++++++++++++++ write/out "midas2skycat: start search/invent" search/invent {P1} result ! read/tab result @1..3 cre/dis ! +++++++++++++++++++++++++++++++++++++++++++++ write/out "midas2skycat: load/ima {P1} scale=-4,-4, center=@1020,@1020" load/ima {P1} scale=-4,-4 center=@1020,@1020 load/lut heat ! show/table result ! there is something wrong with ! search/invent when using WCS ! try to debug copy/DK {P1} CRVAL/d/1/2 crval CREATE/COLUMN result :ra0 CREATE/COLUMN result :del0 ! show/table result DEFINE/LOCAL maxpix/I/1/1 copy/key OUTPUTI/I/6/1 maxpix/I/1/1 ! read/key maxpix write/out "midas2skycat: start slow copy/kt" DEFINE/LOCAL LL/I/1/1 0 DO LL = 1 {maxpix(1)} 1 copy/kt crval/D/1/2 result :ra0 :del0 @{LL} ENDDO ! +++++++++++++++++++++++++++++++++++++++++++++ write/out "midas2skycat: start compute/table" compute/table result :X = (:X-:ra0) / COS(:del0) + :ra0 ! show/tab result ! read/tab result @1..10 name/column result :X ? "WCS" R10.5 name/column result :Y ? "WCS" S12.6 name/column result :IDENT ? ? F5.0 ! show/tab result read/tab result @1..10 load/table result :X :Y ? ? ? 4 load/image {P1} scale=1,1 load/lut rainbow3 clear/channel over load/table result :X :Y ? ? ? 3 PROJECTION/TABLE result OUTAB :IDENT,X,Y,BG,INT,AR assign/print FILE {P2} print/table OUTAB ? ? N assign/print TERM ! clear/channel over