Index: /trunk/AddOn/TAcq/brproc.cc
===================================================================
--- /trunk/AddOn/TAcq/brproc.cc	(revision 3655)
+++ /trunk/AddOn/TAcq/brproc.cc	(revision 3656)
@@ -36,9 +36,10 @@
 /* --Methode-- */
 BRProcARaw2C::BRProcARaw2C(RAcqMemZoneMgr& mem, string& path, uint_4 nmean, 
-                           uint_4 nmax, bool fghist, bool fgnotrl, int card)
+                           uint_4 nmax, bool fghist, uint_4 nfsmap, bool fgnotrl, int card)
   :  memgr(mem) 
 {
   nmax_ = nmax;	
   nmean_ = nmean;
+  nfsmap_ = nfsmap;
   stop_ = false;	
   path_ = path;	
@@ -113,4 +114,7 @@
 */
 
+    bool fgtimfreq = false;  // true->cartes temps<>frequences
+    if (nfsmap_>0) fgtimfreq=true;
+
     TVector< complex<r_4> > cfour2(cfour1.Size());
     
@@ -123,4 +127,9 @@
     TVector< complex<r_4> > visiV12( cfour1.Size() );
 
+    TMatrix<r_4> timfreqV1, timfreqV2;   // Cartes temps<>frequences
+    if (fgtimfreq) {
+      timfreqV1.SetSize(nmean_, spectreV1.Size()/nfsmap_);
+      timfreqV2.SetSize(nmean_, spectreV2.Size()/nfsmap_);
+    }
     cout << " *DBG*BRProcARaw2C PaqSz=" << paqsz << " ProcPaqSize=" << procpaqsz 
          << " procpaqsz/2=" << procpaqsz/2 << " cfour1.Size()=" << cfour1.Size()
@@ -181,4 +190,10 @@
           spectreV1(j) += Zmod2(cfour1(j));
         memcpy(procbuff+i*procpaqsz, cfour1.Data(), sizeof(complex<r_4>)*cfour1.Size());
+        if (fgtimfreq) {   // Remplissage tableau temps-frequence
+          for(sa_size_t c=1; c<timfreqV1.NCols(); c++) {
+            for(sa_size_t j=c*nfsmap_; j<(c+1)*nfsmap_; j++) 
+              timfreqV1(nzm, c) += Zmod2(cfour1(j));
+	  }
+	}
 // Traitement voie 2  	    
         if (fghist_) {
@@ -197,4 +212,10 @@
           spectreV2(j) += Zmod2(cfour2(j));  // Zmod2(zp2[j]); 
         memcpy(procbuff+i*procpaqsz+procpaqsz/2, cfour2.Data(), sizeof(complex<r_4>)*cfour2.Size());
+        if (fgtimfreq) {   // Remplissage tableau temps-frequence
+          for(sa_size_t c=1; c<timfreqV2.NCols(); c++) {
+            for(sa_size_t j=c*nfsmap_; j<(c+1)*nfsmap_; j++) 
+              timfreqV2(nzm,c) += Zmod2(cfour2(j));
+	  }
+	}
 
 // Calcul correlation (visibilite V1 * V2)
@@ -268,4 +289,6 @@
         string tagh1="tshV1";
         string tagh2="tshV2";
+        string tagtf1="timfreqV1";
+        string tagtf2="timfreqV2";
         if (card_==2) {
           tag1 = "specV3";
@@ -274,4 +297,6 @@
           tagh2 = "tshV2";
           tag12="visiV34";
+          tagtf1="timfreqV3";
+          tagtf2="timfreqV4";
         }
         po << PPFNameTag(tag1) << spectreV1; 
@@ -281,4 +306,10 @@
           po << PPFNameTag(tagh1) << h1; 
           po << PPFNameTag(tagh2) << h2; 
+        }
+        if (fgtimfreq) {
+          timfreqV1 /= (r_4)nzm;
+          timfreqV2 /= (r_4)nzm;
+          po << PPFNameTag(tagtf1) << timfreqV1; 
+          po << PPFNameTag(tagtf2) << timfreqV2; 
         }
 	}
@@ -290,4 +321,8 @@
           h2.Zero();
         }
+        if (fgtimfreq) {
+          timfreqV1 = (r_4)(0.);
+          timfreqV2 = (r_4)(0.);
+	}
         nzm = 0;  ifile++; 
 //        ts.SetNow();
Index: /trunk/AddOn/TAcq/brproc.h
===================================================================
--- /trunk/AddOn/TAcq/brproc.h	(revision 3655)
+++ /trunk/AddOn/TAcq/brproc.h	(revision 3656)
@@ -30,4 +30,6 @@
   o nmax : Nombre maxi de frames traites 
   o fghist = true -> fait aussi l'histo des valeurs des echantillons temps
