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


Ignore:
Timestamp:
Jun 29, 2010, 7:26:01 PM (15 years ago)
Author:
ansari
Message:

Suite modif utilisation de reponse calcule (tabulee) de l'interferometre pour soustraction avant-plans, Reza 29/06/2010

File:
1 edited

Legend:

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

    r3792 r3796  
    77    R. Ansari , C. Magneville - Juin 2010
    88
    9 Usage: calcpk2 InMapLSS convFacLSS InMapSync convFacSync InMapRadioSource convFacRsc OutPk
    10                [PixNoiseLevel] [TargetBeamArcmin] [NSigSrcThr]
     9Usage: calcpk2 InMapLSS convFacLSS InMapSync convFacSync InMapRadioSource convFacRsc OutPkFile
     10               [PixNoiseLevel] [Diameter/Four2DRespTableFile] [TargetBeamArcmin] [NSigSrcThr]
    1111---------------------------------------------------------------  */
    1212
     
    4444{
    4545  if (narg<6) {
    46     cout << " Usage: calcpk2 InMapLSS convFacLSS InMapSync convFacSync  OutPk \n"
    47          << "        [PixNoiseLevel] [TargetBeamArcmin] [NSigSrcThr]" << endl;
     46    cout << " Usage: calcpk2 InMapLSS convFacLSS InMapSync convFacSync  OutPkFile \n"
     47         << "        [PixNoiseLevel] [Diameter/Four2DRespTableFile] [TargetBeamArcmin] [NSigSrcThr]" << endl;
    4848    return 1;
    4949  }
     
    6565   
    6666    bool fgcorrbeam=true;
     67
     68    bool fgresptbl=false;
     69    double DIAMETRE=100.;
     70    string resptblname;
     71    if (narg>7) {
     72      if (isdigit(*arg[7])) {
     73        fgresptbl=false;
     74        DIAMETRE=atof(arg[7]);
     75      }
     76      else {
     77        resptblname=arg[7];
     78        fgresptbl=true;
     79      }
     80    }
    6781    double tbeamDoL=135;
    68     if (narg>7) {
    69       tbeamDoL=atof(arg[7]);
     82    if (narg>8) {
     83      tbeamDoL=atof(arg[8]);
    7084      if (tbeamDoL<1.)  fgcorrbeam=false;
    7185    }
    7286    bool fgclnsrc=true;
    7387    double nsigsrc=5.;
    74     if (narg>8) {
    75       nsigsrc=atof(arg[8]);
     88    if (narg>9) {
     89      nsigsrc=atof(arg[9]);
    7690      if (nsigsrc<1.e-6)  fgclnsrc=false;
    7791    }
     
    119133    conv.setFrequency(Freq0MHz);
    120134    double lambda = conv.getLambda();
    121     Four2DResponse arep(2, InterfArrayDiametre/lambda, InterfArrayDiametre/lambda, lambda);
     135    Four2DResponse arep(2, DIAMETRE/lambda, DIAMETRE/lambda, lambda);
     136    Four2DResponse* arep_p=&arep;
     137    Four2DRespTable resptbl;
     138    if (fgresptbl) {
     139      cout << "calcpk2[3.a]: initializing Four2DRespTable from file" << resptblname << endl;
     140      resptbl.readFromPPF(resptblname);
     141      arep_p=&resptbl;
     142    }
     143    else cout << " calcpk2[3.a]: Four2DResponse ( Diameter=" << DIAMETRE << " Lambda= " << lambda
     144              << " DoL=" << DIAMETRE/lambda << " ) " << endl;
     145
    122146    double DoL = tbeamDoL;
    123147    double tbeamarcmin = RadianToDegree(1.22/DoL)*60.;
    124     Four2DResponse tbeam(2, DoL, DoL );
    125     ForegroundCleaner  cleaner(arep, tbeam, skycube);
     148    int typcb = 2;
     149    //    if (fgresptbl) typcb=22;
     150    Four2DResponse tbeam(typcb, DoL, DoL );
     151
     152    ForegroundCleaner  cleaner(*arep_p, tbeam, skycube);
    126153    if (fgcorrbeam) {
    127       cout << "calcpk2[3.a] : calling cleaner.BeamCorrections() for target beam D/Lambda=" << DoL
    128            << "  -> arcmin " << tbeamarcmin << endl;
     154      cout << "calcpk2[3.b] : calling cleaner.BeamCorrections() for target beam D/Lambda=" << DoL
     155           << "  -> arcmin " << tbeamarcmin << " TypDishResp=" << typcb << endl;
    129156      cleaner.BeamCorrections();
    130157    }
    131     cout << " calcpk2[3.b] : calling cleaner.CleanNegatives() ... " << endl;
     158    cout << " calcpk2[3.c] : calling cleaner.CleanNegatives() ... " << endl;
    132159    cleaner.CleanNegatives();
    133160    if (fgclnsrc) {
    134       cout << "calcpk2[3.c] : calling cleaner.CleanPointSources() with threshold NSigma=" << nsigsrc  << endl;
     161      cout << "calcpk2[3.d] : calling cleaner.CleanPointSources() with threshold NSigma=" << nsigsrc  << endl;
    135162      cleaner.CleanPointSources(nsigsrc);
    136163    }
Note: See TracChangeset for help on using the changeset viewer.