Changeset 2291 in Sophya for trunk/SophyaLib/Samba
- Timestamp:
- Dec 5, 2002, 4:43:59 PM (23 years ago)
- Location:
- trunk/SophyaLib/Samba
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/Samba/lambdaBuilder.h
r1756 r2291 14 14 15 15 public : 16 Legendre();17 16 Legendre(r_8 x, int_4 lmax); 18 inline r_8 getPl(int_4 l) 17 18 inline r_8 getPl(int_4 l) const 19 19 { 20 20 if (l>lmax_) … … 25 25 } 26 26 27 27 28 private : 28 void array_init(int_4 lmax); 29 30 Legendre() {;} 31 32 void array_init(int_4 lmax); 29 33 30 34 r_8 x_; … … 45 49 46 50 /*! return the value of the coefficient \f$ \lambda_l^m \f$ */ 47 inline double lamlm(int l, int m) const { return lambda_(l,m); } 51 inline double lamlm(int l, int m) const 52 { 53 lambda_.CheckRelativeIndices(l,m); 54 return lambda_(l,m); 55 } 48 56 49 inline double lamlm(int index) const { return lambda_(index); } 57 inline double lamlm(int index) const { 58 return lambda_(index); 59 } 50 60 51 61 … … 92 102 inline void lam_wx(int l, int m, r_8& w, r_8& x) const 93 103 { 104 if (m > l ) 105 { 106 throw RangeCheckError("LambdaWXBuilder::lam_wx : l < m !" ); 107 } 94 108 w=lamWlm_(l,m); 95 109 x=lamXlm_(l,m); … … 117 131 inline void lam_pm(int l, int m, r_8& lambda_plus, r_8& lambda_moins) const 118 132 { 133 if (m > l ) 134 { 135 throw RangeCheckError("LambdaPMBuilder::lam_pm : l < m !" ); 136 } 119 137 lambda_plus = lamPlm_(l,m); 120 138 lambda_moins = lamMlm_(l,m); -
trunk/SophyaLib/Samba/sphericaltransformserver.cc
r1756 r2291 169 169 // le Resize est suppose mettre a zero 170 170 map.Resize(pixelSizeIndex); 171 char*sphere_type=map.TypeOfMap();171 string sphere_type=map.TypeOfMap(); 172 172 int premiereTranche = 0; 173 173 int derniereTranche = map.NbThetaSlices()-1; 174 if (s trncmp(sphere_type,"RING",4) == 0)174 if (sphere_type.substr(0,4) == "RING") 175 175 { 176 176 nsmax=map.SizeIndex(); … … 182 182 // en vue de l'application du critere Healpix : nlmax<=3*nsmax-1 183 183 // c'est approximatif ; a raffiner. 184 if (s trncmp(sphere_type,"TETAFI",6) == 0)184 if (sphere_type.substr(0,6) == "TETAFI") 185 185 { 186 186 nsmax=(int_4)sqrt(map.NbPixels()/12.); … … 706 706 mapq.Resize(pixelSizeIndex); 707 707 mapu.Resize(pixelSizeIndex); 708 char*sphere_type=mapq.TypeOfMap();709 if (s trncmp(sphere_type,mapu.TypeOfMap(),4) != 0)708 string sphere_type=mapq.TypeOfMap(); 709 if (sphere_type != mapu.TypeOfMap()) 710 710 { 711 711 cout << " SphericalTransformServer: les deux spheres ne sont pas de meme type" << endl; … … 715 715 716 716 } 717 if (s trncmp(sphere_type,"RING",4) == 0)717 if (sphere_type.substr(0,4) == "RING") 718 718 { 719 719 nsmax=mapq.SizeIndex(); … … 724 724 // en vue de l'application du critere Healpix : nlmax<=3*nsmax-1 725 725 // c'est approximatif ; a raffiner. 726 if (s trncmp(sphere_type,"TETAFI",6) == 0)726 if (sphere_type.substr(0,6) == "TETAFI") 727 727 { 728 728 nsmax=(int_4)sqrt(mapq.NbPixels()/12.); … … 739 739 { 740 740 cout << "GenerateFromAlm: nlmax should be <= 3*nside-1" << endl; 741 if (s trncmp(sphere_type,"TETAFI",6) == 0)741 if (sphere_type.substr(0,6) == "TETAFI") 742 742 { 743 743 cout << " (for this criterium, nsmax is computed as sqrt(nbPixels/12))" << endl; … … 877 877 TVector<int_4> pixNumber; 878 878 879 char*sphere_type=mapq.TypeOfMap();880 if (s trncmp(sphere_type,mapu.TypeOfMap(),4) != 0)879 string sphere_type=mapq.TypeOfMap(); 880 if (sphere_type != mapu.TypeOfMap()) 881 881 { 882 882 cout << " SphericalTransformServer: les deux spheres ne sont pas de meme type" << endl;
Note:
See TracChangeset
for help on using the changeset viewer.