Changeset 1443
- Timestamp:
- 09/01/08 11:54:04 (16 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SConstruct
r1433 r1443 98 98 "include", "casacore")) 99 99 if not conf.CheckLib("casa_casa", language='c++'): Exit(1) 100 conf.env.PrependUnique(LIBS=["casa_ ms", "casa_components",100 conf.env.PrependUnique(LIBS=["casa_images", "casa_ms", "casa_components", 101 101 "casa_coordinates", "casa_lattices", 102 102 "casa_fits", "casa_measures", "casa_scimath", -
trunk/python/scantable.py
r1435 r1443 91 91 'MS2' (saves as an aips++ 92 92 MeasurementSet V2) 93 'FITS' (save as image FITS - not 94 readable by class) 95 'CLASS' (save as FITS readable by CLASS) 93 96 overwrite: If the file should be overwritten if it exists. 94 97 The default False is to return with warning -
trunk/src/STWriter.cpp
r1410 r1443 47 47 #include <tables/Tables/ArrayColumn.h> 48 48 49 //#include "SDFITSImageWriter.h"49 #include "STFITSImageWriter.h" 50 50 #include "STAsciiWriter.h" 51 51 #include "STHeader.h" … … 58 58 STWriter::STWriter(const std::string &format) 59 59 { 60 format_ = format; 61 String t(format_); 62 t.upcase(); 63 if (t == "MS2") { 64 writer_ = new PKSMS2writer(); 65 } else if (t == "SDFITS") { 66 writer_ = new PKSSDwriter(); 67 } else if (t == "ASCII" || t == "FITS" || t == "CLASS") { 68 writer_ = 0; 69 } else { 70 throw (AipsError("Unrecognized export format")); 71 } 72 } 73 74 STWriter::~STWriter() 75 { 76 if (writer_) { 77 delete writer_; 78 } 79 } 80 81 Int STWriter::setFormat(const std::string &format) 82 { 83 if (format != format_) { 84 if (writer_) delete writer_; 85 } 86 60 87 format_ = format; 61 88 String t(format_); … … 65 92 } else if (t== "SDFITS") { 66 93 writer_ = new PKSSDwriter(); 67 } else if (t== "ASCII") { 68 writer_ = 0; 69 } else { 70 throw (AipsError("Unrecognized export format")); 71 } 72 } 73 74 STWriter::~STWriter() 75 { 76 if (writer_) { 77 delete writer_; 78 } 79 } 80 81 Int STWriter::setFormat(const std::string &format) 82 { 83 if (format != format_) { 84 if (writer_) delete writer_; 85 } 86 87 format_ = format; 88 String t(format_); 89 t.upcase(); 90 if (t== "MS2") { 91 writer_ = new PKSMS2writer(); 92 } else if (t== "SDFITS") { 93 writer_ = new PKSSDwriter(); 94 } else if (t== "ASCII") { 94 } else if (t == "ASCII" || t == "FITS" || t == "CLASS") { 95 95 writer_ = 0; 96 96 } else { … … 110 110 } else { 111 111 return 1; 112 } 113 } else if ( format_ == "FITS" || format_ == "CLASS") { 114 STFITSImageWriter iw; 115 if (format_ == "CLASS") { 116 iw.setClass(True); 117 } 118 if (iw.write(*in, filename)) { 119 return 0; 112 120 } 113 121 }
Note:
See TracChangeset
for help on using the changeset viewer.