Changeset 3796 in Sophya for trunk/Cosmo/RadioBeam/applobe.cc
- Timestamp:
- Jun 29, 2010, 7:26:01 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/RadioBeam/applobe.cc
r3792 r3796 3 3 R. Ansari , C. Magneville - Juin 2010 4 4 5 Usage: applobe In3DPPFName Out3DPPFName [ResmapleFactor=0.5,0.333...] [TargetBeamDoL] 5 Usage: applobe Diameter/Four2DRespTableFile In3DPPFName Out3DPPFName 6 [TargetBeamDoL] [ResmapleFactor=0.5,0.333...] 6 7 --------------------------------------------------------------- */ 7 8 … … 50 51 51 52 if (narg < 3) { 52 cout << "Usage: applobe In3DPPFName Out3DPPFName [ResmapleFactor=0.5,0.333...] [TargetBeamDoL]\n" << endl; 53 cout << "Usage: applobe Diameter/Four2DRespTableFile In3DPPFName Out3DPPFName " 54 << " [TargetBeamDoL] [ResmapleFactor=0.5,0.333...] \n" << endl; 53 55 return 1; 54 56 } 55 57 56 58 // decodage arguments 57 string outname = arg[2]; 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; 59 bool fgresptbl=true; 60 double DIAMETRE=100.; 61 string resptblname; 62 if (isdigit(*arg[1])) { 63 fgresptbl=false; 64 DIAMETRE=atof(arg[1]); 64 65 } 66 else resptblname=arg[1]; 67 68 string inname = arg[2]; 69 string outname = arg[3]; 65 70 bool fgcorrbeam=false; 66 71 double tbeamDoL=135; … … 68 73 tbeamDoL=atof(arg[4]); 69 74 if (tbeamDoL>1) fgcorrbeam=true; 75 } 76 bool fgresample=false; 77 double fresamp=1.; 78 if (narg>5) { 79 fresamp=atof(arg[5]); 80 if ((fabs(fresamp)>1.e-2)&&(fabs(fresamp-1.)>1.e-2)) fgresample=true; 70 81 } 71 82 … … 101 112 conv.setFrequency(Freq0MHz); 102 113 double lambda = conv.getLambda(); 103 Four2DResponse fresp(2, InterfArrayDiametre/lambda, InterfArrayDiametre/lambda, lambda); 104 BeamEffect beam(fresp); 114 115 Four2DResponse fresp(2, DIAMETRE/lambda, DIAMETRE/lambda, lambda); 116 Four2DResponse* fresp_p=&fresp; 117 Four2DRespTable resptbl; 118 if (fgresptbl) { 119 cout << "applobe[2.b]: initializing Four2DRespTable from file" << resptblname << endl; 120 resptbl.readFromPPF(resptblname); 121 fresp_p=&resptbl; 122 } 123 else cout << " applobe[2.b]: Four2DResponse ( Diameter=" << DIAMETRE << " Lambda= " << lambda 124 << " DoL=" << DIAMETRE/lambda << " ) " << endl; 125 BeamEffect beam(*fresp_p); 105 126 106 127 if (fgcorrbeam) { 107 128 double DoL = tbeamDoL; 108 129 double tbeamarcmin = RadianToDegree(1.22/DoL)*60.; 109 Four2DResponse tbeam(2, DoL, DoL ); 130 int typcb = 2; 131 if (fgresptbl) typcb=22; 132 Four2DResponse tbeam(typcb, DoL, DoL ); 110 133 cout << "applobe[3]: calling Correct2RefLobe() with target beam D/Lambda=" << DoL 111 << " -> arcmin " << tbeamarcmin << endl;134 << " -> arcmin " << tbeamarcmin << " TypDishResp=" << typcb << endl; 112 135 beam.Correct2RefLobe(tbeam, incube, dx, dy, Freq0MHz, dfreq); 113 136 }
Note:
See TracChangeset
for help on using the changeset viewer.