Changeset 3789 in Sophya for trunk/Cosmo/RadioBeam/applobe.cc
- Timestamp:
- Jun 27, 2010, 4:57:36 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/RadioBeam/applobe.cc
r3788 r3789 3 3 R. Ansari , C. Magneville - Juin 2010 4 4 5 Usage: applobe In3DPPFName Out3DPPFName 5 Usage: applobe In3DPPFName Out3DPPFName [ResmapleFactor=0.5,0.333...] [TargetBeamArcmin] 6 6 --------------------------------------------------------------- */ 7 7 … … 50 50 51 51 if (narg < 3) { 52 cout << "Usage: applobe In3DPPFName Out3DPPFName \n" << endl;52 cout << "Usage: applobe In3DPPFName Out3DPPFName [ResmapleFactor=0.5,0.333...] [TargetBeamArcmin]\n" << endl; 53 53 return 1; 54 54 } … … 57 57 string outname = arg[2]; 58 58 string inname = arg[1]; 59 bool fgresample=false; 60 double fresamp=1.; 61 if (narg>3) { 62 fresamp=atof(arg[3]); 63 if ((fabs(fresamp)>1.e-2)&&(fabs(fresamp-1.)>1.e-2)) fgresample=true; 64 } 65 bool fgcorrbeam=false; 66 double tbeamarcmin=15.; 67 if (narg>4) { 68 tbeamarcmin=atof(arg[4]); 69 if (tbeamarcmin>1.e-3) fgcorrbeam=true; 70 } 71 59 72 int rc = 91; 60 73 … … 88 101 conv.setFrequency(Freq0MHz); 89 102 double lambda = conv.getLambda(); 90 Four2DResponse fresp(2, InterfArrayDiametre/lambda, InterfArrayDiametre/lambda );103 Four2DResponse fresp(2, InterfArrayDiametre/lambda, InterfArrayDiametre/lambda, lambda); 91 104 BeamEffect beam(fresp); 92 105 93 cout << "applobe[3]: calling ApplyLobe3D() ... " << endl; 94 beam.ApplyLobe3D(incube, dx, dy, Freq0MHz, dfreq); 106 if (fgcorrbeam) { 107 double DoL = 1.22/ArcminToRadian(tbeamarcmin); 108 Four2DResponse tbeam(2, DoL, DoL ); 109 cout << "applobe[3]: calling Correct2RefLobe() with target beam:" << tbeamarcmin 110 << " arcmin -> D/Lambda=" << DoL << endl; 111 beam.Correct2RefLobe(tbeam, incube, dx, dy, Freq0MHz, dfreq); 112 } 113 else { 114 cout << "applobe[3]: calling ApplyLobe3D() ... " << endl; 115 beam.ApplyLobe3D(incube, dx, dy, Freq0MHz, dfreq); 116 } 117 TArray< r_4 > outcube; 118 if (fgresample) { 119 cout << "applobe[4]: calling ReSample(incube," << fresamp << "," << ",1.) ... " << endl; 120 outcube.Share(beam.ReSample(incube, fresamp, fresamp, 1.)); 121 } 122 else outcube.Share(incube); 95 123 96 cout << "applobe[4]: calling ReSample(incube, 0.5, 0.5, 1.) ... " << endl;97 TArray< r_4 > outcube = beam.ReSample(incube, 0.5, 0.5, 1.);98 99 124 outcube.Show(); 100 125 MeanSigma(outcube, mean, sigma);
Note:
See TracChangeset
for help on using the changeset viewer.