Changeset 3931 in Sophya for trunk/Cosmo


Ignore:
Timestamp:
Dec 23, 2010, 6:38:00 PM (15 years ago)
Author:
ansari
Message:

1/ Ajout nouvelle config interfero en croix (ASKAP like)
2/ Correction et ameliorations diverses, en particulier sur les limites de rotation

ThetaMax=23 degres, angles phi, -phi, phi+pi, -phi-pi

Reza 23/12/2010

Location:
trunk/Cosmo/RadioBeam
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cosmo/RadioBeam/interfconfigs.cc

    r3930 r3931  
    267267
    268268/* --Fonction -- */
     269vector<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 -- */
    269296vector<Dish> CreateDoubleHexagonConfig(double Ddish, double radius1, double radius2, double Eta)
    270297{
  • trunk/Cosmo/RadioBeam/interfconfigs.h

    r3930 r3931  
    3131                                   double etaW=0.9, double etaRL=0.9, bool fgscid=true);
    3232
    33 // ASKPAP like - double hexagonal array of 12 dishes
     33// ASKPAP/MeerKAT - cross arranged array of 11 dishes
     34vector<Dish> CreateCrossConfig(double Ddish=12., double base=20., double Eta=0.95); 
     35// ASKPAP/MeerKAT - double hexagonal array of 12 dishes
    3436vector<Dish> CreateDoubleHexagonConfig(double Ddish=12., double radius1=60., double radius2=150., double Eta=0.95); 
    3537
  • trunk/Cosmo/RadioBeam/mdish.cc

    r3930 r3931  
    211211  double sumw = 0.;
    212212  for(int kt=0; kt<ntet_; kt++)
    213     for(int jp=0; jp<nphi_; jp++)
     213    for(int jp=0; jp<nphi_; jp++) {
    214214      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    }
    216219  double kx1 = DeuxPI*(dishes_[0].DiameterX())/lambda_;
    217220  double ky1 = DeuxPI*(dishes_[0].DiameterY())/lambda_;
  • trunk/Cosmo/RadioBeam/pknoise.cc

    r3930 r3931  
    55    R. Ansari , C. Magneville - Juin 2010
    66
    7   Usage:  pknoise Diameter/Four2DRespTableFile OutPPFName
    8                  [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
    99---------------------------------------------------------------  */
    1010
     
    3838// ---------------------------------------------------------------------
    3939
    40 
     40void 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}
    4151
    4252//-------------------------------------------------------------------------
     
    4656{
    4757  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();
    5059    return 1;
    5160  }
     
    6170  double DIAMETRE=100.;
    6271  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])) {
    64112    fgresptbl=false;
    65     DIAMETRE=atof(arg[1]);
     113    DIAMETRE=atof(arg[ka]);
    66114    sprintf(cbuff,"pknoise_Dish(%g m)", DIAMETRE);
    67115  }
    68116  else {
    69     resptblname=arg[1];
     117    resptblname=arg[ka];
    70118    fgresptbl=true;
    71     sprintf(cbuff,"pknoise_RespTblName=%s", arg[1]);
     119    sprintf(cbuff,"pknoise_RespTblName=%s", arg[ka]);
    72120  }
    73121  tits=cbuff;
    74   string outfile = arg[2]; 
     122  string outfile = arg[ka+1]; 
    75123  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
    92125 
    93126  int rc = 1; 
  • trunk/Cosmo/RadioBeam/repicon.cc

    r3930 r3931  
    4444  if (((narg>1)&&(strcmp(arg[1],"-h")==0))||(narg<3))  {
    4545    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"
    4747         << "          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"
    4949         << "          f3cyl, f8cyl , f3cylp, f8cylp : filled array of non perfect/perfect of n cylinders " << endl;
    5050    return 1;
     
    131131      vdishes=CreateConfigD(Ddish, Eta);
    132132    }
     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    }
    133141    else if (config=="hex12") {
    134142      fgpoint=true;
     
    136144      Eta=0.95;
    137145      D=350.;
    138       vdishes=CreateDoubleHexagonConfig();
    139     }
     146      vdishes=CreateDoubleHexagonConfig(Ddish);
     147    }
     148
    140149    else {
    141150      cout << " NON valid configuration option -> exit" << endl;
     
    151160    MultiDish mdish(LAMBDA, LMAX, vdishes, fgnoauto);
    152161    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);
    155164    cout << " repicon[2] : calling mdish.GetResponse() ..."<< endl;
    156165
  • trunk/Cosmo/RadioBeam/specpk.cc

    r3930 r3931  
    259259    }
    260260  }
    261   if (prtlev_>1) {
     261  if ((prtlev_>1)||((prtlev_>0)&&(s2cut>1.e-9))) {
    262262    cout << " Four3DPk::ComputePkCumul/Info : NModeOK=" << nmodeok << " / NMode=" << fourAmp.Size()
    263263         << " -> " << 100.*(double)nmodeok/(double)fourAmp.Size() << "%" << endl;
     
    288288    if (igen==0) hnd = pkn3d.ComputePk(S2CUT);
    289289    else pkn3d.ComputePkCumul(hnd,S2CUT);
    290     if ((prtlev_>0)&&(((igen+1)%prtmodulo_)==0))
     290    if ((prtlev_>0)&&(igen>0)&&(((igen-1)%prtmodulo_)==0))
    291291      cout << " PkNoiseCalculator::Compute() - done igen=" << igen << " / MaxNGen=" << NGEN << endl;
    292292  }
Note: See TracChangeset for help on using the changeset viewer.