Ignore:
Timestamp:
Nov 13, 2000, 4:32:34 PM (25 years ago)
Author:
ercodmgr
Message:

Adaptateur de TArray et lecture FITS - Reza 13/11/2000

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/nomskymapadapter.cc

    r1315 r1321  
    1414#include "complexios.h"
    1515
     16#include "fitsspherehealpix.h"
     17#include "fitslocalmap.h"
     18
     19
    1620//  Classe array adapter pour localMap
    1721template <class T>
     
    105109return(NULL);
    106110}
     111
     112/* --Methode-- */
     113template <class T>
     114void NOMAdapter_PixelMap<T>::ReadFits(string const & flnm)
     115{
     116LocalMap<T>* lm = dynamic_cast< LocalMap<T> * >(mMap);
     117if (lm != NULL) {
     118  FitsInFile fis(flnm);
     119  fis >> (*lm);
     120  return;
     121}
     122SphereHEALPix<T>* sg = dynamic_cast< SphereHEALPix<T> * >(mMap);
     123if (sg != NULL) {
     124  FitsInFile fis(flnm);
     125  fis >> (*sg);
     126  return;
     127}
     128string s = typeid(*mMap).name();
     129cout << " NOMAdapter_PixelMap<T>::ReadFits() - Error "
     130     << " Not supported for " << s << endl;
     131return;
     132}
     133
     134
     135/* --Methode-- */
     136template <class T>
     137void NOMAdapter_PixelMap<T>::SaveFits(string const & flnm)
     138{
     139LocalMap<T>* lm = dynamic_cast< LocalMap<T> * >(mMap);
     140if (lm != NULL) {
     141  FitsOutFile fos(flnm);
     142  fos << (*lm);
     143  return;
     144}
     145SphereHEALPix<T>* sg = dynamic_cast< SphereHEALPix<T> * >(mMap);
     146if (sg != NULL) {
     147  FitsOutFile fos(flnm);
     148  fos << (*sg);
     149  return;
     150}
     151string s = typeid(*mMap).name();
     152cout << " NOMAdapter_PixelMap<T>::SaveFits() - Error "
     153     << " Not supported for " << s << endl;
     154return;
     155}
     156
     157// ---- Specialisation pour complexes -----
     158void NOMAdapter_PixelMap< complex<r_4> >::ReadFits(string const & flnm)
     159{
     160cout << " void NOMAdapter_PixelMap< complex<r_4> >::ReadFits() - Error "
     161     << " Not supported (complex data type)" << endl;
     162}
     163void NOMAdapter_PixelMap< complex<r_4> >::SaveFits(string const & flnm)
     164{
     165cout << " void NOMAdapter_PixelMap< complex<r_4> >::SaveFits() - Error "
     166     << " Not supported (complex data type)" << endl;
     167}
     168void NOMAdapter_PixelMap< complex<r_8> >::ReadFits(string const & flnm)
     169{
     170cout << " void NOMAdapter_PixelMap< complex<r_4> >::ReadFits() - Error "
     171     << " Not supported (complex data type)" << endl;
     172}
     173void NOMAdapter_PixelMap< complex<r_8> >::SaveFits(string const & flnm)
     174{
     175cout << " void NOMAdapter_PixelMap< complex<r_8> >::SaveFits() - Error "
     176     << " Not supported (complex data type)" << endl;
     177}
     178
    107179
    108180/* --Methode-- */
Note: See TracChangeset for help on using the changeset viewer.