Changeset 857 in Sophya for trunk/SophyaProg/Tests/tspm2.cc


Ignore:
Timestamp:
Apr 10, 2000, 3:04:05 PM (25 years ago)
Author:
ansari
Message:

Adapatation a SphereHEALPix, correction tsttmatrix.cc tsttvector.cc - Reza 10/4/2000

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaProg/Tests/tspm2.cc

    r819 r857  
    11#include <iostream.h>
    22#include <math.h>
    3 #include "skymapinit.h"
    4 #include "spheregorski.h"
    5 #include "spherethetaphi.h"
     3#include "sambainit.h"
     4#include "skymap.h"
    65
    76#include "tod.h"
     
    8786  InitTim();   // Initializing the CPU timer
    8887  if ((narg > 1) && (strcmp(arg[1],"-h") == 0) )  {
    89     cout << " tspm [Gorski_M=32] : Gorski Spherical Map Test " << endl;
     88    cout << " tspm [HEALPix_M=32] : HEALPix Spherical Map Test " << endl;
    9089    exit(0);
    9190    }
     
    9392  int  m=32;
    9493  if (narg >1)  m = atoi(arg[1]);
    95   cout <<  " ===== Gorski Spherical Map Test M= " << m << endl;
     94  cout <<  " ===== HEALPix Spherical Map Test M= " << m << endl;
    9695
    9796  POutPersist s("spheres.ppf");
     
    9998
    10099  {
    101   SphereGorski<double> sph(m);
     100  SphereHEALPix<double> sph(m);
    102101
    103102  cout << "Filling spherical map NPixels= " << sph.NbPixels() << endl;
     
    110109
    111110   {
    112    FIO_SphereGorski<double> fiog(&sph) ;
     111   FIO_SphereHEALPix<double> fiog(&sph) ;
    113112   nomobj = "sphg1";
    114113   fiog.Write(s, nomobj);
    115    cout << "SphMap SphereGorski<double> written to POutPersist with name "  << nomobj << endl;
     114   cout << "SphMap SphereHEALPix<double> written to POutPersist with name "  << nomobj << endl;
    116115   }
    117116
     
    149148
    150149  {
    151   SphereGorski<float> sph(m);
     150  SphereHEALPix<float> sph(m);
    152151
    153152  cout << "Filling spherical map2 NPixels= " << sph.NbPixels() << endl;
     
    166165
    167166   {
    168    FIO_SphereGorski<float> fiog(&sph) ;
     167   FIO_SphereHEALPix<float> fiog(&sph) ;
    169168   nomobj = "sphg2";
    170169   fiog.Write(s, nomobj);
    171    cout << "SphMap SphereGorski<float> written to POutPersist with name "  << nomobj << endl;
     170   cout << "SphMap SphereHEALPix<float> written to POutPersist with name "  << nomobj << endl;
    172171   }
    173172
     
    176175  FitsIoServer fios;
    177176   {
    178    cout << "Test of Write/Read SphereGorski<float> to FITS (sphg_r4.fits) " << endl;
     177   cout << "Test of Write/Read SphereHEALPix<float> to FITS (sphg_r4.fits) " << endl;
    179178   fios.save(sph, "sphg_r4.fits");
    180179 
    181    SphereGorski<float> sphr(4);
     180   SphereHEALPix<float> sphr(4);
    182181   fios.load(sphr, "sphg_r4.fits", 2);
    183    cout << " Read from file - SphereGorski<float> NPixels= " << sphr.NbPixels() << endl;
     182   cout << " Read from file - SphereHEALPix<float> NPixels= " << sphr.NbPixels() << endl;
    184183   int ndiff = 0;
    185184   for(int k=0; k<sphr.NbPixels(); k++) {
Note: See TracChangeset for help on using the changeset viewer.