Index: /trunk/ArchTOIPipe/Kernel/Makefile.in
===================================================================
--- /trunk/ArchTOIPipe/Kernel/Makefile.in	(revision 2358)
+++ /trunk/ArchTOIPipe/Kernel/Makefile.in	(revision 2359)
@@ -65,5 +65,5 @@
            fitstoirdr.cc fitstoiwtr.cc asciitoiwtr.cc \
 	   toisegment.cc toiseqbuff.cc cgt.cc \
-	   fitsringwtr.cc $(PIOFILES)
+	   fitsringwtr.cc fitsringrdr.cc $(PIOFILES)
 
 FILES=$(patsubst %.c,%.o,$(SRCFILES:.cc=.o))
Index: /trunk/ArchTOIPipe/Kernel/fitsringrdr.cc
===================================================================
--- /trunk/ArchTOIPipe/Kernel/fitsringrdr.cc	(revision 2358)
+++ /trunk/ArchTOIPipe/Kernel/fitsringrdr.cc	(revision 2359)
@@ -2,5 +2,5 @@
 //                               Christophe Magneville
 //                               Reza Ansari
-// $Id: fitsringrdr.cc,v 1.2 2003-03-26 09:18:44 cecile Exp $
+// $Id: fitsringrdr.cc,v 1.3 2003-04-01 13:27:48 aubourg Exp $
 
 #include "fitsringrdr.h"
@@ -61,5 +61,5 @@
   fits_movabs_hdu(fptr, 2, NULL, &fstatus);
   
-  fits_get_num_cols(fptr,&nSamples,&fstatus);
+  fits_get_num_rows(fptr,&nSamples,&fstatus);
 
   cout << "FITSRingReader nSamples = " << nSamples << endl;  
@@ -73,5 +73,5 @@
   declareOutput("CircPhi");
   declareOutput("signal");
-
+  openFile(fname);
 }
 
@@ -119,6 +119,7 @@
 
   fits_lock();
-
-  fits_read_key(fptr, TLONG,   "NCIRCLES", &nRings, "Number of rings", &fstatus);
+  fits_movabs_hdu(fptr, 1, NULL, &fstatus);
+  char commt[200];
+  fits_read_key(fptr, TLONG,   "NCIRCLES", &nRings, commt, &fstatus);
   fits_unlock();
   
@@ -134,9 +135,9 @@
     fits_movabs_hdu(fptr, ring+2, NULL, &fstatus);
     strcpy(buf, "RINGDATA");
-    fits_read_key(fptr, TSTRING, "PDMTYPE",  &buf, "Planck Data Model Type", &fstatus);
-    fits_read_key(fptr, TDOUBLE, "CIRTHETA", &theta, "Theta angle in radians", &fstatus);
-    fits_read_key(fptr, TDOUBLE, "CIRPHI", &phi, "Phi angle in radians", &fstatus);
-    fits_read_key(fptr, TDOUBLE, "CIRAPER", &aperture, "Aperture angle in radians", &fstatus);
-    fits_read_key(fptr, TLONG, "NSAMPLES", &nSamples, "Number of samples on the circle", &fstatus);
+    fits_read_key(fptr, TSTRING, "PDMTYPE",  &buf, commt, &fstatus);
+    fits_read_key(fptr, TDOUBLE, "CIRTHETA", &theta, commt, &fstatus);
+    fits_read_key(fptr, TDOUBLE, "CIRPHI", &phi, commt, &fstatus);
+    fits_read_key(fptr, TDOUBLE, "CIRAPER", &aperture, commt, &fstatus);
+    fits_read_key(fptr, TLONG, "NSAMPLES", &nSamples, commt, &fstatus);
     fits_unlock();
 
