source: Sophya/trunk/SophyaExt/FitsIOServer/fitsioserver.h@ 471

Last change on this file since 471 was 471, checked in by ansari, 26 years ago

creation FitsioServer

File size: 1.7 KB
Line 
1#ifndef FITSIOSERVER_SEEN
2#define FITSIOSERVER_SEEN
3
4#include "fitsio.h"
5#include "tvector.h"
6#include "sphericalmap.h"
7#include "localmap.h"
8#include "dvlist.h"
9
10class FitsIoServer
11{
12public :
13FitsIoServer() : FITS_tab_typ_(0), itab_(NULL), ftab_(NULL), dtab_(NULL) {;}
14~FitsIoServer()
15 {
16 if (itab_ != NULL) delete [] itab_;
17 if (ftab_ != NULL) delete [] ftab_;
18 if (dtab_ != NULL) delete [] dtab_;
19 }
20void load(SphericalMap<double>& sph, char flnm[]);
21void load(SphericalMap<float>& sph, char flnm[]);
22void load(TMatrix<double>& mat, char flnm[]);
23void load(LocalMap<double>& sph, char flnm[]);
24void save(SphericalMap<double>& sph, char flnm[]);
25void save(SphericalMap<float>& sph, char flnm[]);
26void save(LocalMap<double>& locm, char flnm[]);
27void save(TMatrix<double>& mat, char flnm[]);
28void sinus_picture_projection(SphericalMap<double>& sph, char flnm[]);
29void sinus_picture_projection(SphericalMap<float>& sph, char flnm[]);
30void picture(LocalMap<double>& lcm, char flnm[]);
31private :
32void read_sphere(char flnm[], int& npixels, int& nside);
33void planck_write_img( fitsfile *fptr, int naxis,int n1, int n2, int n3, DVList& dvl);
34void planck_read_img( fitsfile *fptr, long& naxis,int& n1, int& n2, int& n3, DVList& dvl);
35void write_picture(long* naxes, float* map, char* filename) const;
36
37void printerror(int status) const;
38inline int key_type_PL2FITS(char typ)
39 {
40 switch (typ)
41 {
42 case 'I' :
43 return TINT;
44 case 'D' :
45 return TDOUBLE;
46 case 'S' :
47 return TSTRING;
48 default :
49 cout << " FITSIOSERVER : type de donnee non prevu " << endl;
50 return 0;
51 }
52
53 }
54int FITS_tab_typ_;
55int* itab_;
56float* ftab_;
57double* dtab_;
58};
59#endif
60
61
62
Note: See TracBrowser for help on using the repository browser.