Changeset 3191 in Sophya for trunk/Cosmo/RadioBeam
- Timestamp:
- Mar 19, 2007, 9:29:05 AM (19 years ago)
- Location:
- trunk/Cosmo/RadioBeam
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/RadioBeam/mbeamcyl.cc
r3163 r3191 7 7 //================================================= 8 8 9 MultiBeamCyl::MultiBeamCyl(int nr, int ns, double pos y)9 MultiBeamCyl::MultiBeamCyl(int nr, int ns, double posx, double posy) 10 10 : texact(ns) , tjitt(ns) , toffset(nr) , 11 11 signal(ns), sigjitt(ns) , gain(nr) … … 14 14 NS = ns; 15 15 posY = posy; 16 posX = posx; 16 17 17 18 SetPrintLevel(0); … … 87 88 // pas celle apres shift (freq-reduite) 88 89 // 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)) ; 90 92 dephasage *= (2*M_PI*(fr+freq0)); 91 93 // On ajoute alors la phase propre de chaque source -
trunk/Cosmo/RadioBeam/mbeamcyl.h
r3160 r3191 31 31 // ns = nb d'echantillons en temps de chaque paquet 32 32 // posy = position spatiale en Y pour chaque cylindre (unite ou lambda=1 pour f=1) 33 MultiBeamCyl(int nr=1024, int ns=4096, double pos y=0.);33 MultiBeamCyl(int nr=1024, int ns=4096, double posx=0., double posy=0.); 34 34 ~MultiBeamCyl(); 35 35 … … 42 42 43 43 inline double getCylinderYPos() { return posY; } 44 inline double getCylinderXPos() { return posX; } 44 45 // Specification de la frequence de base f0 et espacement des recepteurs 45 46 // freq_vrai = freq_BRSourceGen + f0 … … 83 84 int NR, NS; // nb recepteurs, nb d'echantillons ds chaque paquet 84 85 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 85 87 86 88 int PrtLev; // Niveau de print de debug -
trunk/Cosmo/RadioBeam/multicyl.cc
r3163 r3191 84 84 void MultiCylinders::ReconstructSourceBox(int halfny, double stepangy) 85 85 { 86 87 86 ReconstructCylinderPlaneS(true); 88 87 TMatrix< complex<r_4> > & mtx = GetCylinder(0).getRecSrcPlane(); 89 88 // boite 3D X:angX, Y:angY , Z: freq 90 89 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; 92 93 sz[1] = halfny*2+1; 93 94 sz[2] = mtx.NRows(); … … 113 114 114 115 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; 115 118 double dphi; 116 119 complex< r_4 > phasefactor; 117 120 int jyy = 0; 118 121 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)); 122 126 // 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; 124 129 } // 125 130 jyy++; -
trunk/Cosmo/RadioBeam/multicyl.h
r3163 r3191 34 34 35 35 // Ajout d'un cylindre, en position posY 36 inline int AddCylinder(double pos y)37 { mCyl.push_back( new MultiBeamCyl(NR, NS, pos y) ); return mCyl.size(); }36 inline int AddCylinder(double posx, double posy) 37 { mCyl.push_back( new MultiBeamCyl(NR, NS, posx, posy) ); return mCyl.size(); } 38 38 39 39 MultiBeamCyl & GetCylinder(int i); -
trunk/Cosmo/RadioBeam/treccyl.cc
r3165 r3191 70 70 int act = 1; 71 71 int ncyl = 5; 72 if (narg < 3) {72 if (narg < 2) { 73 73 cout << "Usage: treccyl act ppfname [PrtLev=0] \n" 74 74 << " -act= X ou XY5 ou XY12 (5 ou 12 cylindres) \n" … … 208 208 for(int kkc=0; kkc<12; kkc++) { 209 209 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); 211 212 } 212 213 } … … 216 217 for(int kkc=0; kkc<5; kkc++) { 217 218 cout << "..." << kkc << " - mcyl.AddCylinder(posY= " << posyc[kkc] << " )" << endl; 218 mcyl.AddCylinder(posyc[kkc] );219 mcyl.AddCylinder(posyc[kkc],posyc[kkc]); 219 220 } 220 221 }
Note:
See TracChangeset
for help on using the changeset viewer.