Changeset 2361 in Sophya for trunk/ArchTOIPipe/ProcWSophya
- Timestamp:
- Apr 17, 2003, 3:47:34 PM (22 years ago)
- Location:
- trunk/ArchTOIPipe/ProcWSophya
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/ProcWSophya/ring2cout.cc
r2360 r2361 3 3 // Christophe Magneville 4 4 // Reza Ansari 5 // $Id: ring2cout.cc,v 1. 4 2003-04-04 14:17:37cecile Exp $5 // $Id: ring2cout.cc,v 1.5 2003-04-17 13:47:34 cecile Exp $ 6 6 7 7 #include "toimanager.h" … … 33 33 void Ring2cout::init() { 34 34 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 38 36 } 39 37 … … 46 44 47 45 cout << " ring " << Nrings << " ns " << Nsamples<< endl; 48 double ctheta[Nsamples],cphi[Nsamples],val[Nsamples];46 double val[Nsamples]; 49 47 for (int k=0; k<Nrings; k++) { 50 48 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); 54 53 mSnRead ++; 55 54 56 55 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; 59 58 60 59 } -
trunk/ArchTOIPipe/ProcWSophya/ring2cout.h
r2354 r2361 5 5 // Christophe Magneville 6 6 // Reza Ansari 7 // $Id: ring2cout.h,v 1. 2 2003-03-26 09:48:53cecile Exp $7 // $Id: ring2cout.h,v 1.3 2003-04-17 13:47:34 cecile Exp $ 8 8 9 9 #ifndef TOI2RING_H … … 17 17 class Ring2cout : public TOIProcessor { 18 18 public: 19 Ring2cout(long n );19 Ring2cout(long ns,long nr); 20 20 virtual ~Ring2cout(); 21 21 22 22 inline void setNSamples( long n=1024) 23 23 {Nsamples = n;} 24 25 inline void setNRings( long n=1) 26 {Nrings = n;} 24 27 25 28 virtual void init(void); … … 31 34 void Print(::ostream & os); 32 35 inline long ProcessedSampleCount() const { return totnscount; } 33 inline long ProcessedRingCount() const { return nRings; }36 inline long ProcessedRingCount() const { return Nrings; } 34 37 35 38 protected: 36 39 long Nsamples; 37 40 long totnscount; 38 long nRings;41 long Nrings; 39 42 40 43 }; -
trunk/ArchTOIPipe/ProcWSophya/toi2ring.cc
r2355 r2361 3 3 // Christophe Magneville 4 4 // Reza Ansari 5 // $Id: toi2ring.cc,v 1. 5 2003-03-28 16:06:17cecile Exp $5 // $Id: toi2ring.cc,v 1.6 2003-04-17 13:47:34 cecile Exp $ 6 6 7 7 #include "toimanager.h" … … 33 33 cout << "Toi2RING::init" << endl; 34 34 declareInput("Theta"); // input index 0 35 declareInput("Phi"); // input index 135 declareInput("Phi"); // input index 1 36 36 declareInput("Phase"); // input index 2 37 37 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 44 40 } 45 41 … … 91 87 // if (k==sne) { wfits.setNRings(Nrings); wwfits.setNRings(Nrings);} 92 88 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; 93 94 for(i=0;i<Nsamples;i++) { 94 95 if(wr[i] == 0) r[i] = -999999.; 95 96 else r[i] /= wr[i]; 96 97 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]); 103 100 wr[i]=0; 104 101 r[i]=0.;
Note:
See TracChangeset
for help on using the changeset viewer.