| 1 |
! @(#)irsclean.prg 19.1 (ES0-DMD) 02/25/03 13:47:33 |
| 2 |
! @(#)irsclean.prg 19.1 (ESO-ASD) 02/25/03 13:47:33 |
| 3 |
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 4 |
!.COPYRIGHT (C) 1993 European Southern Observatory |
| 5 |
!.IDENT irsclean.prg |
| 6 |
!.AUTHOR Cristian Levin (ESO/La Silla) |
| 7 |
!.KEYWORDS XIrspec |
| 8 |
!.PURPOSE |
| 9 |
! Clean the intermediate files generated by XIrspec |
| 10 |
! Command: |
| 11 |
! @g irsclean clean_option obj ststar sky stsky |
| 12 |
! |
| 13 |
!.VERSION 1.0 Package Creation 17-MAR-1993 |
| 14 |
!----------------------------------------------------------- |
| 15 |
! |
| 16 |
define/par p1 MID C "clean option [MID/ALL] : " |
| 17 |
define/par p2 obj IMA "Object frame : " |
| 18 |
define/par p3 ststar IMA "Standard star frame : " |
| 19 |
define/par p4 sky IMA "Sky frame : " |
| 20 |
define/par p5 stsky IMA "Standard sky frame : " |
| 21 |
define/maxpar 5 |
| 22 |
! |
| 23 |
def/loc indx/i/1/1 0 |
| 24 |
def/loc obj/c/1/80 " " all |
| 25 |
def/loc ststar/c/1/80 " " all |
| 26 |
|
| 27 |
indx = m$index(p2, ".bdf") |
| 28 |
if indx .eq. 0 then |
| 29 |
write/key obj/c/1/80 'p2' |
| 30 |
else |
| 31 |
indx = 'indx' - 1 |
| 32 |
write/key obj/c/1/80 'p2(1:{indx})' |
| 33 |
endif |
| 34 |
|
| 35 |
indx = m$index(p3, ".bdf") |
| 36 |
if indx .eq. 0 then |
| 37 |
write/key ststar/c/1/80 'p3' |
| 38 |
else |
| 39 |
indx = 'indx' - 1 |
| 40 |
write/key ststar/c/1/80 'p3(1:{indx})' |
| 41 |
endif |
| 42 |
|
| 43 |
indx = m$index(p4, ".bdf") |
| 44 |
if indx .eq. 0 then |
| 45 |
write/key sky/c/1/80 'p4' |
| 46 |
else |
| 47 |
indx = 'indx' - 1 |
| 48 |
write/key sky/c/1/80 'p4(1:{indx})' |
| 49 |
endif |
| 50 |
|
| 51 |
indx = m$index(p5, ".bdf") |
| 52 |
if indx .eq. 0 then |
| 53 |
write/key stsky/c/1/80 'p5' |
| 54 |
else |
| 55 |
indx = 'indx' - 1 |
| 56 |
write/key stsky/c/1/80 'p5(1:{indx})' |
| 57 |
endif |
| 58 |
|
| 59 |
if p1(1:1) .eq. "A" then |
| 60 |
$rm -f 'obj'_?_*.bdf 'obj'_?.bdf |
| 61 |
$rm -f 'ststar'_?_*.bdf 'ststar'_?.bdf |
| 62 |
$rm -f 'sky'_?.bdf |
| 63 |
$rm -f 'stsky'_?.bdf |
| 64 |
endif |
| 65 |
|
| 66 |
$rm -f middumm* *_ref*.bdf |