Changeset 3933 in Sophya


Ignore:
Timestamp:
Dec 24, 2010, 1:22:04 AM (15 years ago)
Author:
ansari
Message:

correction/amelioration calcul reponse multi-dish ds plan (u,v), Reza 24/12/2010

Location:
trunk/Cosmo/RadioBeam
Files:
3 edited

Legend:

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

    r3932 r3933  
    183183  SetThetaPhiRange();
    184184  SetRespHisNBins();
     185  SetBeamNSamples();
    185186  SetPrtLevel();
    186187  mcnt_=0;
     
    198199  h2w_.SetZeroBin(0.,0.);
    199200
    200   double dold = dishes_[0].D/lambda_;
    201   double dolx = dishes_[0].Dx/lambda_;
    202   double doly = dishes_[0].Dy/lambda_;
     201  double dold = dishes_[0].Diameter()/lambda_;
     202  double dolx = dishes_[0].DiameterX()/lambda_;
     203  double doly = dishes_[0].DiameterY()/lambda_;
    203204
    204205  Four2DResponse rd(2, dold, dold);
     
    289290{
    290291  //  cout << " MultiDish::CumulResp()  theta=" << theta << " phi=" << phi << endl;
    291 
     292  /*
    292293  double dx = h2w_.WBinX()/5;
    293294  double dy = h2w_.WBinY()/5;
    294295  int nbx = DeuxPI*rd.Dx()/dx+1;
    295296  int nby = DeuxPI*rd.Dy()/dy+1;
     297  */
     298  double dx,dy;
     299  int nbx=beamnx_;
     300  int nby=beamny_;
    296301  dx = DeuxPI*rd.Dx()/(double)nbx;
    297302  dy = DeuxPI*rd.Dy()/(double)nby;
  • trunk/Cosmo/RadioBeam/mdish.h

    r3932 r3933  
    129129  inline void SetRespHisNBins(int nx=128, int ny=128)
    130130  { nx_=nx; ny_=ny; }
     131  inline void SetBeamNSamples(int nx=128, int ny=128)
     132  { beamnx_=nx; beamny_=ny; }
     133
    131134  Histo2D GetResponse();
    132135
     
    145148  double thetamax_, phimax_;
    146149  int ntet_,nphi_;
    147   int nx_, ny_;
     150  int nx_, ny_;   // nb de bins de l'histo de reponse
     151  int beamnx_, beamny_; // nb de points d'echantillonnage du beam
     152
    148153  //   Histo2D h2w_, h2cnt_;
    149154  QHis2D h2w_;
  • trunk/Cosmo/RadioBeam/repicon.cc

    r3932 r3933  
    5252       << "    -D DishDiameter (default=5 m) \n"
    5353       << "    -lmax array extension (default=100 m ) for response calculation kmax \n"
     54       << "    -repnxy Nx,Ny (default=200,200) ResponseTable binning \n"
     55       << "    -beamnxy Nx,Ny (default=200,200) Beam sampling \n"
    5456       << "    -rot ThetaMaxDeg,NTheta,PhiMaxDeg,NPhi (default NO-rotate/pointing -> 23,10,30,15 ) \n"
    5557       << "    -prt PrtLev,PrtModulo (default=0,10) \n"
     
    8789  int nphi=15;
    8890  bool fgpoint=false;
    89 
     91  int NRX=200;
     92  int NRY=200;
     93  int NBX=200;
     94  int NBY=200;
     95 
    9096  int ka=1;
    9197  while (ka<(narg-1)) {
     
    101107    else if (strcmp(arg[ka],"-lmax")==0) {
    102108      LMAX=atof(arg[ka+1]);  fgLMAXfixed=true;  ka+=2;
     109    }
     110    else if (strcmp(arg[ka],"-repnxy")==0) {
     111      sscanf(arg[ka+1],"%d,%d",&NRX,&NRY);   ka+=2;
     112    }
     113    else if (strcmp(arg[ka],"-beamnxy")==0) {
     114      sscanf(arg[ka+1],"%d,%d",&NBX,&NBY);   ka+=2;
    103115    }
    104116    else if (strcmp(arg[ka],"-rot")==0) {
     
    124136  try {  // exception handling try bloc at top level
    125137    cout << " ==== repicon.cc program , (u,v) plane response ==== " << endl;
     138
     139    H21Conversions conv;
     140    double LAMBDA=0.357 ;  // 21 cm at z=0.7
     141    conv.setRedshift(z_Redshift);
     142    LAMBDA = conv.getLambda();
    126143   
    127144    double Eta=0.95;
    128145    double cylW=12.;   // Largeur des cylindres
    129     double cylRL=0.5;  // Longeur des elements de reception le long du cylindre
     146    double cylRL=2*LAMBDA;  // Longeur des elements de reception le long du cylindre
    130147    double etaW=0.95;   // Efficacite de couverture en largeur
    131148    double etaRL=0.9;   // Efficacite de couverture le long du cylindre
    132149
    133     int cnt=0;
    134 
    135150    vector<Dish> vdishes;
    136151    cout << " repicon[1] : creating dish vector/ MultiDish for configuration: " << config << endl;
     
    146161    }
    147162    else if (config=="f3cyl") {
    148       cylW=10.;   cylRL=0.5;
    149       vdishes=CreateFilledCylConfig(3, 128, cylW, cylRL, etaW, etaRL, true);
     163      cylW=10.;   cylRL=2*LAMBDA;
     164      vdishes=CreateFilledCylConfig(3, 92, cylW, cylRL, etaW, etaRL, true);
    150165    }
    151166    else if (config=="f3cylp") {
    152       cylW=10.;   cylRL=0.5;
    153       vdishes=CreateFilledCylConfig(3, 128, cylW, cylRL, etaW, etaRL, false);
     167      cylW=10.;   cylRL=2*LAMBDA;
     168      vdishes=CreateFilledCylConfig(3, 92, cylW, cylRL, etaW, etaRL, false);
    154169    }
    155170    else if (config=="f8cyl") {
    156       cylW=12.;   cylRL=0.5;
    157       vdishes=CreateFilledCylConfig(8, 192, cylW, cylRL, etaW, etaRL, true);
     171      cylW=12.;   cylRL=2*LAMBDA;
     172      vdishes=CreateFilledCylConfig(8, 160, cylW, cylRL, etaW, etaRL, true);
    158173    }
    159174    else if (config=="f8cylp") {
    160       cylW=12.;   cylRL=0.5;
    161       vdishes=CreateFilledCylConfig(8, 192, cylW, cylRL, etaW, etaRL, false);
     175      cylW=12.;   cylRL=2*LAMBDA;
     176      vdishes=CreateFilledCylConfig(8, 160, cylW, cylRL, etaW, etaRL, false);
    162177    }
    163178    else if (config=="confA") {
     
    190205      return 99;
    191206    }
    192    
    193     H21Conversions conv;
    194     double LAMBDA=0.357 ;  // 21 cm at z=0.7
    195     conv.setRedshift(z_Redshift);
    196     LAMBDA = conv.getLambda();
    197    
     207       
    198208    double Dol = LMAX/LAMBDA;
    199209    bool fgnoauto = true;
    200     int NRX=200;
    201     int NRY=200;
    202210   
    203211    cout << " repicon[1] : Lambda=" << LAMBDA << " LMAX= " << LMAX << " NDishes=" << vdishes.size()
     
    207215    mdish.SetPrtLevel(prtlev,prtmod);
    208216    mdish.SetRespHisNBins(NRX,NRY);
    209 
     217    mdish.SetBeamNSamples(NBX,NBY);
    210218    if (fgpoint)  {
    211219      cout << " repicon[1.b] : activating pointing , ThetaMaxDeg=" << thetamxdeg << " NTheta=" << nteta
    212            << "  PhiMaxDeg= " << phimxdeg << " NPhi" << nphi << endl;
     220           << "  PhiMaxDeg= " << phimxdeg << " NPhi=" << nphi << endl;
    213221      mdish.SetThetaPhiRange(Angle(thetamxdeg,Angle::Degree).ToRadian(),nteta,Angle(phimxdeg,Angle::Degree).ToRadian(), nphi);
    214222    }
Note: See TracChangeset for help on using the changeset viewer.