Changeset 1683 in Sophya for trunk/SophyaProg/PrgMap


Ignore:
Timestamp:
Oct 11, 2001, 5:22:03 PM (24 years ago)
Author:
lemeur
Message:

methode iterative pour analyse harmonique

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaProg/PrgMap/map2cl.cc

    r1607 r1683  
    5050  else {
    5151    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"
    5353         << "        [-fitsin] [-fitsout] InFileName OutFileName \n"
    5454         << "   -float (-r4): single precision C_l and map (default = double) \n"
     
    5656         << "   -thetacut dtdeg : Symmetric delta-theta cut (in degree) along equator \n"
    5757         << "                    (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"
    5859         << "   -fitsout: Select the FITS format for the output map (default PPF format) \n"
    5960         << "   -fitsin : Select the FITS format for the input vector (default PPF format) \n"
     
    6970public :
    7071static void ComputeCl(string & infile, string & outfile, int lmax, double tcut,
    71                       bool fgfitsin, bool fgfitsout)
     72                      int iterationOrder, bool fgfitsin, bool fgfitsout)
    7273{
    7374  double deg2rad =  M_PI/180.;
    7475  double minute2rad =  M_PI/(180.*60.);
    75 
     76 
    7677  SphereHEALPix<T> sph;
    7778  if (fgfitsin) {
     
    8485    PInPersist ppi(infile);
    8586    ppi >> sph;
    86   }
     87  } 
    8788
    8889  cout << " Input map : NbPixels= " <<  sph.NbPixels() << " NSide= "
     
    9293  double ctcut = (tcut < 1.e-19) ? 0. : cos((90.-tcut)*deg2rad);
    9394  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;
    9596  // Decomposition de la carte en C_l
    9697  SphericalTransformServer<T> sphtr;
    97   TVector<T> clvec = sphtr.DecomposeToCl(sph, lmax, ctcut);
     98  TVector<T> clvec = sphtr.DecomposeToCl(sph, lmax, ctcut, iterationOrder);
    9899 
    99100  T min, max;
     
    125126 
    126127  int lmax = 255;
     128  int iterationOrder = 0;
    127129  double tcut = 0.;
    128130  string infile;
     
    142144      if (k == narg-1) Usage(true);  // -thetacut est suivi d'un argument
    143145      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
    144150    }
    145151    else if (strcmp(arg[k], "-fitsin") == 0) {
     
    166172    if (fgr4) {
    167173      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);
    169175    }
    170176    else {
    171177      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);
    173179    }
    174180  }
Note: See TracChangeset for help on using the changeset viewer.