Changeset 1683 in Sophya for trunk/SophyaProg/PrgMap
- Timestamp:
- Oct 11, 2001, 5:22:03 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaProg/PrgMap/map2cl.cc
r1607 r1683 50 50 else { 51 51 cout << " map2cl : Spherical harmonics analysis - HEALPix map -> Power spectrum C_l \n" 52 << " Usage: map2cl [-float/-r4] [-lmax lval] [-thetacut dtdeg] \n"52 << " Usage: map2cl [-float/-r4] [-lmax lval] [-thetacut dtdeg] [-iter_order lval]\n" 53 53 << " [-fitsin] [-fitsout] InFileName OutFileName \n" 54 54 << " -float (-r4): single precision C_l and map (default = double) \n" … … 56 56 << " -thetacut dtdeg : Symmetric delta-theta cut (in degree) along equator \n" 57 57 << " (default=0 -> no cut)\n" 58 << " -iter_order lval : 1,2,3,4... order of an iterative analysis , 3rd order is usually optimal (default=0 -> standard analysis)\n" 58 59 << " -fitsout: Select the FITS format for the output map (default PPF format) \n" 59 60 << " -fitsin : Select the FITS format for the input vector (default PPF format) \n" … … 69 70 public : 70 71 static void ComputeCl(string & infile, string & outfile, int lmax, double tcut, 71 bool fgfitsin, bool fgfitsout)72 int iterationOrder, bool fgfitsin, bool fgfitsout) 72 73 { 73 74 double deg2rad = M_PI/180.; 74 75 double minute2rad = M_PI/(180.*60.); 75 76 76 77 SphereHEALPix<T> sph; 77 78 if (fgfitsin) { … … 84 85 PInPersist ppi(infile); 85 86 ppi >> sph; 86 } 87 } 87 88 88 89 cout << " Input map : NbPixels= " << sph.NbPixels() << " NSide= " … … 92 93 double ctcut = (tcut < 1.e-19) ? 0. : cos((90.-tcut)*deg2rad); 93 94 cout << "--- Calling DecomposeToCl() (lmax= " << lmax 94 << " cos_theta_cut= " << ctcut << " ) theta_cut=" << tcut << " deg"<< endl;95 << " cos_theta_cut= " << ctcut << " iter_order= " << iterationOrder << ") theta_cut=" << tcut << " deg" << endl; 95 96 // Decomposition de la carte en C_l 96 97 SphericalTransformServer<T> sphtr; 97 TVector<T> clvec = sphtr.DecomposeToCl(sph, lmax, ctcut );98 TVector<T> clvec = sphtr.DecomposeToCl(sph, lmax, ctcut, iterationOrder); 98 99 99 100 T min, max; … … 125 126 126 127 int lmax = 255; 128 int iterationOrder = 0; 127 129 double tcut = 0.; 128 130 string infile; … … 142 144 if (k == narg-1) Usage(true); // -thetacut est suivi d'un argument 143 145 tcut = atof(arg[k+1]); k++; // k++ pour sauter au suivant 146 } 147 else if (strcmp(arg[k], "-iter_order") == 0) { 148 if (k == narg-1) Usage(true); // -iter_order est suivi d'un argument 149 iterationOrder = atof(arg[k+1]); k++; // k++ pour sauter au suivant 144 150 } 145 151 else if (strcmp(arg[k], "-fitsin") == 0) { … … 166 172 if (fgr4) { 167 173 cout << " SphereHEALPix<r_4> --> Power spectrum C_l<r_4> (float)" << endl; 168 _Map2Cl<r_4>::ComputeCl(infile, outfile, lmax, tcut, fgfitsin, fgfitsout);174 _Map2Cl<r_4>::ComputeCl(infile, outfile, lmax, tcut, iterationOrder, fgfitsin, fgfitsout); 169 175 } 170 176 else { 171 177 cout << " SphereHEALPix<r_8> --> Power spectrum C_l<r_8> (double)" << endl; 172 _Map2Cl<r_8>::ComputeCl(infile, outfile, lmax, tcut, fgfitsin, fgfitsout);178 _Map2Cl<r_8>::ComputeCl(infile, outfile, lmax, tcut, iterationOrder,fgfitsin, fgfitsout); 173 179 } 174 180 }
Note:
See TracChangeset
for help on using the changeset viewer.