Changeset 3656 in Sophya for trunk/AddOn/TAcq/brproc.cc


Ignore:
Timestamp:
Sep 9, 2009, 1:56:34 PM (16 years ago)
Author:
ansari
Message:

Ajout possibilite sauvegarde des cartes 2D temps frequence ds BRProcARaw2C , mcrd.cc - Reza 9/9/2009

File:
1 edited

Legend:

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

    r3655 r3656  
    3636/* --Methode-- */
    3737BRProcARaw2C::BRProcARaw2C(RAcqMemZoneMgr& mem, string& path, uint_4 nmean,
    38                            uint_4 nmax, bool fghist, bool fgnotrl, int card)
     38                           uint_4 nmax, bool fghist, uint_4 nfsmap, bool fgnotrl, int card)
    3939  :  memgr(mem)
    4040{
    4141  nmax_ = nmax;
    4242  nmean_ = nmean;
     43  nfsmap_ = nfsmap;
    4344  stop_ = false;       
    4445  path_ = path;
     
    113114*/
    114115
     116    bool fgtimfreq = false;  // true->cartes temps<>frequences
     117    if (nfsmap_>0) fgtimfreq=true;
     118
    115119    TVector< complex<r_4> > cfour2(cfour1.Size());
    116120   
     
    123127    TVector< complex<r_4> > visiV12( cfour1.Size() );
    124128
     129    TMatrix<r_4> timfreqV1, timfreqV2;   // Cartes temps<>frequences
     130    if (fgtimfreq) {
     131      timfreqV1.SetSize(nmean_, spectreV1.Size()/nfsmap_);
     132      timfreqV2.SetSize(nmean_, spectreV2.Size()/nfsmap_);
     133    }
    125134    cout << " *DBG*BRProcARaw2C PaqSz=" << paqsz << " ProcPaqSize=" << procpaqsz
    126135         << " procpaqsz/2=" << procpaqsz/2 << " cfour1.Size()=" << cfour1.Size()
     
    181190          spectreV1(j) += Zmod2(cfour1(j));
    182191        memcpy(procbuff+i*procpaqsz, cfour1.Data(), sizeof(complex<r_4>)*cfour1.Size());
     192        if (fgtimfreq) {   // Remplissage tableau temps-frequence
     193          for(sa_size_t c=1; c<timfreqV1.NCols(); c++) {
     194            for(sa_size_t j=c*nfsmap_; j<(c+1)*nfsmap_; j++)
     195              timfreqV1(nzm, c) += Zmod2(cfour1(j));
     196          }
     197        }
    183198// Traitement voie 2       
    184199        if (fghist_) {
     
    197212          spectreV2(j) += Zmod2(cfour2(j));  // Zmod2(zp2[j]);
    198213        memcpy(procbuff+i*procpaqsz+procpaqsz/2, cfour2.Data(), sizeof(complex<r_4>)*cfour2.Size());
     214        if (fgtimfreq) {   // Remplissage tableau temps-frequence
     215          for(sa_size_t c=1; c<timfreqV2.NCols(); c++) {
     216            for(sa_size_t j=c*nfsmap_; j<(c+1)*nfsmap_; j++)
     217              timfreqV2(nzm,c) += Zmod2(cfour2(j));
     218          }
     219        }
    199220
    200221// Calcul correlation (visibilite V1 * V2)
     
    268289        string tagh1="tshV1";
    269290        string tagh2="tshV2";
     291        string tagtf1="timfreqV1";
     292        string tagtf2="timfreqV2";
    270293        if (card_==2) {
    271294          tag1 = "specV3";
     
    274297          tagh2 = "tshV2";
    275298          tag12="visiV34";
     299          tagtf1="timfreqV3";
     300          tagtf2="timfreqV4";
    276301        }
    277302        po << PPFNameTag(tag1) << spectreV1;
     
    281306          po << PPFNameTag(tagh1) << h1;
    282307          po << PPFNameTag(tagh2) << h2;
     308        }
     309        if (fgtimfreq) {
     310          timfreqV1 /= (r_4)nzm;
     311          timfreqV2 /= (r_4)nzm;
     312          po << PPFNameTag(tagtf1) << timfreqV1;
     313          po << PPFNameTag(tagtf2) << timfreqV2;
    283314        }
    284315        }
     
    290321          h2.Zero();
    291322        }
     323        if (fgtimfreq) {
     324          timfreqV1 = (r_4)(0.);
     325          timfreqV2 = (r_4)(0.);
     326        }
    292327        nzm = 0;  ifile++;
    293328//        ts.SetNow();
Note: See TracChangeset for help on using the changeset viewer.