Changeset 1467 in Sophya for trunk/ArchTOIPipe/TestPipes
- Timestamp:
- Apr 12, 2001, 3:14:22 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/TestPipes/simtst.cc
r1462 r1467 22 22 } 23 23 else { 24 cout << "\n Usage : simtst [-sproc] [-rwtoi] [-dbg] [-start snb] [-end sne] \n" 25 << " [-w1 sz] [-w2 sz] inFitsName outFitsName ppfFileName \n" 26 << " -sproc : Run RzSimpleTOIProc (default RzTOIProc) \n" 27 << " -rwtoi : Use Regular Window TOI (default TOISeqBuffered) \n" 24 cout << "\n Usage : simtst [-dbg] [-start snb] [-end sne] \n" 25 << " [-wtoi sz] [-w2 sz] inFitsName outFitsName ppfFileName \n" 28 26 << " -dbg : sets TOISeqBuffered debug level to 1 \n" 29 27 << " -start snb : sets the start sample num \n" … … 31 29 << " -range min,max : sets the acceptable range for intoi \n" 32 30 << " default= -16000,16000\n" 33 << " -intoi toiName : select input TOI name (def boloMuV_ 11)\n"34 << " -w 1 sz : sets main data windowsize (def= 8192)\n"35 << " -w 2 sz : sets secondarywindow size (def= 512) \n"31 << " -intoi toiName : select input TOI name (def boloMuV_27)\n" 32 << " -wtoi sz : sets TOISeqBuff buffer size (def= 8192)\n" 33 << " -wdegli sz : sets deglitcher window size (def= 512) \n" 36 34 << endl; 37 35 exit(0); … … 45 43 cout << "simtst starting - Decoding arguments " << " narg=" << narg << endl; 46 44 47 bool fgsimple = false;48 bool fgrwtoi = false;49 45 bool fgdbg = false; 50 46 int w1 = 8192; 51 int w2 = 256;47 int w2 = 512; 52 48 int nmax = 10; 53 49 int istart = 104121000+w1*5; … … 58 54 string outfile; 59 55 string ppffile; 60 string intoi = "boloMuV_ 11";56 string intoi = "boloMuV_27"; 61 57 62 58 if (narg < 4) Usage(true); … … 72 68 iend = atoi(arg[ia+1]); ia++; 73 69 } 74 else if (strcmp(arg[ia],"-w 1") == 0) {70 else if (strcmp(arg[ia],"-wtoi") == 0) { 75 71 if (ia == narg-1) Usage(true); 76 72 w1 = atoi(arg[ia+1]); ia++; 77 73 } 78 else if (strcmp(arg[ia],"-w 2") == 0) {74 else if (strcmp(arg[ia],"-wdegli") == 0) { 79 75 if (ia == narg-1) Usage(true); 80 76 w2 = atoi(arg[ia+1]); ia++; … … 89 85 intoi = arg[ia+1]; ia++; 90 86 } 91 else if (strcmp(arg[ia],"-sproc") == 0) fgsimple = true;92 else if (strcmp(arg[ia],"-rwtoi") == 0) fgrwtoi = true;93 87 else if (strcmp(arg[ia],"-dbg") == 0) fgdbg = true; 94 88 … … 131 125 TOISeqBuffered * toiin = new TOISeqBuffered("f2in", w1); 132 126 if (fgdbg) toiin->setDebugLevel(1); 133 TOISeqBuffered * toi out = new TOISeqBuffered("out", w1);134 if (fgdbg) toi out->setDebugLevel(1);127 TOISeqBuffered * toidegli = new TOISeqBuffered("degli", w1); 128 if (fgdbg) toidegli->setDebugLevel(1); 135 129 TOISeqBuffered * toimean = new TOISeqBuffered("mean", w1); 136 130 if (fgdbg) toimean->setDebugLevel(1); … … 161 155 degl.SetRange(range_min, range_max); 162 156 degl.addInput("in", toiin); 163 degl.addOutput("out", toi out);157 degl.addOutput("out", toidegli); 164 158 degl.addOutput("mean", toimean); 165 159 degl.addOutput("sigma", toisig); 166 160 degl.addOutput("incopie", toiincopie); 167 168 /* 169 cout << " Creating a GaussianFilter SimplFilterObject " << endl; 170 SimpleFilter filt(..) 171 TOISeqBuffered * toiincopie = new TOISeqBuffered("incopie", w1); 172 if (fgdbg) toiincopie->setDebugLevel(1); 173 */ 174 161 162 cout << " Creating a FanOut SimpleFanOut Object " << endl; 163 SimpleFanOut fanout(2,2); 164 TOISeqBuffered * toidegli0 = new TOISeqBuffered("degli0", w1); 165 if (fgdbg) toidegli0->setDebugLevel(1); 166 TOISeqBuffered * toidegli1 = new TOISeqBuffered("degli1", w1); 167 168 TOISeqBuffered * toimean0 = new TOISeqBuffered("mean0", w1); 169 if (fgdbg) toimean0->setDebugLevel(1); 170 TOISeqBuffered * toimean1 = new TOISeqBuffered("mean1", w1); 171 if (fgdbg) toimean1->setDebugLevel(1); 172 173 fanout.addInput("in0", toidegli); 174 fanout.addOutput("out0_0", toidegli0); 175 fanout.addOutput("out0_1", toidegli1); 176 fanout.addInput("in1", toimean); 177 fanout.addOutput("out1_0", toimean0); 178 fanout.addOutput("out1_1", toimean1); 179 180 cout << " Creating an Adder SimpleAdder Object " << endl; 181 SimpleAdder adder(2); 182 adder.addInput("in0", toidegli0); 183 adder.addInput("in1", toimean0); 184 adder.SetGain(0, 1.); 185 adder.SetGain(1, -1.); 186 TOISeqBuffered * toideglioff = new TOISeqBuffered("deglioff", w1); 187 if (fgdbg) toideglioff->setDebugLevel(1); 188 adder.addOutput("out", toideglioff); 189 190 cout << " Creating a GaussianFilter SimpleFilter Object " << endl; 191 SimpleFilter filt(8, SimpleFilter::GaussFilter, 1., 2.); 192 193 filt.addInput("in", toideglioff); 194 TOISeqBuffered * toiout = new TOISeqBuffered("out", w1); 195 if (fgdbg) toiout->setDebugLevel(1); 196 TOISeqBuffered * toideglioffcopie = new TOISeqBuffered("deglioffcopie", w1); 197 if (fgdbg) toideglioffcopie->setDebugLevel(1); 198 filt.addOutput("out", toiout); 199 filt.addOutput("incopie", toideglioffcopie); 200 201 202 cout << " Connecting to output (FitsWriter) " << endl; 203 175 204 w.setOutFlags(true); 176 205 w.addInput("in", toiincopie); 177 w.addInput("degli", toiout); 178 w.addInput("mean", toimean); 206 w.addInput("out", toiout); 207 w.addInput("degli", toidegli1); 208 w.addInput("deglioff", toideglioffcopie); 209 w.addInput("mean", toimean1); 179 210 w.addInput("sigma", toisig); 180 211 181 212 cout << " ------ FITSReaderTOI::PrintStatus() : ----- " << endl; 182 213 r.PrintStatus(cout); 214 cout << " ------ FanOut::PrintStatus() : ----- " << endl; 215 fanout.PrintStatus(cout); 216 cout << " ------ Adder::PrintStatus() : ----- " << endl; 217 adder.PrintStatus(cout); 218 cout << " ------ Filter::PrintStatus() : ----- " << endl; 219 filt.PrintStatus(cout); 183 220 cout << "----- FITSWriterTOI::PrintStatus() : ----- " << endl; 184 221 w.PrintStatus(cout); … … 187 224 r.start(); 188 225 degl.start(); 226 fanout.start(); 227 adder.start(); 228 filt.start(); 189 229 w.start(); 190 230 191 /* 231 /* 192 232 for(int jj=0; jj<3; jj++) { 193 233 cout << *toiin; 234 cout << *toimean; 235 cout << *toimean1; 194 236 cout << *toiout; 195 237 sleep(1); 196 238 } 239 197 240 */ 198 241 … … 205 248 // w.PrintStatus(cout); 206 249 250 cout << " ------ toiin, toidegli and toiout Status information ------- " << endl; 251 cout << *toiin; 252 cout << *toidegli; 253 cout << *toiout; 254 207 255 cout << degl; 208 cout << " ------ toiin and toiout Status information ------- " << endl;209 cout << *toiin;210 cout << *toiout; 256 cout << filt; 257 cout << adder; 258 211 259 } 212 260 catch (PThrowable & exc) {
Note:
See TracChangeset
for help on using the changeset viewer.