Changeset 3783 in Sophya
- Timestamp:
- Jun 16, 2010, 12:23:38 AM (15 years ago)
- Location:
- trunk/Cosmo/RadioBeam
- Files:
-
- 7 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/RadioBeam/README
r3756 r3783 1 1 =============================================================================== 2 Projet BAORadio / HSHS2 Projet BAORadio 3 3 Simulation programs for radio lobe reconstruction, noise estimate etc ... 4 4 … … 9 9 Note : Uses SOPHYA class library (http://www.sophya.org ) 10 10 11 A/ (u-v) plane coverage and Noise-P(k) computation for different interferometer configuration 12 ============================================================================================== 13 List of files : 11 A/ Interferometer sensitivity/noise power spectrum and foreground/radio sources 12 ============================================================================================== 13 14 A.1/ (u-v) plane coverage and Noise-P(k) computation for different interferometer configuration 15 - pknoise.cc : main program for Noise-P(k) computation 16 - plpkn.pic : spiapp script for plotting pknoise.cc program output 17 A.2/ power spectrum computation and foreground/radio source 18 - calcpk.cc : power spectrum P(k) computation from 3D mass or temperature map 19 - calcpk2.cc : LSS deltaT/T P(k) computation from LSS+foreground cubes after cleaning 20 - syncube.cc : Synchrotron 3D temperature cube from HASLAM 400 MHz map 21 - tjyk.cc : test de la classe H21Conversions 22 23 A.3/ List of other common files : 14 24 - specpk.h specpk.cc : 3D power spectrum computation classes 15 25 - mdish.h mdish.cc : Classes for representing Multi-Dish interferometer configurations 16 - pknoise.cc : main program , makefile 17 - plpkn.pic : spiapp script for plotting pknoise.cc program output 18 19 B/ P(k) in temperature plot + "cosmic variance" + noise ... 26 - radutil.h radutil.cc : utilitaire de conversion a 21 cm 27 28 E/ P(k) in temperature plot + "cosmic variance" + noise ... 20 29 ============================================================= 21 30 Note : to be executed in spiapp 22 31 List of Files : anapkn.pic + cmvhpkz.ppf 23 32 24 C/ Interferometer configuration / noise estimate33 F/ Interferometer configuration / noise estimate 25 34 ================================================= 26 35 Note : to be executed in spiapp 27 36 28 C.1/ formnoise.pic + vnpairs.cc + vnpairs.h37 F.1/ formnoise.pic + vnpairs.cc + vnpairs.h 29 38 30 C.2/ pa.pic + pa.cc + pa.h : Lobe synthesis (dipoles sum)39 F.2/ pa.pic + pa.cc + pa.h : Lobe synthesis (dipoles sum) 31 40 32 D/ 3D reconstruction (alpha,delta,freq) simulation program41 G/ 3D reconstruction (alpha,delta,freq) simulation program 33 42 =========================================================== 34 43 -
trunk/Cosmo/RadioBeam/makefile
r3756 r3783 6 6 include $(SOPHYABASE)/include/sophyamake.inc 7 7 8 all : pknoise 8 all : pknoise calcpk calcpk2 syncube tjyk 9 9 10 10 clean : 11 11 rm Objs/* 12 12 13 ### les executables 13 14 pknoise : Objs/pknoise 14 15 echo 'makefile : pknoise made' 15 16 16 Objs/pknoise : Objs/pknoise.o Objs/specpk.o Objs/mdish.o 17 $(CXXLINK) -o Objs/pknoise Objs/pknoise.o Objs/specpk.o Objs/mdish.o $(SOPHYAEXTSLBLIST)17 calcpk : Objs/calcpk 18 echo 'makefile : calcpk made' 18 19 19 Objs/pknoise.o : pknoise.cc specpk.h mdish.h 20 calcpk2 : Objs/calcpk2 21 echo 'makefile : calcpk2 made' 22 23 syncube : Objs/syncube 24 echo 'makefile : syncube made' 25 26 tjyk : Objs/tjyk 27 echo 'makefile : tjyk made' 28 29 ### programme pknoise 30 Objs/pknoise : Objs/pknoise.o Objs/specpk.o Objs/mdish.o Objs/qhist.o 31 $(CXXLINK) -o Objs/pknoise Objs/pknoise.o Objs/specpk.o Objs/mdish.o Objs/qhist.o $(SOPHYAEXTSLBLIST) 32 33 Objs/pknoise.o : pknoise.cc specpk.h mdish.h qhist.h 20 34 $(CXXCOMPILE) -o Objs/pknoise.o pknoise.cc 21 35 22 Objs/specpk.o : specpk.cc specpk.h mdish.h 36 ### programme calcpk 37 Objs/calcpk : Objs/calcpk.o Objs/specpk.o Objs/mdish.o Objs/qhist.o 38 $(CXXLINK) -o Objs/calcpk Objs/calcpk.o Objs/specpk.o Objs/mdish.o Objs/qhist.o $(SOPHYAEXTSLBLIST) 39 40 Objs/calcpk.o : calcpk.cc specpk.h mdish.h qhist.h 41 $(CXXCOMPILE) -o Objs/calcpk.o calcpk.cc 42 43 ### programme calcpk2 44 Objs/calcpk2 : Objs/calcpk2.o Objs/specpk.o Objs/mdish.o Objs/qhist.o 45 $(CXXLINK) -o Objs/calcpk2 Objs/calcpk2.o Objs/specpk.o Objs/mdish.o Objs/qhist.o $(SOPHYAEXTSLBLIST) 46 47 Objs/calcpk2.o : calcpk2.cc specpk.h mdish.h qhist.h 48 $(CXXCOMPILE) -o Objs/calcpk2.o calcpk2.cc 49 50 ### programme syncube 51 Objs/syncube : Objs/syncube.o 52 $(CXXLINK) -o Objs/syncube Objs/syncube.o $(SOPHYAEXTSLBLIST) 53 54 Objs/syncube.o : syncube.cc 55 $(CXXCOMPILE) -o Objs/syncube.o syncube.cc 56 57 ### programme syncube 58 Objs/tjyk : Objs/tjyk.o Objs/radutil.o 59 $(CXXLINK) -o Objs/tjyk Objs/tjyk.o Objs/radutil.o $(SOPHYAEXTSLBLIST) 60 61 Objs/tjyk.o : tjyk.cc radutil.h 62 $(CXXCOMPILE) -o Objs/tjyk.o tjyk.cc 63 64 ### les classes / fonctions 65 Objs/specpk.o : specpk.cc specpk.h mdish.h qhist.h 23 66 $(CXXCOMPILE) -o Objs/specpk.o specpk.cc 24 67 25 Objs/mdish.o : mdish.cc mdish.h 68 Objs/mdish.o : mdish.cc mdish.h qhist.h 26 69 $(CXXCOMPILE) -o Objs/mdish.o mdish.cc 70 71 Objs/qhist.o : qhist.cc qhist.h 72 $(CXXCOMPILE) -o Objs/qhist.o qhist.cc 73 74 Objs/radutil.o : radutil.cc radutil.h 75 $(CXXCOMPILE) -o Objs/radutil.o radutil.cc -
trunk/Cosmo/RadioBeam/mdish.cc
r3769 r3783 102 102 }; 103 103 104 // -----------------------------------105 // -- Classe ressemblant a un histo 2D106 // -----------------------------------107 QHis2D::QHis2D()108 : nx(0),ny(0),xmin(0),xmax(0),ymin(0),ymax(0),sumw0(0.)109 {110 ixb0 = jyb0 = 0;111 }112 QHis2D::QHis2D(r_8 xMin,r_8 xMax,int_4 nxb,r_8 yMin,r_8 yMax,int_4 nyb)113 : nx(0),ny(0),xmin(0),xmax(0),ymin(0),ymax(0),sumw0(0.)114 {115 Define(xMin, xMax, nxb, yMin, yMax, nyb);116 }117 void QHis2D::Define(r_8 xMin,r_8 xMax,int_4 nxb,r_8 yMin,r_8 yMax,int_4 nyb)118 {119 nx=nxb; ny=nyb;120 xmin=xMin; xmax=xMax;121 ymin=yMin; ymax=yMax;122 dxb=(xmax-xmin)/(double)nx;123 dyb=(ymax-ymin)/(double)ny;124 sa_size_t sz[5]; sz[0]=nx; sz[1]=ny;125 aw.ReSize(2,sz);126 SetZeroBin();127 sumw0=0.;128 return;129 }130 double QHis2D::Add(r_8 x, r_8 y, r_8 w, bool fgfh)131 {132 sa_size_t ix = (sa_size_t)((x-xmin)/dxb);133 sa_size_t jy = (sa_size_t)((y-ymin)/dyb);134 if ((ix<0)||(ix>=nx)||(jy<0)||(jy>=ny)) return 0.;135 double rw = ((ix==ixb0)&&(jy==jyb0)) ? w : 0.;136 sumw0 += rw;137 if (fgfh) aw(ix,jy) += w;138 return rw;139 }140 void QHis2D::SetZeroBin(r_8 x, r_8 y)141 {142 ixb0 = (sa_size_t)((x-xmin)/dxb);143 jyb0 = (sa_size_t)((y-ymin)/dyb);144 }145 Histo2D QHis2D::Convert()146 {147 int_4 imn,jmn,imx,jmx;148 r_8 min = aw(0,0);149 r_8 max = aw(0,0);150 imn=jmn=imx=jmx=0;151 Histo2D h2(xmin,xmax,nx,ymin,ymax,ny);152 for(int_4 j=0; j<ny; j++)153 for(int_4 i=0; i<nx; i++) {154 h2(i,j) = aw(i,j);155 if (aw(i,j)>max) {156 imx=i; jmx=j; max=aw(i,j);157 }158 if (aw(i,j)<min) {159 imn=i; jmn=j; min=aw(i,j);160 }161 }162 cout << "QHis2D::Convert()/Info: Nx,Ny=" << nx << "," << ny << " SumW=" << sumw0163 << "\n ... Max:" << imx << "," << jmx << " ->" << max164 << " @" << imx*dxb+xmin << "," << jmx*dyb+ymin165 << "\n ...Min:" << imn << "," << jmn << " ->" << min166 << " @" << imn*dxb+xmin << "," << jmn*dyb+ymin << endl;167 return h2;168 }169 104 170 105 //---------------------------------------------------------------------- -
trunk/Cosmo/RadioBeam/mdish.h
r3769 r3783 14 14 #include "genericfunc.h" // SOPHYA .h 15 15 #include "array.h" // SOPHYA .h 16 #include " histats.h" // SOPHYA .h16 #include "qhist.h" 17 17 18 #ifndef DeuxPI 18 19 #define DeuxPI 2.*M_PI 20 #endif 19 21 20 22 // -- Four2DResponse : Reponse instrumentale ds le plan k_x,k_y (angles theta,phi) … … 78 80 }; 79 81 80 // -----------------------------------81 // -- Classe ressemblant a un histo 2D82 class QHis2D {83 public:84 QHis2D();85 QHis2D(r_8 xMin,r_8 xMax,int_4 nxBin,r_8 yMin,r_8 yMax,int_4 nyBin);86 void Define(r_8 xMin,r_8 xMax,int_4 nxBin,r_8 yMin,r_8 yMax,int_4 nyBin);87 double Add(r_8 x, r_8 y, r_8 w, bool fgfh);88 void SetZeroBin(r_8 x=0, r_8 y=0);89 inline double WBinX() { return dxb; }90 inline double WBinY() { return dyb; }91 Histo2D Convert();92 93 r_8 xmin,xmax,ymin,ymax;94 r_8 dxb,dyb;95 sa_size_t nx,ny;96 sa_size_t ixb0, jyb0;97 TArray<r_8> aw;98 double sumw0;99 };100 82 101 83 // ------------------------------------------------------------------- -
trunk/Cosmo/RadioBeam/specpk.cc
r3769 r3783 225 225 double kxx, kyy, kzz; 226 226 // sa_size_t is large integer type 227 for(sa_size_t kz=0; kz<fourAmp.SizeZ(); kz++) { 227 // We ignore 0th term in all frequency directions ... 228 for(sa_size_t kz=1; kz<fourAmp.SizeZ(); kz++) { 228 229 kzz = (kz > fourAmp.SizeZ()/2) ? (double)(fourAmp.SizeZ()-kz)*dkz_ : (double)kz*dkz_; 229 for(sa_size_t ky= 0; ky<fourAmp.SizeY(); ky++) {230 for(sa_size_t ky=1; ky<fourAmp.SizeY(); ky++) { 230 231 kyy = (ky > fourAmp.SizeY()/2) ? (double)(fourAmp.SizeY()-ky)*dky_ : (double)ky*dky_; 231 for(sa_size_t kx= 0; kx<fourAmp.SizeX(); kx++) {232 for(sa_size_t kx=1; kx<fourAmp.SizeX(); kx++) { // ignore the 0th coefficient (constant term) 232 233 double kxx=(double)kx*dkx_; 233 234 complex<TF> za = fourAmp(kx, ky, kz);
Note:
See TracChangeset
for help on using the changeset viewer.