Changeset 1454 in Sophya for trunk/ArchTOIPipe/TestPipes


Ignore:
Timestamp:
Apr 9, 2001, 2:14:21 PM (24 years ago)
Author:
ansari
Message:

Modifs effectuees a St Pierre de Charetreuse - Reza 9/4/2001

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ArchTOIPipe/TestPipes/simtst.cc

    r1443 r1454  
    2020  }
    2121  else {
    22     cout << "\n Usage : tstrztoi [-sproc] [-rwtoi] [-dbg] [-start snb] [-end sne] \n"
     22    cout << "\n Usage : simtst [-sproc] [-rwtoi] [-dbg] [-start snb] [-end sne] \n"
    2323         << "         [-w1 sz] [-w2 sz] inFitsName outFitsName ppfFileName \n"
    2424         << "   -sproc : Run RzSimpleTOIProc (default RzTOIProc) \n"
     
    2727         << "   -start snb : sets the start sample num \n"
    2828         << "   -end sne : sets the end sample num \n"
     29         << "   -range min,max : sets the acceptable range for intoi \n"
     30         << "              default= -16000,16000\n"
     31         << "   -intoi toiName : select input TOI name (def boloMuV_11)\n"
    2932         << "   -w1 sz : sets main data window size (def= 8192)\n"
    3033         << "   -w2 sz : sets secondary window size (def= 512) \n"
     
    4447  bool fgdbg = false;
    4548  int w1 = 8192;
    46   int w2 = 512;
     49  int w2 = 256;
    4750  int nmax = 10;
    4851  int istart = 104121000+w1*5;
    4952  int iend = 0;
     53  double range_min = -16000;
     54  double range_max = 16000.;
    5055  string infile;
    5156  string outfile;
    5257  string ppffile;
     58  string intoi = "boloMuV_11";
    5359
    5460  if (narg < 4) Usage(true);
     
    7278      w2 = atoi(arg[ia+1]); ia++;
    7379    }   
     80    else if (strcmp(arg[ia],"-range") == 0) {
     81      if (ia == narg-1) Usage(true);
     82      sscanf(arg[ia+1],"%lf,%lf",&range_min, &range_max);
     83      ia++;
     84    }   
     85    else if (strcmp(arg[ia],"-intoi") == 0) {
     86      if (ia == narg-1) Usage(true); 
     87      intoi = arg[ia+1]; ia++;
     88    }   
    7489    else if (strcmp(arg[ia],"-sproc") == 0)  fgsimple = true;
    7590    else if (strcmp(arg[ia],"-rwtoi") == 0)  fgrwtoi = true;
     
    93108  cout << ">>>> Window Size W1= " << w1 << " W2= " << w2
    94109       << "  iStart= " << istart << " iEnd= " << iend << endl;
     110  cout << ">>>> InTOIName= " << intoi << endl;
    95111  try {
    96112    TOIManager* mgr = TOIManager::getManager();
     
    109125
    110126
    111     char * colname[5] = {"MJD", "UTC","boloMuV_11","magnFlux","pivot"};
    112     char * toiname[5] = {"MJD", "UTC","bolo11","magneto","pivot"};
     127    //    char * colname[5] = {"MJD", "UTC","boloMuV_11","magnFlux","pivot"};
     128    //    char * toiname[5] = {"MJD", "UTC","bolo11","magneto","pivot"};
    113129    TOISeqBuffered * toiin = new TOISeqBuffered("f2in", w1);
    114130    if (fgdbg) toiin->setDebugLevel(1);
     
    129145    //    }
    130146
    131     int kk = 2;
    132     r.addOutput(colname[kk], toiin);
     147    //    int kk = 2;
     148    r.addOutput(intoi, toiin);
    133149    //  toi->dbg=true;
    134150    //  r.addOutput("boloMuV_11", toi);
     
    138154
    139155    cout << " Creating SimpleDeglitcher() " << endl;
    140     SimpleDeglitcher degl;
     156    SimpleDeglitcher degl(w2);
     157    cout << " Setting Range for deglitcher: " << range_min
     158         << " - " << range_max << endl;
     159    degl.SetRange(range_min, range_max);
    141160    degl.addInput("in", toiin);
    142161    degl.addOutput("out", toiout);
     
    144163    degl.addOutput("sigma", toisig);
    145164    degl.addOutput("incopie", toiincopie);
    146    
    147 
     165 
     166    /*   
     167    cout << " Creating a GaussianFilter SimplFilterObject " << endl;
     168    SimpleFilter filt(..)
     169    TOISeqBuffered * toiincopie = new TOISeqBuffered("incopie", w1);
     170    if (fgdbg) toiincopie->setDebugLevel(1);
     171    */
    148172
    149173    w.setOutFlags(true);
     
    162186    degl.start();
    163187    w.start();
    164    
    165     //    for(int jj=0; jj<3; jj++) {
    166     //      sleep(2);
    167     //      cout << *toi;
    168     //    }
     188
     189    /*   
     190    for(int jj=0; jj<3; jj++) {
     191      cout << *toiin;
     192      cout << *toiout;
     193      sleep(1);
     194    }
     195    */
    169196
    170197    mgr->joinAll();
Note: See TracChangeset for help on using the changeset viewer.