Changeset 3163 in Sophya for trunk/Cosmo
- Timestamp:
- Jan 30, 2007, 7:05:40 PM (19 years ago)
- Location:
- trunk/Cosmo/RadioBeam
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/RadioBeam/mbeamcyl.cc
r3160 r3163 87 87 // pas celle apres shift (freq-reduite) 88 88 // 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->ang X(is)) ;89 double dephasage = num*Da*sin(src->angX(is)) + posY*sin(src->angY(is)) ; 90 90 dephasage *= (2*M_PI*(fr+freq0)); 91 91 // On ajoute alors la phase propre de chaque source … … 133 133 int noksrc = ComputeSignalVector(0, false); 134 134 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; 137 137 if (PrtLev > 0) { 138 138 cout << " ... posY= " << posY << " MeanGain=" << Mean(gain) << " MeanAmpSrc=" -
trunk/Cosmo/RadioBeam/multicyl.cc
r3160 r3163 84 84 void MultiCylinders::ReconstructSourceBox(int halfny, double stepangy) 85 85 { 86 Timer tm("RecSrcBox");87 86 88 87 ReconstructCylinderPlaneS(true); … … 98 97 cout << " MultiCylinders::ReconstructSourceBox(" << halfny << "," << stepangy 99 98 << "=" << Angle(stepangy).ToArcMin() << " ) srcbox:" << endl; 99 Timer tm("RecSrcBox"); 100 100 box.Show(cout); 101 101 … … 103 103 int pmod = mtx.NRows()/10; 104 104 105 double fstep = 1. /(double)NS; // pas en frequence, attention, on a vire la composante continu105 double fstep = 1.0/(double)NS; // pas en frequence, attention, on a vire la composante continu 106 106 for(int kf=0; kf<mtx.NRows(); kf++) { // Loop over frequencies 107 107 double frq = (double)(kf+1.)*fstep + freq0; // + 1 car f=0 a ete vire -
trunk/Cosmo/RadioBeam/multicyl.h
r3160 r3163 25 25 // nr = nb de recepteurs 26 26 // 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) 27 29 MultiCylinders(int nr=256, int ns=1024); 28 30 ~MultiCylinders(); … … 65 67 // Reconstruction de la boite 3D des sources 66 68 // - 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); 70 75 71 76 -
trunk/Cosmo/RadioBeam/recbeam.pic
r3160 r3163 47 47 plot2dw ntsrc sin(angrad)*freq*0.25*256+128 freqred*512*2 amp 1 'nsta same red marker=circle,7' 48 48 49 zone 1 3 50 disp recXYf0 'zoomx2 grey32 lut=sqrt,0.,0.1' 51 disp recXYf1 'zoomx2 grey32 lut=sqrt,0.,0.1' 52 disp recXYf2 'zoomx2 grey32 lut=sqrt,0.,0.1' 49 53 50 54 55 56 objaoper recsrcbox slicexy 101 57 set cobj /home/slicexy_101 58 disp $cobj 'zoomx2 grey32 lut=sqrt,0.,0.1' -
trunk/Cosmo/RadioBeam/treccyl.cc
r3160 r3163 33 33 static double freq0 = 2.; // frequence de base 34 34 static double da = 0.25; // pas des antennes le long du cylindre 35 static double snoise = 1.0; //sigma du bruit36 static double tjit = 0. 05; //sigma du jitter en temps37 static double tos = 0. 02; //sigma des offsets en temps35 static double snoise = 0.; //1.0; sigma du bruit 36 static double tjit = 0.; //0.05; sigma du jitter en temps 37 static double tos = 0.; //0.02; sigma des offsets en temps 38 38 static double gmean = 1.; // gain moyen 39 39 static double gsig = 0.; // sigma des gains … … 149 149 150 150 // BRSourceGen sg; 151 int nsf = 10;151 int nsf = 7; 152 152 vector<double> frq; 153 153 frq.push_back(0.1); … … 157 157 158 158 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.; 160 164 // sg.WritePPF(string("brsrcm.ppf")); 161 165 // BRSourceGen sg(string("brsrcm.ppf")); … … 174 178 175 179 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.); 180 186 181 187 mcyl.SetSources(sg); … … 184 190 185 191 // mcyl.ReconstructCylinderPlaneS(true); 186 mcyl.ReconstructSourceBox( );192 mcyl.ReconstructSourceBox(15, M_PI/500.); 187 193 188 194 POutPersist po(ppfname); … … 192 198 193 199 { 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(); 195 202 po << PPFNameTag("recsrcplane0") << srcplane0; 196 203 } 197 204 198 205 { 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(); 200 214 po << PPFNameTag("recsrcplane3") << srcplane3; 201 215 } … … 205 219 int kfmin, kfmax; 206 220 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; 208 222 { 209 223 TMatrix<r_4> slice0 = mcyl.getRecXYSlice(kfmin, kfmax); 210 224 po << PPFNameTag("recXYf0") << slice0; 211 225 } 212 kfmin = mcyl.getRecSrcBox().SizeZ()*frq[1] - 3; kfmax = kfmin+6;226 kfmin = mcyl.getRecSrcBox().SizeZ()*frq[1] - 1; kfmax = kfmin+2; 213 227 { 214 228 TMatrix<r_4> slice1 = mcyl.getRecXYSlice(kfmin, kfmax); 215 229 po << PPFNameTag("recXYf1") << slice1; 216 230 } 217 kfmin = mcyl.getRecSrcBox().SizeZ()*frq[2] - 3; kfmax = kfmin+6;231 kfmin = mcyl.getRecSrcBox().SizeZ()*frq[2] - 1; kfmax = kfmin+2; 218 232 { 219 233 TMatrix<r_4> slice2 = mcyl.getRecXYSlice(kfmin, kfmax);
Note:
See TracChangeset
for help on using the changeset viewer.