Changeset 2014 in Sophya for trunk/ArchTOIPipe/TestPipes/simofftst.cc
- Timestamp:
- May 28, 2002, 7:30:45 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/TestPipes/simofftst.cc
r2008 r2014 3 3 // Christophe Magneville 4 4 // Reza Ansari 5 // $Id: simofftst.cc,v 1. 2 2002-05-16 13:13:00ansari Exp $5 // $Id: simofftst.cc,v 1.3 2002-05-28 17:30:45 ansari Exp $ 6 6 7 7 /* Test de processeurs ds simtoipr.cc - Reza Avril 2001 … … 11 11 -intoi boloMuV_26 -wtoi 8192 -wdegli 1024 \ 12 12 inputbolo.fits filt.fits xx.ppf 13 # Avec Filtre de Fourier13 # Avec Filtre 14 14 csh> simofftst -start 104385384 -end 104399964 -range -500,500 \ 15 15 -intoi boloMuV_26 -wtoi 8192 -wdegli 1024 \ 16 -wfft 4096 -keepfft 5 -killfreq 15,4,2.5 \17 16 inputbolo.fits filtfft.fits spectre.ppf 18 # Autre exemple b545k02 19 cool> ./simofftst -start 104389122 -end 104649122 -range -1000.,1000. -intoi boloMu 20 V_23 -wtoi 8192 -wdegli 1024 -wfft 4096 -keepfft 5 -killfreq 15,4,2.5 Cmv/b545k02 21 2_16.00_16.49.fits b545.fits b545.ppf 17 csh> $exedir/simofftst -start $sn0 -end $sn1 -intoi $cleanname \ 18 -wtoi 8192 -wdegli 1024 -degli 3.,2.,3,2,0 \ 19 -soff 128,9,3 -gfilt 16,2.5 -prstat \ 20 -soffnt $outppf -bgalcut -20.,20. -bgal $glat \ 21 -bgalfile $point $cleanfile $outfile 22 22 23 23 */ … … 38 38 #include "timing.h" 39 39 #include "histinit.h" 40 #include "psighand.h" 40 41 #include <stdexcept> 41 42 … … 52 53 << " [-degli ns,ns2,mxpt,mnpt,wrec] [-soff wsz,nptfit,degpol] \n" 53 54 << " [-soffnt PPFName] [-gfilt wsz,sigma] \n" 55 << " [-bgalcut bmin,bmax] [-bgal toiname] [-bgalfile pointFitsName] \n" 54 56 << " [-nooutflg] [-nowrtms] [-nowrticd] [-prstat] [-useseqbuff] \n" 55 57 << " inFitsName outFitsName \n" … … 77 79 << endl; 78 80 } 81 if (fgerr) exit(1); 79 82 } 80 83 … … 124 127 double gfilt_sigma = 2.; 125 128 129 // Coordinate file for galactic cut 130 string pointfile = "pointgal.fits"; 131 double bmin = -20; 132 double bmax = 20.; 133 string bgaltoi = "bgal"; 134 bool bgalcut = false; 135 126 136 // File names 127 137 string infile; … … 183 193 ia++; 184 194 } 195 else if (strcmp(arg[ia],"-bgalcut") == 0) { 196 if (ia == narg-1) Usage(true); 197 sscanf(arg[ia+1],"%lf,%lf", &bmin, &bmax); 198 bgalcut = true; 199 ia++; 200 } 201 else if (strcmp(arg[ia],"-bgalfile") == 0) { 202 if (ia == narg-1) Usage(true); 203 pointfile = arg[ia+1]; 204 ia++; 205 } 206 else if (strcmp(arg[ia],"-bgal") == 0) { 207 if (ia == narg-1) Usage(true); 208 bgaltoi = arg[ia+1]; 209 ia++; 210 } 185 211 else if (strcmp(arg[ia],"-wfft") == 0) { 186 212 if (ia == narg-1) Usage(true); … … 226 252 cout << " Initializing SOPHYA ... " << endl; 227 253 SophyaInit(); 254 SophyaConfigureSignalhandling(true); 255 228 256 InitTim(); 229 257 … … 263 291 double G_a = 1./(G_sigma*sqrt(M_PI*2.)); 264 292 SimpleFilter filt(gfilt_wsz, SimpleFilter::GaussFilter, G_a, G_sigma); 265 293 294 295 FITSTOIReader* rbgal = NULL; 296 if (bgalcut) { // if Galactic cut 297 cout << "> Creating bgal FITSTOIReader object - InFile=" << pointfile 298 << " bgaltoiname= " << bgaltoi << endl; 299 cout << " offes.SetBGalCut( " << bmin << "," << bmax << ")" << endl; 300 rbgal = new FITSTOIReader(pointfile); 301 offes.SetBGalCut(bmin, bmax); 302 } 303 266 304 cout << "> Creating FITSTOIWriter OutFitsName= " << outfile << endl; 267 305 FITSTOIWriter w(outfile); … … 281 319 plombier.Connect(offes, "out", w, "degoff", "", 0, fg_wrtflag); 282 320 321 if (bgalcut) { 322 inname = "bgal"; 323 plombier.Connect(*rbgal, bgaltoi, offes, inname); 324 } 283 325 284 326 if (fg_wrticd) { … … 315 357 mgr->joinAll(); 316 358 PrtTim("End threads"); 359 if (bgalcut) delete rbgal; 317 360 318 361 }
Note:
See TracChangeset
for help on using the changeset viewer.