Changeset 2657
- Timestamp:
- 10/10/12 12:17:12 (12 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STFiller.cpp
r2289 r2657 36 36 #include <atnf/PKSIO/NROReader.h> 37 37 #include <casa/Logging/LogIO.h> 38 #include <fits/FITS/FITSSpectralUtil.h> 38 39 39 40 #include <time.h> … … 226 227 Vector<Int> start(nIF_, 1); 227 228 Vector<Int> end(nIF_, 0); 228 reader_->select(beams, ifs, start, end, ref, True, haveXPol_[0], False, getPt); 229 reader_->select(beams, ifs, start, end, ref, True, haveXPol_[0], False, 230 getPt); 229 231 table_->setHeader(*header_); 230 232 //For MS, add the location of POINTING of the input MS so one get … … 249 251 //MS style (as PKSMS2reader converts the original frame 250 252 //in FITS standard style) 251 if (freqFrame == "TOPOCENT") { 252 freqFrame = "TOPO"; 253 } else if (freqFrame == "GEOCENER") { 254 freqFrame = "GEO"; 255 } else if (freqFrame == "BARYCENT") { 256 freqFrame = "BARY"; 257 } else if (freqFrame == "GALACTOC") { 258 freqFrame = "GALACTO"; 259 } else if (freqFrame == "LOCALGRP") { 260 freqFrame = "LGROUP"; 261 } else if (freqFrame == "CMBDIPOL") { 262 freqFrame = "CMB"; 263 } else if (freqFrame == "SOURCE") { 264 freqFrame = "REST"; 265 } 253 MFrequency::Types fframe; 254 FITSSpectralUtil::frameFromSpecsys(fframe, freqFrame); 266 255 // set both "FRAME" and "BASEFRAME" 267 table_->frequencies().setFrame(freqFrame, false); 268 table_->frequencies().setFrame(freqFrame,true); 256 table_->frequencies().setFrame(fframe, false); 257 table_->frequencies().setFrame(fframe,true); 258 269 259 //table_->focus().setParallactify(true); 270 260 } -
trunk/src/STWriter.cpp
r2652 r2657 40 40 41 41 #include <atnf/PKSIO/PKSrecord.h> 42 #ifndef NOPKSMS43 #include <atnf/PKSIO/PKSMS2writer.h>44 #endif45 42 #include <atnf/PKSIO/PKSSDwriter.h> 46 43 #include <atnf/PKSIO/SrcType.h> … … 51 48 #include <tables/Tables/ArrayColumn.h> 52 49 50 #include <fits/FITS/FITSSpectralUtil.h> 51 53 52 #include "STFITSImageWriter.h" 54 53 #include "STAsciiWriter.h" … … 68 67 t.upcase(); 69 68 if (t == "MS2") { 70 #ifdef NOPKSMS71 69 throw (AipsError("MS2 OUTPUT FORMAT IS NO LONGER SUPPORTED")); 72 #else73 writer_ = new PKSMS2writer();74 #endif75 70 } else if (t == "SDFITS") { 76 71 writer_ = new PKSSDwriter(); … … 99 94 t.upcase(); 100 95 if (t== "MS2") { 101 #ifdef NOPKSMS102 96 throw (AipsError("MS2 OUTPUT FORMAT IS NO LONGER SUPPORTED")); 103 #else104 writer_ = new PKSMS2writer();105 #endif106 97 } else if (t== "SDFITS") { 107 98 writer_ = new PKSSDwriter(); … … 121 112 // in asap on-the-fly. 122 113 114 String freqframe; 115 FITSSpectralUtil::specsysFromFrame(freqframe, 116 in->frequencies().getFrame(true)); 123 117 CountedPtr<Scantable> inst = in; 124 118 if (in->frequencies().getFrame(true) != in->frequencies().getFrame(false)) { 119 FITSSpectralUtil::specsysFromFrame(freqframe, 120 in->frequencies().getFrame(false)); 121 125 122 STMath stm(false); 126 123 inst = stm.frequencyAlign(in); … … 151 148 // before. Need to check with the Offline User Test data 152 149 STHeader hdr = inst->getHeader(); 153 //const Int nPol = hdr.npol;154 //const Int nChan = hdr.nchan;155 150 std::vector<uint> ifs = inst->getIFNos(); 156 151 int nIF = inst->nif();//ifs.size(); … … 177 172 // Create the output file and write static data. 178 173 Int status; 179 // status = writer_->create(String(filename), hdr.observer, hdr.project,180 // hdr.antennaname, hdr.antennaposition,181 // hdr.obstype, hdr.fluxunit,182 // hdr.equinox, hdr.freqref,183 // nChan, nPol, havexpol, False);184 174 status = writer_->create(String(filename), hdr.observer, hdr.project, 185 175 inst->getAntennaName(), hdr.antennaposition, 186 176 hdr.obstype, hdr.fluxunit, 187 hdr.equinox, hdr.freqref,177 hdr.equinox, freqframe, 188 178 nChan, nPol, havexpol, False); 189 179 if ( status ) {
Note:
See TracChangeset
for help on using the changeset viewer.