- Timestamp:
- May 5, 2011, 7:25:18 PM (14 years ago)
- Location:
- trunk/Cosmo/RadioBeam
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/RadioBeam/calcpk2.cc
r3973 r3986 7 7 R. Ansari , C. Magneville - Juin 2010 8 8 9 Usage: calcpk2 [-t -g ] InMapLSS convFacLSS InMapSync convFacSync InMapRadioSource convFacRsc OutPkFile9 Usage: calcpk2 [-t -g -mxr val] InMapLSS convFacLSS InMapSync convFacSync InMapRadioSource convFacRsc OutPkFile 10 10 [PixNoiseLevel] [Diameter/Four2DRespTableFile] [TargetBeamArcmin] [NSigSrcThr] 11 11 --------------------------------------------------------------- */ … … 44 44 { 45 45 if ( (narg<6)||((narg>1)&&(strcmp(arg[1],"-h")==0)) ) { 46 cout << " Usage: [-t -g ] calcpk2 InMapLSS convFacLSS InMapFgnd convFacFgnd OutPkFile \n"46 cout << " Usage: [-t -g -mxr val] calcpk2 InMapLSS convFacLSS InMapFgnd convFacFgnd OutPkFile \n" 47 47 << " [PixNoiseLevel] [D_Dish/Four2DRespTableFile CorBeamDiam] \n" 48 48 << " [NSigSrcThr] [P2/P1] [RecMapFile] " << endl; 49 49 if ((narg>1)&&(strcmp(arg[1],"-h")==0)) { 50 50 cout << "-t -g : Triangular / gaussian beam shape (def=gaussian) \n" 51 << "-mxr val: Max beam correction factor (default=10.) \n " 51 52 << "- InMapLSS: Input 3D LSS cube (PPF file name) \n " 52 53 << "- convFacLSS: LSS cube conversion factor to mK (milliKelvin) \n" … … 78 79 // decodage argument optionnel 79 80 bool fgoptarg=true; 81 double maxratio=10.; 80 82 while (fgoptarg) { 81 83 string fbo = arg[1]; 82 84 if (fbo=="-t") { fggaussian=false; arg++; narg--; } 83 85 else if (fbo=="-g") { fggaussian=true; arg++; narg--; } 86 else if (fbo=="-mxr") { arg++; maxratio=atof(arg[1]); arg++; narg-=2; } 84 87 else fgoptarg=false; 85 88 } … … 197 200 Four2DResponse tbeam(typcb, DoL, DoL ); 198 201 199 ForegroundCleaner cleaner(*arep_p, tbeam, skycube );202 ForegroundCleaner cleaner(*arep_p, tbeam, skycube, maxratio); 200 203 if (fgcorrbeam) { 201 204 cout << "calcpk2[3.b] : calling cleaner.BeamCorrections() for target beam Diameter=" << tbeamDiam -
trunk/Cosmo/RadioBeam/fgndsub.cc
r3830 r3986 14 14 15 15 /* --Methode-- */ 16 ForegroundCleaner::ForegroundCleaner(Four2DResponse& arrep, Four2DResponse& tbeam, TArray< TF >& skycube )17 : arrep_(arrep) , tbeam_(tbeam), skycube_(skycube) 16 ForegroundCleaner::ForegroundCleaner(Four2DResponse& arrep, Four2DResponse& tbeam, TArray< TF >& skycube, double maxratio) 17 : arrep_(arrep) , tbeam_(tbeam), skycube_(skycube), maxratio_(maxratio) 18 18 { 19 19 double dxdeg = ThetaSizeDegre/(double)NTheta; … … 32 32 { 33 33 BeamEffect beam(arrep_); 34 beam.Correct2RefLobe(tbeam_, skycube_, dx_, dy_, freq0_, dfreq_ );35 cout << " ForegroundCleaner::BeamCorrections() done "<< endl;34 beam.Correct2RefLobe(tbeam_, skycube_, dx_, dy_, freq0_, dfreq_, maxratio_); 35 cout << " ForegroundCleaner::BeamCorrections() done Maxratio=" << maxratio_ << endl; 36 36 } 37 37 -
trunk/Cosmo/RadioBeam/fgndsub.h
r3830 r3986 25 25 class ForegroundCleaner { 26 26 public: 27 ForegroundCleaner(Four2DResponse& arrep, Four2DResponse& tbeam, TArray< TF >& skycube );27 ForegroundCleaner(Four2DResponse& arrep, Four2DResponse& tbeam, TArray< TF >& skycube, double maxratio=10.); 28 28 void BeamCorrections(); 29 29 int CleanNegatives(TF seuil=1.e-6); … … 37 37 Four2DResponse& tbeam_; // Target beam to which would be corrected using BeamCorrections() 38 38 TArray< TF > skycube_; 39 double maxratio_; 39 40 double dx_, dy_; // taille des pixels (radians) de skycube 40 41 double freq0_, dfreq_; // 1ere frequence et bin en frequence de skycube_; -
trunk/Cosmo/RadioBeam/lobe.cc
r3973 r3986 85 85 86 86 /* --Methode-- */ 87 void BeamEffect::Correct2RefLobe(Four2DResponse& rep, TArray< TF >& a, double dx, double dy, double f0, double df )87 void BeamEffect::Correct2RefLobe(Four2DResponse& rep, TArray< TF >& a, double dx, double dy, double f0, double df, double maxratio) 88 88 // dx, dy en radioans, f0, df en MHz 89 89 { … … 103 103 conv.setFrequency(f0+kz*df); 104 104 fresp_.setLambda(conv.getLambda()); 105 Four2DRespRatio rratio(rep, fresp_ );105 Four2DRespRatio rratio(rep, fresp_, maxratio); 106 106 ApplyLobeK2D(rratio, fourAmp, dkx, dky); 107 107 ffts.FFTBackward(fourAmp, slice, true); -
trunk/Cosmo/RadioBeam/lobe.h
r3973 r3986 36 36 37 37 // Corrige de l'effet de l'effet de lobe, pour chaque plan de frequence, pour tout ramener au lobe defini par "rep" 38 void Correct2RefLobe(Four2DResponse& rep, TArray< TF >& a, double dx, double dy, double f0, double df );38 void Correct2RefLobe(Four2DResponse& rep, TArray< TF >& a, double dx, double dy, double f0, double df, double maxratio=10.); 39 39 40 40 // Applique l'effet de lobe "rep" dans le plan de Fourier pour une frequence (longueur d'onde) fixee -
trunk/Cosmo/RadioBeam/mdish.cc
r3974 r3986 167 167 // -- Four2DRespRatio : rapport de la reponse entre deux objets Four2DResponse 168 168 //--------------------------------------------------------------- 169 Four2DRespRatio::Four2DRespRatio(Four2DResponse& a, Four2DResponse& b, double divzthr)170 : Four2DResponse(0, a.D(), a.D()), a_(a), b_(b), divzthr_(divzthr)169 Four2DRespRatio::Four2DRespRatio(Four2DResponse& a, Four2DResponse& b, double maxratio) 170 : Four2DResponse(0, a.D(), a.D()), a_(a), b_(b), maxratio_(maxratio) 171 171 { 172 172 } … … 177 177 double rb = b_.Value(kx,ky); 178 178 if (ra<rb) { 179 if (rb>1.e- 39) return(ra/rb);179 if (rb>1.e-9) return(ra/rb); 180 180 else return 0.; 181 181 } 182 if (rb<divzthr_) rb=divzthr_; 183 return (ra/rb); 182 double rval=1.; 183 if (rb<1.e-9) rval=ra/rb; 184 if (rval<maxratio_) return rval; 185 return maxratio_; 184 186 } 185 187 -
trunk/Cosmo/RadioBeam/mdish.h
r3973 r3986 90 90 class Four2DRespRatio : public Four2DResponse { 91 91 public: 92 Four2DRespRatio(Four2DResponse& a, Four2DResponse& b, double divzthr=5.e-2);92 Four2DRespRatio(Four2DResponse& a, Four2DResponse& b, double maxratio=10.); 93 93 // Return the ratio a.Value(kx,ky) / b.Value(kx, ky) - with protection against divide by zero 94 94 virtual double Value(double kx, double ky); 95 95 Four2DResponse& a_; 96 96 Four2DResponse& b_; 97 double divzthr_;97 double maxratio_; 98 98 }; 99 99 -
trunk/Cosmo/RadioBeam/subtractradsrc.cmd
r3984 r3986 17 17 # 1.d/ To run SimLSS with GSM map parametersand 90x30 deg maps (DeltaFreq=500 MHz) @ z=1 [ 90deg-> phi/alpha, 30deg -> theta/delta] 18 18 csh> ~/Objs/exe/cmvginit3df -a -1 -2 -C -G 0. -F 0 -x 600,2.9 -y 1800,2.9 -z 256,3.5 -Z 1.0 -8 1. -n 10000 -O 0,2 -o lssz100 -T 2 19 20 csh> ~/Objs/exe/cmvginit3df -a -1 -2 -C -G 0. -F 0 -x 600,3.8 -y 1800,3.8 -z 256,4.2 -Z 1.5 -8 1. -n 10000 -O 0,2 -o lssz150 -T 2 19 21 20 22 # 1.c/ Change the X and Z axis of the cube to adapt it to RadioBeam package convention
Note:
See TracChangeset
for help on using the changeset viewer.