Changeset 2361 in Sophya for trunk/ArchTOIPipe/Kernel
- Timestamp:
- Apr 17, 2003, 3:47:34 PM (22 years ago)
- Location:
- trunk/ArchTOIPipe/Kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/Kernel/fitsringrdr.cc
r2360 r2361 2 2 // Christophe Magneville 3 3 // Reza Ansari 4 // $Id: fitsringrdr.cc,v 1. 4 2003-04-04 14:17:03cecile Exp $4 // $Id: fitsringrdr.cc,v 1.5 2003-04-17 13:47:34 cecile Exp $ 5 5 6 6 #include "fitsringrdr.h" … … 74 74 void FITSRingReader::init() { 75 75 76 declareOutput("CircTheta");77 declareOutput("CircPhi");78 76 declareOutput("signal"); 79 openFile(fname); 77 openFile(fname); 80 78 } 81 79 … … 121 119 122 120 void FITSRingReader::run() { 121 cout << "!!!!!!! RING " << endl; 123 122 124 123 fits_lock(); … … 142 141 fits_read_key(fptr, TDOUBLE, "CIRPHI", &phi, commt, &fstatus); 143 142 fits_read_key(fptr, TDOUBLE, "CIRAPER", &aperture, commt, &fstatus); 144 fits_read_key(fptr, TLONG, "NSAMPLES", &nSamples, commt, &fstatus);143 fits_read_key(fptr, TLONG, "NSAMPLES", &nSamples, commt, &fstatus); 145 144 fits_unlock(); 146 wontNeedBefore(ring* nSamples);145 wontNeedBefore(ring*(nSamples+2)); 147 146 cout << "!!!!!!! RING " << ring << endl; 148 147 148 double data; 149 fits_lock(); 150 putData(0, ring*(nSamples+2)+0,theta); 151 putData(0, ring*(nSamples+2)+1,phi); 152 fits_unlock(); 149 153 for (int i=0; i<nSamples; i++) { 150 double data;151 154 fits_lock(); 152 155 fits_read_col_dbl(fptr,1,i+1,1,1,0,&data,&anyNul,&fstatus); 153 putData(0, ring*nSamples+i,theta); 154 putData(1, ring*nSamples+i,phi); 155 putData(2, ring*nSamples+i,data); 156 putData(0, ring*(nSamples+2)+2+i,data); 156 157 fits_unlock(); 157 158 } -
trunk/ArchTOIPipe/Kernel/fitsringwtr.cc
r2355 r2361 4 4 // Christophe Magneville 5 5 // Reza Ansari 6 // $Id: fitsringwtr.cc,v 1. 6 2003-03-28 16:06:40cecile Exp $6 // $Id: fitsringwtr.cc,v 1.7 2003-04-17 13:47:34 cecile Exp $ 7 7 8 8 #include "fitsringwtr.h" … … 40 40 41 41 void FITSRingWriter::init() { 42 declareInput("CircTheta");43 declareInput("CircPhi");44 42 declareInput("signal"); 45 43 } … … 59 57 fits_write_key(fptr, TLONG, "NCIRCLES", &nRings, "Number of rings", &fstatus); 60 58 fits_unlock(); 61 59 62 60 char* ttype = "DATA"; 63 61 char* tform = "1D"; … … 67 65 sprintf(xname, "CRING_%d", ring); 68 66 69 double theta = getData(0, ring*nSamples); 70 double phi = getData(1, ring*nSamples); 67 wontNeedBefore(ring*(nSamples+2)); 68 double theta = getData(0, ring*(nSamples+2)+0); 69 double phi = getData(0, ring*(nSamples+2)+1); 71 70 72 71 fits_lock(); … … 79 78 fits_write_key(fptr, TLONG, "NSAMPLES", &nSamples, "Number of samples on the circle", &fstatus); 80 79 fits_unlock(); 81 wontNeedBefore(ring*nSamples);82 80 81 cout << nSamples << " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@" << endl; 82 83 83 for (int i=0; i<nSamples; i++) { 84 double data = getData(2, ring*nSamples+i); 84 double data = getData(0, ring*(nSamples+2)+2+i); 85 if (i > 1000) cout << i << " " << data << endl; 85 86 fits_lock(); 86 87 fits_write_col(fptr, TDOUBLE, 1,i+1,1,1, &data, &fstatus);
Note:
See TracChangeset
for help on using the changeset viewer.