1
! @(#)mosrebin1d.prg 8.4 (ESO-IPG) 02/17/95 14:41:35
2
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++
3
!.COPYRIGHT (C) 1993 European Southern Observatory
5
!.AUTHORS Sabine Moehler (LSW)
8
!.VERSION 1.0 Package Creation 17-MAR-1993
9
! 1.1 adapted for MOS 20-AUG-1993
10
!-------------------------------------------------------
12
! CROSSREF tol deg mtd guess
14
DEFINE/PARAM P1 {EXTOBJEC} IMA "Enter image to be rebinned "
15
DEFINE/PARAM P2 ? IMA "Enter result image (root name) "
16
DEFINE/PARAM P3 {REBSTRT},{REBEND},{REBSTP} N "Start, End, Step in wavelength:"
18
DEFINE/PARAM P4 {REBMET} CHA "Rebin method (SPLINE/QUADRATIC,LINEAR) :"
19
DEFINE/PARAM P5 {LINFIT} CHA "Table with dispersion coefficients: "
20
!------------------------------------------------------------------------------
24
!------------------------------------------------------------------------------
25
DEFINE/LOCAL FITD/I/1/1 0
27
WRITE/KEYW INPUTR {REBSTRT},{REBEND},{REBSTP}
28
VERIFY/MOS {LINFIT} TAB
31
WRITE/KEYW INPUTR/R/1/3 {P3}
33
!SET/FORS REBMET={P4} LINFIT={P5} REBSTRT={INPUTR(1)}
34
!SET/FORS REBEND={INPUTR(2)} REBSTP={INPUTR(3)} MOS={P6}
36
!------------------------------------------------------------------------------
38
! get numbers for rebinning method
40
!------------------------------------------------------------------------------
42
IF P4(1:1) .EQ. "L" WRITE/KEYW INPUTI/I/1/1 0 ! Method LINEAR
43
IF P4(1:1) .EQ. "Q" WRITE/KEYW INPUTI/I/1/1 1 ! Method QUADRATIC
44
IF P4(1:1) .EQ. "S" WRITE/KEYW INPUTI/I/1/1 2 ! Method SPLINE
46
IF INPUTI(1) .LT. 0 THEN
47
WRITE/OUT "Rebin: Unknown method {P4}"
51
COPY/KD INPUTR/R/1/3 {LINFIT}.tbl REBPAR/R/1/3
52
!------------------------------------------------------------------------------
54
! do polynomial regression for all coefficients
56
!------------------------------------------------------------------------------
57
! (to be done, Otmar Stahl)
59
COPY/DK {LINFIT}.tbl LNCOE FITD
64
RUN STD_EXE:mosrebin1d
65
!------------------------------------------------------------------------------
66
WRITE/OUT "Calibration Performed."