+  o nfsmap>0 : fabrication de cartes (image 2D) des spectres, 
+     avec nfsmap=nombre de frequences sommes  
   o fgnotrl = true -> fichiers fits / paquets sans trailer 
   o card : numero de carte , juste pour les impressions 
@@ -36,5 +38,6 @@
 public:	
   BRProcARaw2C(RAcqMemZoneMgr& mem, string& path, uint_4 nmean=10, 
-               uint_4 nmax=100, bool fgtshist=false, bool fgnotrl=false, int card=1);
+               uint_4 nmax=100, bool fgtshist=false, uint_4 nfsmap=0, 
+               bool fgnotrl=false, int card=1);
   virtual void run(); 
   void Stop();
@@ -44,5 +47,6 @@
   bool stop_;  
   uint_4 nmax_;  // Nombre maxi de blocs MemZone traites
-  uint_4 nmean_;  // Nombre de blocs pour le calcul des moyennes 
+  uint_4 nmean_;  // Nombre de spectres pour le calcul des moyennes 
+  uint_4 nfsmap_;  // Binning en frequence pour les cartes 2D temps-freq
   string path_;  
   bool fghist_;   // if true, fill and save histogram with time sample values
Index: /trunk/AddOn/TAcq/mcrd.cc
===================================================================
--- /trunk/AddOn/TAcq/mcrd.cc	(revision 3655)
+++ /trunk/AddOn/TAcq/mcrd.cc	(revision 3656)
@@ -58,4 +58,5 @@
 static int NPaqinZone=128;
 static int NMean=1024;
+static int NFreqSMap=0;  // binning en frequences cartes 2D temps-freq, 0-> NoMap 2D spectres   
 static int NGenZ=100;
 static int GPaqSz=16424;
@@ -112,5 +113,6 @@
     if (narg>offa+1) sscanf(arg[offa+1],"%d,%d",&NZones,&NPaqinZone);	
     if (narg>offa+2) NMean=atoi(arg[offa+2]);
-    if (narg>offa+3) sscanf(arg[offa+3],"%d,%d,%lg",&GPaqSz,&NGenZ,&LossRate);	
+    if (narg>offa+3) NFreqSMap=atoi(arg[offa+3]);
+    if (narg>offa+4) sscanf(arg[offa+4],"%d,%d,%lg",&GPaqSz,&NGenZ,&LossRate);	
 
     cout << " ---------- mcrd.cc Start - ACT= " << act << " ------------- " << endl;
@@ -176,5 +178,5 @@
 
   outname += "/Ch12";
-  BRProcARaw2C proc(mmgr, outname, NMean, nmaxz, fghist, fgnotrl);
+  BRProcARaw2C proc(mmgr, outname, NMean, nmaxz, fghist, NFreqSMap, fgnotrl);
 
   cout << " mcrd/Proc1FRawA: Starting threads (reader, proc) ... " << endl;
@@ -243,8 +245,8 @@
   string outname1 = outname;
   outname1 += "/Ch12";
-  BRProcARaw2C proc1(mmgr1, outname1, NMean, nmaxz, fghist, fgnotrl);
+  BRProcARaw2C proc1(mmgr1, outname1, NMean, nmaxz, fghist, NFreqSMap, fgnotrl);
   string outname2 = outname;
   outname2 += "/Ch34";
-  BRProcARaw2C proc2(mmgr2, outname2, NMean, nmaxz, fghist, fgnotrl,2);
+  BRProcARaw2C proc2(mmgr2, outname2, NMean, nmaxz, fghist, NFreqSMap, fgnotrl,2);
   string outname12 = outname;
   outname12 += "/Ch1234";
@@ -294,5 +296,6 @@
   cout << " --- mcrd.cc : Reading/Processing BAORadio FITS files" << endl;
   cout << " Usage:  mcrd ACT OutPath InPath [InPath2] Imin,Imax\n" 
-       << "              [NZones,NPaqinZone] [NMean] [GPaqSz,NGenZones,LossRate]" << endl;
+       << "              [NZones,NPaqinZone] [NMean] [NFreqSMap]\n"
+       << "              [GPaqSz,NGenZones,LossRate]" << endl;
   if (fgshort) {
     cout << " mcrd -h for detailed instructions" << endl;
@@ -312,4 +315,5 @@
        << "     of the RAcqMemZoneMgr memory manager (default = 4,128)\n"
        << " NMean: Number of packet used for spectra/visibility computation (def=1024)\n"
+       << " NFreqSMap: Frequency binning for 2D (time-freq) spectra maps (def=0->No maps)\n"
        << " GPaqSz,NGenZones,LossRate: Paquet Size, Number of memory zones filled and\n"
        << "      loss rate (-2g,-4g) , default=16424,100,0.1" << endl;
