Index: trunk/ArchTOIPipe/Kernel/fitsringwtr.cc
===================================================================
--- trunk/ArchTOIPipe/Kernel/fitsringwtr.cc	(revision 2355)
+++ trunk/ArchTOIPipe/Kernel/fitsringwtr.cc	(revision 2361)
@@ -4,5 +4,5 @@
 //                               Christophe Magneville
 //                               Reza Ansari
-// $Id: fitsringwtr.cc,v 1.6 2003-03-28 16:06:40 cecile Exp $
+// $Id: fitsringwtr.cc,v 1.7 2003-04-17 13:47:34 cecile Exp $
 
 #include "fitsringwtr.h"
@@ -40,6 +40,4 @@
 
 void FITSRingWriter::init() {
-  declareInput("CircTheta");
-  declareInput("CircPhi");
   declareInput("signal");
 }
@@ -59,5 +57,5 @@
   fits_write_key(fptr, TLONG,   "NCIRCLES", &nRings, "Number of rings", &fstatus);
   fits_unlock();
-  
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
   char* ttype = "DATA";
   char* tform = "1D";
@@ -67,6 +65,7 @@
     sprintf(xname, "CRING_%d", ring);
 
-    double theta = getData(0, ring*nSamples);
-    double phi = getData(1, ring*nSamples);
+    wontNeedBefore(ring*(nSamples+2));
+    double theta = getData(0, ring*(nSamples+2)+0);
+    double phi   = getData(0, ring*(nSamples+2)+1);
 
     fits_lock();
@@ -79,8 +78,10 @@
     fits_write_key(fptr, TLONG, "NSAMPLES", &nSamples, "Number of samples on the circle", &fstatus);
     fits_unlock();
-    wontNeedBefore(ring*nSamples);
 
+    cout << nSamples << " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@" << endl;
+    
     for (int i=0; i<nSamples; i++) {
-      double data = getData(2, ring*nSamples+i);
+      double data = getData(0, ring*(nSamples+2)+2+i);
+      if (i > 1000) cout << i << " "  << data << endl;
       fits_lock();
       fits_write_col(fptr, TDOUBLE, 1,i+1,1,1, &data, &fstatus);
