- Timestamp:
- 10/10/12 14:53:53 (12 years ago)
- Location:
- tags/asap-4.1.0
- Files:
-
- 5 deleted
- 31 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
tags/asap-4.1.0
-
tags/asap-4.1.0/CHANGELOG
r2531 r2662 2 2 ========= 3 3 4 Release 4.1.0 [2012-1 7-05]4 Release 4.1.0 [2012-10-10] 5 5 6 6 * reworked build system to work as 'normal' python package … … 8 8 * experimental merging of IFs 9 9 * speed ups 10 * moveto ipython>=0.1110 * work with to ipython>=0.11 11 11 * Ticket #269 fixed regression of reference scan detection for Hobart data 12 * work under OS X 10.7 12 * work under OS X 10.7/10.8 13 13 * fixed logging control through rcParams 14 14 * fix for frequency_alignment 15 15 * Ticket #264 silence skydip. 16 16 * Ticket #265 fix summary for multiple IF chains 17 * Ticket #280 fix SDFITS frequency frame output 17 18 18 19 Release 4.0.0 [2011-10-05] -
tags/asap-4.1.0/Makefile
- Property svn:mergeinfo changed (with no actual effect on merging)
-
tags/asap-4.1.0/SConstruct
- Property svn:mergeinfo changed (with no actual effect on merging)
-
tags/asap-4.1.0/apps
- Property svn:mergeinfo changed (with no actual effect on merging)
-
tags/asap-4.1.0/external-alma
- Property svn:mergeinfo changed (with no actual effect on merging)
-
tags/asap-4.1.0/external-alma/atnf/pks/pks_maths.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
tags/asap-4.1.0/getsvnrev.sh
- Property svn:mergeinfo changed (with no actual effect on merging)
-
tags/asap-4.1.0/python
- Property svn:mergeinfo changed (with no actual effect on merging)
-
tags/asap-4.1.0/python/__init__.py
r2649 r2662 59 59 60 60 __date__ = '$Date$'.split()[1] 61 __version__ = ' trunk'61 __version__ = '4.1.0' 62 62 __revision__ = get_revision() 63 63 -
tags/asap-4.1.0/src
- Property svn:mergeinfo changed
/trunk/src (added) merged: 2657-2658
- Property svn:mergeinfo changed
-
tags/asap-4.1.0/src/FillerWrapper.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
tags/asap-4.1.0/src/SConscript
- Property svn:mergeinfo changed (with no actual effect on merging)
-
tags/asap-4.1.0/src/STAsciiWriter.cpp
r2335 r2662 44 44 #include <casa/sstream.h> 45 45 #include <casa/iomanip.h> 46 #include <casa/Logging/LogIO.h> 46 47 47 48 #include <measures/Measures/MEpoch.h> … … 176 177 } 177 178 of.close(); 178 ostringstream oss; 179 oss << "Wrote " << fName; 180 pushLog(String(oss)); 179 LogIO os( LogOrigin( "STAsciiWriter") ) ; 180 os << "Wrote " << fName << LogIO::POST; 181 181 ++iter; 182 182 } -
tags/asap-4.1.0/src/STAsciiWriter.h
r1106 r2662 37 37 38 38 #include "Scantable.h" 39 #include "Logger.h" 39 40 40 41 41 namespace casa { … … 48 48 * A class to export a Scnatble to ASCII file(s) 49 49 */ 50 class STAsciiWriter : public Logger{50 class STAsciiWriter { 51 51 public: 52 52 // Constructor -
tags/asap-4.1.0/src/STAttr.cpp
r2163 r2662 37 37 #include <casa/Quanta/Quantum.h> 38 38 #include <casa/Quanta/MVTime.h> 39 #include <casa/Logging/LogIO.h> 39 40 40 41 #include <measures/Measures/MEpoch.h> … … 52 53 } 53 54 54 STAttr::STAttr(const STAttr& other): 55 Logger() 55 STAttr::STAttr(const STAttr& other) 56 56 { 57 57 (void) other; //suppress unused warning … … 123 123 const Vector<Float>& freqs) const 124 124 { 125 126 // Look at date where appropriate125 casa::LogIO os( casa::LogOrigin( "STAttr", "beamEfficiency()" ) ); 126 // Look at date where appropriate 127 127 MVTime t(dateObs.getValue()); 128 128 uInt year = t.year(); … … 133 133 { 134 134 if (year<2003) { 135 pushLog("There is no beam efficiency data from before 2003"136 " - using 2003 data");135 os << "There is no beam efficiency data from before 2003" 136 <<" - using 2003 data" << casa::LogIO::POST; 137 137 facs = interp(freqs/1.0e9f, MopEtaBeamX_, MopEtaBeam2003Y_); 138 138 } else if (year==2003) { 139 pushLog("Using beam efficiency data from 2003");139 os << "Using beam efficiency data from 2003" << casa::LogIO::POST; 140 140 facs = interp(freqs/1.0e9f, MopEtaBeamX_, MopEtaBeam2003Y_); 141 141 } else { 142 pushLog("Using beam efficiency data from 2004");142 os << "Using beam efficiency data from 2004" << casa::LogIO::POST; 143 143 facs = interp(freqs/1.0e9f, MopEtaBeamX_, MopEtaBeam2004Y_); 144 144 } … … 147 147 default: 148 148 { 149 pushLog("No beam efficiency data for this instrument - assuming unity"); 149 os << "No beam efficiency data for this instrument - assuming unity" 150 << casa::LogIO::POST; 150 151 } 151 152 } … … 157 158 const Vector<Float>& freqs) const 158 159 { 159 160 casa::LogIO os( casa::LogOrigin( "STAttr", "apertureEfficiency()" ) ); 160 161 // Look at date where appropriate 161 162 MVTime t(dateObs.getValue()); … … 167 168 { 168 169 if (year<2004) { 169 pushLog("There is no aperture efficiency data from before 2004"170 " - using 2004 data");170 os << "There is no aperture efficiency data from before 2004" 171 << " - using 2004 data" << casa::LogIO::POST; 171 172 facs = interp(freqs/1.0e9f, MopEtaApX_, MopEtaAp2004Y_); 172 173 } else { 173 pushLog("Using aperture efficiency data from 2004");174 os << "Using aperture efficiency data from 2004" << casa::LogIO::POST; 174 175 facs = interp(freqs/1.0e9f, MopEtaApX_, MopEtaAp2004Y_); 175 176 } … … 183 184 default: 184 185 { 185 pushLog("No aperture efficiency data for this instrument"186 " - assuming unity");186 os << "No aperture efficiency data for this instrument" 187 << " - assuming unity" << casa::LogIO::POST; 187 188 } 188 189 } -
tags/asap-4.1.0/src/STAttr.h
r1346 r2662 38 38 #include <casa/Utilities/CountedPtr.h> 39 39 40 #include "Logger.h"41 40 #include "STDefs.h" 42 41 … … 47 46 namespace asap { 48 47 49 class STAttr : public Logger{48 class STAttr { 50 49 51 50 public: -
tags/asap-4.1.0/src/STFITSImageWriter.cpp
r1823 r2662 30 30 //#--------------------------------------------------------------------------- 31 31 32 32 33 #include <fitsio.h> 33 #include <images/Images/TempImage.h> 34 #include <casa/Containers/RecordField.h> 35 #include <casa/Logging/LogIO.h> 34 36 35 37 #include <lattices/Lattices/ArrayLattice.h> … … 41 43 #include <tables/Tables/TableIter.h> 42 44 #include <tables/Tables/TableRecord.h> 43 #include <casa/Containers/RecordField.h> 45 44 46 #include <tables/Tables/TableRow.h> 45 47 #include <tables/Tables/ScalarColumn.h> … … 271 273 } 272 274 fits_close_file(fptr, &status); 273 ostringstream oss; 274 oss << "Wrote " << fileName; 275 pushLog(String(oss)); 276 //pushLog(String(oss)); 275 276 LogIO os( casa::LogOrigin("STFITSImageWriter")); 277 os << "Wrote " << fileName << LogIO::POST; 277 278 ++iter; 278 279 } -
tags/asap-4.1.0/src/STFITSImageWriter.h
r1823 r2662 33 33 34 34 #include <casa/aips.h> 35 #include <casa/BasicSL/String.h>36 #include <casa/ostream.h>37 35 38 36 #include <coordinates/Coordinates/DirectionCoordinate.h> 39 #include "Scantable.h" 40 #include "Logger.h" 37 38 //#include "Scantable.h" 39 40 namespace casa { 41 class String; 42 } 41 43 42 44 namespace asap { 45 46 class Scantable; 47 48 43 49 /** 44 50 * A class to export a Scantable to FITS file(s) 45 51 */ 46 class STFITSImageWriter : public Logger{52 class STFITSImageWriter { 47 53 public: 48 54 // Constructor -
tags/asap-4.1.0/src/STFiller.cpp
r2289 r2662 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> … … 137 138 // Get basic parameters. 138 139 if ( anyEQ(haveXPol_, True) ) { 139 pushLog("Cross polarization present");140 140 for (uInt i=0; i< npols.nelements();++i) { 141 141 if (npols[i] < 3) npols[i] += 2;// Convert Complex -> 2 Floats … … 164 164 throw(AipsError("Failed to get header.")); 165 165 } 166 LogIO os( casa::LogOrigin( "STFiller") ); 167 166 168 if ((header_->obstype).matches("*SW*")) { 167 169 // need robust way here - probably read ahead of next timestamp 168 pushLog("Header indicates frequency switched observation.\n"169 "setting # of IFs = 1 ");170 os << "Header indicates frequency switched observation.\n" 171 << "setting # of IFs = 1 " << LogIO::POST; 170 172 nIF_ = 1; 171 173 header_->obstype = String("fswitch"); … … 226 228 Vector<Int> start(nIF_, 1); 227 229 Vector<Int> end(nIF_, 0); 228 reader_->select(beams, ifs, start, end, ref, True, haveXPol_[0], False, getPt); 230 reader_->select(beams, ifs, start, end, ref, True, haveXPol_[0], False, 231 getPt); 229 232 table_->setHeader(*header_); 230 233 //For MS, add the location of POINTING of the input MS so one get … … 249 252 //MS style (as PKSMS2reader converts the original frame 250 253 //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 } 254 MFrequency::Types fframe; 255 FITSSpectralUtil::frameFromSpecsys(fframe, freqFrame); 266 256 // set both "FRAME" and "BASEFRAME" 267 table_->frequencies().setFrame(freqFrame, false); 268 table_->frequencies().setFrame(freqFrame,true); 257 table_->frequencies().setFrame(fframe, false); 258 table_->frequencies().setFrame(fframe,true); 259 269 260 //table_->focus().setParallactify(true); 270 261 } -
tags/asap-4.1.0/src/STFiller.h
r1819 r2662 24 24 #include "Scantable.h" 25 25 #include "STHeader.h" 26 #include "Logger.h" 26 27 27 28 28 class PKSreader; … … 39 39 @version 2.0a 40 40 */ 41 class STFiller : public Logger{41 class STFiller { 42 42 public: 43 43 -
tags/asap-4.1.0/src/STFrequencies.cpp
r2243 r2662 15 15 #include <casa/Containers/RecordField.h> 16 16 #include <casa/Arrays/IPosition.h> 17 #include <casa/Logging/LogIO.h> 17 18 18 19 #include <tables/Tables/TableDesc.h> … … 264 265 if (!MFrequency::getType(mft, rf)) { 265 266 ostringstream oss; 266 pushLog("WARNING: Frequency type unknown assuming TOPO"); 267 LogIO os( casa::LogOrigin( "STFrequencies", "getFrame") ); 268 os << LogIO::WARN << "WARNING: Frequency type unknown assuming TOPO" 269 << LogIO::POST; 267 270 mft = MFrequency::TOPO; 268 271 } -
tags/asap-4.1.0/src/STMath.cpp
r2643 r2662 388 388 cycColOut.put(i, uInt(0)); 389 389 } else { 390 ostringstream oss; 391 oss << "For output row="<<i<<", all input rows of data are flagged. no averaging" << endl; 392 pushLog(String(oss)); 390 os << "For output row="<<i<<", all input rows of data are flagged. no averaging" << LogIO::POST; 393 391 } 394 392 acc.reset(); … … 1252 1250 casa::Float tau ) 1253 1251 { 1252 LogIO os( casa::LogOrigin( "STMath", "dosigref()")); 1254 1253 if ( ! ref->conformant(*sig) ) { 1255 1254 throw(AipsError("'sig' and 'ref' scantables are not conformant.")); … … 1263 1262 smref = smooth(ref, inkernel, fsmoothref ); 1264 1263 ostringstream oss; 1265 os s<<"Applied smoothing of "<<fsmoothref<<" on the reference."<<endl;1266 pushLog(String(oss));1264 os <<"Applied smoothing of "<<fsmoothref<<" on the reference." 1265 << LogIO::POST; 1267 1266 } 1268 1267 else { … … 1309 1308 Float elev; 1310 1309 refelevCol.get(i, elev); 1311 os s<< "user specified Tsys = " << tsysv;1310 os << "user specified Tsys = " << tsysv; 1312 1311 // do recalc elevation if EL = 0 1313 1312 if ( elev == 0 ) { … … 1320 1319 } 1321 1320 } 1322 oss << ", corrected (for El) tsys= "<<tsysrefscalar; 1323 pushLog(String(oss)); 1321 os << ", corrected (for El) tsys= "<<tsysrefscalar; 1324 1322 } 1325 1323 else { … … 1357 1355 { 1358 1356 setInsitu(false); 1357 LogIO os( casa::LogOrigin( "STMath", "donod()")); 1359 1358 STSelector sel; 1360 1359 std::vector<int> scan1, scan2, beams, types; … … 1444 1443 1445 1444 msg=String("Processing dototalpower for subset of the data"); 1446 ostringstream oss1; 1447 oss1 << msg << endl; 1448 pushLog(String(oss1)); 1445 os << msg << LogIO::POST; 1449 1446 // Debug for IRC CS data 1450 1447 //float tcal1=7.0; … … 1459 1456 // dosigref calibration 1460 1457 msg=String("Processing dosigref for subset of the data"); 1461 ostringstream oss2; 1462 oss2 << msg << endl; 1463 pushLog(String(oss2)); 1458 os << msg << endl; 1464 1459 calb1=dosigref(sig1,ref2,smoothref,tsysv,tau); 1465 1460 calb2=dosigref(sig2,ref1,smoothref,tsysv,tau); … … 2161 2156 const std::string& method) 2162 2157 { 2158 LogIO os( LogOrigin( "STMath", "gainElevation", WHERE ) ) ; 2163 2159 // Get elevation data from Scantable and convert to degrees 2164 2160 CountedPtr< Scantable > out = getScantable(in, false); … … 2203 2199 throw(AipsError("There is no known gain-elevation polynomial known for this instrument")); 2204 2200 } 2205 ostringstream oss; 2206 oss << "Making polynomial correction with " << msg << " coefficients:" << endl; 2207 oss << " " << coeff; 2208 pushLog(String(oss)); 2201 os << "Making polynomial correction with " << msg << " coefficients:" << endl; 2202 os << " " << coeff << LogIO::POST; 2209 2203 const uInt nrow = tab.nrow(); 2210 2204 Vector<Float> factor(nrow); … … 2217 2211 } else { 2218 2212 // Read and correct 2219 pushLog("Making correction from ascii Table");2213 os << "Making correction from ascii Table" << LogIO::POST; 2220 2214 scaleFromAsciiTable(tab, filename, method, x, true); 2221 2215 } … … 2288 2282 float jyperk ) 2289 2283 { 2284 LogIO os( LogOrigin( "STMath", "convertFlux", WHERE ) ) ; 2285 2290 2286 CountedPtr< Scantable > out = getScantable(in, false); 2291 2287 Table& tab = in->table(); … … 2299 2295 2300 2296 if ( fluxUnit == JY ) { 2301 pushLog("Converting to K");2297 os << "Converting to K" << LogIO::POST; 2302 2298 Quantum<Double> t(1.0,fluxUnit); 2303 2299 Quantum<Double> t2 = t.get(JY); … … 2307 2303 out->setFluxUnit("K"); 2308 2304 } else if ( fluxUnit == K ) { 2309 pushLog("Converting to Jy");2305 os << "Converting to Jy" << LogIO::POST; 2310 2306 Quantum<Double> t(1.0,fluxUnit); 2311 2307 Quantum<Double> t2 = t.get(K); … … 2324 2320 factor *= jyperk; 2325 2321 if ( tokelvin ) factor = 1.0 / jyperk; 2326 ostringstream oss; 2327 oss << "Jy/K = " << jyperk; 2328 pushLog(String(oss)); 2322 os << "Jy/K = " << jyperk << LogIO::POST; 2329 2323 Vector<Float> factors(outtab.nrow(), factor); 2330 2324 scaleByVector(outtab,factors, false); … … 2338 2332 } 2339 2333 jyperk = STAttr::findJyPerK(etaap, d); 2340 ostringstream oss; 2341 oss << "Jy/K = " << jyperk; 2342 pushLog(String(oss)); 2334 os << "Jy/K = " << jyperk << LogIO::POST; 2343 2335 factor *= jyperk; 2344 2336 if ( tokelvin ) { … … 2354 2346 // change per integration. 2355 2347 2356 pushLog("Looking up conversion factors");2348 os <<"Looking up conversion factors" << LogIO::POST; 2357 2349 convertBrightnessUnits(out, tokelvin, cfac); 2358 2350 } … … 2547 2539 if ( ! (*it)->conformant(*out) ) { 2548 2540 // non conformant. 2549 //pushLog(String("Warning: Can't merge scantables as header info differs."));2550 2541 LogIO os( LogOrigin( "STMath", "merge()", WHERE ) ) ; 2551 2542 os << LogIO::SEVERE << "Can't merge scantables as header informations (any one of AntennaName, Equinox, and FluxUnit) differ." << LogIO::EXCEPTION ; … … 2746 2737 const std::string & method) 2747 2738 { 2739 LogIO os( casa::LogOrigin("STMath", "frequencyAlign()", WHERE)); 2748 2740 // clone as this is not working insitu 2749 2741 bool insitu = insitu_; … … 2784 2776 MVTime mvt(refEpoch.getValue()); 2785 2777 String epochout = mvt.string(MVTime::YMD) + String(" (") + refEpoch.getRefString() + String(")"); 2786 ostringstream oss; 2787 oss << "Aligned at reference Epoch " << epochout 2788 << " in frame " << MFrequency::showType(system); 2789 pushLog(String(oss)); 2778 os << "Aligned at reference Epoch " << epochout 2779 << " in frame " << MFrequency::showType(system) << LogIO::POST; 2790 2780 // set up the iterator 2791 2781 Block<String> cols(4); -
tags/asap-4.1.0/src/STMath.h
r2580 r2662 23 23 #include <scimath/Mathematics/InterpolateArray1D.h> 24 24 25 #include "Logger.h"26 25 #include "Scantable.h" 27 26 #include "STDefs.h" … … 34 33 * @author Malte Marquarding 35 34 */ 36 class STMath : private Logger{35 class STMath { 37 36 public: 38 37 // typedef for long method name -
tags/asap-4.1.0/src/STSubTable.h
r894 r2662 16 16 #include <tables/Tables/ScalarColumn.h> 17 17 18 #include "Logger.h" 18 19 19 20 20 namespace asap { … … 28 28 @version $Revision:$ 29 29 */ 30 class STSubTable : public Logger{30 class STSubTable { 31 31 public: 32 32 STSubTable() {;} -
tags/asap-4.1.0/src/STWriter.cpp
r2652 r2662 38 38 #include <casa/Utilities/CountedPtr.h> 39 39 #include <casa/Utilities/Assert.h> 40 #include <casa/Logging/LogIO.h> 40 41 41 42 #include <atnf/PKSIO/PKSrecord.h> 42 #ifndef NOPKSMS43 #include <atnf/PKSIO/PKSMS2writer.h>44 #endif45 43 #include <atnf/PKSIO/PKSSDwriter.h> 46 44 #include <atnf/PKSIO/SrcType.h> … … 51 49 #include <tables/Tables/ArrayColumn.h> 52 50 51 #include <fits/FITS/FITSSpectralUtil.h> 52 53 53 #include "STFITSImageWriter.h" 54 54 #include "STAsciiWriter.h" … … 68 68 t.upcase(); 69 69 if (t == "MS2") { 70 #ifdef NOPKSMS71 70 throw (AipsError("MS2 OUTPUT FORMAT IS NO LONGER SUPPORTED")); 72 #else73 writer_ = new PKSMS2writer();74 #endif75 71 } else if (t == "SDFITS") { 76 72 writer_ = new PKSSDwriter(); … … 99 95 t.upcase(); 100 96 if (t== "MS2") { 101 #ifdef NOPKSMS102 97 throw (AipsError("MS2 OUTPUT FORMAT IS NO LONGER SUPPORTED")); 103 #else104 writer_ = new PKSMS2writer();105 #endif106 98 } else if (t== "SDFITS") { 107 99 writer_ = new PKSSDwriter(); … … 121 113 // in asap on-the-fly. 122 114 115 String freqframe; 116 FITSSpectralUtil::specsysFromFrame(freqframe, 117 in->frequencies().getFrame(true)); 123 118 CountedPtr<Scantable> inst = in; 124 119 if (in->frequencies().getFrame(true) != in->frequencies().getFrame(false)) { 120 FITSSpectralUtil::specsysFromFrame(freqframe, 121 in->frequencies().getFrame(false)); 122 125 123 STMath stm(false); 126 124 inst = stm.frequencyAlign(in); … … 151 149 // before. Need to check with the Offline User Test data 152 150 STHeader hdr = inst->getHeader(); 153 //const Int nPol = hdr.npol;154 //const Int nChan = hdr.nchan;155 151 std::vector<uint> ifs = inst->getIFNos(); 156 152 int nIF = inst->nif();//ifs.size(); … … 177 173 // Create the output file and write static data. 178 174 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 175 status = writer_->create(String(filename), hdr.observer, hdr.project, 185 176 inst->getAntennaName(), hdr.antennaposition, 186 177 hdr.obstype, hdr.fluxunit, 187 hdr.equinox, hdr.freqref,178 hdr.equinox, freqframe, 188 179 nChan, nPol, havexpol, False); 189 180 if ( status ) { … … 331 322 ++scanit; 332 323 } 333 ostringstream oss;334 os s << "STWriter: wrote " << count << " rows to " << filename;335 pushLog(String(oss));336 324 LogIO os( casa::LogOrigin("STWriter")); 325 os << "STWriter: wrote " << count << " rows to " << filename 326 << casa::LogIO::POST; 327 337 328 writer_->close(); 338 //if MS2 delete POINTING table exists and copy the one in the keyword 339 if ( format_ == "MS2" ) { 340 replacePtTab(table, filename); 341 } 329 342 330 return 0; 343 331 } … … 390 378 } 391 379 392 // For writing MS data, if there is the reference to393 // original pointing table it replace it by it.394 void STWriter::replacePtTab (const Table& tab, const std::string& fname)395 {396 String oldPtTabName = fname;397 oldPtTabName.append("/POINTING");398 if ( tab.keywordSet().isDefined("POINTING") ) {399 String PointingTab = tab.keywordSet().asString("POINTING");400 if ( Table::isReadable(PointingTab) ) {401 Table newPtTab(PointingTab, Table::Old);402 newPtTab.copy(oldPtTabName, Table::New);403 ostringstream oss;404 oss << "STWriter: copied " <<PointingTab << " to " << fname;405 pushLog(String(oss));406 }407 }408 }409 380 410 381 // get obsType string from SRCTYPE value -
tags/asap-4.1.0/src/STWriter.h
r2163 r2662 38 38 #include <casa/BasicSL/String.h> 39 39 40 #include "Logger.h"41 40 #include "Scantable.h" 42 41 … … 53 52 * @version 2.0a 54 53 */ 55 class STWriter : public Logger{54 class STWriter { 56 55 public: 57 56 explicit STWriter(const string &format = "SDFITS"); … … 82 81 const casa::Table& tab); 83 82 84 void replacePtTab(const casa::Table& tab, const std::string& fname);85 86 83 casa::String getObsTypes( casa::Int srctype ) ; 87 84 -
tags/asap-4.1.0/src/Scantable.cpp
r2645 r2662 20 20 #include <casa/OS/File.h> 21 21 #include <casa/OS/Path.h> 22 #include <casa/Logging/LogIO.h> 22 23 #include <casa/Arrays/Array.h> 23 24 #include <casa/Arrays/ArrayAccessor.h> … … 168 169 */ 169 170 170 Scantable::Scantable( const Scantable& other, bool clear ): 171 Logger() 171 Scantable::Scantable( const Scantable& other, bool clear ) 172 172 { 173 173 // with or without data … … 726 726 727 727 void Scantable::calculateAZEL() 728 { 728 { 729 LogIO os( LogOrigin( "Scantable", "calculateAZEL()", WHERE ) ) ; 729 730 MPosition mp = getAntennaPosition(); 730 731 MEpoch::ROScalarColumn timeCol(table_, "TIME"); 731 732 ostringstream oss; 732 oss << "Computed azimuth/elevation using " << endl 733 << mp << endl; 733 oss << mp; 734 os << "Computed azimuth/elevation using " << endl 735 << String(oss) << endl; 734 736 for (Int i=0; i<nrow(); ++i) { 735 737 MEpoch me = timeCol(i); 736 738 MDirection md = getDirection(i); 737 oss << " Time: " << formatTime(me,False) << " Direction: " << formatDirection(md) 739 os << " Time: " << formatTime(me,False) 740 << " Direction: " << formatDirection(md) 738 741 << endl << " => "; 739 742 MeasFrame frame(mp, me); … … 744 747 azCol_.put(i,Float(azel[0])); 745 748 elCol_.put(i,Float(azel[1])); 746 oss << "azel: " << azel[0]/C::pi*180.0 << " " 747 << azel[1]/C::pi*180.0 << " (deg)" << endl; 748 } 749 pushLog(String(oss)); 749 os << "azel: " << azel[0]/C::pi*180.0 << " " 750 << azel[1]/C::pi*180.0 << " (deg)" << LogIO::POST; 751 } 750 752 } 751 753 … … 885 887 const std::string& poltype ) const 886 888 { 889 LogIO os( LogOrigin( "Scantable", "getSpectrum()", WHERE ) ) ; 890 887 891 String ptype = poltype; 888 892 if (poltype == "" ) ptype = getPolType(); … … 907 911 } 908 912 if ( arr.nelements() == 0 ) 909 pushLog("Not enough polarisations present to do the conversion."); 913 914 os << "Not enough polarisations present to do the conversion." 915 << LogIO::POST; 910 916 arr.tovector(out); 911 917 return out; -
tags/asap-4.1.0/src/Scantable.h
r2645 r2662 39 39 #include <tables/Tables/Table.h> 40 40 41 #include "Logger.h" 41 42 42 #include "MathUtils.h" 43 43 #include "STFit.h" … … 74 74 * @version 75 75 */ 76 class Scantable : private Logger76 class Scantable 77 77 { 78 78 -
tags/asap-4.1.0/src/python_asap.cpp
r2613 r2662 81 81 asap::python::python_MSWriter(); 82 82 asap::python::python_LineCatalog(); 83 asap::python::python_Logger();84 83 asap::python::python_LogSink(); 85 84 asap::python::python_STCoordinate(); -
tags/asap-4.1.0/test/test_nrofiller.py
r1853 r2662 8 8 9 9 from nose.tools import * 10 from nose.plugins.skip import SkipTest 10 11 11 12 def tempdir_setup(): … … 45 46 assert_equal(self.st.stats('sum')[0],2183.681396484375) 46 47 48 47 49 def test_frequency(self): 50 raise SkipTest("Currently disabled") 48 51 rf=self.st.get_restfreqs() 49 52 assert_equal(len(rf),2)
Note:
See TracChangeset
for help on using the changeset viewer.