Changeset 442
- Timestamp:
- 02/15/05 11:57:48 (20 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDWriter.cc
r324 r442 111 111 112 112 Int SDWriter::write(const CountedPtr<SDMemTable> in, 113 const std::string &filename )113 const std::string &filename, Bool toStokes) 114 114 { 115 115 … … 119 119 Bool verbose = True; 120 120 SDFITSImageWriter iw; 121 if (iw.write(*in, filename, verbose )) {121 if (iw.write(*in, filename, verbose, toStokes)) { 122 122 return 0; 123 123 } else { … … 126 126 } else if (cFormat=="ASCII") { 127 127 SDAsciiWriter iw; 128 if (iw.write(*in, filename )) {128 if (iw.write(*in, filename, toStokes)) { 129 129 return 0; 130 130 } else { … … 139 139 const Int nPol = hdr.npol; 140 140 const Int nChan = hdr.nchan; 141 if (toStokes) { 142 cerr << "Stokes conversion not yet available with SDFITS or MS" << endl; 143 } 141 144 142 145 // Get Freq table … … 200 203 Double srcVel = 0.0; 201 204 202 // The writer will assume refPix = nChan/2 + 1. So recompute205 // The writer will assume refPix = nChan/2 (0-rel). So recompute 203 206 // the frequency at this location. 204 207 … … 206 209 Double crval = sdft.referenceValue(freqID); 207 210 Double crpix = sdft.referencePixel(freqID); 208 Double pixel = nChan/2 + 1;211 Double pixel = nChan/2; 209 212 Double refFreqNew = (pixel-crpix)*cdelt + crval; 210 213 // -
trunk/src/SDWriter.h
r199 r442 50 50 51 51 // Format can be "SDFITS", "FITS", "MS2" or "ASCII" 52 // Stokes conversion available for FITS and ASCII at present 52 53 casa::Int setFormat(const string &format = "SDFITS"); 53 54 casa::Int write(const casa::CountedPtr<SDMemTable> table, 54 const string &filename );55 const string &filename, casa::Bool toStokes); 55 56 56 57 private:
Note:
See TracChangeset
for help on using the changeset viewer.