Changeset 3191 in Sophya for trunk/Cosmo/RadioBeam


Ignore:
Timestamp:
Mar 19, 2007, 9:29:05 AM (19 years ago)
Author:
legoff
Message:

Cylinders have different x positions (NS).
This is taken into account in the signal phase shift
and in the exp() term when combining cylinders.
We can have more bins in x than antennas in one cylinder
to see the gain in resolution along x due to several cylinders at different x

Location:
trunk/Cosmo/RadioBeam
Files:
5 edited

Legend:

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

    r3163 r3191  
    77//=================================================
    88
    9 MultiBeamCyl::MultiBeamCyl(int nr, int ns, double posy)
     9MultiBeamCyl::MultiBeamCyl(int nr, int ns, double posx, double posy)
    1010  : texact(ns) , tjitt(ns) , toffset(nr) ,
    1111    signal(ns), sigjitt(ns) , gain(nr)
     
    1414  NS = ns;
    1515  posY = posy;
     16  posX = posx;
    1617
    1718  SetPrintLevel(0);
     
    8788    // pas celle apres shift (freq-reduite)
    8889    // lambda = c T = c/freq avec c = 1, dephasage = 2*pi*num*Da*sin(ang)/lambda
    89     double dephasage = num*Da*sin(src->angX(is)) + posY*sin(src->angY(is)) ;
     90    double dephasage = (posX+num*Da)*sin(src->angX(is)) +
     91                                posY*sin(src->angY(is)) ;
    9092    dephasage *= (2*M_PI*(fr+freq0));
    9193    // On ajoute alors la phase propre de chaque source
  • trunk/Cosmo/RadioBeam/mbeamcyl.h

    r3160 r3191  
    3131  // ns = nb d'echantillons en temps de chaque paquet
    3232  // posy = position spatiale en Y pour chaque cylindre (unite ou lambda=1 pour f=1)
    33  MultiBeamCyl(int nr=1024, int ns=4096, double posy=0.);
     33 MultiBeamCyl(int nr=1024, int ns=4096, double posx=0., double posy=0.);
    3434 ~MultiBeamCyl();
    3535
     
    4242
    4343 inline double getCylinderYPos() { return posY; }
     44 inline double getCylinderXPos() { return posX; }
    4445 // Specification de la frequence de base f0 et espacement des recepteurs
    4546 // freq_vrai = freq_BRSourceGen + f0
     
    8384 int NR, NS;  // nb recepteurs, nb d'echantillons ds chaque paquet
    8485 double posY;    // Position selon Y (E-O) de la ligne de recepteurs
     86 double posX;    // Position selon X (N-S) de la ligne de recepteurs
    8587
    8688 int PrtLev;   // Niveau de print de debug
  • trunk/Cosmo/RadioBeam/multicyl.cc

    r3163 r3191  
    8484void MultiCylinders::ReconstructSourceBox(int halfny, double stepangy)
    8585{
    86 
    8786  ReconstructCylinderPlaneS(true);
    8887  TMatrix< complex<r_4> > & mtx = GetCylinder(0).getRecSrcPlane();
    8988  // boite 3D X:angX, Y:angY , Z: freq
    9089  sa_size_t sz[5] = {0,0,0,0,0};
    91   sz[0] = mtx.NCols();
     90//  int nx=mtx.NCols(); // uncomment to go back to nxbin = nantenna
     91  int nx=256;
     92  sz[0] = nx;
    9293  sz[1] = halfny*2+1;
    9394  sz[2] = mtx.NRows();
     
    113114
    114115      double facl = - 2*M_PI*frq*cyl.getCylinderYPos();  // attention au signe -
     116//      double facl_x = - 2*M_PI*cyl.getCylinderXPos()/cyl.Da/(double)cyl.NR;
     117      double facl_x = - 2*M_PI*cyl.getCylinderXPos()/cyl.Da;
    115118      double dphi;
    116119      complex< r_4 > phasefactor;
    117120      int jyy = 0;
    118121      for(int jy=-halfny; jy<=halfny; jy++) {  // Loop over Y angular steps
    119         double dphi = facl * sin( (double)jy*stepangy );
    120         phasefactor = complex< r_4 > ((r_4) cos(dphi) , (r_4) sin(dphi));
    121         for(int ix=0; ix<sz[0]; ix++) {  // Loop over AngX directions
     122        for(int ix=0; ix<nx; ix++) {  // Loop over AngX directions
     123          double dphi = facl * sin( (double)jy*stepangy )
     124                        + facl_x*(double(ix)/double(nx)-1./2.);
     125          phasefactor = complex< r_4 > ((r_4) cos(dphi) , (r_4) sin(dphi));
    122126          // sur recp : index ligne -> frequence  ,    index colonne -> angX ,
    123           box(ix, jyy, kf) += recp(kf, ix)*phasefactor;
     127          int ixx=(int)(ix*(double)cyl.NR/double(nx));
     128          box(ix, jyy, kf) += recp(kf, ixx)*phasefactor;
    124129        }  // 
    125130        jyy++;
  • trunk/Cosmo/RadioBeam/multicyl.h

    r3163 r3191  
    3434
    3535 // Ajout d'un cylindre, en position posY
    36  inline int AddCylinder(double posy)
    37    {  mCyl.push_back( new MultiBeamCyl(NR, NS, posy) ); return mCyl.size(); }
     36 inline int AddCylinder(double posx, double posy)
     37   {  mCyl.push_back( new MultiBeamCyl(NR, NS, posx, posy) ); return mCyl.size(); }
    3838
    3939 MultiBeamCyl & GetCylinder(int i);
  • trunk/Cosmo/RadioBeam/treccyl.cc

    r3165 r3191  
    7070int act = 1;
    7171int ncyl = 5;
    72 if (narg < 3) {
     72if (narg < 2) {
    7373  cout << "Usage: treccyl act ppfname [PrtLev=0] \n"
    7474       << " -act= X ou XY5 ou XY12  (5 ou 12 cylindres) \n"
     
    208208    for(int kkc=0; kkc<12; kkc++) {
    209209      cout << "..." << kkc << " - mcyl.AddCylinder(posY= " << 5.*kkc << " )" << endl;
    210       mcyl.AddCylinder(5.*kkc);
     210      mcyl.AddCylinder(5.*kkc,5.*kkc);
     211//      mcyl.AddCylinder(0.,5.*kkc);
    211212    }
    212213  }
     
    216217    for(int kkc=0; kkc<5; kkc++) {
    217218      cout << "..." << kkc << " - mcyl.AddCylinder(posY= " << posyc[kkc] << " )" << endl;
    218       mcyl.AddCylinder(posyc[kkc]);
     219      mcyl.AddCylinder(posyc[kkc],posyc[kkc]);
    219220    }
    220221  }
Note: See TracChangeset for help on using the changeset viewer.