Changeset 2984 in Sophya for trunk


Ignore:
Timestamp:
Jun 21, 2006, 5:53:06 PM (19 years ago)
Author:
ansari
Message:

Remplacement appel a RfourierSynthesisFromB (TF reel) par fourierSynthesisFromB (TF complexe) pour corriger pb transforme Ylm sur HEALPix (zones polar cap) , Reza 21/6/2006

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/Samba/sphericaltransformserver.cc

    r2958 r2984  
    175175  map.Resize(pixelSizeIndex);
    176176  string sphere_type=map.TypeOfMap();
    177       int premiereTranche = 0;
    178       int derniereTranche = map.NbThetaSlices()-1;
    179   if (sphere_type.substr(0,4) == "RING")
    180   {
    181     nsmax=map.SizeIndex();
    182   }
    183   else
    184   {
    185     // pour une sphere Gorski le nombre de pixels est 12*nsmax**2
    186     // on calcule une quantite equivalente a nsmax pour la sphere-theta-phi
    187     // en vue de l'application du critere Healpix : nlmax<=3*nsmax-1
    188     // c'est approximatif ; a raffiner.
    189     if (sphere_type.substr(0,6) == "TETAFI")
    190     {
    191       nsmax=(int_4)sqrt(map.NbPixels()/12.);
    192       premiereTranche++;
    193       derniereTranche--;
    194     }
    195     else
    196     {
    197       cout << " unknown type of sphere : " << sphere_type << endl;
    198       throw IOExc(" unknown type of sphere: " + (string)sphere_type );
    199     }
    200   //  cout << "GenerateFromAlm: the sphere is of type : " << sphere_type << endl;
    201   //  cout << "GenerateFromAlm: size index (nside) of the sphere= " << nsmax << endl;
    202   //  cout << "GenerateFromAlm: nlmax (from Alm) = " << nlmax << endl;
    203   //  if (nlmax>3*nsmax-1)
    204   //  {
    205       //     cout << "GenerateFromAlm: nlmax should be <= 3*nside-1" << endl;
    206   //   if (strncmp(sphere_type,"TETAFI",6) == 0)
    207   //    {
    208   //      cout << "GenerateFromAlm: nlmax should be <= 3*nside-1" << endl;
    209   //      cout << " (for this criterium, nsmax is computed as sqrt(nbPixels/12))" << endl;
    210   //    }
    211   //}
    212   }
     177  int premiereTranche = 0;
     178  int derniereTranche = map.NbThetaSlices()-1;
     179
    213180  Bm<complex<T> > b_m_theta(nmmax);
    214181
    215   //  map.Resize(nsmax);
    216182
    217183
     
    227193      map.GetThetaSlice(ith,theta,phi0, pixNumber,datan);
    228194      nph = pixNumber.NElts();
    229 
     195      if (nph < 2) continue;  // On laisse tomber les tranches avec un point
    230196      //       -----------------------------------------------------
    231197      //              for each theta, and each m, computes
     
    259225      // ---------------------------------------------------------------*/
    260226
    261 
    262       if (sphere_type.substr(0,4) == "RING")
    263         {
     227      /* ----- Reza, Juin 2006 :
     228         En verifiant la difference entre deux cartes
     229         cl -> map -> alm -> map2 et mapdiff = map-map2
     230         je me suis apercu qu'il y avait des differences importantes - dans les
     231         deux zones 'polar cap' de HEALPix - apres avoir pas mal chercher, il semble
     232         que la routine RfourierSynthesisFromB en soit responsable
     233         Je fais donc tout passer dans fourierSynthesisFromB
     234      if ( (sphere_type == "RING") || (sphere_type == "NESTED") ) {
    264235          TVector<T> Temp = RfourierSynthesisFromB(b_m_theta,nph,phi0);
    265           for (int i=0;i< nph;i++) map(pixNumber(i))=Temp(i);
     236          for (int i=0;i< nph;i++) map(pixNumber(i))=Temp(i); 
    266237        }
    267238      else
     239      */
    268240        // pour des pixelisations quelconques (autres que HEALPix
    269241        //  nph n'est pas toujours pair
Note: See TracChangeset for help on using the changeset viewer.