Changeset 3163 in Sophya for trunk/Cosmo/RadioBeam


Ignore:
Timestamp:
Jan 30, 2007, 7:05:40 PM (19 years ago)
Author:
ansari
Message:

debug divers ds RadioBeam - Reza 30/01/2007

Location:
trunk/Cosmo/RadioBeam
Files:
5 edited

Legend:

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

    r3160 r3163  
    8787    // pas celle apres shift (freq-reduite)
    8888    // 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->angX(is)) ;
     89    double dephasage = num*Da*sin(src->angX(is)) + posY*sin(src->angY(is)) ;
    9090    dephasage *= (2*M_PI*(fr+freq0));
    9191    // On ajoute alors la phase propre de chaque source
     
    133133  int noksrc = ComputeSignalVector(0, false);
    134134  vector<TVector< complex<r_4> > >  vvfc;
    135   cout << "MultiBeamCyl::ReconstructSourcePlane()/Info NR=" << NR << " NFreq="
    136        << f_sigjit.Size()-1 << " NOkSrc=" << noksrc << endl;
     135  cout << "MultiBeamCyl::ReconstructSourcePlane() NR=" << NR
     136       << " PosY=" << posY << " NFreq=" << f_sigjit.Size()-1 << " NOkSrc=" << noksrc << endl;
    137137  if (PrtLev > 0) {
    138138    cout << " ... posY= " << posY << " MeanGain=" << Mean(gain) << " MeanAmpSrc="
  • trunk/Cosmo/RadioBeam/multicyl.cc

    r3160 r3163  
    8484void MultiCylinders::ReconstructSourceBox(int halfny, double stepangy)
    8585{
    86   Timer tm("RecSrcBox");
    8786
    8887  ReconstructCylinderPlaneS(true);
     
    9897  cout << " MultiCylinders::ReconstructSourceBox(" << halfny << "," << stepangy
    9998       << "=" << Angle(stepangy).ToArcMin() << " ) srcbox:" << endl;
     99  Timer tm("RecSrcBox");
    100100  box.Show(cout);
    101101
     
    103103  int pmod = mtx.NRows()/10;
    104104 
    105   double fstep = 1./(double)NS;  // pas en frequence, attention, on a vire la composante continu
     105  double fstep = 1.0/(double)NS;  // pas en frequence, attention, on a vire la composante continu
    106106  for(int kf=0; kf<mtx.NRows(); kf++) { // Loop over frequencies
    107107    double frq = (double)(kf+1.)*fstep + freq0;  // + 1 car f=0 a ete vire
  • trunk/Cosmo/RadioBeam/multicyl.h

    r3160 r3163  
    2525  // nr = nb de recepteurs
    2626  // ns = nb d'echantillons en temps de chaque paquet
     27  //   nr = 256 -> resol_ang ~ pi/256 = 0.01 rad ~ 40'
     28  //   longueur @ f=2 ~ 64 (256*lambda/2 = 256*0.25)
    2729 MultiCylinders(int nr=256, int ns=1024);
    2830 ~MultiCylinders();
     
    6567 // Reconstruction de la boite 3D des sources
    6668 // - halfny : nb de bin en angY = 2*halfny+1
    67  // - stepangy : pas en angle Y (radian) 1 arcmin= 0.00029 rad (~Pi/11000)
    68  // Cette methode appelle ReconstructCylinderPlaneS(true);
    69  void ReconstructSourceBox(int halfny=15, double stepangy=M_PI/10000);
     69 // - stepangy : pas en angle Y (radian)
     70 // NOTE: Cette methode appelle ReconstructCylinderPlaneS(true);
     71 // La resolution doit etre <= resol en angX --> ~ 1 deg ~ pi/
     72 // @f = 2 , lambda = 0.5 ===> posY <~ lambda/(2 sin resol)
     73 //   ===> posY < ~ 20   
     74 void ReconstructSourceBox(int halfny=10, double stepangy=M_PI/300);
    7075
    7176
  • trunk/Cosmo/RadioBeam/recbeam.pic

    r3160 r3163  
    4747plot2dw ntsrc sin(angrad)*freq*0.25*256+128 freqred*512*2 amp 1 'nsta same red marker=circle,7'
    4848
     49zone 1 3
     50disp recXYf0 'zoomx2 grey32 lut=sqrt,0.,0.1'
     51disp recXYf1 'zoomx2 grey32 lut=sqrt,0.,0.1'
     52disp recXYf2 'zoomx2 grey32 lut=sqrt,0.,0.1'
    4953
    5054
     55
     56objaoper recsrcbox slicexy 101
     57set cobj /home/slicexy_101
     58disp $cobj 'zoomx2 grey32 lut=sqrt,0.,0.1'
  • trunk/Cosmo/RadioBeam/treccyl.cc

    r3160 r3163  
    3333static double freq0 = 2.;  // frequence de base
    3434static double da = 0.25;     // pas des antennes le long du cylindre
    35 static double snoise = 1.0;  // sigma du bruit
    36 static double tjit = 0.05;   // sigma du jitter en temps
    37 static double tos = 0.02;    // sigma des offsets en temps
     35static double snoise = 0.; //1.0;  sigma du bruit
     36static double tjit = 0.; //0.05;    sigma du jitter en temps
     37static double tos = 0.; //0.02;    sigma des offsets en temps
    3838static double gmean = 1.;    // gain moyen
    3939static double gsig = 0.;     // sigma des gains
     
    149149
    150150  // BRSourceGen sg;
    151   int nsf = 10;
     151  int nsf = 7;
    152152  vector<double> frq;
    153153  frq.push_back(0.1);
     
    157157 
    158158  cout << "treccy/testmulticyl: BRSourceGen sg([frq=0.1,0.27,0.38], " << nsf << ")" << endl;
    159   BRSourceGen sg(frq, nsf, M_PI/3, M_PI/1000);
     159  BRSourceGen sg(frq, nsf, M_PI/3, M_PI/150);
     160  int is;
     161  for(is=0; is<nsf; is++)     sg.angY(is) = 0.;
     162  for(is=nsf; is<2*nsf; is++)     sg.angY(is) = M_PI/150.;
     163  for(is=2*nsf; is<3*nsf; is++)     sg.angY(is) = -M_PI/150.;
    160164  // sg.WritePPF(string("brsrcm.ppf"));
    161165  // BRSourceGen  sg(string("brsrcm.ppf"));
     
    174178
    175179  mcyl.AddCylinder(0.);
    176   mcyl.AddCylinder(100.);
    177   mcyl.AddCylinder(300.);
    178   mcyl.AddCylinder(700.);
    179   mcyl.AddCylinder(1500.);
     180  mcyl.AddCylinder(5.);
     181  mcyl.AddCylinder(10.);
     182  mcyl.AddCylinder(18.);
     183  mcyl.AddCylinder(30.);
     184  mcyl.AddCylinder(46.);
     185  mcyl.AddCylinder(64.);
    180186
    181187  mcyl.SetSources(sg);
     
    184190
    185191  //  mcyl.ReconstructCylinderPlaneS(true);
    186   mcyl.ReconstructSourceBox();
     192  mcyl.ReconstructSourceBox(15, M_PI/500.);
    187193
    188194  POutPersist po(ppfname);
     
    192198
    193199  {
    194   TMatrix<r_4> srcplane0 = module(mcyl.GetCylinder(0).getRecSrcPlane());
     200    //  TMatrix<r_4> srcplane0 = module(mcyl.GetCylinder(0).getRecSrcPlane());
     201  TMatrix< complex<r_4> > srcplane0 = mcyl.GetCylinder(0).getRecSrcPlane();
    195202  po << PPFNameTag("recsrcplane0") << srcplane0;
    196203  }
    197204
    198205  {
    199   TMatrix<r_4> srcplane3 = module(mcyl.GetCylinder(3).getRecSrcPlane());
     206    //  TMatrix<r_4> srcplane2 = module(mcyl.GetCylinder(3).getRecSrcPlane());
     207  TMatrix< complex<r_4> > srcplane2 = mcyl.GetCylinder(2).getRecSrcPlane();
     208  po << PPFNameTag("recsrcplane2") << srcplane2;
     209  }
     210
     211  {
     212    //  TMatrix<r_4> srcplane3 = module(mcyl.GetCylinder(3).getRecSrcPlane());
     213  TMatrix< complex<r_4> > srcplane3 = mcyl.GetCylinder(0).getRecSrcPlane();
    200214  po << PPFNameTag("recsrcplane3") << srcplane3;
    201215  }
     
    205219  int kfmin, kfmax;
    206220  po << PPFNameTag("recsrcbox") << mcyl.getRecSrcBox();
    207   kfmin = mcyl.getRecSrcBox().SizeZ()*frq[0] - 3;  kfmax = kfmin+6;
     221  kfmin = mcyl.getRecSrcBox().SizeZ()*frq[0] - 1;  kfmax = kfmin+2;
    208222  {
    209223  TMatrix<r_4> slice0 = mcyl.getRecXYSlice(kfmin, kfmax);
    210224  po << PPFNameTag("recXYf0") << slice0;
    211225  }
    212   kfmin = mcyl.getRecSrcBox().SizeZ()*frq[1] - 3;  kfmax = kfmin+6;
     226  kfmin = mcyl.getRecSrcBox().SizeZ()*frq[1] - 1;  kfmax = kfmin+2;
    213227  {
    214228  TMatrix<r_4> slice1 = mcyl.getRecXYSlice(kfmin, kfmax);
    215229  po << PPFNameTag("recXYf1") << slice1;
    216230  }
    217   kfmin = mcyl.getRecSrcBox().SizeZ()*frq[2] - 3;  kfmax = kfmin+6;
     231  kfmin = mcyl.getRecSrcBox().SizeZ()*frq[2] - 1;  kfmax = kfmin+2;
    218232  {
    219233  TMatrix<r_4> slice2 = mcyl.getRecXYSlice(kfmin, kfmax);
Note: See TracChangeset for help on using the changeset viewer.