Changeset 2000 in Sophya


Ignore:
Timestamp:
May 14, 2002, 3:06:58 PM (23 years ago)
Author:
ansari
Message:

Corrections diverses et introduction d'une classe de calcul de ligne de
base par ajustement glissant d'un polynome (SimpleOffsetEstimator)
avec son programme test - Reza 14/5/2002

Location:
trunk/ArchTOIPipe
Files:
3 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/ArchTOIPipe/Kernel/cgt.cc

    r1998 r2000  
    1313#include "toiseqbuff.h"
    1414#include "toisegment.h"
     15#include "fitstoiwtr.h"
    1516
    1617#ifdef WITH_SOPHYA
     
    6364
    6465TOI& CGT::Connect(TOIProcessor& prout, string& out,
    65                   TOIProcessor& prin, string& in, string nom, int wbsz)
     66                  TOIProcessor& prin, string& in, string nom, int wbsz, bool withFlag)
    6667{
    6768  int id1 = findProcId(&prout);
     
    8283  lesTuyaux.push_back(tuy);
    8384  prout.addOutput(out, toi);
    84   prin.addInput(in, toi);
     85  if (withFlag) { // Si c'est un FITSTOIWriter
     86    FITSTOIWriter* ftw = dynamic_cast< FITSTOIWriter* >(&prin);
     87    if (ftw) ftw->addInput(in, toi, withFlag);
     88    else prin.addInput(in, toi);
     89  }
     90  else prin.addInput(in, toi);
    8591  if (dbgLevel > 1)
    8692    cout << " CGT::Connect() TOI " << toi->getName() << " created " << endl;
     
    8995
    9096TOI& CGT::Connect(TOIProcessor& prout, const char* out,
    91                   TOIProcessor& prin, const char* in, string nom, int wbsz)
     97                  TOIProcessor& prin, const char* in, string nom, int wbsz, bool withFlag)
    9298{
    9399  string outs = out; 
    94100  string ins = in;
    95   return Connect(prout, outs, prin, ins, nom, wbsz);
     101  return Connect(prout, outs, prin, ins, nom, wbsz, withFlag);
    96102}
    97103
  • trunk/ArchTOIPipe/Kernel/cgt.h

    r1994 r2000  
    3030 
    3131  virtual TOI& Connect(TOIProcessor& prout, string& out,
    32                        TOIProcessor& prin, string& in, string nom="", int wbsz=0);
     32                       TOIProcessor& prin, string& in, string nom="",
     33                       int wbsz=0, bool withFlag=false);
    3334  virtual TOI& Connect(TOIProcessor& prout, const char* out,
    34                        TOIProcessor& prin, const char* in, string nom="", int wbsz=0);
     35                       TOIProcessor& prin, const char* in, string nom="",
     36                       int wbsz=0, bool withFlag=false);
    3537
    3638  virtual void ListProcs(::ostream& os, bool prstat=false); // const plus tard
  • trunk/ArchTOIPipe/Kernel/toimanager.h

    r1999 r2000  
    55//                               Christophe Magneville
    66//                               Reza Ansari
    7 // $Id: toimanager.h,v 1.12 2002-05-13 15:50:50 ansari Exp $
     7// $Id: toimanager.h,v 1.13 2002-05-14 13:06:57 ansari Exp $
    88
    99
     
    5858class ProcSampleCounter : public RzProcSampleCounter {
    5959public:
    60   ProcSampleCounter(const T & t) { _t = &t; }
     60  ProcSampleCounter(T & t) { _t = &t; }
    6161  virtual long  ProcessedSampleCount()
    6262  { return _t->ProcessedSampleCount(); }
     
    6464  virtual long  SampleEnd() { return _t->getMaxIn(); }
    6565protected:
    66   const T * _t;
     66  T * _t;
    6767};
    6868
  • trunk/ArchTOIPipe/Kernel/toiprocessor.h

    r1800 r2000  
    55//                               Christophe Magneville
    66//                               Reza Ansari
    7 // $Id: toiprocessor.h,v 1.18 2001-11-29 18:19:32 aubourg Exp $
     7// $Id: toiprocessor.h,v 1.19 2002-05-14 13:06:57 ansari Exp $
    88
    99
     
    8484
    8585  // Gestion des bornes pour les transformations de TOIs...
     86public: 
     87  // Methodes passees en public par Reza, 14/5/2002
    8688  virtual int   calcMinOut(); // Protected ?
    8789  virtual int   calcMaxOut(); // Protected ?
     90
     91  virtual int   getMinIn();
     92  virtual int   getMaxIn();
     93protected:
     94  // Implementation par defaut
    8895  int           minOut;    // Cache for calcMinOut() value. Protected ?
    8996  int           maxOut;    // Cache for calcMaxOut() value. Protected ?
    9097
    91   virtual int   getMinIn();
    92   virtual int   getMaxIn();
    93   // Implementation par defaut
    9498  int           upExtra;  // MaxIn - MaxOut : extra samples for processing
    9599  int           lowExtra; // MinOut - MinIn : extra samples for processing
  • trunk/ArchTOIPipe/ProcWSophya/simtoipr.h

    r1762 r2000  
    55//                               Christophe Magneville
    66//                               Reza Ansari
    7 // $Id: simtoipr.h,v 1.11 2001-11-13 16:22:47 aubourg Exp $
     7// $Id: simtoipr.h,v 1.12 2002-05-14 13:06:58 ansari Exp $
    88
    99
     
    1818// if (val > Mean(Window)+ns*Sigma(Window)) val = Mean(Window)
    1919// Si Pas plus de maxnpt points remplissants cette condition
     20//
     21// Structure generale :
     22//
     23//                --------------------
     24//   toi in  ---> |                  | ---> out    (toi = in_deglitche)
     25//                | SimpleDeglitcher | ---> mean   (toi - optionnel) 
     26//                |                  | ---> sigma  (toi - optionnel)
     27//                |                  | ---> incopie ( toi = in , optionnel)
     28//                |                  |
     29//                --------------------
     30//  Si pas de toi out connecte, seul mean et sigma sont calcule
     31//  les flags sont mis a jour pour le toi out en sortie
    2032
    2133class SimpleDeglitcher : public TOIProcessor {
     
    8496//  Un filtre simple, dans le domaine temporel
    8597//  remplace val -> Somme(val(i)*coeff(i)) ds Fenetre
     98//
     99// Structure generale :
     100//
     101//                ------------------
     102//   toi in  ---> |                | ---> out    (toi = in_filtre)
     103//                |  SimpleFilter  | 
     104//                |                | ---> incopie ( toi = in , optionnel)
     105//                |                |
     106//                ------------------
    86107
    87108class SimpleFilter : public TOIProcessor {
  • trunk/ArchTOIPipe/TestPipes/mesovh2.cc

    r1995 r2000  
    33//                               Christophe Magneville
    44//                               Reza Ansari
    5 // $Id: mesovh2.cc,v 1.1 2002-05-13 13:12:50 ansari Exp $
     5// $Id: mesovh2.cc,v 1.2 2002-05-14 13:06:58 ansari Exp $
    66/*   mesure de performance de l'architecture
    77
     
    4444         << "   -intoi2 toiName : chaine 2 procs with toi2->in2\n"
    4545         << "   -prstat : PrintStat with ProcSampleCounter \n"
    46          << "   -useseg : Use TOISeqBuffered TOI's (default: TOISegmented) \n"
     46         << "   -useseqbuff : Use TOISeqBuffered TOI's (default: TOISegmented) \n"
    4747         << endl;
    4848    exit(0);
Note: See TracChangeset for help on using the changeset viewer.