Changeset 2984 in Sophya for trunk/SophyaLib/Samba/sphericaltransformserver.cc
- Timestamp:
- Jun 21, 2006, 5:53:06 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/Samba/sphericaltransformserver.cc
r2958 r2984 175 175 map.Resize(pixelSizeIndex); 176 176 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 213 180 Bm<complex<T> > b_m_theta(nmmax); 214 181 215 // map.Resize(nsmax);216 182 217 183 … … 227 193 map.GetThetaSlice(ith,theta,phi0, pixNumber,datan); 228 194 nph = pixNumber.NElts(); 229 195 if (nph < 2) continue; // On laisse tomber les tranches avec un point 230 196 // ----------------------------------------------------- 231 197 // for each theta, and each m, computes … … 259 225 // ---------------------------------------------------------------*/ 260 226 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") ) { 264 235 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); 266 237 } 267 238 else 239 */ 268 240 // pour des pixelisations quelconques (autres que HEALPix 269 241 // nph n'est pas toujours pair
Note:
See TracChangeset
for help on using the changeset viewer.