Changeset 4027 in Sophya for trunk/Cosmo/RadioBeam/specpk.h
- Timestamp:
- Oct 17, 2011, 10:56:41 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/RadioBeam/specpk.h
r4026 r4027 46 46 Four3DPk(TArray< complex<TF> > & fourcoedd, RandomGeneratorInterface& rg); 47 47 Four3DPk(RandomGeneratorInterface& rg, sa_size_t szx=128, sa_size_t szy=256, sa_size_t szz=128); 48 virtual ~Four3DPk(); 49 48 50 inline void SetCellSize(double dkx=DeuxPI, double dky=DeuxPI, double dkz=DeuxPI) 49 51 { dkx_=dkx; dky_=dky; dkz_=dkz; } … … 54 56 // typically = ComovRadialDistance 55 57 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); 57 59 58 60 // Return the array size 59 61 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 60 66 // Set the cell size/step in Fourier Space 61 67 // Return the fourier amplitude matrix … … 66 72 67 73 // 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(); 70 76 71 77 // angscale is a multiplicative factor converting transverse k (wave number) values to angular wave numbers 72 78 // 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_; } 75 85 76 86 protected: … … 81 91 int prtlev_; 82 92 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_; 83 98 }; 84 99 … … 94 109 { freq0_=freq0; dfreq_=dfreq; } 95 110 inline void SetAngScaleConversion(double angscale=1.) 96 { angscale_=angscale; } 111 { angscales_=angscale; } 112 inline void SetAngScaleConversion(Vector& angscs) 113 { angscales_=angscs; } 97 114 inline void SetS2Cut(double s2cut=100.) 98 115 { S2CUT=s2cut; } 99 116 inline double GetS2Cut() { return S2CUT; } 100 HProf Compute( );117 HProf Compute(int nbin=256, double kmin=0., double kmax=-1.); 101 118 inline int SetPrtLevel(int lev=0, int prtmod=10) 102 119 { int olev=prtlev_; prtlev_=lev; prtmodulo_=prtmod; return olev; } … … 106 123 Four2DResponse& frep; 107 124 double freq0_,dfreq_; 108 double angscale_;125 Vector angscales_; 109 126 double S2CUT; 110 127 int NGEN;
Note:
See TracChangeset
for help on using the changeset viewer.