1
! @(#)necsplituves.prg 19.1 (ESO-IPG) 02/25/03 14:19:43
2
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++
3
!.COPYRIGHT (C) 1991 European Southern Observatory
4
!.IDENT necsplituves.prg
5
!.AUTHOR Andrea Modigliani
6
!.KEYWORDS Spectroscopy, Echelle,
7
!.PURPOSE Split and rotation of UVES spectra
9
! MIDAS procedure to reformat UVES Echelle Spectra Images:!
13
! cuts it in two components, one corresponding to each UVES detector side
18
! rotates each component clockwise 90 degrees
19
! saves each component on two different assigned names
21
! inits echelle package
22
! applies to each image the hough transformation
24
! saves it on an assigned name
25
! save the defined order on an assigned filename
26
! applies the wavelength calibration
29
!.VERSION 1.0 Creation 05.10.98
30
!-------------------------------------------------------
32
DEFINE/PARAMETER p1 ? c "Set the FITS image name whithout fits extension (ima.fits=> ima): "
34
DEFINE/PARAMETER p2 {P1} c "Set the BDF image root name "
35
DEFINE/PARAM p3 NO c "Display option"
37
DEFINE/LOCAL half_x_size/D/1/1 0.
39
INTAPE/FITS 1 {p2} {p1}.fits
40
if p3(1:1) .eq. "Y" @ creifnot 2 heat
42
if p3(1:1) .eq. "y" LOAD/IMAGE {p2}0001.bdf scale=-10,-10
44
half_x_size = {{p1}0001.bdf,NPIX(1)} / 2
47
EXTRACT/IMAGE {p2}_low.bdf = {p2}0001.bdf [{half_x_size}+1,<:>,>]
48
if p3(1:1) .eq. "y" LOAD/IMAGE {p2}_low.bdf scale=-10,-10
49
ROTATE/CLOCK {p2}_low.bdf {p2}_low_r.bdf
50
FLIP/IMAGE {p2}_low_r.bdf X
51
WRITE/DESCRIPTOR {p2}_low_r.bdf start/D/1/2, 1,1
52
WRITE/DESCRIPTOR {p2}_low_r.bdf step/D/1/2, 1,1
55
EXTRACT/IMAGE {p2}_upp.bdf = {p2}0001.bdf [<,<:{half_x_size},>]
56
if p3(1:1) .eq. "y" LOAD/IMAGE {p2}_upp.bdf scale=-10,-10
57
ROTATE/CLOCK {p2}_upp.bdf {p2}_upp_r.bdf
58
FLIP/IMAGE {p2}_upp_r.bdf X
59
WRITE/DESCRIPTOR {p2}_upp_r.bdf start/D/1/2, 1,1
60
WRITE/DESCRIPTOR {p2}_upp_r.bdf step/D/1/2, 1,1
63
if p3(1:1) .eq. "y" LOAD/IMAGE {p2}_low_r.bdf scale=-10,-10
64
if p3(1:1) .eq. "y" LOAD/IMAGE {p2}_upp_r.bdf scale=-10,-10
66
$rm {p2}_low.bdf {p2}_upp.bdf {p2}0001.bdf