~ubuntu-branches/debian/jessie/eso-midas/jessie

« back to all changes in this revision

Viewing changes to stdred/mos/proc/mosrebin1d.prg

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-22 14:44:58 UTC
  • Revision ID: package-import@ubuntu.com-20140422144458-okiwi1assxkkiz39
Tags: upstream-13.09pl1.2+dfsg
ImportĀ upstreamĀ versionĀ 13.09pl1.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
! @(#)mosrebin1d.prg    8.4 (ESO-IPG) 02/17/95 14:41:35
 
2
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
3
!.COPYRIGHT   (C) 1993 European Southern Observatory
 
4
!.IDENT       mosrebin.prg
 
5
!.AUTHORS     Sabine Moehler   (LSW)
 
6
!.KEYWORDS    MOS
 
7
!.PURPOSE     
 
8
!.VERSION     1.0  Package Creation  17-MAR-1993  
 
9
!             1.1  adapted for MOS   20-AUG-1993   
 
10
!-------------------------------------------------------
 
11
!
 
12
! CROSSREF tol deg mtd guess
 
13
!
 
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:"
 
17
!
 
18
DEFINE/PARAM  P4  {REBMET}        CHA "Rebin method (SPLINE/QUADRATIC,LINEAR) :"
 
19
DEFINE/PARAM  P5  {LINFIT}        CHA "Table with dispersion coefficients: "
 
20
!------------------------------------------------------------------------------
 
21
 
22
! Local variables
 
23
!
 
24
!------------------------------------------------------------------------------
 
25
DEFINE/LOCAL FITD/I/1/1 0
 
26
!
 
27
WRITE/KEYW   INPUTR {REBSTRT},{REBEND},{REBSTP}
 
28
VERIFY/MOS  {LINFIT} TAB
 
29
VERIFY/MOS  {P1} IMA
 
30
!
 
31
WRITE/KEYW INPUTR/R/1/3 {P3}
 
32
!
 
33
!SET/FORS REBMET={P4} LINFIT={P5} REBSTRT={INPUTR(1)}
 
34
!SET/FORS REBEND={INPUTR(2)} REBSTP={INPUTR(3)} MOS={P6}
 
35
!
 
36
!------------------------------------------------------------------------------
 
37
!
 
38
! get numbers for rebinning method
 
39
!
 
40
!------------------------------------------------------------------------------
 
41
INPUTI(1) = -1
 
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
 
45
!
 
46
IF INPUTI(1) .LT. 0  THEN
 
47
   WRITE/OUT "Rebin: Unknown method {P4}"
 
48
   RETURN/EXIT
 
49
ENDIF
 
50
!
 
51
COPY/KD INPUTR/R/1/3 {LINFIT}.tbl REBPAR/R/1/3
 
52
!------------------------------------------------------------------------------
 
53
!
 
54
! do polynomial regression for all coefficients
 
55
!
 
56
!------------------------------------------------------------------------------
 
57
! (to be done, Otmar Stahl)
 
58
!
 
59
COPY/DK    {LINFIT}.tbl LNCOE FITD
 
60
!
 
61
WRITE/KEYW  IN_A         {P1}
 
62
WRITE/KEYW  IN_B         {P5} 
 
63
WRITE/KEYW  OUT_A        {P2}
 
64
RUN STD_EXE:mosrebin1d
 
65
!------------------------------------------------------------------------------
 
66
WRITE/OUT  "Calibration Performed."
 
67
!