SINFONI Pipeline Reference Manual  2.5.2
sinfo_local_types.h
1 /*
2  * This file is part of the ESO SINFONI Pipeline
3  * Copyright (C) 2004,2005 European Southern Observatory
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
18  */
19 /*----------------------------------------------------------------------------
20 
21  File name : sinfo_local_types.h
22  Author : Nicolas Devillard
23  Created on : Nov 27, 1995
24  Description : all shared local types for eclipse
25 
26  ---------------------------------------------------------------------------*/
27 /*---------------------------------------------------------------------------
28  PUBLIC NOTICE AS REQUIRED BY LAW: Any use of this product, in any
29  manner whatsoever, will increase the amount of disorder in the
30  universe. Although no liability is implied herein, the consumer is
31  warned that this process will ultimately lead to the heat death of the
32  universe.
33  ---------------------------------------------------------------------------*/
34 /*
35  $Id: sinfo_local_types.h,v 1.4 2007-06-06 07:10:45 amodigli Exp $
36  $Author: amodigli $
37  $Date: 2007-06-06 07:10:45 $
38  $Revision: 1.4 $
39  */
40 
41 #ifndef SINFO_LOCAL_TYPES_H
42 #define SINFO_LOCAL_TYPES_H
43 /*----------------------------------------------------------------------------
44  Includes
45  *--------------------------------------------------------------------------*/
46 /*----------------------------------------------------------------------------
47  Defines
48  *--------------------------------------------------------------------------*/
49 
50 /*----------------------------------------------------------------------------
51  New types
52  ---------------------------------------------------------------------------*/
53 /*
54  * These types are defined for portability issues
55  * On DEC-Alpha stations, long is 64 bits, but int is 32
56  * We have to redefine all int values accordingly to ensure
57  * portability!
58  */
59 
60 #ifdef _DEC_ALPHA
61 typedef unsigned int ulong32 ;
62 typedef int long32 ;
63 #else
64 typedef unsigned long ulong32 ;
65 typedef long long32 ;
66 #endif
67 
68 typedef unsigned short ushort16 ;
69 typedef short short16 ;
70 
71 typedef unsigned char uchar8 ;
72 typedef char char8 ;
73 
74 typedef unsigned char BYTE ;
75 
76 /* defined in limits.h, redefined here for portability */
77 
78 #define LONG32_MIN (long32)(-2147483647-1)
79 #define LONG32_MAX (long32)(2147483647)
80 #define ULONG32_MAX (ulong32)(4294967295)
81 
82 #define SHRT16_MIN (short16)(-32768)
83 #define SHRT16_MAX (short16)(32767)
84 #define USHRT16_MAX (ushort16)(65535)
85 
86 typedef struct _DOUBLE_COMPLEX_ {
87  double x, y ;
88 } dcomplex ;
89 
90 /*--------------------------------------------------------------------------*/
91 /* pixelvalue is the internal Pixel representation */
92 
93 #ifdef DOUBLEPIX
94 typedef double pixelvalue ;
95 #else
96 typedef float pixelvalue ;
97 #endif
98 
99 
100 
101 /*
102  * dpoint: useful to store point coordinates in double precision
103  */
104 
105 typedef struct _DPOINT_ {
106  double x ;
107  double y ;
108 } dpoint ;
109 
110 
111 
112 
113 /*--------------------------------------------------------------------------*/
114 /* Pixel map */
115 
116 
117 typedef uchar8 binpix ;
118 
119 typedef struct _PIXEL_MAP_
120 {
121  int lx, ly ;
122  int nbpix ;
123  int ngoodpix ;
124  binpix * data ;
125 } pixel_map ;
126 
127 
128 #define NullMap (pixel_map*)NULL
129 
130 
131 #endif