Changeset 1725 in Sophya
- Timestamp:
- Oct 29, 2001, 11:42:20 PM (24 years ago)
- Location:
- trunk/ArchTOIPipe/Kernel
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/Kernel/fitstoirdr.cc
r1721 r1725 13 13 fptr = NULL; 14 14 totnscount = 0; 15 16 implicitSN = false; 17 implicitSNStart = 0; 15 18 } 16 19 17 20 FITSTOIReader::~FITSTOIReader() { 21 } 22 23 void FITSTOIReader::setImplicitSN(int snStart) { 24 implicitSN = true; 25 implicitSNStart = snStart; 18 26 } 19 27 … … 61 69 62 70 cout << "FITSTOIReader cols = " << ncols << " rows=" << nrows << endl; 63 int anyNul; 64 double y; 65 fits_read_col_dbl(fptr,1,1,1,1,0,&y,&anyNul,&fstatus); 66 firstSn = (int) (y+.1); 71 if (implicitSN) { 72 firstSn = implicitSNStart; 73 } else { 74 int anyNul; 75 double y; 76 fits_read_col_dbl(fptr,1,1,1,1,0,&y,&anyNul,&fstatus); 77 firstSn = (int) (y+.1); 78 } 67 79 fits_unlock(); 68 80 } … … 72 84 73 85 fits_lock(); 74 // Dans cette version, on s'attend a ce que la premiere colonne soit le samplenum 86 // si pas implicitSN, la premiere colonne est le sampleNum. 87 // Sinon, le samplenum est la fitsline + offset. 75 88 int itoi=-1; 76 for (int i=1; i<ncols; i++) { 89 int col1 = implicitSN ? 0 : 1; 90 for (int i=col1; i<ncols; i++) { 77 91 char templt[10]; 78 92 sprintf(templt, "%d", i+1); … … 122 136 } 123 137 138 // run 1 : deprecated. NON MAINTENU. Incompatible avec implicit SN. 124 139 void FITSTOIReader::run1() { 125 140 // Il faudrait optimiser en fonction de ce qui a ete demande comme samplenum, … … 206 221 int anyNul; 207 222 fits_lock(); 208 fits_read_col_dbl(fptr,1,ideb+1,1,n,0,samplenum,&anyNul,&fstatus); 223 if (implicitSN) { 224 for (long j=0; j<Buff_Sz; j++) { 225 samplenum[j] = j+ideb+implicitSNStart; 226 } 227 } else { 228 fits_read_col_dbl(fptr,1,ideb+1,1,n,0,samplenum,&anyNul,&fstatus); 229 } 209 230 for(int k=0; k<getNOut(); k++) { 210 231 if(colval[k]==NULL) continue; -
trunk/ArchTOIPipe/Kernel/fitstoirdr.h
r1717 r1725 15 15 FITSTOIReader(string fn,int buff_sz=1000); 16 16 ~FITSTOIReader(); 17 18 void setImplicitSN(int snStart=0); 17 19 18 20 virtual void addFile(string fn); … … 42 44 int snBegin; // first file 43 45 int snEnd; // last file 46 47 bool implicitSN; 48 int implicitSNStart; 44 49 45 50 vector<string> allfn; -
trunk/ArchTOIPipe/Kernel/toiprocessor.cc
r1689 r1725 246 246 for (int i=0; i<n; i++) { 247 247 TOI* toi = outTOIs[i]; 248 toi->putDone(); 248 if (toi) { 249 toi->putDone(); 250 } 249 251 } 250 252 }
Note:
See TracChangeset
for help on using the changeset viewer.