Changeset 4027 in Sophya for trunk/Cosmo/RadioBeam/specpk.h


Ignore:
Timestamp:
Oct 17, 2011, 10:56:41 AM (14 years ago)
Author:
ansari
Message:

Implementatiom prise en compte dA(z) ds la calcul de bruit Pnoise(k) - Reza 17/10/2011

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cosmo/RadioBeam/specpk.h

    r4026 r4027  
    4646  Four3DPk(TArray< complex<TF> > & fourcoedd, RandomGeneratorInterface& rg);
    4747  Four3DPk(RandomGeneratorInterface& rg, sa_size_t szx=128, sa_size_t szy=256, sa_size_t szz=128);
     48  virtual ~Four3DPk();
     49
    4850  inline void SetCellSize(double dkx=DeuxPI, double dky=DeuxPI, double dkz=DeuxPI)
    4951  { dkx_=dkx;  dky_=dky;  dkz_=dkz; }
     
    5456// typically = ComovRadialDistance
    5557  void ComputeNoiseFourierAmp(Four2DResponse& resp, double angscale=1., bool crmask=false);
    56   void ComputeNoiseFourierAmp(Four2DResponse& resp, double f0, double df, double angscale=1.);
     58  void ComputeNoiseFourierAmp(Four2DResponse& resp, double f0, double df, Vector& angscales);
    5759
    5860// Return the array size
    5961  inline sa_size_t NCells() { return fourAmp.Size(); }
     62  inline sa_size_t SizeX() { return fourAmp.SizeX(); }
     63  inline sa_size_t SizeY() { return fourAmp.SizeY(); }
     64  inline sa_size_t SizeZ() { return fourAmp.SizeZ(); }
     65
    6066// Set the cell size/step in Fourier Space
    6167// Return the fourier amplitude matrix 
     
    6672
    6773// Return the reconstructed power spectrum as a profile histogram   
    68   HProf ComputePk(double s2cut=0., int nbin=256, double kmin=0., double kmax=-1.);
    69   void  ComputePkCumul(HProf& hp, double s2cut=0.);
     74  HProf ComputePk(double s2cut=0., int nbin=256, double kmin=0., double kmax=-1., bool fgmodcnt=false);
     75  void  ComputePkCumul();
    7076
    7177// angscale is a multiplicative factor converting transverse k (wave number) values to angular wave numbers
    7278// typically = ComovRadialDistance
    73   HProf ComputeNoisePk(Four2DResponse& resp, Histo& fracmodok, DataTable& dt, double angscale=1.,
    74                        double s2cut=0., int nbin=256, double kmin=0., double kmax=-1.);
     79  HProf ComputeNoisePk(Four2DResponse& resp, double angscale=1., double s2cut=0.,
     80                       int nbin=256, double kmin=0., double kmax=-1.);
     81
     82  // Fills a data table from the computed P(k) profile histogram and mode count
     83  Histo FillPkDataTable(DataTable& dt);
     84  inline HProf& GetPk() { return *hp_pk_p_; }
    7585
    7686protected:
     
    8191  int prtlev_;
    8292  int prtmodulo_;
     93  // Profile histograms for power spectrum and number of modes
     94  HProf* hp_pk_p_;
     95  Histo* hmcnt_p_;
     96  Histo* hmcntok_p_;
     97  double s2cut_;
    8398};
    8499
     
    94109  { freq0_=freq0;  dfreq_=dfreq; }
    95110  inline void SetAngScaleConversion(double angscale=1.)
    96   { angscale_=angscale; }
     111  { angscales_=angscale; }
     112  inline void SetAngScaleConversion(Vector& angscs)
     113  { angscales_=angscs; }
    97114  inline void SetS2Cut(double s2cut=100.)
    98115  {  S2CUT=s2cut; }
    99116  inline double GetS2Cut() { return S2CUT; }
    100   HProf Compute();
     117  HProf Compute(int nbin=256, double kmin=0., double kmax=-1.);
    101118  inline int SetPrtLevel(int lev=0, int prtmod=10)
    102119  { int olev=prtlev_; prtlev_=lev; prtmodulo_=prtmod; return olev; }
     
    106123  Four2DResponse& frep;
    107124  double freq0_,dfreq_;
    108   double angscale_;
     125  Vector angscales_;
    109126  double S2CUT;
    110127  int NGEN;
Note: See TracChangeset for help on using the changeset viewer.