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

« back to all changes in this revision

Viewing changes to stdred/ccdred/libsrc/mo_tblwpar.c

  • 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
/*===========================================================================
 
2
  Copyright (C) 1995-2009 European Southern Observatory (ESO)
 
3
 
 
4
  This program is free software; you can redistribute it and/or 
 
5
  modify it under the terms of the GNU General Public License as 
 
6
  published by the Free Software Foundation; either version 2 of 
 
7
  the License, or (at your option) any later version.
 
8
 
 
9
  This program is distributed in the hope that it will be useful,
 
10
  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
  GNU General Public License for more details.
 
13
 
 
14
  You should have received a copy of the GNU General Public 
 
15
  License along with this program; if not, write to the Free 
 
16
  Software Foundation, Inc., 675 Massachusetts Ave, Cambridge, 
 
17
  MA 02139, USA.
 
18
 
 
19
  Correspondence concerning ESO-MIDAS should be addressed as follows:
 
20
        Internet e-mail: midas@eso.org
 
21
        Postal address: European Southern Observatory
 
22
                        Data Management Division 
 
23
                        Karl-Schwarzschild-Strasse 2
 
24
                        D 85748 Garching bei Muenchen 
 
25
                        GERMANY
 
26
===========================================================================*/
 
27
 
 
28
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
29
.IDENTIFIER  mo_tblwpar.c
 
30
.AUTHOR      R.H. Warmels IPG-ESO Garching
 
31
.KEYWORDS    mosaicing software
 
32
.LANGUAGE    C
 
33
.PURPOSE     Write the data base parameters in the table descriptor
 
34
.ENVIRONment MIDAS
 
35
             #include <ccd_def.h>      Symbols used by the ccd package
 
36
.VERSION     1.0     16-May-1995   creation
 
37
 
 
38
 090526         last modif
 
39
------------------------------------------------------------*/
 
40
/*
 
41
 * Define _POSIX_SOURCE to indicate
 
42
 * that this is a POSIX program
 
43
 */
 
44
#define  _POSIX_SOURCE 1
 
45
 
 
46
/*
 
47
 * definition of the used functions in this module
 
48
 */
 
49
 
 
50
#include <midas_def.h>
 
51
#include <stdio.h>
 
52
#include <string.h>
 
53
#include <stdlib.h>
 
54
#include <math.h>
 
55
 
 
56
#include <ccd_def.h>
 
57
 
 
58
 
 
59
void MO_TBLWPAR(tbl, im_sec, med_sec)
 
60
int    tbl;                                /* table file number */
 
61
char   *im_sec;
 
62
char   *med_sec;
 
63
{
 
64
int    uni;
 
65
int    status;
 
66
int    ncols;
 
67
int    nrows;
 
68
int    nxsub;
 
69
int    nysub;
 
70
int    nxover;
 
71
int    nyover;
 
72
 
 
73
float  usrnul;
 
74
 
 
75
char   corner[4];
 
76
char   raster[4];
 
77
char   order[4];
 
78
 
 
79
ncols  = MO_NCOLS;
 
80
nrows  = MO_NROWS;
 
81
nxsub  = MO_NXSUB;
 
82
nysub  = MO_NYSUB;
 
83
nxover = MO_NXOVERLAP;
 
84
nyover = MO_NYOVERLAP;
 
85
 
 
86
status = SCDWRC(tbl, "IM_SEC",1,im_sec,1,40,&uni);
 
87
status = SCDWRC(tbl, "MED_SEC",1,med_sec,1,40,&uni);
 
88
status = SCDWRI(tbl, "MO_NCOLS",&ncols,1,1,&uni);
 
89
status = SCDWRI(tbl, "MO_NROWS",&nrows,1,1,&uni);
 
90
status = SCDWRI(tbl, "MO_NXSUB",&nxsub,1,1,&uni);
 
91
status = SCDWRI(tbl, "MO_NYSUB",&nysub,1,1,&uni);
 
92
status = SCDWRI(tbl, "MO_NXOVERLAP",&nxover,1,1,&uni);
 
93
status = SCDWRI(tbl, "MO_NYOVERLAP",&nyover,1,1,&uni);
 
94
 
 
95
switch( MO_CORNER ) 
 
96
   {
 
97
   case 1:
 
98
      (void) strcpy(corner,MO_LL);
 
99
      status = SCDWRC(tbl, "MO_CORNER",1,corner,1,2,&uni);
 
100
      break;
 
101
   case 2:
 
102
      (void) strcpy(corner,MO_LR);
 
103
      status = SCDWRC(tbl, "MO_CORNER",1,corner,1,2,&uni);
 
104
      break;
 
105
   case 3:
 
106
      (void) strcpy(corner,MO_UL);
 
107
      status = SCDWRC(tbl, "MO_CORNER",1,corner,1,2,&uni);
 
108
      break;
 
109
   case 4:
 
110
      (void) strcpy(corner,MO_UR);
 
111
      status = SCDWRC(tbl, "MO_CORNER",1,corner,1,2,&uni);
 
112
      break;
 
113
    }
 
114
 
 
115
(void) strcpy(order,MO_ORDER);
 
116
status = SCDWRC(tbl, "MO_ORDER", 1, order, 1, 3, &uni);
 
117
 
 
118
(void) strcpy(raster,MO_RASTER);
 
119
status = SCDWRC(tbl, "MO_RASTER", 1, raster, 1, 3, &uni);
 
120
 
 
121
usrnul = MO_BLANK;
 
122
status = SCDWRR(tbl, "MO_BLANK", &usrnul, 1, 1, &uni);
 
123
 
 
124
}
 
125