Changeset 3785 in Sophya for trunk/Cosmo/RadioBeam
- Timestamp:
- Jun 16, 2010, 11:53:54 PM (15 years ago)
- Location:
- trunk/Cosmo/RadioBeam
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/RadioBeam/README
r3783 r3785 19 19 - calcpk2.cc : LSS deltaT/T P(k) computation from LSS+foreground cubes after cleaning 20 20 - syncube.cc : Synchrotron 3D temperature cube from HASLAM 400 MHz map 21 - srcat2cube.cc : radio source 3D temperature cube from NVSS catalog 21 22 - tjyk.cc : test de la classe H21Conversions 22 23 … … 25 26 - mdish.h mdish.cc : Classes for representing Multi-Dish interferometer configurations 26 27 - radutil.h radutil.cc : utilitaire de conversion a 21 cm 28 - cubedef.h : size and limits for 3D temperature cubes generated by syncube.cc , srcat2cube.cc 27 29 28 30 E/ P(k) in temperature plot + "cosmic variance" + noise ... -
trunk/Cosmo/RadioBeam/makefile
r3783 r3785 6 6 include $(SOPHYABASE)/include/sophyamake.inc 7 7 8 all : pknoise calcpk calcpk2 syncube tjyk8 all : pknoise calcpk calcpk2 syncube srcat2cube tjyk 9 9 10 10 clean : … … 23 23 syncube : Objs/syncube 24 24 echo 'makefile : syncube made' 25 26 srcat2cube : Objs/srcat2cube 27 echo 'makefile : srcat2cube made' 25 28 26 29 tjyk : Objs/tjyk … … 55 58 $(CXXCOMPILE) -o Objs/syncube.o syncube.cc 56 59 57 ### programme syncube 60 ### programme srcat2cube 61 Objs/srcat2cube : Objs/srcat2cube.o 62 $(CXXLINK) -o Objs/srcat2cube Objs/srcat2cube.o Objs/radutil.o $(SOPHYAEXTSLBLIST) 63 64 Objs/srcat2cube.o : srcat2cube.cc radutil.h 65 $(CXXCOMPILE) -o Objs/srcat2cube.o srcat2cube.cc 66 67 ### programme tjyk 58 68 Objs/tjyk : Objs/tjyk.o Objs/radutil.o 59 69 $(CXXLINK) -o Objs/tjyk Objs/tjyk.o Objs/radutil.o $(SOPHYAEXTSLBLIST) -
trunk/Cosmo/RadioBeam/syncube.cc
r3783 r3785 44 44 #include "fiosinit.h" 45 45 46 47 46 #include "timing.h" 48 47 #include "ctimer.h" 48 49 #include "cubedef.h" 49 50 50 51 //---------------------------------------------------------------------------- … … 65 66 return 1; 66 67 } 67 68 //--- Parametres des lois de puissance en frequence69 double AmpPL1 = 1.; // amp max PowerLaw 270 double PLidx1 = -2.5; // index de la loi de puissance synchrotron71 double sigPLidx1 = 0.1; // Sigma de la variation (gaussienne) de index172 // Amplitude max de la 2eme composante en loi de puissance (tirage plat 0 ... AmpPL2)73 double AmpPL2 = 0.1; // amp max PowerLaw 274 double PLidx2 = -3.2;75 double sigPLidx2 = 0.15;76 68 77 69 // decodage arguments … … 101 93 cout << "syncube[1]: Input resolution doubled : " << inmap << endl; 102 94 103 sa_size_t NTet=256; 104 sa_size_t NPhi=256; 105 LocalMap<r_4> outmap(NPhi,NTet,60.,60.,110.,150.); 95 LocalMap<r_4> outmap(NPhi,NTheta,60.,60.,110.,150.); 106 96 for(int_4 kk=0; kk<outmap.NbPixels(); kk++) { 107 97 double theta, phi; // Theta, Phi en radians … … 110 100 } 111 101 112 TArray<r_4> omap(NPhi,NT et);113 double tet0 = Angle( 60.,Angle::Degree).ToRadian();114 double phi0 = Angle( 120.,Angle::Degree).ToRadian();115 double dtet = Angle( 60.,Angle::Degree).ToRadian()/(double)NTet;116 double dphi = Angle( 60.,Angle::Degree).ToRadian()/(double)NPhi;102 TArray<r_4> omap(NPhi,NTheta); 103 double tet0 = Angle(Theta0Degre,Angle::Degree).ToRadian(); 104 double phi0 = Angle(Phi0Degre,Angle::Degree).ToRadian(); 105 double dtet = Angle(ThetaSizeDegre,Angle::Degree).ToRadian()/(double)NTheta; 106 double dphi = Angle(PhiSizeDegre,Angle::Degree).ToRadian()/(double)NPhi; 117 107 for (sa_size_t j=0; j<omap.SizeY(); j++) { 118 108 double theta = j*dtet+tet0; … … 122 112 } 123 113 } 114 115 double mean, sigma; 116 MeanSigma(omap, mean, sigma); 117 cout << "syncube[2] omap : Mean=" << mean << " Sigma=" << sigma << " Jy - Sizes:" << endl; 118 omap.Show(); 119 124 120 // Sph2Sph(inmap,outmap); 125 121 126 cout << "syncube[2]: Output rectangular map computed " << outmap << endl;127 122 if (narg > 3) { 128 123 string ppfname = arg[3]; … … 134 129 } 135 130 136 sa_size_t NFreq = 128; 137 TArray<r_4> ocube(NPhi,NTet,NFreq); 131 TArray<r_4> ocube(NPhi,NTheta,NFreq); 138 132 139 133 double infreq = 400.; // Frequence carte input en MHz 140 double freq0 = 840.; // Freq0 du cube de sortie141 double dfreq = 1.;134 double freq0 = Freq0MHz; // Freq0 du cube de sortie 135 double dfreq = FreqSizeMHz/(double)NFreq; 142 136 143 137 ThSDR48RandGen rg; … … 162 156 // On sauve le cube de sortie 163 157 { 164 cout << " syncube[ 2]: Saving output cube to -> " << outname << endl;158 cout << " syncube[4]: Saving output cube to -> " << outname << endl; 165 159 POutPersist poc(outname); 166 160 poc << ocube; … … 170 164 } 171 165 catch (PThrowable& exc) { 172 cerr << " treccyl.cc catched Exception " << exc.Msg() << endl;166 cerr << " syncube.cc catched Exception " << exc.Msg() << endl; 173 167 rc = 77; 174 168 } -
trunk/Cosmo/RadioBeam/tjyk.cc
r3783 r3785 2 2 #include <iostream> 3 3 4 // Appel : tjyk [z=redshift] [resol_arcmin] 5 4 6 int main(int narg, char* arg[]) 5 7 { … … 7 9 H21Conversions conv; 8 10 9 conv.setRedshift(0.6); 10 conv.setOmegaPixArcmin2(10.*10.); 11 cout << " --------------------------------------------------------------- " << endl; 11 double z = 0.; 12 double resol = 10.; 13 if (narg>1) z = atof(arg[1]); 14 if (narg>2) resol = atof(arg[2]); 15 16 conv.setRedshift(z); 17 conv.setOmegaPixArcmin2(resol*resol); 18 cout << " ------------------------------ H21Conversions ------------------------- " << endl; 19 cout << " Redshift=z= " << z << " Resol(arcmin)= " << resol << endl; 12 20 cout << " H21Conversions: z=" << conv.getRedshift() << " Freq=" << conv.getFrequency() 13 21 << " MHz , Lambda=" << conv.getLambda() << " m , OmegaPix=" << conv.getOmegaPix() << " srad" << endl;
Note:
See TracChangeset
for help on using the changeset viewer.