geirs2Panic  Richard J. Mathar
Fits header keyword batch editor
 All Classes Files Functions Variables Macros Pages
Window.h
Go to the documentation of this file.
1 #ifndef WINDOW_H
2 #define WINDOW_H
3 /*
4 * MPIA - GEIRS project
5 *
6 * "@(#) $Id$"
7 *
8 */
9 
10 #include <string>
11 
15 #include <CCfits/CCfits>
16 
17 using namespace std ;
18 using namespace CCfits ;
19 
24 class Window {
25 
26 public:
31  string iname ;
32 
36  int gap ;
37 
41  int chpsz ;
42 
48  int detsize[4] ;
49 
53  int trimsizeFus[4] ;
54 
60  int trimsize[4] ;
61 
64  FITS * ifits ;
65 
68  valarray<float> farr ;
69 
72  valarray<int> iarr ;
73 
76  valarray<unsigned short> usarr ;
77 
80  valarray<unsigned short> sarr ;
81 
82 #if 0
83 
86  double mima[2] ;
87 #endif
88 
92  float pixsc ;
93 
96  long bits ;
97 
100  long naxes ;
101 
102  Window(char *fitsInname, int gp =0, int csiz = 2048) ;
103 
104  Window(string fitsInname, int gp =0, int csiz = 2048) ;
105 
106  // Window(const Window & othwin) ;
107 
108  ~Window() ;
109 
110  void win2win(const int rotRight90, const bool flip) ;
111 
112  int sizeX() const ;
113 
114  int sizeY() const ;
115 
116  static bool isRef(int xin, int yin, int xchipsize, int ychipsize) ;
117 
118  bool isRef(int xin, int yin) const;
119 
120  void blankRef(int blank) ;
121 
122  void cooGeirsWinToSplicRot(int coo[2], const int rotRight90, const bool flip) ;
123 
124  static void fourPix(const string & tsiz, int coo[4],bool relwidth) ;
125 
126  string canonName() ;
127 
128  static string trimws(const string & instring) ;
129 
130  void rmFiles(bool verbose=false) ;
131 
132 protected:
133 
134  void cooGeirsNoWin(int coo[2]) ;
135 
136  void cooToWin(int coo[2]) ;
137 
138  void detIdx(const int coo[2], int idx[2]) ;
139 
140  static void pixRot(int coo[2], int rotRight90, bool flip) ;
141 
142  void cooGeirsWinToSplic(int coo[2]) ;
143 
144 
145  void cooGeirsWinToSplicRotWin(int coo[2], const int rotRight90, const bool flip) ;
146 
147 private:
148  void readPix(bool verbose);
149 
150  void init(bool verbose) ;
151 
152 } ; /* Window */
153 
154 #endif /* WINDOW_H */
FITS * ifits
The FITS file that will be read/scanned.
Definition: Window.h:64
long bits
The indication of image type (integer, short, float...)
Definition: Window.h:96
Definition: Window.h:24
valarray< unsigned short > usarr
Array of pixels in 16bit integer units.
Definition: Window.h:76
long naxes
The indication of dimension of the image (2=flat, 3=cubes,...)
Definition: Window.h:100
valarray< float > farr
array of pixels in floating point units.
Definition: Window.h:68
valarray< int > iarr
Array of pixels in 32bit integer units.
Definition: Window.h:72
string iname
Name of the input file.
Definition: Window.h:31
float pixsc
Pixel scale in units of degrees on the sky.
Definition: Window.h:92
int gap
Gap (measured in pixels) between the chips of the mosaic.
Definition: Window.h:36
int chpsz
Size (measured in pixels) of the single chip of the mosaic.
Definition: Window.h:41
valarray< unsigned short > sarr
Array of pixels in 16bit integer units.
Definition: Window.h:80