[2615] | 1 | #include "sopnamsp.h"
|
---|
[764] | 2 | #include "smathconst.h"
|
---|
| 3 | #include <complex>
|
---|
[809] | 4 | #include "fiondblock.h"
|
---|
[2322] | 5 | #include <iostream>
|
---|
[764] | 6 |
|
---|
[3836] | 7 | #define SPHERETHETAPHI_CC_BFILE // avoid extern template declarations
|
---|
| 8 | #include "spherethetaphi.h"
|
---|
[764] | 9 |
|
---|
[4066] | 10 | //----- global print level for spherical maps -----
|
---|
| 11 | static int_4 pixel_map_prt_lev_ = 0;
|
---|
| 12 | // Set global print level
|
---|
| 13 | void SOPHYA::PixelMap_SetGlobalPrintLevel(int_4 lev)
|
---|
| 14 | { pixel_map_prt_lev_=lev; }
|
---|
| 15 | // Get global print level
|
---|
| 16 | int_4 SOPHYA::PixelMap_GetGlobalPrintLevel()
|
---|
| 17 | { return pixel_map_prt_lev_; }
|
---|
| 18 | //----------------------------------------------------
|
---|
[3836] | 19 |
|
---|
[2303] | 20 | /*!
|
---|
| 21 | \class SOPHYA::SphereThetaPhi
|
---|
| 22 | \ingroup SkyMap
|
---|
[2808] | 23 |
|
---|
| 24 | \brief Spherical map with equal latitude (iso-theta) rings
|
---|
| 25 |
|
---|
| 26 |
|
---|
[2303] | 27 | Class implementing spherical maps, with equal latitude (iso-theta) rings
|
---|
| 28 | pixelisation scheme - with template data types (double, float, complex, ...)
|
---|
| 29 |
|
---|
| 30 | sphere splitted with respect to theta, phi : each hemisphere is
|
---|
| 31 | splitted into (m-1) parallels (equator does not enter into account).
|
---|
| 32 | This operation defines m slices, each of which is splitted into
|
---|
| 33 | equidistant meridians. This splitting is realized in such a way that
|
---|
| 34 | all pixels have the same area and are as square as possible.
|
---|
| 35 |
|
---|
| 36 | One begins with the hemisphere with positive z, starting from the pole
|
---|
| 37 | toward the equator. The first pixel is the polar cap ; it is circular
|
---|
| 38 | and centered on theta=0.
|
---|
| 39 | */
|
---|
| 40 |
|
---|
[764] | 41 | //***************************************************************
|
---|
| 42 | //++
|
---|
| 43 | // Class SphereThetaPhi
|
---|
| 44 | //
|
---|
| 45 | //
|
---|
| 46 | // include spherethetaphi.h
|
---|
| 47 | //--
|
---|
| 48 | //++
|
---|
| 49 | //
|
---|
| 50 | // Links Parents
|
---|
| 51 | //
|
---|
| 52 | // SphericalMap
|
---|
| 53 | //--
|
---|
| 54 |
|
---|
| 55 | /* --Methode-- */
|
---|
| 56 | //++
|
---|
| 57 | // Titre Constructors
|
---|
| 58 | //--
|
---|
| 59 | //++
|
---|
| 60 |
|
---|
| 61 | template <class T>
|
---|
| 62 | SphereThetaPhi<T>::SphereThetaPhi()
|
---|
[980] | 63 | : NPhi_(), TNphi_(), Theta_(), pixels_()
|
---|
[764] | 64 |
|
---|
| 65 | //--
|
---|
| 66 | {
|
---|
| 67 | InitNul();
|
---|
| 68 | }
|
---|
| 69 |
|
---|
| 70 |
|
---|
| 71 | /* --Methode-- */
|
---|
| 72 |
|
---|
[2960] | 73 | /*!
|
---|
| 74 | \brief Constructor with specification of number of slices (in a hemisphere)
|
---|
| 75 | \param m is the number of slices in theta on an hemisphere (the polar cap
|
---|
| 76 | forms the first slice).
|
---|
| 77 | */
|
---|
[764] | 78 | template <class T>
|
---|
| 79 | SphereThetaPhi<T>::SphereThetaPhi(int_4 m)
|
---|
| 80 | {
|
---|
| 81 | InitNul();
|
---|
| 82 | Pixelize(m);
|
---|
| 83 | }
|
---|
| 84 |
|
---|
[2960] | 85 | //! Copy constructor (shares the pixel data if share==true)
|
---|
[764] | 86 | template <class T>
|
---|
| 87 | SphereThetaPhi<T>::SphereThetaPhi(const SphereThetaPhi<T>& s, bool share)
|
---|
[908] | 88 | : NPhi_(s.NPhi_, share), TNphi_(s.TNphi_, share), Theta_(s.Theta_, share),
|
---|
| 89 | pixels_(s.pixels_ , share)
|
---|
[764] | 90 | {
|
---|
[908] | 91 |
|
---|
[764] | 92 | NTheta_= s.NTheta_;
|
---|
| 93 | NPix_ = s.NPix_;
|
---|
[908] | 94 | Omega_ = s.Omega_;
|
---|
[2885] | 95 | if(s.mInfo_) this->mInfo_= new DVList(*s.mInfo_);
|
---|
[908] | 96 | }
|
---|
[764] | 97 |
|
---|
[2960] | 98 | //! Copy constructor (shares the pixel data)
|
---|
[908] | 99 | template <class T>
|
---|
| 100 | SphereThetaPhi<T>::SphereThetaPhi(const SphereThetaPhi<T>& s)
|
---|
| 101 | : NPhi_(s.NPhi_), TNphi_(s.TNphi_), Theta_(s.Theta_), pixels_(s.pixels_)
|
---|
| 102 | {
|
---|
| 103 |
|
---|
| 104 | NTheta_= s.NTheta_;
|
---|
| 105 | NPix_ = s.NPix_;
|
---|
[764] | 106 | Omega_ = s.Omega_;
|
---|
[2885] | 107 | if(s.mInfo_) this->mInfo_= new DVList(*s.mInfo_);
|
---|
[764] | 108 | }
|
---|
| 109 |
|
---|
| 110 | //++
|
---|
| 111 | // Titre Destructor
|
---|
| 112 | //--
|
---|
| 113 | //++
|
---|
| 114 | template <class T>
|
---|
| 115 | SphereThetaPhi<T>::~SphereThetaPhi()
|
---|
| 116 |
|
---|
| 117 | //--
|
---|
| 118 | {}
|
---|
| 119 |
|
---|
| 120 | template <class T>
|
---|
| 121 | void SphereThetaPhi<T>::InitNul()
|
---|
| 122 | //
|
---|
| 123 | {
|
---|
| 124 | NTheta_= 0;
|
---|
| 125 | NPix_ = 0;
|
---|
| 126 | // pixels_.Reset(); Pas de reset par InitNul (en cas de share) - Reza 20/11/99 $CHECK$
|
---|
| 127 | }
|
---|
| 128 |
|
---|
| 129 |
|
---|
[2960] | 130 | //! re-pixelize the sphere if (m > 0)
|
---|
[764] | 131 | template <class T>
|
---|
| 132 | void SphereThetaPhi<T>::Resize(int_4 m)
|
---|
| 133 | {
|
---|
[2960] | 134 | if ((m <= 0) && (NTheta_ > 0) ) {
|
---|
[4066] | 135 | if (PixelMap_GetGlobalPrintLevel()>0)
|
---|
| 136 | cout << "SphereThetaPhi<T>::Resize(m) with m<=0 - NOT resized" << endl;
|
---|
[2960] | 137 | return;
|
---|
| 138 | }
|
---|
[764] | 139 | InitNul();
|
---|
| 140 | Pixelize(m);
|
---|
| 141 | }
|
---|
| 142 |
|
---|
[2960] | 143 | //! Clone or share the SphereThetaPhi object \b a
|
---|
[908] | 144 | template<class T>
|
---|
| 145 | void SphereThetaPhi<T>::CloneOrShare(const SphereThetaPhi<T>& a)
|
---|
| 146 | {
|
---|
| 147 |
|
---|
[980] | 148 | NTheta_= a.NTheta_;
|
---|
| 149 | NPix_ = a.NPix_;
|
---|
| 150 | Omega_ = a.Omega_;
|
---|
| 151 | NPhi_.CloneOrShare(a.NPhi_);
|
---|
| 152 | TNphi_.CloneOrShare(a.TNphi_);
|
---|
| 153 | Theta_.CloneOrShare(a.Theta_);
|
---|
| 154 | pixels_.CloneOrShare(a.pixels_);
|
---|
[2885] | 155 | if (this->mInfo_) {delete this->mInfo_; this->mInfo_ = NULL;}
|
---|
| 156 | if (a.mInfo_) this->mInfo_ = new DVList(*(a.mInfo_));
|
---|
[908] | 157 | }
|
---|
[2960] | 158 | //! Share the pixel data with object \b a
|
---|
[1419] | 159 | template<class T>
|
---|
| 160 | void SphereThetaPhi<T>::Share(const SphereThetaPhi<T>& a)
|
---|
| 161 | {
|
---|
[908] | 162 |
|
---|
[1419] | 163 | NTheta_= a.NTheta_;
|
---|
| 164 | NPix_ = a.NPix_;
|
---|
| 165 | Omega_ = a.Omega_;
|
---|
| 166 | NPhi_.Share(a.NPhi_);
|
---|
| 167 | TNphi_.Share(a.TNphi_);
|
---|
| 168 | Theta_.Share(a.Theta_);
|
---|
| 169 | pixels_.Share(a.pixels_);
|
---|
[2885] | 170 | if (this->mInfo_) {delete this->mInfo_; this->mInfo_ = NULL;}
|
---|
| 171 | if (a.mInfo_) this->mInfo_ = new DVList(*(a.mInfo_));
|
---|
[1419] | 172 | }
|
---|
| 173 |
|
---|
[980] | 174 | ////////////////////////// methodes de copie/share
|
---|
[2960] | 175 | //! Perform data copy or shares the data
|
---|
[908] | 176 | template<class T>
|
---|
| 177 | SphereThetaPhi<T>& SphereThetaPhi<T>::Set(const SphereThetaPhi<T>& a)
|
---|
[980] | 178 | {
|
---|
[908] | 179 | if (this != &a)
|
---|
| 180 | {
|
---|
[980] | 181 |
|
---|
| 182 |
|
---|
| 183 | if (a.NbPixels() < 1)
|
---|
| 184 | throw RangeCheckError("SphereThetaPhi<T>::Set(a ) - Array a not allocated ! ");
|
---|
| 185 | if (NbPixels() < 1) CloneOrShare(a);
|
---|
| 186 | else CopyElt(a);
|
---|
[2885] | 187 | if (this->mInfo_) delete this->mInfo_;
|
---|
| 188 | this->mInfo_ = NULL;
|
---|
| 189 | if (a.mInfo_) this->mInfo_ = new DVList(*(a.mInfo_));
|
---|
[908] | 190 | }
|
---|
| 191 | return(*this);
|
---|
[980] | 192 | }
|
---|
[908] | 193 |
|
---|
[2960] | 194 | //! Perform data copy or shares the data
|
---|
[980] | 195 | template<class T>
|
---|
| 196 | SphereThetaPhi<T>& SphereThetaPhi<T>::CopyElt(const SphereThetaPhi<T>& a)
|
---|
| 197 | {
|
---|
| 198 | if (NbPixels() < 1)
|
---|
| 199 | throw RangeCheckError("SphereThetaPhi<T>::CopyElt(const SphereThetaPhi<T>& ) - Not Allocated Array ! ");
|
---|
| 200 | if (NbPixels() != a.NbPixels())
|
---|
| 201 | throw(SzMismatchError("SphereThetaPhi<T>::CopyElt(const SphereThetaPhi<T>&) SizeMismatch")) ;
|
---|
[908] | 202 |
|
---|
[980] | 203 | NTheta_= a.NTheta_;
|
---|
| 204 | NPix_ = a.NPix_;
|
---|
| 205 | Omega_ = a.Omega_;
|
---|
[3572] | 206 | for (int_4 k=0; k< NPix_; k++) pixels_(k) = a.pixels_(k);
|
---|
| 207 | for (size_t k=0; k< a.NPhi_.Size(); k++) NPhi_(k) = a.NPhi_(k);
|
---|
| 208 | for (size_t k=0; k< a.TNphi_.Size(); k++) TNphi_(k) = a.TNphi_(k);
|
---|
| 209 | for (size_t k=0; k< a.Theta_.Size(); k++) Theta_(k) = a.Theta_(k);
|
---|
[980] | 210 | return(*this);
|
---|
[908] | 211 |
|
---|
[980] | 212 | }
|
---|
| 213 |
|
---|
[764] | 214 | /* --Methode-- */
|
---|
[2960] | 215 | //! Return total number of pixels
|
---|
[764] | 216 | template <class T>
|
---|
| 217 | int_4 SphereThetaPhi<T>::NbPixels() const
|
---|
| 218 | {
|
---|
| 219 | return(NPix_);
|
---|
| 220 | }
|
---|
| 221 |
|
---|
| 222 | /* --Methode-- */
|
---|
[2960] | 223 | //! Return value of pixel with index k
|
---|
[764] | 224 | template <class T>
|
---|
| 225 | T& SphereThetaPhi<T>::PixVal(int_4 k)
|
---|
| 226 | {
|
---|
| 227 | if((k < 0) || (k >= NPix_))
|
---|
| 228 | {
|
---|
| 229 | throw RangeCheckError("SphereThetaPhi::PIxVal Pixel index out of range");
|
---|
| 230 | }
|
---|
| 231 | return pixels_(k);
|
---|
| 232 | }
|
---|
| 233 |
|
---|
[2960] | 234 | //! Return value of pixel with index k
|
---|
[764] | 235 | template <class T>
|
---|
| 236 | T const& SphereThetaPhi<T>::PixVal(int_4 k) const
|
---|
| 237 | {
|
---|
| 238 | if((k < 0) || (k >= NPix_))
|
---|
| 239 | {
|
---|
| 240 | throw RangeCheckError("SphereThetaPhi::PIxVal Pixel index out of range");
|
---|
| 241 | }
|
---|
| 242 | return *(pixels_.Data()+k);
|
---|
| 243 | }
|
---|
| 244 |
|
---|
| 245 | /* --Methode-- */
|
---|
[2960] | 246 | //! Return true if teta,phi in map
|
---|
[764] | 247 | template <class T>
|
---|
| 248 | bool SphereThetaPhi<T>::ContainsSph(double /*theta*/, double /*phi*/) const
|
---|
| 249 | {
|
---|
| 250 | return(true);
|
---|
| 251 | }
|
---|
| 252 |
|
---|
| 253 | /* --Methode-- */
|
---|
[2960] | 254 | //! Return index of the pixel corresponding to direction (theta, phi).
|
---|
[764] | 255 | template <class T>
|
---|
| 256 | int_4 SphereThetaPhi<T>::PixIndexSph(double theta, double phi) const
|
---|
| 257 | {
|
---|
| 258 | double dphi;
|
---|
[2990] | 259 | int_4 i,k;
|
---|
[764] | 260 | bool fgzn = false;
|
---|
| 261 |
|
---|
| 262 | if((theta > Pi) || (theta < 0.)) return(-1);
|
---|
| 263 | if((phi < 0.) || (phi > DeuxPi)) return(-1);
|
---|
| 264 | if(theta > Pi*0.5) {fgzn = true; theta = Pi-theta;}
|
---|
| 265 |
|
---|
| 266 | // La bande d'indice kt est limitée par les valeurs de theta contenues dans
|
---|
| 267 | // Theta_[kt] et Theta_[kt+1]
|
---|
| 268 | for( i=1; i< NTheta_; i++ )
|
---|
| 269 | if( theta < Theta_(i) ) break;
|
---|
| 270 |
|
---|
| 271 | dphi= DeuxPi/(double)NPhi_(i-1);
|
---|
| 272 |
|
---|
| 273 | if (fgzn) k= NPix_-TNphi_(i)+(int_4)(phi/dphi);
|
---|
| 274 | else k= TNphi_(i-1)+(int_4)(phi/dphi);
|
---|
| 275 | return(k);
|
---|
| 276 | }
|
---|
| 277 |
|
---|
| 278 | /* --Methode-- */
|
---|
[2960] | 279 | //! Return (theta,phi) coordinates of middle of pixel with index k
|
---|
[764] | 280 | template <class T>
|
---|
| 281 | void SphereThetaPhi<T>::PixThetaPhi(int_4 k,double& theta,double& phi) const
|
---|
| 282 | {
|
---|
[2990] | 283 | int_4 i;
|
---|
[764] | 284 | bool fgzn = false;
|
---|
| 285 |
|
---|
| 286 | if((k < 0) || (k >= NPix_)) {theta = -99999.; phi = -99999.; return; }
|
---|
| 287 | if( k >= NPix_/2) {fgzn = true; k = NPix_-1-k;}
|
---|
| 288 |
|
---|
| 289 | // recupère l'indice i de la tranche qui contient le pixel k
|
---|
| 290 | for( i=0; i< NTheta_; i++ )
|
---|
| 291 | if( k < TNphi_(i+1) ) break;
|
---|
| 292 |
|
---|
| 293 | // angle theta
|
---|
| 294 | theta= 0.5*(Theta_(i)+Theta_(i+1));
|
---|
| 295 | if (fgzn) theta= Pi-theta;
|
---|
| 296 |
|
---|
| 297 | // angle phi
|
---|
| 298 | k -= TNphi_(i);
|
---|
| 299 | phi= DeuxPi/(double)NPhi_(i)*(double)(k+.5);
|
---|
| 300 | if (fgzn) phi= DeuxPi-phi;
|
---|
| 301 | }
|
---|
| 302 |
|
---|
[2960] | 303 | //! Setting pixel values to a constant
|
---|
[764] | 304 | template <class T>
|
---|
| 305 | T SphereThetaPhi<T>::SetPixels(T v)
|
---|
| 306 | {
|
---|
| 307 | pixels_.Reset(v);
|
---|
| 308 | return(v);
|
---|
| 309 | }
|
---|
| 310 |
|
---|
[2960] | 311 | /*!
|
---|
| 312 | \brief Pixel Solid angle (steradians)
|
---|
| 313 | All the pixels have the same solid angle. The dummy argument is
|
---|
| 314 | for compatibility with eventual pixelizations which would not
|
---|
| 315 | fulfil this requirement.
|
---|
| 316 | */
|
---|
[764] | 317 | template <class T>
|
---|
| 318 | double SphereThetaPhi<T>::PixSolAngle(int_4 /*dummy*/) const
|
---|
| 319 |
|
---|
| 320 | {
|
---|
| 321 | return Omega_;
|
---|
| 322 | }
|
---|
| 323 |
|
---|
| 324 | /* --Methode-- */
|
---|
[2960] | 325 | //! Return values of theta,phi which limit the pixel with index k
|
---|
[764] | 326 | template <class T>
|
---|
| 327 | void SphereThetaPhi<T>::Limits(int_4 k,double& tetMin,double& tetMax,double& phiMin,double& phiMax)
|
---|
| 328 | {
|
---|
[2990] | 329 | int_4 j;
|
---|
[764] | 330 | double dphi;
|
---|
| 331 | bool fgzn= false;
|
---|
| 332 |
|
---|
| 333 | if((k < 0) || (k >= NPix_)) {
|
---|
| 334 | tetMin= -99999.;
|
---|
| 335 | phiMin= -99999.;
|
---|
| 336 | tetMax= -99999.;
|
---|
| 337 | phiMax= -99999.;
|
---|
| 338 | return;
|
---|
| 339 | }
|
---|
| 340 |
|
---|
| 341 | // si on se trouve dans l'hémisphère Sud
|
---|
| 342 | if(k >= NPix_/2) {
|
---|
| 343 | fgzn= true;
|
---|
| 344 | k= NPix_-1-k;
|
---|
| 345 | }
|
---|
| 346 |
|
---|
| 347 | // on recupere l'indice i de la tranche qui contient le pixel k
|
---|
[2990] | 348 | int_4 i;
|
---|
[764] | 349 | for( i=0; i< NTheta_; i++ )
|
---|
| 350 | if(k < TNphi_(i+1)) break;
|
---|
| 351 |
|
---|
| 352 | // valeurs limites de theta dans l'hemisphere Nord
|
---|
| 353 | tetMin= Theta_(i);
|
---|
| 354 | tetMax= Theta_(i+1);
|
---|
| 355 | // valeurs limites de theta dans l'hemisphere Sud
|
---|
| 356 | if (fgzn) {
|
---|
| 357 | tetMin= Pi - Theta_(i+1);
|
---|
| 358 | tetMax= Pi - Theta_(i);
|
---|
| 359 | }
|
---|
| 360 |
|
---|
| 361 | // pixel correspondant dans l'hemisphere Nord
|
---|
| 362 | if (fgzn) k= TNphi_(i+1)-k+TNphi_(i)-1;
|
---|
| 363 |
|
---|
| 364 | // indice j de discretisation ( phi= j*dphi )
|
---|
| 365 | j= k-TNphi_(i);
|
---|
| 366 | dphi= DeuxPi/(double)NPhi_(i);
|
---|
| 367 |
|
---|
| 368 | // valeurs limites de phi
|
---|
| 369 | phiMin= dphi*(double)(j);
|
---|
| 370 | phiMax= dphi*(double)(j+1);
|
---|
| 371 | return;
|
---|
| 372 | }
|
---|
| 373 |
|
---|
| 374 | /* --Methode-- */
|
---|
[2960] | 375 | //! Return number of theta-slices on the sphere
|
---|
[764] | 376 | template <class T>
|
---|
| 377 | uint_4 SphereThetaPhi<T>::NbThetaSlices() const
|
---|
| 378 | {
|
---|
| 379 | if (NTheta_<=0)
|
---|
| 380 | {
|
---|
| 381 | throw PException(" sphere not pixelized, NbSlice=0 ");
|
---|
| 382 | }
|
---|
| 383 | return( 2*NTheta_);
|
---|
| 384 | }
|
---|
| 385 |
|
---|
| 386 | /* --Methode-- */
|
---|
[2960] | 387 | //! Return number of pixels along the phi-direction of the kt-th slice
|
---|
[764] | 388 | template <class T>
|
---|
| 389 | int_4 SphereThetaPhi<T>::NPhi(int_4 kt) const
|
---|
| 390 | {
|
---|
[2990] | 391 | int_4 nbpix;
|
---|
[764] | 392 | // verification
|
---|
| 393 | if((kt < 0) || (kt >= 2*NTheta_)) return(-1);
|
---|
| 394 |
|
---|
| 395 | // si on se trouve dans l'hemisphere Sud
|
---|
| 396 | if(kt >= NTheta_) {
|
---|
| 397 | kt= 2*NTheta_-1-kt;
|
---|
| 398 | }
|
---|
| 399 |
|
---|
| 400 | // nombre de pixels
|
---|
| 401 | nbpix= NPhi_(kt);
|
---|
| 402 | return(nbpix);
|
---|
| 403 | }
|
---|
| 404 |
|
---|
| 405 |
|
---|
| 406 | /* --Methode-- */
|
---|
[2960] | 407 | //! Return theta values which limit the slice kt
|
---|
[764] | 408 | template <class T>
|
---|
[2969] | 409 | void SphereThetaPhi<T>::Theta(int_4 kt,double& tetMin,double& tetMax) const
|
---|
[764] | 410 | {
|
---|
| 411 | bool fgzn= false;
|
---|
| 412 | // verification
|
---|
| 413 | if( (kt< 0) || (kt>= 2*NTheta_) ) {
|
---|
| 414 | tetMin= -99999.;
|
---|
| 415 | tetMax= -99999.;
|
---|
| 416 | return;
|
---|
| 417 | }
|
---|
| 418 |
|
---|
| 419 | // si on se trouve dans l'hemisphere Sud
|
---|
| 420 | if( kt >= NTheta_ ) {
|
---|
| 421 | fgzn= true;
|
---|
| 422 | kt= 2*NTheta_-1-kt;
|
---|
| 423 | }
|
---|
| 424 |
|
---|
| 425 | // valeurs limites de theta dans l'hemisphere Nord
|
---|
| 426 | tetMin= Theta_(kt);
|
---|
| 427 | tetMax= Theta_(kt+1);
|
---|
| 428 | // valeurs limites de theta dans l'hemisphere Sud
|
---|
| 429 | if (fgzn) {
|
---|
| 430 | tetMin= Pi - Theta_(kt+1);
|
---|
| 431 | tetMax= Pi - Theta_(kt);
|
---|
| 432 | }
|
---|
| 433 | }
|
---|
| 434 |
|
---|
| 435 | /* --Methode-- */
|
---|
[2960] | 436 | //! Return values of phi which limit the jp-th pixel of the kt-th slice
|
---|
[764] | 437 | template <class T>
|
---|
[2969] | 438 | void SphereThetaPhi<T>::Phi(int_4 kt,int_4 jp,double& phiMin,double& phiMax) const
|
---|
[764] | 439 | {
|
---|
| 440 | // verification
|
---|
| 441 | if((kt < 0) || (kt >= 2*NTheta_)) {
|
---|
| 442 | phiMin= -99999.;
|
---|
| 443 | phiMax= -99999.;
|
---|
| 444 | return;
|
---|
| 445 | }
|
---|
| 446 |
|
---|
| 447 | // si on se trouve dans l'hemisphere Sud
|
---|
| 448 | if(kt >= NTheta_) kt= 2*NTheta_-1-kt;
|
---|
| 449 |
|
---|
| 450 | // verifie si la tranche kt contient au moins jp pixels
|
---|
| 451 | if( (jp< 0) || (jp >= NPhi_(kt)) ) {
|
---|
| 452 | phiMin= -88888.;
|
---|
| 453 | phiMax= -88888.;
|
---|
| 454 | return;
|
---|
| 455 | }
|
---|
| 456 |
|
---|
| 457 | double dphi= DeuxPi/(double)NPhi_(kt);
|
---|
| 458 | phiMin= dphi*(double)(jp);
|
---|
| 459 | phiMax= dphi*(double)(jp+1);
|
---|
| 460 | return;
|
---|
| 461 | }
|
---|
| 462 |
|
---|
| 463 | /* --Methode-- */
|
---|
[2960] | 464 | //! Return pixel index with sequence index jp in the slice kt
|
---|
[764] | 465 | template <class T>
|
---|
| 466 | int_4 SphereThetaPhi<T>::Index(int_4 kt,int_4 jp) const
|
---|
| 467 | {
|
---|
[2990] | 468 | int_4 k;
|
---|
[764] | 469 | bool fgzn= false;
|
---|
| 470 |
|
---|
| 471 | // si on se trouve dans l'hemisphere Sud
|
---|
| 472 | if(kt >= NTheta_) {
|
---|
| 473 | fgzn= true;
|
---|
| 474 | kt= 2*NTheta_-1-kt;
|
---|
| 475 | }
|
---|
| 476 |
|
---|
| 477 | // si la tranche kt contient au moins i pixels
|
---|
| 478 | if( (jp>=0) && (jp<NPhi_(kt)) )
|
---|
| 479 | {
|
---|
| 480 | // dans l'hemisphere Sud
|
---|
| 481 | if (fgzn) k= NPix_-TNphi_(kt+1)+jp;
|
---|
| 482 | // dans l'hemisphere Nord
|
---|
| 483 | else k= TNphi_(kt)+jp;
|
---|
| 484 | }
|
---|
| 485 | else
|
---|
| 486 | {
|
---|
| 487 | k= 9999;
|
---|
| 488 | printf("\n la tranche %d ne contient pas un pixel de rang %d",kt,jp);
|
---|
| 489 | }
|
---|
| 490 | return(k);
|
---|
| 491 | }
|
---|
| 492 |
|
---|
| 493 | /* --Methode-- */
|
---|
[2960] | 494 | //! Return indices kt (theta) and jp (phi) of pixel with index k
|
---|
[764] | 495 | template <class T>
|
---|
| 496 | void SphereThetaPhi<T>::ThetaPhiIndex(int_4 k,int_4& kt,int_4& jp)
|
---|
| 497 | {
|
---|
| 498 | bool fgzn= false;
|
---|
| 499 | // si on se trouve dans l'hemisphere Sud
|
---|
| 500 | if(k >= NPix_/2)
|
---|
| 501 | {
|
---|
| 502 | fgzn= true;
|
---|
| 503 | k= NPix_-1-k;
|
---|
| 504 | }
|
---|
| 505 |
|
---|
| 506 | // on recupere l'indice kt de la tranche qui contient le pixel k
|
---|
[2990] | 507 | int_4 i;
|
---|
[764] | 508 | for(i = 0; i < NTheta_; i++)
|
---|
| 509 | if(k < TNphi_(i+1)) break;
|
---|
| 510 |
|
---|
| 511 | // indice kt de tranche
|
---|
| 512 | if (fgzn) kt= 2*NTheta_-1-i;
|
---|
| 513 | else kt= i;
|
---|
| 514 |
|
---|
| 515 | // indice jp de pixel
|
---|
| 516 | if (fgzn) jp= TNphi_(i+1)-k-1;
|
---|
| 517 | else jp= k-TNphi_(i);
|
---|
| 518 | }
|
---|
[2960] | 519 | /*!
|
---|
| 520 | \brief achieve the splitting into pixels
|
---|
| 521 | m has the same signification as for the constructor
|
---|
| 522 |
|
---|
| 523 | Each theta-slice of the north hemisphere will be spitted starting f
|
---|
| 524 | from phi=0 ...
|
---|
| 525 |
|
---|
| 526 | South hemisphere is scanned in the same direction according to phi
|
---|
| 527 | and from equator to the pole (the pixel following the last one of
|
---|
| 528 | the slice closest to the equator with z>0, is the pixel with lowest
|
---|
| 529 | phi of the slice closest of the equator with z<0).
|
---|
| 530 | */
|
---|
[764] | 531 | template <class T>
|
---|
| 532 | void SphereThetaPhi<T>::Pixelize(int_4 m)
|
---|
| 533 |
|
---|
| 534 | //--
|
---|
| 535 | {
|
---|
[2990] | 536 | int_4 ntotpix,j;
|
---|
[764] | 537 |
|
---|
| 538 | // Decodage et controle des arguments d'appel :
|
---|
[2960] | 539 | // au moins 2 et au plus 524288 bandes d'un hemisphere en theta
|
---|
[764] | 540 | if (m < 2) m = 2;
|
---|
[2960] | 541 | if (m > 524288) m = 524288;
|
---|
[764] | 542 |
|
---|
| 543 | // On memorise les arguments d'appel
|
---|
| 544 | NTheta_ = m;
|
---|
| 545 |
|
---|
| 546 | // On commence par decouper l'hemisphere z>0.
|
---|
| 547 | // Creation des vecteurs contenant :
|
---|
| 548 | // Les valeurs limites de theta (une valeur de plus que le nombre de bandes...)
|
---|
| 549 | // Theta_= new double[m+1];
|
---|
| 550 | Theta_.ReSize(m+1);
|
---|
| 551 |
|
---|
| 552 | // Le nombre de pixels en phi de chacune des bandes en theta
|
---|
| 553 | // NPhi_ = new int_4[m];
|
---|
[980] | 554 | // une taille de m suffit, mais je mets m+1 pour que les 3 tableaux aient
|
---|
| 555 | // la meme taille pour une manipulation plus faciles par la librairie
|
---|
| 556 | // cfitsio -- GLM (13-04-00)
|
---|
| 557 | NPhi_.ReSize(m+1);
|
---|
[764] | 558 |
|
---|
| 559 | // Le nombre/Deuxpi total des pixels contenus dans les bandes de z superieur a une
|
---|
| 560 | // bande donnee (mTPphi[m] contient le nombre de pixels total de l'hemisphere)
|
---|
| 561 | // TNphi_= new int_4[m+1];
|
---|
| 562 | TNphi_.ReSize(m+1);
|
---|
| 563 |
|
---|
| 564 | // Calcul du nombre total de pixels dans chaque bande pour optimiser
|
---|
| 565 | // le rapport largeur/hauteur des pixels
|
---|
| 566 |
|
---|
| 567 | //calotte polaire
|
---|
| 568 | TNphi_(0)= 0;
|
---|
| 569 | NPhi_(0) = 1;
|
---|
| 570 |
|
---|
| 571 | //bandes jusqu'a l'equateur
|
---|
| 572 | for(j = 1; j < m; j++)
|
---|
| 573 | {
|
---|
| 574 | TNphi_(j)= TNphi_(j-1)+NPhi_(j-1);
|
---|
| 575 | NPhi_(j) = (int_4)(.5+4.*(double)(m-.5)*sin(Pi*(double)j/(double)(2.*m-1.))) ;
|
---|
| 576 | }
|
---|
| 577 |
|
---|
| 578 | // Nombre total de pixels sur l'hemisphere
|
---|
| 579 | ntotpix = TNphi_(m-1)+NPhi_(m-1);
|
---|
| 580 | TNphi_(m)= ntotpix;
|
---|
| 581 | // et sur la sphere entiere
|
---|
| 582 | NPix_= 2*ntotpix;
|
---|
| 583 |
|
---|
| 584 | // Creation et initialisation du vecteur des contenus des pixels
|
---|
| 585 | pixels_.ReSize(NPix_);
|
---|
| 586 | pixels_.Reset();
|
---|
| 587 |
|
---|
| 588 | // Determination des limites des bandes en theta :
|
---|
| 589 | // omeg est l'angle solide couvert par chaque pixel,
|
---|
| 590 | // une bande donnee kt couvre un angle solide NPhi_[kt]*omeg
|
---|
| 591 | // egal a 2* Pi*(cos Theta_[kt]-cos Theta_[kt+1]). De meme, l'angle solide
|
---|
| 592 | //de la
|
---|
| 593 | // calotte allant du pole a la limite haute de la bande kt vaut
|
---|
| 594 | // 2* Pi*(1.-cos Theta_[kt+1])= TNphi_[kt]*omeg...
|
---|
| 595 |
|
---|
| 596 | double omeg2pi= 1./(double)ntotpix;
|
---|
| 597 | Omega_ = omeg2pi*DeuxPi;
|
---|
| 598 |
|
---|
| 599 | for(j=0; j <= m; j++)
|
---|
| 600 | {
|
---|
| 601 | Theta_(j)= acos(1.-(double)TNphi_(j)*omeg2pi);
|
---|
| 602 | }
|
---|
| 603 | }
|
---|
| 604 |
|
---|
[2968] | 605 | //! Return the theta angle for slice defined by \b index
|
---|
| 606 | template <class T>
|
---|
| 607 | r_8 SphereThetaPhi<T>::ThetaOfSlice(int_4 index) const
|
---|
| 608 | {
|
---|
| 609 | if(index < 0 || index >= 2*NTheta_)
|
---|
| 610 | throw RangeCheckError("SphereThetaPhi::ThetaOfSlice() index out of range");
|
---|
| 611 | double tet1, tet2;
|
---|
| 612 | Theta(index, tet1, tet2);
|
---|
| 613 | return 0.5*(tet1+tet2);
|
---|
| 614 | }
|
---|
[2960] | 615 |
|
---|
[2973] | 616 | //! Return true : All theta slices have a symmetric slice at Pi-Theta in SphereThetaPhi
|
---|
| 617 | template <class T>
|
---|
| 618 | bool SphereThetaPhi<T>::HasSymThetaSlice() const
|
---|
| 619 | {
|
---|
| 620 | return true;
|
---|
| 621 | }
|
---|
| 622 | //! Return the slice index for the symmetric slice at theta=Pi-ThetaOfSlice(idx)
|
---|
| 623 | template <class T>
|
---|
| 624 | int_4 SphereThetaPhi<T>::GetSymThetaSliceIndex(int_4 idx) const
|
---|
| 625 | {
|
---|
[3572] | 626 | if(idx < 0 || idx >= (int_4)NbThetaSlices())
|
---|
[2973] | 627 | throw RangeCheckError("SphereThetaPhi::GetSymThetaSliceIndex index out of range");
|
---|
| 628 | return (NbThetaSlices()-1-idx);
|
---|
| 629 | }
|
---|
| 630 |
|
---|
[2960] | 631 | /*!
|
---|
| 632 | \brief return a Theta slice information
|
---|
| 633 | For a theta-slice with index 'index', return :
|
---|
| 634 | the corresponding "theta"
|
---|
| 635 | a vector containing the phi's of the pixels of the slice
|
---|
| 636 | a vector containing the corresponding values of pixels
|
---|
| 637 | */
|
---|
[764] | 638 | template <class T>
|
---|
| 639 | void SphereThetaPhi<T>::GetThetaSlice(int_4 index,r_8& theta, TVector<r_8>& phi, TVector<T>& value) const
|
---|
| 640 |
|
---|
| 641 | {
|
---|
| 642 |
|
---|
[3572] | 643 | if(index < 0 || index >= (int_4)NbThetaSlices())
|
---|
[2985] | 644 | throw RangeCheckError("SphereThetaPhi::GetThetaSlice(idx...) index out of range");
|
---|
[2968] | 645 |
|
---|
[764] | 646 |
|
---|
[2990] | 647 | int_4 iring= Index(index,0);
|
---|
| 648 | int_4 lring = NPhi(index);
|
---|
[764] | 649 |
|
---|
| 650 | phi.ReSize(lring);
|
---|
| 651 | value.ReSize(lring);
|
---|
| 652 | double Te= 0.;
|
---|
| 653 | double Fi= 0.;
|
---|
[2985] | 654 | PixThetaPhi(iring,Te,Fi);
|
---|
| 655 | double DFi = DeuxPi/(double)NPhi(index);
|
---|
[2990] | 656 | for(int_4 kk = 0; kk < lring; kk++) {
|
---|
[2985] | 657 | value(kk)= pixels_(kk+iring);
|
---|
| 658 | phi(kk)= Fi;
|
---|
| 659 | Fi += DFi;
|
---|
| 660 | }
|
---|
[764] | 661 | theta= Te;
|
---|
| 662 | }
|
---|
| 663 |
|
---|
[2960] | 664 | /*
|
---|
| 665 | \brief return information on a theta slice
|
---|
| 666 | For a theta-slice with index 'index', return :
|
---|
| 667 | the corresponding "theta"
|
---|
| 668 | the corresponding "phi" for first pixel of the slice
|
---|
| 669 | a vector containing the indices of the pixels of the slice
|
---|
| 670 | (equally distributed in phi)
|
---|
| 671 | a vector containing the corresponding values of pixels
|
---|
| 672 | */
|
---|
[764] | 673 | template <class T>
|
---|
| 674 | void SphereThetaPhi<T>::GetThetaSlice(int_4 index,r_8& theta, r_8& phi0,TVector<int_4>& pixelIndices, TVector<T>& value) const
|
---|
| 675 |
|
---|
| 676 | {
|
---|
| 677 |
|
---|
[3572] | 678 | if(index < 0 || index >= (int_4)NbThetaSlices())
|
---|
[2985] | 679 | throw RangeCheckError("SphereThetaPhi::GetThetaSlice(idx...) idx out of range");
|
---|
[764] | 680 |
|
---|
[2990] | 681 | int_4 iring= Index(index,0);
|
---|
| 682 | int_4 lring = NPhi(index);
|
---|
[764] | 683 |
|
---|
| 684 | pixelIndices.ReSize(lring);
|
---|
| 685 | value.ReSize(lring);
|
---|
[2990] | 686 | for(int_4 kk = 0; kk < lring; kk++) {
|
---|
[2985] | 687 | pixelIndices(kk)=kk+iring ;
|
---|
| 688 | value(kk)= pixels_(kk+iring);
|
---|
| 689 | }
|
---|
| 690 | PixThetaPhi(iring,theta,phi0);
|
---|
[764] | 691 | }
|
---|
| 692 |
|
---|
[2990] | 693 | //! return a pointer to the specified slice pixel data
|
---|
| 694 | template <class T>
|
---|
| 695 | T* SphereThetaPhi<T>::GetThetaSliceDataPtr(int_4 index)
|
---|
| 696 | {
|
---|
[3572] | 697 | if(index < 0 || index >= (int_4)NbThetaSlices())
|
---|
[2990] | 698 | throw RangeCheckError("SphereThetaPhi::GetThetaSliceDataPtr(idx) idx out of range");
|
---|
| 699 | return pixels_.Begin()+Index(index,0);
|
---|
| 700 | }
|
---|
[764] | 701 |
|
---|
| 702 |
|
---|
| 703 | template <class T>
|
---|
| 704 | void SphereThetaPhi<T>::print(ostream& os) const
|
---|
| 705 | {
|
---|
[2987] | 706 | this->Show(os);
|
---|
[2985] | 707 | os << "SphereThetaPhi<T> NTheta_= " << NTheta_ << " NPix_ = " << NPix_
|
---|
| 708 | << " Omega_ = " << Omega_ << endl;
|
---|
[2885] | 709 | if(this->mInfo_) os << " DVList Info= " << *(this->mInfo_) << endl;
|
---|
[764] | 710 |
|
---|
[2985] | 711 | os << "... NPhi_ Values : ";
|
---|
[2990] | 712 | int_4 i;
|
---|
[764] | 713 | for(i=0; i < NTheta_; i++)
|
---|
| 714 | {
|
---|
| 715 | if(i%5 == 0) os << endl;
|
---|
| 716 | os << NPhi_(i) <<", ";
|
---|
| 717 | }
|
---|
| 718 | os << endl;
|
---|
| 719 |
|
---|
[2985] | 720 | os << "... Theta_ Values : ";
|
---|
[764] | 721 | for(i=0; i < NTheta_+1; i++)
|
---|
| 722 | {
|
---|
| 723 | if(i%5 == 0) os << endl;
|
---|
| 724 | os << Theta_(i) <<", ";
|
---|
| 725 | }
|
---|
| 726 | os << endl;
|
---|
| 727 |
|
---|
[2985] | 728 | os << "... TNphi_ Values : ";
|
---|
[764] | 729 | for(i=0; i < NTheta_+1; i++)
|
---|
| 730 | {
|
---|
| 731 | if(i%5 == 0) os << endl;
|
---|
| 732 | os << TNphi_(i) <<", ";
|
---|
| 733 | }
|
---|
| 734 | os << endl;
|
---|
| 735 |
|
---|
[2985] | 736 | os << "... Pixel Values : ";
|
---|
[764] | 737 | for(i=0; i < NPix_; i++)
|
---|
| 738 | {
|
---|
| 739 | if(i%5 == 0) os << endl;
|
---|
| 740 | os << pixels_(i) <<", ";
|
---|
| 741 | }
|
---|
| 742 | os << endl;
|
---|
| 743 | }
|
---|
| 744 |
|
---|
[1419] | 745 | // ...... Operations de calcul ......
|
---|
[764] | 746 |
|
---|
[1419] | 747 |
|
---|
| 748 | //! Fill a SphereThetaPhi with a constant value \b a
|
---|
| 749 | template <class T>
|
---|
| 750 | SphereThetaPhi<T>& SphereThetaPhi<T>::SetT(T a)
|
---|
| 751 | {
|
---|
| 752 | if (NbPixels() < 1)
|
---|
| 753 | throw RangeCheckError("SphereThetaPhi<T>::SetT(T ) - SphereThetaPhi not dimensionned ! ");
|
---|
| 754 | pixels_ = a;
|
---|
| 755 | return (*this);
|
---|
| 756 | }
|
---|
| 757 |
|
---|
| 758 | /*! Add a constant value \b x to a SphereThetaPhi */
|
---|
| 759 | template <class T>
|
---|
| 760 | SphereThetaPhi<T>& SphereThetaPhi<T>::Add(T a)
|
---|
| 761 | {
|
---|
| 762 | if (NbPixels()< 1)
|
---|
| 763 | throw RangeCheckError("SphereThetaPhi<T>::Add(T ) - SphereThetaPhi not dimensionned ! ");
|
---|
| 764 | pixels_ += a;
|
---|
| 765 | return (*this);
|
---|
| 766 | }
|
---|
| 767 |
|
---|
| 768 | /*! Substract a constant value \b a to a SphereThetaPhi */
|
---|
| 769 | template <class T>
|
---|
[1624] | 770 | SphereThetaPhi<T>& SphereThetaPhi<T>::Sub(T a,bool fginv)
|
---|
[1419] | 771 | {
|
---|
| 772 | if (NbPixels()< 1)
|
---|
| 773 | throw RangeCheckError("SphereThetaPhi<T>::Sub(T ) - SphereThetaPhi not dimensionned ! ");
|
---|
[1624] | 774 | pixels_.Sub(a,fginv);
|
---|
[1419] | 775 | return (*this);
|
---|
| 776 | }
|
---|
| 777 |
|
---|
| 778 | /*! multiply a SphereThetaPhi by a constant value \b a */
|
---|
| 779 | template <class T>
|
---|
| 780 | SphereThetaPhi<T>& SphereThetaPhi<T>::Mul(T a)
|
---|
| 781 | {
|
---|
| 782 | if (NbPixels()< 1)
|
---|
| 783 | throw RangeCheckError("SphereThetaPhi<T>::Mul(T ) - SphereThetaPhi not dimensionned ! ");
|
---|
| 784 | pixels_ *= a;
|
---|
| 785 | return (*this);
|
---|
| 786 | }
|
---|
| 787 |
|
---|
| 788 | /*! divide a SphereThetaPhi by a constant value \b a */
|
---|
| 789 | template <class T>
|
---|
| 790 | SphereThetaPhi<T>& SphereThetaPhi<T>::Div(T a)
|
---|
| 791 | {
|
---|
| 792 | if (NbPixels()< 1)
|
---|
| 793 | throw RangeCheckError("SphereThetaPhi<T>::Div(T ) - SphereThetaPhi not dimensionned ! ");
|
---|
| 794 | pixels_ /= a;
|
---|
| 795 | return (*this);
|
---|
| 796 | }
|
---|
| 797 |
|
---|
| 798 | // >>>> Operations avec 2nd membre de type SphereThetaPhi
|
---|
| 799 | //! Add two SphereThetaPhi
|
---|
| 800 |
|
---|
| 801 | template <class T>
|
---|
| 802 | SphereThetaPhi<T>& SphereThetaPhi<T>::AddElt(const SphereThetaPhi<T>& a)
|
---|
| 803 | {
|
---|
| 804 | if (NbPixels()!= a.NbPixels())
|
---|
| 805 | {
|
---|
| 806 | throw(SzMismatchError("SphereThetaPhi<T>::AddElt(const SphereThetaPhi<T>&) SizeMismatch")) ;
|
---|
| 807 | }
|
---|
| 808 | pixels_ += a.pixels_;
|
---|
| 809 | return (*this);
|
---|
| 810 | }
|
---|
| 811 |
|
---|
| 812 | //! Substract two SphereThetaPhi
|
---|
| 813 | template <class T>
|
---|
| 814 | SphereThetaPhi<T>& SphereThetaPhi<T>::SubElt(const SphereThetaPhi<T>& a)
|
---|
| 815 | {
|
---|
| 816 | if (NbPixels()!= a.NbPixels())
|
---|
| 817 | {
|
---|
| 818 | throw(SzMismatchError("SphereThetaPhi<T>::SubElt(const SphereThetaPhi<T>&) SizeMismatch")) ;
|
---|
| 819 | }
|
---|
| 820 | pixels_ -= a.pixels_;
|
---|
| 821 | return (*this);
|
---|
| 822 | }
|
---|
| 823 |
|
---|
| 824 | //! Multiply two SphereThetaPhi (elements by elements)
|
---|
| 825 | template <class T>
|
---|
| 826 | SphereThetaPhi<T>& SphereThetaPhi<T>::MulElt(const SphereThetaPhi<T>& a)
|
---|
| 827 | {
|
---|
| 828 | if (NbPixels()!= a.NbPixels())
|
---|
| 829 | {
|
---|
[1551] | 830 | throw(SzMismatchError("SphereThetaPhi<T>::MulElt(const SphereThetaPhi<T>&) SizeMismatch")) ;
|
---|
[1419] | 831 | }
|
---|
| 832 | pixels_ *= a.pixels_;
|
---|
| 833 | return (*this);
|
---|
| 834 | }
|
---|
| 835 |
|
---|
[1551] | 836 | //! Divide two SphereThetaPhi (elements by elements) - No protection for divide by 0
|
---|
| 837 | template <class T>
|
---|
| 838 | SphereThetaPhi<T>& SphereThetaPhi<T>::DivElt(const SphereThetaPhi<T>& a)
|
---|
| 839 | {
|
---|
| 840 | if (NbPixels()!= a.NbPixels())
|
---|
| 841 | {
|
---|
| 842 | throw(SzMismatchError("SphereThetaPhi<T>::DivElt(const SphereThetaPhi<T>&) SizeMismatch")) ;
|
---|
| 843 | }
|
---|
| 844 | pixels_ /= a.pixels_;
|
---|
| 845 | return (*this);
|
---|
| 846 | }
|
---|
[1419] | 847 |
|
---|
| 848 |
|
---|
[1551] | 849 |
|
---|
[764] | 850 | #ifdef __CXX_PRAGMA_TEMPLATES__
|
---|
[2082] | 851 | #pragma define_template SphereThetaPhi<int_4>
|
---|
[764] | 852 | #pragma define_template SphereThetaPhi<r_8>
|
---|
| 853 | #pragma define_template SphereThetaPhi<r_4>
|
---|
| 854 | #pragma define_template SphereThetaPhi< complex<r_4> >
|
---|
| 855 | #pragma define_template SphereThetaPhi< complex<r_8> >
|
---|
| 856 | #endif
|
---|
| 857 | #if defined(ANSI_TEMPLATES) || defined(GNU_TEMPLATES)
|
---|
[2869] | 858 | namespace SOPHYA {
|
---|
[2082] | 859 | template class SphereThetaPhi<int_4>;
|
---|
[764] | 860 | template class SphereThetaPhi<r_8>;
|
---|
| 861 | template class SphereThetaPhi<r_4>;
|
---|
| 862 | template class SphereThetaPhi< complex<r_4> >;
|
---|
| 863 | template class SphereThetaPhi< complex<r_8> >;
|
---|
[2869] | 864 | }
|
---|
[764] | 865 | #endif
|
---|