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 |
|
---|
10 | class FitsIoServer
|
---|
11 | {
|
---|
12 | public :
|
---|
13 | FitsIoServer() : 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 | }
|
---|
20 | void load(SphericalMap<double>& sph, char flnm[]);
|
---|
21 | void load(SphericalMap<float>& sph, char flnm[]);
|
---|
22 | void load(TMatrix<double>& mat, char flnm[]);
|
---|
23 | void load(LocalMap<double>& sph, char flnm[]);
|
---|
24 | void save(SphericalMap<double>& sph, char flnm[]);
|
---|
25 | void save(SphericalMap<float>& sph, char flnm[]);
|
---|
26 | void save(LocalMap<double>& locm, char flnm[]);
|
---|
27 | void save(TMatrix<double>& mat, char flnm[]);
|
---|
28 | void sinus_picture_projection(SphericalMap<double>& sph, char flnm[]);
|
---|
29 | void sinus_picture_projection(SphericalMap<float>& sph, char flnm[]);
|
---|
30 | void picture(LocalMap<double>& lcm, char flnm[]);
|
---|
31 | private :
|
---|
32 | void read_sphere(char flnm[], int& npixels, int& nside);
|
---|
33 | void planck_write_img( fitsfile *fptr, int naxis,int n1, int n2, int n3, DVList& dvl);
|
---|
34 | void planck_read_img( fitsfile *fptr, long& naxis,int& n1, int& n2, int& n3, DVList& dvl);
|
---|
35 | void write_picture(long* naxes, float* map, char* filename) const;
|
---|
36 |
|
---|
37 | void printerror(int status) const;
|
---|
38 | inline 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 | }
|
---|
54 | int FITS_tab_typ_;
|
---|
55 | int* itab_;
|
---|
56 | float* ftab_;
|
---|
57 | double* dtab_;
|
---|
58 | };
|
---|
59 | #endif
|
---|
60 |
|
---|
61 |
|
---|
62 |
|
---|