Changeset 1552
- Timestamp:
- 03/27/09 21:25:44 (16 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STAsciiWriter.cpp
r1375 r1552 88 88 89 89 String rootName(fileName); 90 if (rootName.length()==0) rootName = String("ascii"); 91 90 92 91 Block<String> cols(4); 93 92 cols[0] = String("SCANNO"); … … 103 102 String dirtype = stable.getDirectionRefString(); 104 103 ostringstream onstr; 105 onstr << "SCAN" << rec.asuInt("SCANNO") 106 << "_CYCLE" << rec.asuInt("CYCLENO") 107 << "_BEAM" << rec.asuInt("BEAMNO") 108 << "_IF" << rec.asuInt("IFNO"); 104 105 if (rootName.length()==0) { 106 rootName = String("ascii"); 107 } 108 if (tab.nrow() > 1) { 109 if (stable.nscan() > 1) 110 onstr << "_SCAN" << rec.asuInt("SCANNO"); 111 if (stable.ncycle(rec.asuInt("SCANNO")) > 1) 112 onstr << "_CYCLE" << rec.asuInt("CYCLENO"); 113 if (stable.nbeam(rec.asuInt("SCANNO")) > 1) 114 onstr << "_BEAM" << rec.asuInt("BEAMNO"); 115 if (stable.nif(rec.asuInt("SCANNO")) > 1) 116 onstr << "_IF" << rec.asuInt("IFNO"); 117 } 118 109 119 String fName = rootName + String(onstr) + String(".txt"); 110 120 ofstream of(fName.chars(), ios::trunc); -
trunk/src/STFITSImageWriter.cpp
r1510 r1552 121 121 TableIterator iter(tab, cols); 122 122 // Open data file 123 123 124 while ( !iter.pastEnd() ) { 124 125 Table t = iter.table(); … … 127 128 String dirtype = stable.getDirectionRefString(); 128 129 ostringstream onstr; 129 onstr << "SCAN" << rec.asuInt("SCANNO") 130 << "_CYCLE" << rec.asuInt("CYCLENO") 131 << "_BEAM" << rec.asuInt("BEAMNO") 132 << "_IF" << rec.asuInt("IFNO") 133 << "_POL" << rec.asuInt("POLNO"); 130 if (rootName.length()==0) { 131 rootName = "fits"; 132 } 133 if (tab.nrow() > 1) { 134 if (stable.nscan() > 1) 135 onstr << "_SCAN" << rec.asuInt("SCANNO"); 136 if (stable.ncycle(rec.asuInt("SCANNO")) > 1) 137 onstr << "_CYCLE" << rec.asuInt("CYCLENO"); 138 if (stable.nbeam(rec.asuInt("SCANNO")) > 1) 139 onstr << "_BEAM" << rec.asuInt("BEAMNO"); 140 if (stable.nif(rec.asuInt("SCANNO")) > 1) 141 onstr << "_IF" << rec.asuInt("IFNO"); 142 if (stable.npol(rec.asuInt("SCANNO")) > 1) 143 onstr << "_POL" << rec.asuInt("POLNO"); 144 } 134 145 String fileName = rootName + String(onstr) + String(".fits"); 135 146 int row0 = t.rowNumbers(tab)[0]; … … 258 269 } 259 270 fits_close_file(fptr, &status); 260 271 ostringstream oss; 272 oss << "Wrote " << fileName; 273 pushLog(String(oss)); 261 274 //pushLog(String(oss)); 262 275 ++iter;
Note:
See TracChangeset
for help on using the changeset viewer.