Changeset 3973 in Sophya for trunk/Cosmo/RadioBeam/lobe.cc


Ignore:
Timestamp:
Apr 18, 2011, 5:30:44 PM (14 years ago)
Author:
ansari
Message:

Corrections diverses: choix lobe gaussien/triangle et specif DishDiameter au lieu de DoL ds applobe/calcpk2, possibilite application lobe freq.independante ds applobe, Reza 18/04/2011

File:
1 edited

Legend:

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

    r3797 r3973  
    1818}
    1919
     20/* --Methode-- */
     21void BeamEffect::ApplyLobe(TArray< TF >& a, double dx, double dy, double f0)
     22// dx, dy en radioans, f0, df en MHz
     23{
     24  Timer tm("BeamEffect::ApplyLobe");
     25  FFTWServer ffts(true);                     
     26  ffts.setNormalize(true);
     27 
     28  H21Conversions conv;
     29  conv.setFrequency(f0);
     30  fresp_.setLambda(conv.getLambda());
     31
     32  TArray< complex<TF> > fourAmp;
     33  double dkx = DeuxPI/(double)a.SizeX()/dx;
     34  double dky = DeuxPI/(double)a.SizeY()/dy;
     35 
     36  for(sa_size_t kz=0; kz<a.SizeZ(); kz++) {
     37    TArray< TF > slice( a(Range::all(), Range::all(), kz) );
     38    ffts.FFTForward(slice, fourAmp);
     39    ApplyLobeK2D(fresp_, fourAmp, dkx, dky);
     40    ffts.FFTBackward(fourAmp, slice, true);
     41    if (kz%20==0)  cout << "BeamEffect::ApplyLobe() done kz=" << kz << " / a.SizeZ()=" << a.SizeZ() << endl;
     42  }
     43  double mean, sigma;
     44  TF min, max;
     45  a.MinMax(min, max);
     46  MeanSigma(a, mean, sigma);
     47  cout << " BeamEffect::ApplyLobe() - Result Min=" << min << " Max=" << max
     48       << " Mean=" << mean << " Sigma=" << sigma << endl;
     49  return;
     50}
    2051
    2152
Note: See TracChangeset for help on using the changeset viewer.