Changeset 3640 in Sophya


Ignore:
Timestamp:
May 27, 2009, 5:15:45 PM (16 years ago)
Author:
ansari
Message:

Correction et ameliorations multiples - en particulier mcrd.cc, brproc.cc et brfitsrd.cc, Reza 27/05/2009

Location:
trunk/AddOn/TAcq
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/AddOn/TAcq/brfitsrd.cc

    r3635 r3640  
    3838{
    3939  setRC(1);     
    40   BRPaqChecker pcheck;  // Verification/comptage des paquets
    4140
    4241  try {
    4342    TimeStamp ts;
    44     Timer tm("BRFitsReader");
     43    Timer tm("BRFitsReader", false);
     44    BRPaqChecker pcheck(~fgnotrl_);  // Verification/comptage des paquets
     45   
    4546    size_t totnbytesrd = 0;
    4647    cout << " BRFitsReader::run() - Starting " << ts << " NbFiles=" << infiles_.size()
     
    4950    uint_4  nfileok = 0;
    5051    uint_8 nbytesrd = 0; 
     52    /*  Variables pour la logique des zones memoire et numeros de paquets dans la zone memoire */
     53    int mid = -2;
     54    Byte* buff = NULL; 
     55    int kmp = 0;   
     56    int kmpmax=memgr.NbPaquets();
     57
     58    int paqsz = 0;
    5159    for(int ifile=0; ifile<infiles_.size(); ifile++) {
    5260      string ffname = infiles_[ifile];
     
    6270// Les fichier FITS contiennent l'entet (24 bytes), mais pas le trailer (16 bytes) si fgnotrl=true
    6371      int incpaqsz=0;
    64       int paqsz = 0;
    6572      if (fgnotrl_) {
    6673        incpaqsz=16;
    6774        cout << " Warning : FITS files without frame trailers ..." << endl;
    6875      }
    69       if (paqsz == 0)  {  // premier passage, on fixe la taille de paquet et on alloue le buffer
     76      if (paqsz == 0)  {  // premier passage, on fixe la taille de paquet et on verifie compatibilite avec memgr
    7077        paqsz = mff.NAxis1()+incpaqsz;
    7178        if (paqsz != memgr.PaqSize()) {
    7279         cout << "BRFitsReader::run() mff.NAxis1() incompatible with memgr.PaqSize() -> exception " << endl;
    7380         throw SzMismatchError(" fits file size incompatible with memgr.PaqSize()");
    74         }
    75        if (mff.NAxis2() != memgr.NbPaquets())  {
    76          cout << "BRFitsReader::run() mff.NAxis2() <> memgr.NbPaquets() -> exception " << endl;
    77          throw SzMismatchError(" fits file NAxies2() <> memgr.NbPaquets()");
    7881        }
    7982      }
     
    8386        continue;
    8487        }
    85         if (memgr.NbPaquets() != mff.NAxis2()) {
    86         cout << " PB memgr.NbPaquets() != mff.NAxis2()  --> skipping " << endl;
    87         continue;
    88         }
    89       }
    90       int mid = memgr.FindMemZoneId(MemZA_Fill); 
    91       Byte* buff = memgr.GetMemZone(mid);
    92       if (buff == NULL) {
    93         cout << " BRFitsReader::run()/ERROR memgr.GetMemZone(" << mid << ") -> NULL" << endl;
    94         setRC(2);       
    95         return;
     88      }   
     89      if (mid < 0) {
     90        mid = memgr.FindMemZoneId(MemZA_Fill); 
     91        buff = memgr.GetMemZone(mid);
     92        if (buff == NULL) {
     93              cout << " BRFitsReader::run()/ERROR memgr.GetMemZone(" << mid << ") -> NULL" << endl;
     94              setRC(2);
     95               return; 
     96         }
     97         kmp=0;
    9698      }
    9799      size_t sx = mff.NAxis1();
    98       size_t sy = mff.NAxis2();
    99      
    100       for(int j=0; j<mff.NAxis2(); j++) {
    101         mff.ReadB(buff+j*paqsz, sx, j*sx);
    102         BRPaquet paq(NULL, buff+j*paqsz, paqsz);
    103         pcheck.Check(paq);   // Verification du paquet / FrameCounter
    104 
     100      size_t sy = mff.NAxis2();     
     101      int nprt=0;
     102      for(int j=0; j<sy; j++) {
     103        mff.ReadB(buff+kmp*paqsz, sx, j*sx);
     104        BRPaquet paq(NULL, buff+kmp*paqsz, paqsz);
     105        bool pqok = pcheck.Check(paq);   // Verification du paquet / FrameCounter
     106        if (!pqok && (nprt < 10)) {
     107          cout << "--BUG-- i=" << ifile << " mid=" << mid << " j=" << j << " kmp=" << kmp
     108               << " paqsz=" << paqsz << endl;
     109          nprt++;
     110          paq.Print(); 
     111        }
     112        kmp++;
     113        if (kmp >= kmpmax)  {   // Zone memoire rempli !
     114          memgr.FreeMemZone(mid, MemZS_Filled);
     115              mid = -2;
     116          if (j<sy) {
     117            mid = memgr.FindMemZoneId(MemZA_Fill); 
     118            buff = memgr.GetMemZone(mid);
     119            if (buff == NULL) {
     120                  cout << " BRFitsReader::run()/ERROR memgr.GetMemZone(" << mid << ") -> NULL" << endl;
     121                  setRC(2);     
     122                   return;     
     123             }
     124             kmp=0;
     125          }
     126        }
    105127      }
    106128      nfileok++;   
    107129      size_t nbytesrd = sx*sy;
    108130      totnbytesrd += nbytesrd;
     131    }   // Fin de la boucle sur les fichiers
     132// Gestion d'une zone partiellement remplie
     133    if (mid>=0) {
     134      for(int k=kmp;k<kmpmax;k++) {
     135        Byte* bp=buff+k*paqsz;
     136        for(int l=0;l<paqsz;l++) bp[l]=0;
     137      }
    109138      memgr.FreeMemZone(mid, MemZS_Filled);
    110     }   // Fin de la boucle sur les fichiers
    111 
     139    }
    112140
    113141//    sprintf(fname,"%s/.log",path_.c_str());
     
    120148    cout << " ------------------  BRFitsReader::run() END ----------------- " << endl;
    121149    ts.SetNow();
    122     tm.Split();
     150    tm.SplitQ();
    123151    cout << "  END reading " << ts << " NFileOK=" << nfileok << endl;
    124152    cout << "  TotalDiskRead= " << totnbytesrd/(1024*1024) << " MBytes Disk-Read rate= "
    125153         << (double)(totnbytesrd)/1024./tm.PartialElapsedTimems() << " MB/s" << endl;   
    126154    pcheck.Print(cout);
     155    cout << " BRFitsReader::run()/Timing: \n";
     156    tm.Print();
    127157    cout << " ---------------------------------------------------------- " << endl;
    128158
  • trunk/AddOn/TAcq/brpaqu.cc

    r3639 r3640  
    1 #include <stdio.h>
    2 #include <stdlib.h>
    3 #include <string.h>
    41#include "brpaqu.h"
    52
     
    439436// --------------------------------------------------------------------------
    440437
    441 BRPaqChecker::BRPaqChecker()
    442 {
     438BRPaqChecker::BRPaqChecker(bool cktrl, int maxprt)
     439{
     440  cktrl_ = cktrl;       
    443441  totnframes = 0;
    444442  nframeok = 0;
    445443  lostframes = 0;
    446444  frclst = 0;
     445  cnt_saut = 0;
     446  maxprt_ = maxprt;
    447447  DefineHDRTag();
    448448  DefineTRLTag();
     
    466466
    467467
    468 static int cnt_pb = 0;
    469468bool BRPaqChecker::Check(BRPaquet& paq)
    470469{
    471470  totnframes++;
    472471  if (paq.HDRMarker64() != HDRTag()) return false;
    473   if (paq.TRLMarker64() != TRLTag()) return false;
     472  if (cktrl_&&(paq.TRLMarker64() != TRLTag())) return false;
    474473  /*  DBG
    475474  if (paq.TRLMarker64() != TRLTag()) {
     
    486485    lostframes += (unsigned long long)delfc - 1;
    487486    if (delfc != 1) {
    488       cnt_pb++;
    489       if (cnt_pb < 5) {
     487      cnt_saut++;
     488      if (cnt_saut < maxprt_) {
    490489        cout << "BRPaqChecker::Check([NumFrameOK=" << nframeok
    491490             << ")/Debug  FrameCounter Cur=" << curfc
     
    500499}
    501500
    502 ostream& BRPaqChecker::Print(ostream& os)
     501ostream& BRPaqChecker::Print(ostream& os) const
    503502{
    504503  //  os << "BRPaqChecker:  HDRTag=" << hex << HDRTag() << " TRLTag=" << TRLTag() << dec << "\n"
    505504  //     << " ... Tot.Nb.Frames.Proc=" << totnframes << " NbFrame HDR/TRL OK=" << nframeok
    506   os << "BRPaqChecker: Tot.Nb.Frames.Proc=" << totnframes << " NbFrame HDR/TRL OK=" << nframeok
    507      << " LostFrames=" << lostframes
    508      << " Loss=" << (double)lostframes*100./(double)totnframes << " %" << endl;
     505  os << "BRPaqChecker: Tot.Nb.Frames.Proc=" << totnframes << " Nb.HDR/TRL OK=" << nframeok;
     506  if (cktrl_) os << " (Check Header AND Trailer)" << endl;
     507  else os << " (Header Check only)" << endl;
     508  float meangap = (cnt_saut>0)?((float)lostframes/(float)cnt_saut):0.;
     509  os   << " ... LostFrames=" << lostframes
     510       << " LossRate=" << (double)lostframes*100./(double)totnframes << " %"
     511       << " NbGaps=" << cnt_saut << " MeanGap=" << meangap << endl;
    509512  return os;
    510513}
  • trunk/AddOn/TAcq/brpaqu.h

    r3635 r3640  
    179179class BRPaqChecker {
    180180public:
    181   BRPaqChecker();
     181  BRPaqChecker(bool cktrl=true, int maxprt=0);
    182182  ~BRPaqChecker();
    183183
     
    191191  bool Check(BRPaquet& paq);
    192192  // Imprime le compte de paquets ...
    193   ostream & Print(ostream& os);
     193  ostream & Print(ostream& os) const;
     194  inline ostream & Print() const { return Print(cout); }
    194195
    195196  unsigned long long totnframes;    // Nombre totale de frames/paquets traites
     
    198199  unsigned int frclst;         // derniere valeur du frame-counter
    199200
     201  bool cktrl_;    // Verifie aussi le trailer si true
     202  unsigned int cnt_saut;          // Nb de fois ou DeltaFrameCounter>1
     203  unsigned int maxprt_;        // Nb maxi de print paquets perdus / probleme
     204
    200205  UInt64 hdrtag_;
    201206  UInt64 trltag_;
    202207};
     208
     209// Definition de l'operator << overloading - Appel de Prin()
     210inline ostream& operator << (ostream& s, BRPaqChecker const & chk)
     211  {  return chk.Print(s);  }
    203212
    204213#endif
  • trunk/AddOn/TAcq/brproc.cc

    r3635 r3640  
    2626//---------------------------------------------------------------
    2727
    28 BRProcARaw2C::BRProcARaw2C(RAcqMemZoneMgr& mem, string& path, uint_4 nmean, uint_4 step, uint_4 nmax)
     28BRProcARaw2C::BRProcARaw2C(RAcqMemZoneMgr& mem, string& path, uint_4 nmean,
     29                           uint_4 step, uint_4 nmax, bool fgnotrl)
    2930  :  memgr(mem)
    3031{
     
    3435  stop_ = false;       
    3536  path_ = path;
     37  fgnotrl_ = fgnotrl;
    3638}
    3739
     
    5052  setRC(1);     
    5153  try {
    52     Timer tm("BRProcARaw2C");
     54    Timer tm("BRProcARaw2C", false);
    5355    TimeStamp ts;
     56    BRPaqChecker pcheck(~fgnotrl_);  // Verification/comptage des paquets
     57   
     58    size_t totnbytesout = 0;
     59    size_t totnbytesproc = 0;
     60
    5461    cout << " BRProcARaw2C::run() - Starting " << ts << " NMaxMemZones=" << nmax_
    5562         << " NMean=" << nmean_ << " Step=" << step_ << endl;   
     
    6269
    6370// Initialisation pour calcul FFT
    64     TVector< complex<r_4> > cfour;  // composant TF
     71    TVector< complex<r_4> > cfour1;  // composant TF
    6572    uint_4 paqsz = memgr.PaqSize();
    6673    uint_4 procpaqsz = memgr.ProcPaqSize();
     
    6976    vx = (r_4)(0.);
    7077    FFTPackServer ffts;
    71     ffts.FFTForward(vx, cfour);
    72     TVector<r_4> spectreV1, spectreV2;
    73  
    74     spectreV1.ReSize(cfour.Size());
    75     spectreV2.ReSize(cfour.Size());
     78    ffts.FFTForward(vx, cfour1);
     79    TVector< complex<r_4> > cfour2(cfour1.Size());
    7680   
    77     TVector< complex<r_4> > visiV12( cfour.Size() );
     81    TVector<r_4> spectreV1(cfour1.Size());
     82    TVector<r_4> spectreV2(cfour1.Size());
     83    TVector< complex<r_4> > visiV12( cfour1.Size() );
    7884
     85
     86    fftwf_plan plan1 = fftwf_plan_dft_r2c_1d(vx.Size(), vx.Data(),
     87                          (fftwf_complex*)cfour1.Data(), FFTW_ESTIMATE);
     88    fftwf_plan plan2 = fftwf_plan_dft_r2c_1d(vx.Size(), vx.Data(),
     89                          (fftwf_complex*)cfour2.Data(), FFTW_ESTIMATE);
    7990
    8091    uint_4 ifile = 0;                           
     
    8596      Byte* buff = memgr.GetMemZone(mid);
    8697      if (buff == NULL) {
    87         cout << " BRProcARaw2C::run()/ERROR memgr.GetMemZone(" << mid << ") -> NULL" << endl;
    88         break;         
     98         cout << " BRProcARaw2C::run()/ERROR memgr.GetMemZone(" << mid << ") -> NULL" << endl;
     99             break;             
    89100      }
    90101      Byte* procbuff = memgr.GetProcMemZone(mid);
    91102      if (procbuff == NULL) {
    92         cout << " BRProcARaw2C::run()/ERROR memgr.GetProcMemZone(" << mid << ") -> NULL" << endl;
    93         break; 
     103            cout << " BRProcARaw2C::run()/ERROR memgr.GetProcMemZone(" << mid << ") -> NULL" << endl;
     104        break; 
    94105      }
    95       BRPaquet paq0(NULL, buff, paqsz);
     106
    96107      for(uint_4 i=0; i<memgr.NbPaquets(); i+=step_) {
    97         BRPaquet paq(NULL, buff+i*paqsz, paqsz);
    98         Byte min = 255;
    99         Byte max = 0;
    100  
     108            BRPaquet paq(NULL, buff+i*paqsz, paqsz);
     109        if (!pcheck.Check(paq)) continue;   // on ne traite que les paquets OK
     110
    101111// Traitement voie 1       
    102         for(sa_size_t j=0; j<vx.Size(); j++)
    103           vx(j) = (r_4)(*(paq.Data1()+j))-127.5;
    104         fftwf_complex* coeff1 = (fftwf_complex*)(procbuff+i*procpaqsz);
    105         fftwf_plan plan = fftwf_plan_dft_r2c_1d(vx.Size(), vx.Data(), coeff1, FFTW_ESTIMATE);
    106         fftwf_execute(plan);
    107         //   ffts_.FFTForward(vx, cfour_);
    108         complex<r_4>* zp1 = (complex<r_4>*)(coeff1);
     112            for(sa_size_t j=0; j<vx.Size(); j++)
     113              vx(j) = (r_4)(*(paq.Data1()+j))-127.5;
     114//        fftwf_complex* coeff1 = (fftwf_complex*)(procbuff+i*procpaqsz);
     115            fftwf_execute(plan1);
     116//        complex<r_4>* zp1 = (complex<r_4>*)(coeff1);
     117//        ffts.FFTForward(vx, cfour1);
    109118        for(sa_size_t j=0; j<spectreV1.Size(); j++)
    110           spectreV1(j) += Zmod2(zp1[j]);
    111  
     119          spectreV1(j) += Zmod2(cfour1(j));
     120        memcpy(procbuff+i*procpaqsz, cfour1.Data(), sizeof(complex<r_4>)*cfour1.Size());
    112121// Traitement voie 2       
    113         for(sa_size_t j=0; j<vx.Size(); j++)
    114           vx(j) = (r_4)(*(paq.Data2()+j))-127.5;
    115         fftwf_complex* coeff2 = (fftwf_complex*)(procbuff+i*procpaqsz+procpaqsz/2);
    116         plan = fftwf_plan_dft_r2c_1d(vx.Size(), vx.Data(), coeff2, FFTW_ESTIMATE);
    117         fftwf_execute(plan);
    118         //    ffts_.FFTForward(vx, cfour_);
    119         complex<r_4>* zp2 = (complex<r_4>*)(coeff2);
     122            for(sa_size_t j=0; j<vx.Size(); j++)
     123              vx(j) = (r_4)(*(paq.Data2()+j))-127.5;
     124
     125            fftwf_execute(plan2);
     126
    120127        for(sa_size_t j=0; j<spectreV2.Size(); j++)
    121           spectreV2(j) += Zmod2(zp2[j]);
     128          spectreV2(j) += Zmod2(cfour2(j));  // Zmod2(zp2[j]);
     129        memcpy(procbuff+i*procpaqsz+procpaqsz/2, cfour2.Data(), sizeof(complex<r_4>)*cfour2.Size());
    122130
    123131// Calcul correlation (visibilite V1 * V2)
    124         for(sa_size_t j=0; j<visiV12.Size(); j++) visiV12(j)+=zp1[j]*zp2[j];
     132        for(sa_size_t j=0; j<visiV12.Size(); j++)
     133          visiV12(j)+=cfour1(j)*conj(cfour2(j));
     134//        for(sa_size_t j=0; j<visiV12.Size(); j++) visiV12(j)+=zp1[j]*zp2[j];
     135        nzm++;   
     136        totnbytesproc += paq.DataSize();
     137        totnbytesout += (2*sizeof(complex<r_4>)*cfour1.Size());
    125138
    126         nzm++;
    127       }
    128       if ((nzm >= nmean_) ||(kmz==(nmax_-1))) {
     139      } // Fin de boucle sur les paquets d'une zone
     140      if ((nzm >= nmean_) || ((kmz==(nmax_-1))&&(nzm>1))) {
    129141        spectreV1 /= (r_4)(nzm);
    130142        spectreV2 /= (r_4)(nzm);
     
    135147        spectreV2.Info()["NPaqMoy"] = nzm;
    136148        visiV12.Info()["NPaqMoy"] = nzm;
    137         {
     149            {
    138150        sprintf(fname,"%s_%d.ppf",path_.c_str(),(int)ifile);
    139151        POutPersist po(fname);
     
    141153        po << PPFNameTag("specV2") << spectreV2;
    142154        po << PPFNameTag("visiV12") << visiV12;
    143         }
     155            }
    144156        spectreV1 = (r_4)(0.);
    145157        spectreV2 = (r_4)(0.);
     
    149161//        filog << ts << " :  proc file  " << fname << endl;                   
    150162        cout << " BRProcARaw2C::run() created file  " << fname << endl;
    151       }
     163      }   
    152164     
    153165      memgr.FreeMemZone(mid, MemZS_ProcA);
    154     }
     166    }  // Fin de boucle sur les zones a traiter
     167  cout << " ------------------  BRProcARaw2C::run() END ----------------- " << endl;
     168  ts.SetNow();
     169  tm.SplitQ();
     170  cout << "  TotalProc= " << totnbytesproc/(1024*1024) << " MBytes, rate= "
     171       << (double)(totnbytesproc)/1024./tm.PartialElapsedTimems() << " MB/s"
     172       << " ProcDataOut=" <<  totnbytesout/(1024*1024) << " MB" << endl;   
     173  cout << pcheck;
     174  cout << " BRProcARaw2C::run()/Timing: \n";
     175  tm.Print();
     176  cout << " ---------------------------------------------------------- " << endl;
     177   
    155178  }
    156179  catch (PException& exc) {
  • trunk/AddOn/TAcq/brproc.h

    r3635 r3640  
    2525class BRProcARaw2C : public ZThread {
    2626public:
    27   BRProcARaw2C(RAcqMemZoneMgr& mem, string& path, uint_4 nmean=1, uint_4 step=1, uint_4 nmax=100);
     27  BRProcARaw2C(RAcqMemZoneMgr& mem, string& path, uint_4 nmean=1,
     28               uint_4 step=1, uint_4 nmax=100, bool fgnotrl=false);
    2829  virtual void run();
    2930  void Stop();
     
    3637  uint_4 nmean_;  // Nombre de blocs pour le calcul des moyennes
    3738  string path_; 
     39  bool fgnotrl_;   // if true, don't check packet trailer - when using pre-june fits files
    3840};
    3941
  • trunk/AddOn/TAcq/mcrd.cc

    r3639 r3640  
    5959  if (narg < 4) {
    6060    cout << " --- Reading/Processing BAORadio FITS files" << endl;
    61     cout << " Usage:  mcrd ACT OutPPF -infits DirName Imin Imax " << endl;
     61    cout << " Usage:  mcrd ACT OutPPF -infits DirName Imin Imax [NZones,NbPaqinZone] " << endl;
    6262    cout << " ACT= notrl FITS files without frame trailer \n"
    6363         << " OutPPF : Output PPF file name (without .ppf)" << endl;
    6464    cout << " -infiles DirName Imin Imax : Input fits directory and sequence numbers \n"
    65          << "    FileNames=DirName/signalII.fits Imin<=II<=Imax " << endl; 
     65         << "    FileNames=DirName/signalII.fits Imin<=II<=Imax \n"
     66         << " - NZones,NbPaqinZone : Number of Zones and number of paquets in one zone\n"
     67         << "     of the RAcqMemZoneMgr memory manager (default = 4,128) " << endl;
    6668    return 1;
    6769  }
     
    8688      infiles.push_back(nbuff);
    8789    }
     90    int nzones = 4;
     91    int npaqz = 128;
     92    if (narg>7) sscanf(arg[7],"%d,%d",&nzones,&npaqz); 
    8893
    8994    cout << " ---------- mcrd.cc Start - ACT= " << act << " ------------- " << endl;
     
    9297    if (act=="notrl") fgnotrl=true;  // fichier fits SANS trailer
    9398
    94     uint_4 paqsz, npaq;
    95     DecodeMiniFitsHeader(infiles[0],paqsz, npaq, fgnotrl);
     99    uint_4 paqsz, npaqf;
     100    DecodeMiniFitsHeader(infiles[0],paqsz, npaqf, fgnotrl);
    96101
    97     int nzones = 3;
    98     RAcqMemZoneMgr mmgr(nzones, npaq, paqsz, sizeof(complex<r_4>)*paqsz);
     102    cout << " mcrd: NZones=" << nzones << " NbPaq=" << npaqz << "(in file=" << npaqf
     103         << " ) PaqSz=" << paqsz << endl;
     104         
     105    RAcqMemZoneMgr mmgr(nzones, npaqz, paqsz, sizeof(complex<r_4>)*paqsz);
    99106    mmgr.SetFinalizedMask((uint_4)MemZS_ProcA);
    100107
    101108    BRFitsReader reader(mmgr, infiles, fgnotrl);
    102     BRProcARaw2C proc(mmgr, outname, npaq, 1, npaq*infiles.size());
     109    BRProcARaw2C proc(mmgr, outname, npaqf, 1, npaqf*infiles.size()/npaqz);
    103110
    104111    cout << " mcrd.cc : Starting threads (reader, proc) ... " << endl;
  • trunk/AddOn/TAcq/racqumem.cc

    r3635 r3640  
    5454        if (rid < 0) for(uint_4 k=0; k<NbZones(); k++) {
    5555          if ((states[k].act == MemZA_None) &&
    56               ((states[k].stat == MemZS_Free)||(states[k].stat & mask_finalized_)) ) {
     56              ((states[k].stat == MemZS_Free)||((states[k].stat&mask_finalized_)==mask_finalized_) )) {
    5757            if (states[k].serial < bestserial) { rid=k; bestserial=states[k].serial; }
    5858          }
  • trunk/AddOn/TAcq/racqurw.cc

    r3635 r3640  
    243243        sprintf(fname,"%s/signal%d.fits",path_.c_str(),(int)fnum++);
    244244        mff.Open(fname,MF_Write);  //Reza - Ouverture conditionnel fichier
    245         mff.setDTypeNaxis(MF_Byte, paq0.DataSize()+paq0.HeaderSize(), npaqperfile);
     245        // Entete correspondant a l'ecriture tout le paquet - trailer compris (modif Mai 2009)
     246        mff.setDTypeNaxis(MF_Byte, paq0.PaquetSize(), npaqperfile);
     247        // Sans TRAILER de paquet mff.setDTypeNaxis(MF_Byte, paq0.DataSize()+paq0.HeaderSize(), npaqperfile);
    246248      }
    247249      else sprintf(fname,"MemDataBloc[%d]-NoDataFile",(int)fnum++);
     
    274276
    275277          if (savesig_) // Reza - Ecriture conditionnel fichier fits signal
    276             mff.WriteB(paq.Header(),paq.PaquetSize()); // ecriture tout le paquet (modif Mai 2009
    277           //  mff.WriteB(paq.Data1(), paq.DataSize());
    278             mff.WriteB(paq.Header(),paq.DataSize()+paq.HeaderSize()); // ecriture datas + header
     278            mff.WriteB(paq.Header(),paq.PaquetSize()); // ecriture tout le paquet (modif Mai 2009)
     279            //  mff.WriteB(paq.Data1(), paq.DataSize());
     280            //  mff.WriteB(paq.Header(),paq.DataSize()+paq.HeaderSize()); // ecriture datas + header
    279281        }
    280282        memgr.FreeMemZone(mid, MemZS_Saved);
Note: See TracChangeset for help on using the changeset viewer.