Changeset 2973 in Sophya for trunk/SophyaLib/SkyMap/pixelmap.h


Ignore:
Timestamp:
Jun 20, 2006, 6:01:49 PM (19 years ago)
Author:
ansari
Message:

1/ Nettoyage+commentaires/doxygen ds Vector3d, UnitVector, LongLat,
SphereCoordSys ...
2/ Ajout de la classe angle pour faciliter les conversions rad<>deg<>arcmin
dans le fichier vector3d.h .cc
3/ nettoyage/uniformisation methodes print pour pixelmap, ajout de la
methode PixelMap<T>::Show()
4/ Ajout methodes SphericalMap<T>::HasSymThetaSlice() et
GetSymThetaSliceIndex(int_4 idx) et leurs implementations pour
SphereHEALPix et SphereThetaPhi en vue de l'optimisation du calcul
transforme Ylm
5/ Ajout methode ResolToSizeIndex ds SphereThetaPhi , SphereHEALPix et
SphereECP

Reza , 20 Juin 2006

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/SkyMap/pixelmap.h

    r2322 r2973  
    66#include "dvlist.h"
    77#include "spherepos.h"
     8#include "datatype.h"
    89#include <iostream>
     10#include <typeinfo>
    911
    1012namespace SOPHYA {
     
    100102inline PixelMap<T>& operator = (T v) { return(SetT(v)); }
    101103
     104//! Ascii print of synthetic information about the pixelmap on stream os
     105virtual void  Show(ostream& os) const;
     106//! Show information on \b cout
     107inline  void  Show() const { Show(cout); }
    102108
    103109                     
    104 //++
     110//! Return a reference to the associated DVList object
    105111DVList& Info()
    106 //
    107 // Renvoie une reference sur l''objet DVList Associe
    108 //--
    109112  {
    110113    if (mInfo_ == NULL)  mInfo_ = new DVList;
     
    122125};
    123126
     127template <class T>
     128inline ostream& operator << (ostream& s,  const PixelMap<T> & a)
     129{ a.Show(s);   return(s); }
    124130
    125131template <class T>
     
    151157}
    152158
     159template <class T>
     160void PixelMap<T>::Show(ostream& os) const
     161{
     162os << "PixelMap<T>::Show() class: " << typeid(*this).name()
     163   << " T= " << DataTypeInfo<T>::getTypeName() << endl;
     164double solang = 0.;
     165if (NbPixels() > 0) solang = PixSolAngle(NbPixels()/2);
     166 double frac = NbPixels()*solang*100/(4.*M_PI);
     167if (frac > 100.) frac = 100.;
     168os << " NbPixels()= " << NbPixels() << " ResolArcMin ~="
     169   << Angle(sqrt(solang)).ToArcMin() << " SphereFrac ~= "
     170   << frac << " % of 4Pi" << endl;
     171}
     172
    153173
    154174} // Fin du namespace
Note: See TracChangeset for help on using the changeset viewer.