Changeset 3947 in Sophya for trunk/Cosmo/RadioBeam/repicon.cc


Ignore:
Timestamp:
Feb 14, 2011, 12:58:29 AM (15 years ago)
Author:
ansari
Message:

Amelioration et modifs diverses lors de la redaction du papier, Reza 13/02/2011

File:
1 edited

Legend:

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

    r3936 r3947  
    3232
    3333// pour sauver la reponse mdresp et la config des dishes dans un fichier PPF
    34 void SaveDTVecDishesH2Resp(string& outfile, vector<Dish>& vdishes, Four2DRespTable& mdresp);
     34void SaveDTVecDishesH2Resp(POutPersist& po, vector<Dish>& vdishes, Four2DRespTable& mdresp);
    3535
    3636// ---------------------------------------------------------------------
    37 // main program for computing interferometer response un (u,v) plane
     37// main program for computing interferometer response in (u,v) plane
    3838// R. Ansari  - Avril-Juin 2010
    3939// ---------------------------------------------------------------------
     
    4242{
    4343  cout << " Usage: repicon [-parname Value] configId OutPPFName \n"
    44        << " configIds: f4x4,f8x8,f20x20, confA,confB,confC,confD, hex12,cross11, f3cyl,f8cyl,f3cylp,f8cylp \n"
    45        << "   f4x4 , f8x8 , f20x20 Filled array of nxn dishes  \n"
     44       << " configIds: f4x4,f8x8,f11x11,f20x20, confA,confB,confC,confD, hex12,cross11, \n"
     45       <<  "           f3cyl,f8cyl,f3cylp,f8cylp, nan12,nan24,nan36,nan40,nan128 \n"
     46       << "   f4x4 , f8x8 , f11x11 , f20x20 Filled array of nxn dishes  \n"
    4647       << "   confA , confB, confC, confD : semi-filled array of dishes \n"
    4748       << "   hex12,cross11 : ASKAP like double hexagonal (12xD=12m), cross config (11xD=12m) \n"
     49       << "   nan12,nan24,nan36,nan40,nan128: 3,4,6,5,8 cylinder like configurations with 12,24,36,40,128 dishes\n"
    4850       << "   f3cyl, f8cyl , f3cylp, f8cylp : filled array of non perfect/perfect of n cylinders \n"
    4951       << "   f4cylw : filled array of 4 perfect of wide cylinders \n"
    50        << "  [ -parname value] : -renmax -z -prt -D -lmax \n"
     52       << "   pit2cyl,pit2cylw : 2 cylinders 15mx7m, 20mx10 for z=0.3 at Pittsburg (perfect) \n"
     53       << "   pit4cyl : 4 cylinders 32mx8m for z=0.3-0.7 at Pittsburg (perfect) \n"
     54       << "  [ -parname value] : -renmax -z -prt -D -lmax -eta -autocor \n"
    5155       << "    -renmax MaxValue (default : Do NOT renormalize 2D response value \n"   
    5256       << "    -z redshift (default=0.7) --> determines Lambda \n"
    5357       << "    -D DishDiameter (default=5 m) \n"
     58       << "    -eta fill_factor (default=0.90) \n"
    5459       << "    -lmax array extension (default=100 m ) for response calculation kmax \n"
    5560       << "    -repnxy Nx,Ny (default=200,200) ResponseTable binning \n"
    5661       << "    -beamnxy Nx,Ny (default=200,200) Beam sampling \n"
    5762       << "    -rot ThetaMaxDeg,NTheta,PhiMaxDeg,NPhi (default NO-rotate/pointing -> 23,10,30,15 ) \n"
     63       << "    -autocor : keep antenna auto-correlation signals (default NO) \n"
    5864       << "    -prt PrtLev,PrtModulo (default=0,10) \n"
    5965       << endl;
     
    8288 
    8389  double Ddish=5.;
     90  double Eta=0.9;
    8491  bool fgDfixed=false;
    8592  double LMAX = 100.;  // taille de la zone, pour calcul kmax
     
    94101  int NBX=200;
    95102  int NBY=200;
     103  bool fgnoauto=true;  // do not keep antenna autocorrelation signal
    96104 
    97105  int ka=1;
     
    106114      Ddish=atof(arg[ka+1]);  fgDfixed=true;  ka+=2;
    107115    }
     116    else if (strcmp(arg[ka],"-eta")==0) {
     117      Eta=atof(arg[ka+1]);  ka+=2;
     118    }
    108119    else if (strcmp(arg[ka],"-lmax")==0) {
    109120      LMAX=atof(arg[ka+1]);  fgLMAXfixed=true;  ka+=2;
     
    117128    else if (strcmp(arg[ka],"-rot")==0) {
    118129      sscanf(arg[ka+1],"%lg,%d,%lg,%d",&thetamxdeg,&nteta,&phimxdeg,&nphi);  fgpoint=true;  ka+=2;
     130    }
     131    else if (strcmp(arg[ka],"-autocor")==0) {
     132      fgnoauto=false;   ka+=1;
    119133    }
    120134    else if (strcmp(arg[ka],"-prt")==0) {
     
    143157    LAMBDA = conv.getLambda();
    144158   
    145     double Eta=0.95;
    146159    double cylW=12.;   // Largeur des cylindres
    147160    double cylRL=2*LAMBDA;  // Longeur des elements de reception le long du cylindre
     
    150163
    151164    vector<Dish> vdishes;
    152     cout << " repicon[1] : creating dish vector/ MultiDish for configuration: " << config << endl;
     165    cout << " repicon[1] : creating dish vector/ MultiDish for configuration: " << config
     166         << " Ddish=" << Ddish << " m. Eta=" << Eta << endl;
    153167
    154168    if (config=="f4x4") {
     
    157171    else if (config=="f8x8") {
    158172      vdishes=CreateFilledSqConfig(8,Ddish, Eta);
     173    }
     174    else if (config=="f11x11") {
     175      vdishes=CreateFilledSqConfig(11,Ddish, Eta);
    159176    }
    160177    else if (config=="f20x20") {
     
    172189      cylW=25.;   cylRL=3*LAMBDA;
    173190      vdishes=CreateFilledCylConfig(4, 100, cylW, cylRL, etaW, etaRL, false);
     191    }
     192    else if (config=="pit2cyl") {
     193      etaW=0.9; etaRL=0.9;
     194      cylW=7.;   cylRL=2*LAMBDA;
     195      vdishes=CreateFilledCylConfig(2, 32, cylW, cylRL, etaW, etaRL, false);
     196    }
     197    else if (config=="pit2cylw") {
     198      etaW=0.9; etaRL=0.9;
     199      cylW=9.;   cylRL=2*LAMBDA;
     200      vdishes=CreateFilledCylConfig(2, 40, cylW, cylRL, etaW, etaRL, false);
     201    }
     202    else if (config=="pit4cyl") {
     203      etaW=0.9; etaRL=0.9;
     204      cylW=8.;   cylRL=2*LAMBDA;
     205      vdishes=CreateFilledCylConfig(4, 64, cylW, cylRL, etaW, etaRL, false);
    174206    }
    175207    else if (config=="f8cyl") {
     
    206238      vdishes=CreateDoubleHexagonConfig(Ddish);
    207239    }
     240    else if (config=="nan12") {
     241      vdishes=CreateConfigNancay12(Ddish, Eta);
     242    }
     243    else if (config=="nan24") {
     244      vdishes=CreateConfigNancay24(Ddish, Eta);
     245    }
     246    else if (config=="nan36") {
     247      vdishes=CreateConfigNancay36(Ddish, Eta);
     248    }
     249    else if (config=="nan40") {
     250      vdishes=CreateConfigNancay40(Ddish, Eta);
     251    }
     252    else if (config=="nan128") {
     253      vdishes=CreateConfigNancay128(Ddish, Eta);
     254    }
    208255    else {
    209256      cout << " NON valid configuration option -> exit" << endl;
     
    212259       
    213260    double Dol = LMAX/LAMBDA;
    214     bool fgnoauto = true;
    215261   
    216262    cout << " repicon[1] : Lambda=" << LAMBDA << " LMAX= " << LMAX << " NDishes=" << vdishes.size()
    217          << " D-Dish=" << Ddish << " m." << endl;
     263         << " D-Dish=" << Ddish << " m. " << ((fgnoauto)?" NO-":"With-") << "AutoCorrelation" << endl;
    218264 
    219265    MultiDish mdish(LAMBDA, LMAX, vdishes, fgnoauto);
     
    230276    Histo2D hrep = mdish.GetResponse();
    231277    PrtTim("Apres mdish.GetResponse()");
     278    HProf h1dnoise = mdish.GetProjNoiseLevel();
     279    HProf h1drep = mdish.GetProjResponse();
    232280
    233281    Four2DRespTable mdresp(hrep, Dol, LAMBDA);
     
    241289
    242290    string outfile2 = "hdt_"+outfile;
    243     cout << " repicon[4] : saving H2D-response, multidish config to PPF file " << outfile2 << endl;
    244     SaveDTVecDishesH2Resp(outfile2, vdishes, mdresp);
     291    POutPersist po2(outfile2);
     292    cout << " repicon[4] : saving H1D/H2D-response, multidish config to PPF file " << outfile2 << endl;
     293    po2 << PPFNameTag("h1dnoise") << h1dnoise;
     294    po2 << PPFNameTag("h1drep") << h1drep;
     295    SaveDTVecDishesH2Resp(po2, vdishes, mdresp);
    245296
    246297    rc = 0;
     
    265316
    266317/*-- Nouvelle-Fonction --*/
    267 void SaveDTVecDishesH2Resp(string& outfile, vector<Dish>& vdishes, Four2DRespTable& mdresp)
     318void SaveDTVecDishesH2Resp(POutPersist& po, vector<Dish>& vdishes, Four2DRespTable& mdresp)
    268319{
    269320  char* names[5]={"did","posx","posy","diam","diamy"};
     
    285336  }
    286337  Histo2D h2rep=mdresp.GetResponse();
    287   POutPersist po(outfile);
    288338  po << PPFNameTag("mdish") << ntvd;
    289339  po << PPFNameTag("h2rep") << h2rep;
Note: See TracChangeset for help on using the changeset viewer.