Changeset 2361 in Sophya for trunk/ArchTOIPipe/ProcWSophya


Ignore:
Timestamp:
Apr 17, 2003, 3:47:34 PM (22 years ago)
Author:
cecile
Message:

nouveaux tuyaux de ring : theta, phi puis Nsamples mesures

Location:
trunk/ArchTOIPipe/ProcWSophya
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ArchTOIPipe/ProcWSophya/ring2cout.cc

    r2360 r2361  
    33//                               Christophe Magneville
    44//                               Reza Ansari
    5 // $Id: ring2cout.cc,v 1.4 2003-04-04 14:17:37 cecile Exp $
     5// $Id: ring2cout.cc,v 1.5 2003-04-17 13:47:34 cecile Exp $
    66
    77#include "toimanager.h"
     
    3333void Ring2cout::init() {
    3434  cout << "Ring2cout::init" << endl;
    35   declareInput("Theta");     // input  index 0
    36   declareInput("Phi");     // input  index 1
    37   declareInput("Phase");     // input  index 2
     35  declareInput("Phase");     // input  index 0
    3836}
    3937
     
    4644
    4745  cout << " ring " << Nrings << " ns " << Nsamples<< endl;
    48   double ctheta[Nsamples],cphi[Nsamples],val[Nsamples];
     46  double val[Nsamples];
    4947  for (int k=0; k<Nrings; k++) {
    5048   
    51     getData(0,k*Nsamples,Nsamples,ctheta);
    52     getData(1,k*Nsamples,Nsamples,cphi);
    53     getData(2,k*Nsamples,Nsamples,val);
     49    double theta= getData(0,k*(Nsamples+2)+0);
     50    double phi  = getData(0,k*(Nsamples+2)+1);
     51    cout << Nrings << " " << k <<" " <<theta <<" " <<phi<< endl;
     52    getData(0,k*(Nsamples+2)+2,Nsamples,val);
    5453    mSnRead ++;
    5554   
    5655    for (int i=0; i< Nsamples;i++)
    57       cout << Nrings << " " << k <<" " << i <<" " << ctheta[i] << " " << cphi[i]<< " " << val[i]<< endl;
    58     totnscount+=Nsamples;
     56      cout <<  i << " " << val[i]<< endl;
     57    totnscount+=Nsamples+2;
    5958   
    6059  }
  • trunk/ArchTOIPipe/ProcWSophya/ring2cout.h

    r2354 r2361  
    55//                               Christophe Magneville
    66//                               Reza Ansari
    7 // $Id: ring2cout.h,v 1.2 2003-03-26 09:48:53 cecile Exp $
     7// $Id: ring2cout.h,v 1.3 2003-04-17 13:47:34 cecile Exp $
    88
    99#ifndef TOI2RING_H
     
    1717class Ring2cout : public TOIProcessor {
    1818public:
    19                  Ring2cout(long n);
     19                 Ring2cout(long ns,long nr);
    2020  virtual       ~Ring2cout();
    2121
    2222  inline void setNSamples( long n=1024)
    2323              {Nsamples = n;}
     24
     25  inline void setNRings( long n=1)
     26              {Nrings = n;}
    2427
    2528  virtual void  init(void);
     
    3134  void Print(::ostream & os);
    3235  inline long   ProcessedSampleCount() const { return totnscount; }
    33   inline long   ProcessedRingCount() const { return nRings; }
     36  inline long   ProcessedRingCount() const { return Nrings; }
    3437
    3538protected:
    3639  long Nsamples;
    3740  long totnscount;
    38   long nRings;
     41  long Nrings;
    3942 
    4043};
  • trunk/ArchTOIPipe/ProcWSophya/toi2ring.cc

    r2355 r2361  
    33//                               Christophe Magneville
    44//                               Reza Ansari
    5 // $Id: toi2ring.cc,v 1.5 2003-03-28 16:06:17 cecile Exp $
     5// $Id: toi2ring.cc,v 1.6 2003-04-17 13:47:34 cecile Exp $
    66
    77#include "toimanager.h"
     
    3333  cout << "Toi2RING::init" << endl;
    3434  declareInput("Theta");     // input  index 0
    35   declareInput("Phi");     // input  index 1
     35  declareInput("Phi");       // input  index 1
    3636  declareInput("Phase");     // input  index 2
    3737  declareInput("Value");     // input  index 3
    38   declareOutput("CircTheta");   // output index 0
    39   declareOutput("CircPhi");   // output index 1
    40   declareOutput("Rvalue");   // output index 2
    41   declareOutput("WCircTheta");   // output index 3
    42   declareOutput("WCircPhi");   // output index 4
    43   declareOutput("WRvalue");   // output index 5
     38  declareOutput("Rvalue");   // output index 0
     39  declareOutput("WRvalue");  // output index 1
    4440}
    4541
     
    9187    //  if (k==sne) { wfits.setNRings(Nrings); wwfits.setNRings(Nrings);}
    9288   
     89    putData(0,Nrings*(Nsamples+2)+0,ctheta_prec);
     90    putData(1,Nrings*(Nsamples+2)+0,ctheta_prec);
     91    putData(0,Nrings*(Nsamples+2)+1,cphi_prec);
     92    putData(1,Nrings*(Nsamples+2)+1,cphi_prec);
     93    cout << Nsamples << " !@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" << endl;
    9394    for(i=0;i<Nsamples;i++) {
    9495      if(wr[i] == 0) r[i] = -999999.;
    9596      else r[i] /= wr[i];
    9697     
    97       putData(0,Nrings*Nsamples+i,ctheta_prec);
    98       putData(1,Nrings*Nsamples+i,cphi_prec);
    99       putData(2,Nrings*Nsamples+i,r[i]);
    100       putData(3,Nrings*Nsamples+i,ctheta_prec);
    101       putData(4,Nrings*Nsamples+i,cphi_prec);
    102       putData(5,Nrings*Nsamples+i,wr[i]);
     98      putData(0,Nrings*(Nsamples+2)+2+i,r[i]);
     99      putData(1,Nrings*(Nsamples+2)+2+i,wr[i]);
    103100      wr[i]=0;
    104101      r[i]=0.;
Note: See TracChangeset for help on using the changeset viewer.