Ignore:
Timestamp:
Sep 1, 1999, 2:45:54 PM (26 years ago)
Author:
ansari
Message:

Integration detecteur d'etoiles DY

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Poubelle/archTOI.old/ssthandler.h

    r350 r394  
    55#define SSTHANDLER_H
    66
     7#include <math.h>
    78#include <vector>
     9#include <map>
    810
    911#ifndef nb_max_bolo
     
    1517#endif
    1618
     19class ArcheopsFile;
     20
     21// Zone findStar
     22#include "sstetoile.h"
     23#include "pisteetoile.h"
     24
     25//#define SST_DEBUG
     26#define NbChanDump (10)
     27#define NbPhotDiodBarette (46)
     28#define NbEtInMapMax    (100)
     29#define SSTChassLog (true)
     30#define NbSampleBlock (2*nb_per_block)
     31// Fin Zone findStar
    1732
    1833class SSTHandler {
     
    2338  virtual ~SSTHandler();
    2439 
    25   enum process { rmveOffset = 1,
     40  enum process { permDiode = 1,
    2641         findStars  = 2,
    2742         findPeriod = 4,
     
    3348  static void Has2Bars(bool, int elecOffset=0); // elecOffset : which wired together
    3449 
     50  long getLastBlkNum() {return lastBlkNum;}
    3551  int  getRawSignal(int imesure, int idiode); // for last block
    3652  int  getSignal(int imesure, int idiode);    // for last block, imesure<0 -> history
    37   int  getStarZ(int imesure, int istar);      // for last block, imesure<0 -> history
    38   int  getStarF(int imesure, int istar);      // for last block, imesure<0 -> history
    39   long getLastBlkNum() {return lastBlkNum;}
     53       
     54        //      Zone findStar
     55  int  getNumbStar(int iSampl);
     56                        // return number of star found in sample number iSampl 
     57  int  getStarZ(int iSampl, int istar);
     58                        // return diode number of the star     
     59  double getStarF(int iSampl, int istar); 
     60                        // return star flux in Ampère
     61  double getStarTime(int iSampl, int istar);
     62                        // return star time in this sample
    4063
    4164protected:
     
    4669  int   starHistLength;
    4770  long  lastBlkNum;
    48   int   seuil;
    4971 
     72        // Is there two photoDiod Arrays and how are they connected?
    5073  static bool  has2bars;
    5174  static int   elecOffset;
     
    5376  inline int& diode(int iSamp, int iDiod) {return diodeT[iSamp*nb_photo_diodes+iDiod];}
    5477 
    55   struct star {
    56     float z;
    57     float m;
    58     double t;
    59   };
    60 
    61   vector<star>* stars;
    62  
     78  static int  diodpermut[46]; // diodpermut[i] = channel de la diode i
    6379 
    6480  void DecodeTMBlock(block_type_sst*, int i, int* diodes); // mesure i -> diodes
    65   void RemoveOffset(); // diodeRaw -> diode, avec decalage, 1 echantillon.
    66   void FindStars(); // sur les 72 derniers echantillons dans diode.
     81  void PermutDiode(); // diodeRaw -> diode, avec decalage, 1 echantillon.
     82  int FindStars(block_type_sst* blk);           // sur les 72 derniers echantillons dans diode.
     83                                                // return nmber of star found in last block
    6784 
    68   static int  diodpermut[46]; // diodpermut[i] = channel de la diode i
     85        //      Zone findStar
     86  int NbStarInBlock;
     87
     88  PisteEtoile** PisteBar;
     89       
     90#ifdef SST_DEBUG
     91        ofstream** pPisteDump;
     92#endif
     93
     94  map<double,SSTEtoile> StarHistoryMap;
     95                // On stocke les etoiles de manière ordonnée en temps
     96  typedef  map<double,SSTEtoile>::iterator StarHistIter;
     97  typedef  map<double,SSTEtoile>::const_iterator StarConstHistIter;
     98 
     99  vector<SSTEtoile> LastBlockStarVec;   
     100                // Vecteur des SSTEtoile du block classees en ordre de temps decroissant.
     101  //vector<SSTEtoile> reverse_iterator StarVecRevIter LastBlockStarVec.rbegin();
     102  SSTEtoile LastStar;
     103  PisteEtoile* pPiste;          // Piste courante d'analyse
     104  int Diodedata[NbSampleBlock];
     105  int offseDataDiod;
     106  int LastBlockSSTNb; // Gère la disparition des blocs défectueux
     107  int noStarDet;
     108  int FirstSplNb(block_type_sst* blk); // Calcule l'index du premier echantillon du block analysé
     109  ofstream sstchass;
     110 
     111  void findStarConstruct();
     112  void findStarDestruct();
    69113};
    70114
Note: See TracChangeset for help on using the changeset viewer.