- Timestamp:
- Dec 23, 2010, 6:38:00 PM (15 years ago)
- Location:
- trunk/Cosmo/RadioBeam
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/RadioBeam/interfconfigs.cc
r3930 r3931 267 267 268 268 /* --Fonction -- */ 269 vector<Dish> CreateCrossConfig(double Ddish, double base, double Eta) 270 { 271 vector<Dish> vd; 272 int cnt=0; 273 EnumeratedSequence esx,esy; 274 esx = -6.,-2.,1.,3.,5.; 275 esy = -5.,-1.,2.,4.,6.; 276 277 cnt++; 278 vd.push_back(Dish(cnt, 0., 0., Eta*Ddish)); 279 280 for(int k=0; k<esx.Size(); k++) { 281 double fx=esx.Value(k); 282 cnt++; 283 vd.push_back(Dish(cnt, fx*base, 0., Eta*Ddish)); 284 } 285 for(int k=0; k<esy.Size(); k++) { 286 double fy=esy.Value(k); 287 cnt++; 288 vd.push_back(Dish(cnt, 0., fy*base, Eta*Ddish)); 289 } 290 cout << ">>>CreateCrossConfig(" << Ddish << "," << Eta << ") ---> NDishes=" << vd.size() << endl; 291 return vd; 292 } 293 294 295 /* --Fonction -- */ 269 296 vector<Dish> CreateDoubleHexagonConfig(double Ddish, double radius1, double radius2, double Eta) 270 297 { -
trunk/Cosmo/RadioBeam/interfconfigs.h
r3930 r3931 31 31 double etaW=0.9, double etaRL=0.9, bool fgscid=true); 32 32 33 // ASKPAP like - double hexagonal array of 12 dishes 33 // ASKPAP/MeerKAT - cross arranged array of 11 dishes 34 vector<Dish> CreateCrossConfig(double Ddish=12., double base=20., double Eta=0.95); 35 // ASKPAP/MeerKAT - double hexagonal array of 12 dishes 34 36 vector<Dish> CreateDoubleHexagonConfig(double Ddish=12., double radius1=60., double radius2=150., double Eta=0.95); 35 37 -
trunk/Cosmo/RadioBeam/mdish.cc
r3930 r3931 211 211 double sumw = 0.; 212 212 for(int kt=0; kt<ntet_; kt++) 213 for(int jp=0; jp<nphi_; jp++) 213 for(int jp=0; jp<nphi_; jp++) { 214 214 sumw += CumulResp(rd, (double)kt*dtet, (double)jp*dphi); 215 215 sumw += CumulResp(rd, (double)kt*dtet, -(double)jp*dphi); 216 sumw += CumulResp(rd, (double)kt*dtet, (double)jp*dphi+M_PI); 217 sumw += CumulResp(rd, (double)kt*dtet, -(double)jp*dphi-M_PI); 218 } 216 219 double kx1 = DeuxPI*(dishes_[0].DiameterX())/lambda_; 217 220 double ky1 = DeuxPI*(dishes_[0].DiameterY())/lambda_; -
trunk/Cosmo/RadioBeam/pknoise.cc
r3930 r3931 5 5 R. Ansari , C. Magneville - Juin 2010 6 6 7 Usage: pknoise Diameter/Four2DRespTableFile OutPPFName8 [NGen=1] [S2Cut=100.] [z_redshift=0.7]7 Usage: pknoise pknoise [-parname value] Diameter/Four2DRespTableFile OutPPFName 8 -parname : -noise , -renmax , -scut , -ngen , -z , -prt 9 9 --------------------------------------------------------------- */ 10 10 … … 38 38 // --------------------------------------------------------------------- 39 39 40 40 void Usage() 41 { 42 cout << " Usage: pknoise [-parname value] Diameter/Four2DRespTableFile OutPPFName \n" 43 << " -noise NoiseLevel (default=1.) \n" 44 << " -renmax MaxValue (default : Do NOT renormalize 2D response value \n" 45 << " -scut SCutValue (default=100.) \n" 46 << " -ngen NGen (default=1) number of noise fourier amp generations \n" 47 << " -z redshift (default=0.7) \n" 48 << " -prt PrtLev,PrtModulo (default=0,10) " << endl; 49 return; 50 } 41 51 42 52 //------------------------------------------------------------------------- … … 46 56 { 47 57 if ( (narg<3)||((narg>1)&&(strcmp(arg[1],"-h")==0)) ) { 48 cout << " Usage: pknoise Diameter/Four2DRespTableFile OutPPFName [RenormalizeMax]\n" 49 << " [NGen=1] [S2Cut=100.] [z_redshift=0.7] [PrtLev,PrtModulo=0,10]" << endl; 58 Usage(); 50 59 return 1; 51 60 } … … 61 70 double DIAMETRE=100.; 62 71 string resptblname; 63 if (isdigit(*arg[1])) { 72 double NoiseLevel=1.; 73 74 bool fgrenorm=false; 75 double rmax=1.; 76 int NMAX = 1; 77 double SCut=0.; 78 double z_Redshift=0.7 ; // 21 cm at z=0.7 -> 0.357 m 79 int prtlev=0; 80 int prtmod=10; 81 82 int ka=1; 83 while (ka<(narg-1)) { 84 if (strcmp(arg[ka],"-noise")==0) { 85 NoiseLevel=atof(arg[ka+1]); 86 ka+=2; 87 } 88 else if (strcmp(arg[ka],"-renmax")==0) { 89 rmax=atof(arg[ka+1]); fgrenorm=true; ka+=2; 90 } 91 else if (strcmp(arg[ka],"-scut")==0) { 92 SCut=atof(arg[ka+1]); ka+=2; 93 } 94 else if (strcmp(arg[ka],"-ngen")==0) { 95 NMAX=atoi(arg[ka+1]); ka+=2; 96 } 97 else if (strcmp(arg[ka],"-z")==0) { 98 z_Redshift=atof(arg[ka+1]); ka+=2; 99 } 100 else if (strcmp(arg[ka],"-prt")==0) { 101 sscanf(arg[ka+1],"%d,%d",&prtlev,&prtmod); ka+=2; 102 } 103 else break; 104 } 105 106 if ((ka+1)>=narg) { 107 cout << " pknoise / Argument error " << endl; 108 Usage(); 109 return 2; 110 } 111 if (isdigit(*arg[ka])) { 64 112 fgresptbl=false; 65 DIAMETRE=atof(arg[ 1]);113 DIAMETRE=atof(arg[ka]); 66 114 sprintf(cbuff,"pknoise_Dish(%g m)", DIAMETRE); 67 115 } 68 116 else { 69 resptblname=arg[ 1];117 resptblname=arg[ka]; 70 118 fgresptbl=true; 71 sprintf(cbuff,"pknoise_RespTblName=%s", arg[ 1]);119 sprintf(cbuff,"pknoise_RespTblName=%s", arg[ka]); 72 120 } 73 121 tits=cbuff; 74 string outfile = arg[ 2];122 string outfile = arg[ka+1]; 75 123 if (outfile==".") outfile = "pknoise.ppf"; 76 bool fgrenorm=false; 77 double rmax=1.; 78 if (narg>3) { 79 rmax=atof(arg[3]); 80 fgrenorm=true; 81 } 82 int NMAX = 1; 83 if (narg>4) NMAX = atoi(arg[4]); 84 double SCut=0.; 85 if (narg>5) SCut = atof(arg[5]); 86 double z_Redshift=0.7 ; // 21 cm at z=0.7 -> 0.357 m 87 if (narg>6) z_Redshift = atof(arg[6]); 88 int prtlev=0; 89 int prtmod=10; 90 if (narg>7) sscanf(arg[7],"%d,%d",&prtlev,&prtmod); 91 //-- end command line arguments 124 //-- end command line arguments 92 125 93 126 int rc = 1; -
trunk/Cosmo/RadioBeam/repicon.cc
r3930 r3931 44 44 if (((narg>1)&&(strcmp(arg[1],"-h")==0))||(narg<3)) { 45 45 cout << " Usage: repicon configId OutPPFName [z_redshift=0.7] [RenormalizeMax] \n" 46 << " configs: f4x4 , f8x8 , f20x20 Filled array of nxn dishes \n"46 << " configs: f4x4 , f8x8 , f20x20 Filled array of nxn dishes (D=5m) \n" 47 47 << " confA , confB, confC, confD : semi-filled array of dishes \n" 48 << " hex12 : ASKAP like double hexagonal array of dishes\n"48 << " hex12,cross11 : ASKAP like double hexagonal (12xD=12m), cross config (11xD=12m) \n" 49 49 << " f3cyl, f8cyl , f3cylp, f8cylp : filled array of non perfect/perfect of n cylinders " << endl; 50 50 return 1; … … 131 131 vdishes=CreateConfigD(Ddish, Eta); 132 132 } 133 else if (config=="cross11") { 134 fgpoint=true; 135 Ddish = 12.; 136 double base=20.; 137 Eta=0.95; 138 D=250.; 139 vdishes=CreateCrossConfig(Ddish,base,Eta); 140 } 133 141 else if (config=="hex12") { 134 142 fgpoint=true; … … 136 144 Eta=0.95; 137 145 D=350.; 138 vdishes=CreateDoubleHexagonConfig(); 139 } 146 vdishes=CreateDoubleHexagonConfig(Ddish); 147 } 148 140 149 else { 141 150 cout << " NON valid configuration option -> exit" << endl; … … 151 160 MultiDish mdish(LAMBDA, LMAX, vdishes, fgnoauto); 152 161 mdish.SetRespHisNBins(NRX,NRY); 153 if (fgpoint) 154 mdish.SetThetaPhiRange( M_PI/6.,12, M_PI/6., 12);162 if (fgpoint) // 23 degres : angle d'inclinaison de l'orbite terrestre 163 mdish.SetThetaPhiRange(Angle(23.,Angle::Degree).ToRadian(),10, M_PI/6., 15); 155 164 cout << " repicon[2] : calling mdish.GetResponse() ..."<< endl; 156 165 -
trunk/Cosmo/RadioBeam/specpk.cc
r3930 r3931 259 259 } 260 260 } 261 if ( prtlev_>1) {261 if ((prtlev_>1)||((prtlev_>0)&&(s2cut>1.e-9))) { 262 262 cout << " Four3DPk::ComputePkCumul/Info : NModeOK=" << nmodeok << " / NMode=" << fourAmp.Size() 263 263 << " -> " << 100.*(double)nmodeok/(double)fourAmp.Size() << "%" << endl; … … 288 288 if (igen==0) hnd = pkn3d.ComputePk(S2CUT); 289 289 else pkn3d.ComputePkCumul(hnd,S2CUT); 290 if ((prtlev_>0)&&( ((igen+1)%prtmodulo_)==0))290 if ((prtlev_>0)&&(igen>0)&&(((igen-1)%prtmodulo_)==0)) 291 291 cout << " PkNoiseCalculator::Compute() - done igen=" << igen << " / MaxNGen=" << NGEN << endl; 292 292 }
Note:
See TracChangeset
for help on using the changeset viewer.