1
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++
2
!.COPYRIGHT (C) 1993-2005 European Southern Observatory
4
!.AUTHORS Pascal Ballester (ESO/Garching)
5
! Cristian Levin (ESO/La Silla)
6
!.KEYWORDS Spectroscopy, Long-Slit
8
! line identification in long slit reduction
12
!.VERSION 1.0 Package Creation 17-MAR-1993
15
!-------------------------------------------------------
17
CROSSREF wlc ystart lintab tol
19
define/param p1 {wlc} CHAR "Wavelength calibration frame: "
20
define/param p2 {ystart} NUMB "Ystart: "
21
define/param p3 {lintab} CHAR "Line table: "
22
define/param p4 + N "Error:"
24
define/local cmd/c/1/20 "{mid$cmnd} " !copy Midas command string
25
define/local toler/d/1/1 0.
26
if p4(1:1) .eq. "+" then
33
set/long WLC={p1} YSTART={p2} LINTAB={p3}
38
if ystart .eq. 0 ystart = npix(2)/2
39
compute/table {lintab} :IDENT=NULL
42
if outputi(1) .eq. 0 then
43
write/out "Error: Wrong parameter YSTART = {YSTART}"
47
if cmd(1:1) .eq. "X" then
49
$ $GUI_EXE/ident.exe {aux_mode(3)} &
53
plot/row {WLC} @{YSTART}
54
identify/gcursor {LINTAB} :IDENT :X {TOLER}
55
select/table {LINTAB} ALL
60
define/param p1 {LINTAB} TAB
61
define/param p2 {YSTART} NUMB
63
define/local midscan/D/1/1 0.
64
define/local wcbin/D/1/1 0.
66
if {p2} .lt. 0 .or. {p2} .gt. npix(2) then
67
write/out "Error: Wrong parameter YSTART = {p2}"
71
wcbin = M$ABS(YSTEP*STEP(2)/2.)
73
if {p2} .eq. 0 .and. npix(2) .eq. 1 then
76
elseif {p2} .eq. 1 .or. {p2} .eq. npix(2) then
77
midscan = start(2) + ({P2}-1.)*step(2)
79
midscan = start(2) + ({P2}-0.9)*step(2)
82
select/table {p1} ABS(:Y-({midscan})).le.{wcbin}
84
if outputi(1) .eq. 0 then
85
write/out "Error: Wrong parameter YSTART = {p2}"