Changeset 2933 in Sophya for trunk/SophyaPI/PIext/nomskymapadapter.cc
- Timestamp:
- Apr 3, 2006, 2:20:29 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/nomskymapadapter.cc
r2689 r2933 14 14 #include "pitvmaad.h" 15 15 #include "complexios.h" 16 17 #include "fitsspherehealpix.h"18 #include "fitslocalmap.h"19 16 20 17 // Valeur par defaut pour la projection MolleWeide, en dehors de la sphere … … 122 119 if (se != NULL) return( new SphereECP<T>(*se, share) ); 123 120 return(NULL); 124 }125 126 /* --Methode-- */127 template <class T>128 void NOMAdapter_PixelMap<T>::ReadFits(string const & flnm)129 {130 LocalMap<T>* lm = dynamic_cast< LocalMap<T> * >(mMap);131 if (lm != NULL) {132 FitsInFile fis(flnm);133 fis >> (*lm);134 return;135 }136 SphereHEALPix<T>* sg = dynamic_cast< SphereHEALPix<T> * >(mMap);137 if (sg != NULL) {138 FitsInFile fis(flnm);139 fis >> (*sg);140 return;141 }142 string s = typeid(*mMap).name();143 cout << " NOMAdapter_PixelMap<T>::ReadFits() - Error "144 << " Not supported for " << s << endl;145 return;146 }147 148 149 /* --Methode-- */150 template <class T>151 void NOMAdapter_PixelMap<T>::SaveFits(string const & flnm)152 {153 LocalMap<T>* lm = dynamic_cast< LocalMap<T> * >(mMap);154 if (lm != NULL) {155 FitsOutFile fos(flnm);156 fos << (*lm);157 return;158 }159 SphereHEALPix<T>* sg = dynamic_cast< SphereHEALPix<T> * >(mMap);160 if (sg != NULL) {161 FitsOutFile fos(flnm);162 fos << (*sg);163 return;164 }165 string s = typeid(*mMap).name();166 cout << " NOMAdapter_PixelMap<T>::SaveFits() - Error "167 << " Not supported for " << s << endl;168 return;169 }170 171 // ---- Specialisation pour complexes -----172 DECL_TEMP_SPEC /* equivalent a template <> , pour SGI-CC en particulier */173 void NOMAdapter_PixelMap< complex<r_4> >::ReadFits(string const & flnm)174 {175 cout << " void NOMAdapter_PixelMap< complex<r_4> >::ReadFits() - Error "176 << " Not supported (complex data type)" << endl;177 }178 DECL_TEMP_SPEC /* equivalent a template <> , pour SGI-CC en particulier */179 void NOMAdapter_PixelMap< complex<r_4> >::SaveFits(string const & flnm)180 {181 cout << " void NOMAdapter_PixelMap< complex<r_4> >::SaveFits() - Error "182 << " Not supported (complex data type)" << endl;183 }184 DECL_TEMP_SPEC /* equivalent a template <> , pour SGI-CC en particulier */185 void NOMAdapter_PixelMap< complex<r_8> >::ReadFits(string const & flnm)186 {187 cout << " void NOMAdapter_PixelMap< complex<r_4> >::ReadFits() - Error "188 << " Not supported (complex data type)" << endl;189 }190 DECL_TEMP_SPEC /* equivalent a template <> , pour SGI-CC en particulier */191 void NOMAdapter_PixelMap< complex<r_8> >::SaveFits(string const & flnm)192 {193 cout << " void NOMAdapter_PixelMap< complex<r_8> >::SaveFits() - Error "194 << " Not supported (complex data type)" << endl;195 121 } 196 122
Note:
See TracChangeset
for help on using the changeset viewer.