Changeset 4022 in Sophya for trunk/Cosmo/RadioBeam/calcpk2.cc


Ignore:
Timestamp:
Sep 28, 2011, 5:13:51 PM (14 years ago)
Author:
ansari
Message:

modifs pour pouvoir imposer la moyenne en temp des plans X,Y des cubes lors de l'extraction du signal HI, Reza 28/9/2011

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cosmo/RadioBeam/calcpk2.cc

    r3989 r4022  
    4444{
    4545  if ( (narg<6)||((narg>1)&&(strcmp(arg[1],"-h")==0)) ) {
    46     cout << " Usage: [-t -g -mxr val] calcpk2 InMapLSS convFacLSS InMapFgnd convFacFgnd OutPkFile \n"
     46    cout << " Usage: [-t -g -mxr val -fmt T0,alpha] calcpk2 InMapLSS convFacLSS InMapFgnd convFacFgnd OutPkFile \n"
    4747         << "        [PixNoiseLevel] [D_Dish/Four2DRespTableFile CorBeamDiam] \n"
    4848         << "        [NSigSrcThr] [P2/P1] [RecMapFile] " << endl;
    4949    if ((narg>1)&&(strcmp(arg[1],"-h")==0)) {
    5050      cout << "-t -g : Triangular / gaussian beam shape (def=gaussian) \n"
     51           << "-fmt T0,alpha: fix mean slice temp. according to power law T0,alpha \n "
    5152           << "-mxr val: Max beam correction factor (default=10.) \n "
    5253           << "- InMapLSS: Input 3D LSS cube (PPF file name) \n "
     
    7980    double maxratio=10.;   // valeur max du rapport des lobes lors de la correction de lobe
    8081
     82    bool fgfix_mXYtemp=false;
     83    double T0_pl=1.;
     84    double alpha_pl=0.;
    8185    // decodage argument optionnel
    8286    bool fgoptarg=true;
     
    8690      else if (fbo=="-g")  { fggaussian=true; arg++; narg--; }
    8791      else if (fbo=="-mxr")  { arg++; maxratio=atof(arg[1]); arg++; narg-=2; }
     92      else if (fbo=="-fmt") 
     93        { fgfix_mXYtemp=true; arg++; sscanf(arg[1],"%lg,%lg",&T0_pl,&alpha_pl); arg++; narg-=2; }
    8894      else fgoptarg=false;
    8995    }
     
    202208
    203209    ForegroundCleaner  cleaner(*arep_p, tbeam, skycube, maxratio);
     210    if (fgfix_mXYtemp) {
     211      cout << "calcpk2[3.b] : calling cleaner.FixMeanXYTemp(T0=" << T0_pl << ",alpha=" << alpha_pl << ")" << endl;
     212      cleaner.FixMeanXYTemp(T0_pl,alpha_pl);
     213    }
    204214    if (fgcorrbeam) {
    205       cout << "calcpk2[3.b] : calling cleaner.BeamCorrections() for target beam Diameter=" << tbeamDiam 
     215      cout << "calcpk2[3.c] : calling cleaner.BeamCorrections() for target beam Diameter=" << tbeamDiam 
    206216           << " D/Lambda=" << DoL  << "  -> arcmin " << tbeamarcmin << " TypDishResp=" << typcb << endl;
    207217      cleaner.BeamCorrections();
    208218    }
    209     cout << " calcpk2[3.c] : calling cleaner.CleanNegatives() ... " << endl;
     219    cout << " calcpk2[3.d] : calling cleaner.CleanNegatives() ... " << endl;
    210220    cleaner.CleanNegatives();
    211221    if (fgclnsrc) {
    212       cout << "calcpk2[3.d] : calling cleaner.CleanPointSources() with threshold NSigma=" << nsigsrc  << endl;
     222      cout << "calcpk2[3.e] : calling cleaner.CleanPointSources() with threshold NSigma=" << nsigsrc  << endl;
    213223      cleaner.CleanPointSources(nsigsrc);
    214224    }
Note: See TracChangeset for help on using the changeset viewer.