Index: /trunk/ArchTOIPipe/Kernel/fitsringrdr.h
===================================================================
--- /trunk/ArchTOIPipe/Kernel/fitsringrdr.h	(revision 2358)
+++ /trunk/ArchTOIPipe/Kernel/fitsringrdr.h	(revision 2359)
@@ -6,5 +6,5 @@
 //                               Christophe Magneville
 //                               Reza Ansari
-// $Id: fitsringrdr.h,v 1.2 2003-03-26 09:18:44 cecile Exp $
+// $Id: fitsringrdr.h,v 1.3 2003-04-01 13:27:48 aubourg Exp $
 
 #ifndef FITSRINGRDR_H
@@ -46,5 +46,5 @@
 
 private:
-  int nSamples;
+  long nSamples;
   long nRings;
   double aperture;
Index: /trunk/ArchTOIPipe/Kernel/piotoirdr.cc
===================================================================
--- /trunk/ArchTOIPipe/Kernel/piotoirdr.cc	(revision 2358)
+++ /trunk/ArchTOIPipe/Kernel/piotoirdr.cc	(revision 2359)
@@ -3,5 +3,5 @@
 //                               Christophe Magneville
 //                               Reza Ansari
-// $Id: piotoirdr.cc,v 1.2 2003-03-09 23:20:30 aubourg Exp $
+// $Id: piotoirdr.cc,v 1.3 2003-04-01 13:27:48 aubourg Exp $
 
 #include "piotoirdr.h"
@@ -27,5 +27,5 @@
   //pioTOI = new PIOObjectTOI(object.c_str(), "r");
   fits_lock();
-  pioGroup = PIOOpenTOI(const_cast<char*>(object.c_str()), "r");
+  pioGroup = PIOOpenTOI(const_cast<char*>(group.c_str()), "r");
   fits_unlock();
   readBounds();
Index: /trunk/ArchTOIPipe/ProcWSophya/Makefile.in
===================================================================
--- /trunk/ArchTOIPipe/ProcWSophya/Makefile.in	(revision 2358)
+++ /trunk/ArchTOIPipe/ProcWSophya/Makefile.in	(revision 2359)
@@ -48,5 +48,5 @@
 SRCFILES=map2toi.cc toi2map.cc rztoi.cc simtoipr.cc ktoibad.cc smoothtoi.cc \
          noisegen.cc meanvarestim.cc simoffset.cc simcleaner.cc flag2map.cc toi2toi_addsp.cc \
-	Bolos2ring.cc PSB2ring.cc
+	Bolos2ring.cc PSB2ring.cc toi2ring.cc ring2cout.cc
 
 FILES=$(patsubst %.c,%.o,$(SRCFILES:.cc=.o))
Index: /trunk/ArchTOIPipe/ProcWSophya/ring2cout.cc
===================================================================
--- /trunk/ArchTOIPipe/ProcWSophya/ring2cout.cc	(revision 2358)
+++ /trunk/ArchTOIPipe/ProcWSophya/ring2cout.cc	(revision 2359)
@@ -3,5 +3,5 @@
 //                               Christophe Magneville
 //                               Reza Ansari
-// $Id: ring2cout.cc,v 1.2 2003-03-26 09:48:53 cecile Exp $
+// $Id: ring2cout.cc,v 1.3 2003-04-01 13:27:48 aubourg Exp $
 
 #include "toimanager.h"
@@ -14,5 +14,5 @@
 ////////////////////////////////////////////////////////////////////////
 Ring2cout::Ring2cout(long n)
-  :totnscount(0), nRings(0)
+  :totnscount(0), nRings(1)
 {
   setNSamples(n);
@@ -55,8 +55,9 @@
     getData(2,k*Nsamples,Nsamples,val);
     mSnRead ++;
+    wontNeedBefore(k*Nsamples);
     
     cout << " ring " << k << endl;
     for (int i=i; i< Nsamples;i++)
-      cout << ctheta << " " << cphi<< " " << val<< endl;
+      cout << ctheta[i] << " " << cphi[i]<< " " << val[i]<< endl;
     totnscount++;
     
