ArrayIO.tcc   ArrayIO.tcc 
skipping to change at line 26 skipping to change at line 26
//# along with this library; if not, write to the Free Software Foundation, //# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# $Id: ArrayIO.tcc 20739 2009-09-29 01:15:15Z Malte.Marquarding $ //# $Id: ArrayIO.tcc 21368 2013-08-06 12:39:41Z gervandiepen $
//# Includes //# Includes
#include <casa/Arrays/ArrayIO.h> #include <casa/Arrays/ArrayIO.h>
#include <casa/Arrays/Array.h> #include <casa/Arrays/Array.h>
#include <casa/Arrays/ArrayError.h> #include <casa/Arrays/ArrayError.h>
#include <casa/Arrays/Matrix.h> #include <casa/Arrays/Matrix.h>
#include <casa/Arrays/Vector.h> #include <casa/Arrays/Vector.h>
#include <casa/Arrays/ArrayPosIter.h> #include <casa/Arrays/ArrayPosIter.h>
#include <casa/IO/AipsIO.h> #include <casa/IO/AipsIO.h>
#include <casa/IO/AipsIOCarray.h> #include <casa/IO/AipsIOCarray.h>
skipping to change at line 153 skipping to change at line 153
template<class T> template<class T>
AipsIO &operator<<(AipsIO &ios, const Array<T> &a) AipsIO &operator<<(AipsIO &ios, const Array<T> &a)
{ {
putArray (ios, a, "Array"); putArray (ios, a, "Array");
return ios; return ios;
} }
template<class T> template<class T>
void putArray (AipsIO &ios, const Array<T> &a, const Char* name) void putArray (AipsIO &ios, const Array<T> &a, const Char* name)
{ {
if (a.size() * sizeof(T) > 2147483647) {
throw AipsError("AipsIO putArray too large (exceeds 2**31 bytes)");
}
ios.putstart(name, Array<T>::arrayVersion()); ios.putstart(name, Array<T>::arrayVersion());
// Write out dimensionality // Write out dimensionality
ios << a.ndim(); ios << a.ndim();
// Write out length // Write out length
for (uInt i=0; i < a.ndim(); i++) { for (uInt i=0; i < a.ndim(); i++) {
ios << uInt(a.shape()(i)); ios << uInt(a.shape()(i));
} }
// Now write out the data // Now write out the data
Bool deleteIt; Bool deleteIt;
const T *storage = a.getStorage(deleteIt); const T *storage = a.getStorage(deleteIt);
 End of changes. 2 change blocks. 
1 lines changed or deleted 4 lines changed or added


 BaseTable.h   BaseTable.h 
skipping to change at line 26 skipping to change at line 26
//# along with this library; if not, write to the Free Software Foundation, //# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# $Id: BaseTable.h 21025 2011-03-03 15:09:00Z gervandiepen $ //# $Id: BaseTable.h 21398 2013-11-11 13:42:56Z gervandiepen $
#ifndef TABLES_BASETABLE_H #ifndef TABLES_BASETABLE_H
#define TABLES_BASETABLE_H #define TABLES_BASETABLE_H
//# Includes //# Includes
#include <casa/aips.h> #include <casa/aips.h>
#include <tables/Tables/TableInfo.h> #include <tables/Tables/TableInfo.h>
#include <tables/Tables/TableDesc.h> #include <tables/Tables/TableDesc.h>
#include <casa/Utilities/Compare.h> #include <casa/Utilities/Compare.h>
#include <casa/Utilities/CountedPtr.h> #include <casa/Utilities/CountedPtr.h>
skipping to change at line 556 skipping to change at line 556
// Get the rownrs of the table in ascending order to be // Get the rownrs of the table in ascending order to be
// used in the logical operation on the table. // used in the logical operation on the table.
uInt logicRows (uInt*& rownrs, Bool& allocated); uInt logicRows (uInt*& rownrs, Bool& allocated);
// Make an empty table description. // Make an empty table description.
// This is used if one asks for the description of a NullTable. // This is used if one asks for the description of a NullTable.
// Creating an empty TableDesc in the NullTable takes too much time. // Creating an empty TableDesc in the NullTable takes too much time.
// Furthermore it causes static initialization order problems. // Furthermore it causes static initialization order problems.
const TableDesc& makeTableDesc() const; const TableDesc& makeTableDesc() const;
// Make the name absolute.
// It first checks if the name contains valid characters (not only . an
d /).
String makeAbsoluteName (const String& name) const;
}; };
} //# NAMESPACE CASA - END } //# NAMESPACE CASA - END
#endif #endif
 End of changes. 2 change blocks. 
1 lines changed or deleted 6 lines changed or added


 ConcatTable.h   ConcatTable.h 
skipping to change at line 26 skipping to change at line 26
//# along with this library; if not, write to the Free Software Foundation, //# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# $Id: ConcatTable.h 21025 2011-03-03 15:09:00Z gervandiepen $ //# $Id: ConcatTable.h 21254 2012-07-18 06:20:53Z gervandiepen $
#ifndef TABLES_CONCATTABLE_H #ifndef TABLES_CONCATTABLE_H
#define TABLES_CONCATTABLE_H #define TABLES_CONCATTABLE_H
//# Includes //# Includes
#include <casa/aips.h> #include <casa/aips.h>
#include <tables/Tables/BaseTable.h> #include <tables/Tables/BaseTable.h>
#include <tables/Tables/ConcatRows.h> #include <tables/Tables/ConcatRows.h>
#include <tables/Tables/TableRecord.h> #include <tables/Tables/TableRecord.h>
#include <tables/Tables/Table.h> #include <tables/Tables/Table.h>
skipping to change at line 119 skipping to change at line 119
// <li> Allow to remove a row or column from the ConcatTable // <li> Allow to remove a row or column from the ConcatTable
// <li> Allow to rename a column in the ConcatTable // <li> Allow to rename a column in the ConcatTable
// <li> Maybe implement doSort one time for a more efficient sort. // <li> Maybe implement doSort one time for a more efficient sort.
// (now everything is handled by BaseTable). // (now everything is handled by BaseTable).
// </todo> // </todo>
class ConcatTable : public BaseTable class ConcatTable : public BaseTable
{ {
public: public:
// Create a reference table object referencing the // Create a virtual table as the concatenation of the given tables.
// given BaseTable object. // It checks if the table descriptions of the tables are the same.
// If the BaseTable is actually another ConcatTable, it will reference // Subtables with the given names will be concatenated as well.
// its referenced table (thus the original table) and it will // It is assumed that the other subtables are the same for all tables,
// take its vector of row numbers and projected column names // so the ones of the first table are used.
// into account. Thus if a select is done on a projected table, // <br>The option can be Table::Old or Table::Update.
// the resulting ConcatTable will have the same projection. // <br>If a non-empty subdirectory name is given, the tables will
// be moved to that subdirectory when the concatenated table is written
// (by writeConcatTable).
// <group> // <group>
ConcatTable (const Block<BaseTable*>& tables, ConcatTable (const Block<BaseTable*>& tables,
const Block<String>& subTables); const Block<String>& subTables,
const String& subDirName);
ConcatTable (const Block<String>& tableNames, ConcatTable (const Block<String>& tableNames,
const Block<String>& subTables, const Block<String>& subTables,
const String& subDirName,
int option, int option,
const TableLock& lockOptions, const TableLock& lockOptions,
const TSMOption& tsmOption); const TSMOption& tsmOption);
// </group> // </group>
// Create a concat table out of a file (written by writeConcatTable). // Create a concat table out of a file (written by writeConcatTable).
// The referenced tables will also be opened (if not stored in the cach e). // The referenced tables will also be opened (if not stored in the cach e).
ConcatTable (AipsIO&, const String& name, uInt nrrow, int option, ConcatTable (AipsIO&, const String& name, uInt nrrow, int option,
const TableLock& lockOptions, const TSMOption& tsmOption); const TableLock& lockOptions, const TSMOption& tsmOption);
skipping to change at line 312 skipping to change at line 316
// Assignment is forbidden, because copying a table requires // Assignment is forbidden, because copying a table requires
// some more knowledge (like table name of result). // some more knowledge (like table name of result).
// Declaring it private, makes it unusable. // Declaring it private, makes it unusable.
ConcatTable& operator= (const ConcatTable&); ConcatTable& operator= (const ConcatTable&);
// Show the extra table structure info (names of used tables). // Show the extra table structure info (names of used tables).
void showStructureExtra (std::ostream&) const; void showStructureExtra (std::ostream&) const;
// Open all tables in the required way. // Open all tables in the required way.
void openTables (const Block<String>& tableNames, Int option, void openTables (const Block<String>& tableNames, int option,
const TableLock& lockOptions, const TSMOption& tsmOptio n); const TableLock& lockOptions, const TSMOption& tsmOptio n);
// Initialize. // Initialize.
// It checks if the descriptions of all tables are equal. // It checks if the descriptions of all tables are equal.
// It creates the keyword setfor which it concatenates subtables as nee ded. // It creates the keyword setfor which it concatenates subtables as nee ded.
void initialize(); void initialize();
// Setup the main parts of the object. // Setup the main parts of the object.
// <br>First create the name map (mapping column name in ConcatTable to // <br>First create the name map (mapping column name in ConcatTable to
// the column in the original table). // the column in the original table).
// If the BaseTable is a ConcatTable, use its name map. // If the BaseTable is a ConcatTable, use its name map.
// Otherwise create the initial name map from the table description. // Otherwise create the initial name map from the table description.
// A rename might change the map. // A rename might change the map.
// <br>Create the ConcatColumn objects. // <br>Create the ConcatColumn objects.
// <br>Create the initial TableInfo as a copy of the original BaseTable . // <br>Create the initial TableInfo as a copy of the original BaseTable .
void setup (BaseTable* btp, const Vector<String>& columnNames); void setup (BaseTable* btp, const Vector<String>& columnNames);
// Add lines containing the concatenated tables to the info.
void addInfo();
// Create the ConcatColumn objects for all columns in the description. // Create the ConcatColumn objects for all columns in the description.
void makeConcatCol(); void makeConcatCol();
// Handle the subtales that have to be concatenated. // Handle the subtales that have to be concatenated.
void handleSubTables(); void handleSubTables();
// Write a reference table. // Write a reference table.
void writeConcatTable (Bool fsync); void writeConcatTable (Bool fsync);
// Check if the column can be added, thus does not exist yet. // Check if the column can be added, thus does not exist yet.
void checkAddColumn (const String& name, Bool addToParent); void checkAddColumn (const String& name, Bool addToParent);
//# Data members //# Data members
Block<String> subTableNames_p; Block<String> subTableNames_p;
String subDirName_p;
Block<BaseTable*> baseTabPtr_p; //# pointers to parent tables Block<BaseTable*> baseTabPtr_p; //# pointers to parent tables
SimpleOrderedMap<String,ConcatColumn*> colMap_p; //# map name to column SimpleOrderedMap<String,ConcatColumn*> colMap_p; //# map name to column
TableRecord keywordSet_p; TableRecord keywordSet_p;
Bool changed_p; //# True = changed since last wr ite Bool changed_p; //# True = changed since last wr ite
ConcatRows rows_p; ConcatRows rows_p;
}; };
} //# NAMESPACE CASA - END } //# NAMESPACE CASA - END
#endif #endif
 End of changes. 7 change blocks. 
10 lines changed or deleted 18 lines changed or added


 ConvolveGridder.tcc   ConvolveGridder.tcc 
skipping to change at line 27 skipping to change at line 27
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be adressed as follows: //# Correspondence concerning AIPS++ should be adressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# //#
//# $Id: ConvolveGridder.tcc 21024 2011-03-01 11:46:18Z gervandiepen $ //# $Id: ConvolveGridder.tcc 21270 2012-10-23 09:46:22Z marcel.loose $
#include <scimath/Mathematics/ConvolveGridder.h> #include <scimath/Mathematics/ConvolveGridder.h>
#include <casa/BasicSL/Constants.h> #include <casa/BasicSL/Constants.h>
#include <casa/Arrays/ArrayMath.h> #include <casa/Arrays/ArrayMath.h>
#include <casa/Arrays/Vector.h> #include <casa/Arrays/Vector.h>
#include <casa/iostream.h> #include <casa/iostream.h>
namespace casa { //# NAMESPACE CASA - BEGIN namespace casa { //# NAMESPACE CASA - BEGIN
#define NEED_UNDERSCORES #define NEED_UNDERSCORES
skipping to change at line 302 skipping to change at line 302
loc=0; loc=0;
supportVec.resize(ndim); supportVec.resize(ndim);
supportVec=support; supportVec=support;
} }
template <class Domain, class Range> template <class Domain, class Range>
Bool ConvolveGridder<Domain, Range>::grid(Array<Range> &gridded, Bool ConvolveGridder<Domain, Range>::grid(Array<Range> &gridded,
const Vector<Domain>& p, const Vector<Domain>& p,
const Range& value) const Range& value)
{ {
loc=location(loc,p); loc=this->location(loc,p);
loc-=offsetVec; loc-=offsetVec;
if(onGrid(loc,supportVec)) { if(onGrid(loc,supportVec)) {
Bool del; Bool del;
posVec=position(posVec, p); posVec=this->position(posVec, p);
const IPosition& fs = gridded.shape(); const IPosition& fs = gridded.shape();
vector<Int> s(fs.begin(), fs.end()); vector<Int> s(fs.begin(), fs.end());
switch(loc.nelements()) { switch(loc.nelements()) {
case 1: case 1:
grd1d(&s[0], &loc(0), gridded.getStorage(del), &value, &support, grd1d(&s[0], &loc(0), gridded.getStorage(del), &value, &support,
&sampling, &posVec(0), convFunc.getStorage(del)); &sampling, &posVec(0), convFunc.getStorage(del));
break; break;
case 2: case 2:
grd2d(&s[0], &s[1], &loc(0), &loc(1), gridded.getStorage(del), grd2d(&s[0], &s[1], &loc(0), &loc(1), gridded.getStorage(del),
&value, &support, &sampling, &posVec(0), &posVec(1), &value, &support, &sampling, &posVec(0), &posVec(1),
skipping to change at line 342 skipping to change at line 342
cout<<"Off grid"<<endl; cout<<"Off grid"<<endl;
return False; return False;
} }
} }
template <class Domain, class Range> template <class Domain, class Range>
Bool ConvolveGridder<Domain, Range>::degrid(const Array<Range> &gridded, Bool ConvolveGridder<Domain, Range>::degrid(const Array<Range> &gridded,
const Vector<Domain>& p, const Vector<Domain>& p,
Range& value) Range& value)
{ {
loc=location(loc,p); loc=this->location(loc,p);
if(onGrid(loc,supportVec)) { if(onGrid(loc,supportVec)) {
Bool del; Bool del;
posVec=position(posVec, p); posVec=this->position(posVec, p);
const IPosition& fs = gridded.shape(); const IPosition& fs = gridded.shape();
vector<Int> s(fs.begin(), fs.end()); vector<Int> s(fs.begin(), fs.end());
switch(loc.nelements()) { switch(loc.nelements()) {
case 1: case 1:
dgrd1d(&s[0], &loc(0), gridded.getStorage(del), &value, &support, dgrd1d(&s[0], &loc(0), gridded.getStorage(del), &value, &support,
&sampling, &posVec(0), convFunc.getStorage(del)); &sampling, &posVec(0), convFunc.getStorage(del));
break; break;
case 2: case 2:
dgrd2d(&s[0], &s[1], &loc(0), &loc(1), gridded.getStorage(del), dgrd2d(&s[0], &s[1], &loc(0), &loc(1), gridded.getStorage(del),
&value, &support, &sampling, &posVec(0), &posVec(1), &value, &support, &sampling, &posVec(0), &posVec(1),
 End of changes. 5 change blocks. 
5 lines changed or deleted 5 lines changed or added


 FITS2Image.tcc   FITS2Image.tcc 
skipping to change at line 50 skipping to change at line 50
#include <casa/Quanta/Unit.h> #include <casa/Quanta/Unit.h>
#include <casa/Utilities/DataType.h> #include <casa/Utilities/DataType.h>
#include <casa/BasicSL/String.h> #include <casa/BasicSL/String.h>
namespace casa { //# NAMESPACE CASA - BEGIN namespace casa { //# NAMESPACE CASA - BEGIN
template <typename T> template <typename T>
void FITSImage::crackHeader (CoordinateSystem& cSys, void FITSImage::crackHeader (CoordinateSystem& cSys,
IPosition& shape, ImageInfo& imageInfo, IPosition& shape, ImageInfo& imageInfo,
Unit& brightnessUnit, RecordInterface& miscInf o, Unit& brightnessUnit, RecordInterface& miscInf o,
Float& scale, Float& offset, Short& magicShort Float& scale, Float& offset,
, uChar& magicUChar, Short& magicShort,
Int& magicInt, Bool& hasBlanks, Int& magicInt, Bool& hasBlanks,
LogIO& os, FitsInput& infile, uInt whichRep) LogIO& os, FitsInput& infile, uInt whichRep)
{ {
// Shape // Shape
PrimaryArray<T> fitsImage(infile); PrimaryArray<T> fitsImage(infile);
Int ndim = fitsImage.dims(); Int ndim = fitsImage.dims();
shape.resize(ndim); shape.resize(ndim);
for (Int i=0; i<ndim; i++) { for (Int i=0; i<ndim; i++) {
skipping to change at line 101 skipping to change at line 102
throw (AipsError("bitpix card inconsistent with data type: expect ed bitpix = -64")); throw (AipsError("bitpix card inconsistent with data type: expect ed bitpix = -64"));
} }
} else if (dataType==TpInt) { } else if (dataType==TpInt) {
if (bitpix != 32) { if (bitpix != 32) {
throw (AipsError("bitpix card inconsistent with data type: expect ed bitpix = 32")); throw (AipsError("bitpix card inconsistent with data type: expect ed bitpix = 32"));
} }
} else if (dataType==TpShort) { } else if (dataType==TpShort) {
if (bitpix != 16) { if (bitpix != 16) {
throw (AipsError("bitpix card inconsistent with data type: expect ed bitpix = 16")); throw (AipsError("bitpix card inconsistent with data type: expect ed bitpix = 16"));
} }
} else if (dataType==TpUChar) {
if (bitpix != 8) {
throw (AipsError("bitpix card inconsistent with data type: expect
ed bitpix = 8"));
}
} else { } else {
throw (AipsError("Unsupported Template type; Float & Double only are supported")); throw (AipsError("Unsupported Template type; Float & Double only are supported"));
} }
// Scale and blank (will only be present for Int and Short) // Scale and blank (will only be present for Int and Short)
Double s = 1.0; Double s = 1.0;
Double o = 0.0; Double o = 0.0;
if (headerRec.isDefined("bscale")) { if (headerRec.isDefined("bscale")) {
subRec = headerRec.asRecord("bscale"); subRec = headerRec.asRecord("bscale");
skipping to change at line 122 skipping to change at line 127
headerRec.removeField("bscale"); headerRec.removeField("bscale");
} }
if (headerRec.isDefined("bzero")) { if (headerRec.isDefined("bzero")) {
subRec = headerRec.asRecord("bzero"); subRec = headerRec.asRecord("bzero");
subRec.get("value", o); subRec.get("value", o);
headerRec.removeField("bzero"); headerRec.removeField("bzero");
} }
scale = s; scale = s;
offset = o; offset = o;
// Will only be present for Int and Short // Will only be present for Int and Short and uChar
hasBlanks = False; hasBlanks = False;
if (headerRec.isDefined("blank")) { if (headerRec.isDefined("blank")) {
subRec = headerRec.asRecord("blank"); subRec = headerRec.asRecord("blank");
Int m; Int m;
subRec.get("value", m); subRec.get("value", m);
headerRec.removeField("blank"); headerRec.removeField("blank");
if (dataType==TpShort) { if (dataType==TpUChar) {
magicUChar = m;
} else if (dataType==TpShort) {
magicShort = m; magicShort = m;
} else if (dataType==TpInt) { } else if (dataType==TpInt) {
magicInt = m; magicInt = m;
} else { } else {
magicUChar = m;
magicShort = m; magicShort = m;
magicInt = m; magicInt = m;
} }
hasBlanks = True; hasBlanks = True;
} }
// Brightness Unit // Brightness Unit
brightnessUnit = ImageFITSConverter::getBrightnessUnit(headerRec, os); brightnessUnit = ImageFITSConverter::getBrightnessUnit(headerRec, os);
skipping to change at line 199 skipping to change at line 207
// Try and find the restoring beam in the history cards if // Try and find the restoring beam in the history cards if
// its not in the header // its not in the header
if (imageInfo.restoringBeam().nelements() != 3) { if (imageInfo.restoringBeam().nelements() != 3) {
imageInfo.getRestoringBeam(log); imageInfo.getRestoringBeam(log);
} }
} }
template <typename T> template <typename T>
void FITSImage::crackExtHeader (CoordinateSystem& cSys, void FITSImage::crackExtHeader (CoordinateSystem& cSys,
IPosition& shape, ImageInfo& imageInfo, IPosition& shape, ImageInfo& imageInfo,
Unit& brightnessUnit, RecordInterface& miscInf Unit& brightnessUnit, RecordInterface& miscI
o, nfo,
Float& scale, Float& offset, Short& magicShort Float& scale, Float& offset, uChar& magicUCh
, ar,
Int& magicInt, Bool& hasBlanks, Short& magicShort,
LogIO& os, FitsInput& infile, uInt whichRep) Int& magicInt, Bool& hasBlanks,
LogIO& os, FitsInput& infile, uInt whichRep)
{ {
// Shape // Shape
ImageExtension<T> fitsImage(infile); ImageExtension<T> fitsImage(infile);
Int ndim = fitsImage.dims(); Int ndim = fitsImage.dims();
shape.resize(ndim); shape.resize(ndim);
for (Int i=0; i<ndim; i++) { for (Int i=0; i<ndim; i++) {
shape(i) = fitsImage.dim(i); shape(i) = fitsImage.dim(i);
skipping to change at line 254 skipping to change at line 263
throw (AipsError("bitpix card inconsistent with data type: expect ed bitpix = -64")); throw (AipsError("bitpix card inconsistent with data type: expect ed bitpix = -64"));
} }
} else if (dataType==TpInt) { } else if (dataType==TpInt) {
if (bitpix != 32) { if (bitpix != 32) {
throw (AipsError("bitpix card inconsistent with data type: expect ed bitpix = 32")); throw (AipsError("bitpix card inconsistent with data type: expect ed bitpix = 32"));
} }
} else if (dataType==TpShort) { } else if (dataType==TpShort) {
if (bitpix != 16) { if (bitpix != 16) {
throw (AipsError("bitpix card inconsistent with data type: expect ed bitpix = 16")); throw (AipsError("bitpix card inconsistent with data type: expect ed bitpix = 16"));
} }
} else if (dataType==TpUChar) {
if (bitpix != 8) {
throw (AipsError("bitpix card inconsistent with data type: expect
ed bitpix = 16"));
}
} else { } else {
throw (AipsError("Unsupported Template type; Float & Double only are supported")); throw (AipsError("Unsupported Template type; Float & Double only are supported"));
} }
// Scale and blank (will only be present for Int and Short) // Scale and blank (will only be present for Int and Short)
Double s = 1.0; Double s = 1.0;
Double o = 0.0; Double o = 0.0;
if (headerRec.isDefined("bscale")) { if (headerRec.isDefined("bscale")) {
subRec = headerRec.asRecord("bscale"); subRec = headerRec.asRecord("bscale");
skipping to change at line 283 skipping to change at line 296
offset = o; offset = o;
// Will only be present for Int and Short // Will only be present for Int and Short
hasBlanks = False; hasBlanks = False;
if (headerRec.isDefined("blank")) { if (headerRec.isDefined("blank")) {
subRec = headerRec.asRecord("blank"); subRec = headerRec.asRecord("blank");
Int m; Int m;
subRec.get("value", m); subRec.get("value", m);
headerRec.removeField("blank"); headerRec.removeField("blank");
if (dataType==TpShort) { if (dataType==TpUChar) {
magicUChar = m;
} else if (dataType==TpShort) {
magicShort = m; magicShort = m;
} else if (dataType==TpInt) { } else if (dataType==TpInt) {
magicInt = m; magicInt = m;
} else { } else {
magicUChar = m;
magicShort = m; magicShort = m;
magicInt = m; magicInt = m;
} }
hasBlanks = True; hasBlanks = True;
} }
// Brightness Unit // Brightness Unit
brightnessUnit = ImageFITSConverter::getBrightnessUnit(headerRec, os); brightnessUnit = ImageFITSConverter::getBrightnessUnit(headerRec, os);
 End of changes. 9 change blocks. 
12 lines changed or deleted 29 lines changed or added


 FITSImage.h   FITSImage.h 
skipping to change at line 26 skipping to change at line 26
//# along with this library; if not, write to the Free Software Foundation, //# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# $Id: FITSImage.h 21130 2011-10-18 07:39:05Z gervandiepen $ //# $Id: FITSImage.h 21249 2012-05-18 01:38:49Z Malte.Marquarding $
#ifndef IMAGES_FITSIMAGE_H #ifndef IMAGES_FITSIMAGE_H
#define IMAGES_FITSIMAGE_H #define IMAGES_FITSIMAGE_H
//# Includes //# Includes
#include <images/Images/ImageInterface.h> #include <images/Images/ImageInterface.h>
#include <images/Images/MaskSpecifier.h> #include <images/Images/MaskSpecifier.h>
#include <tables/Tables/TiledFileAccess.h> #include <tables/Tables/TiledFileAccess.h>
#include <lattices/Lattices/TiledShape.h> #include <lattices/Lattices/TiledShape.h>
#include <fits/FITS/fits.h> #include <fits/FITS/fits.h>
skipping to change at line 261 skipping to change at line 261
private: private:
String name_p; String name_p;
String fullname_p; String fullname_p;
MaskSpecifier maskSpec_p; MaskSpecifier maskSpec_p;
CountedPtr<TiledFileAccess> pTiledFile_p; CountedPtr<TiledFileAccess> pTiledFile_p;
Lattice<Bool>* pPixelMask_p; Lattice<Bool>* pPixelMask_p;
TiledShape shape_p; TiledShape shape_p;
Float scale_p; Float scale_p;
Float offset_p; Float offset_p;
Short shortMagic_p; Short shortMagic_p;
uChar uCharMagic_p;
Int longMagic_p; Int longMagic_p;
Bool hasBlanks_p; Bool hasBlanks_p;
DataType dataType_p; DataType dataType_p;
Int64 fileOffset_p; Int64 fileOffset_p;
Bool isClosed_p; Bool isClosed_p;
uInt whichRep_p; uInt whichRep_p;
uInt whichHDU_p; uInt whichHDU_p;
// Reopen the image if needed. // Reopen the image if needed.
void reopenIfNeeded() const void reopenIfNeeded() const
skipping to change at line 285 skipping to change at line 286
// Open the image (used by setup and reopen). // Open the image (used by setup and reopen).
void open(); void open();
// Fish things out of the FITS file // Fish things out of the FITS file
void getImageAttributes (CoordinateSystem& cSys, void getImageAttributes (CoordinateSystem& cSys,
IPosition& shape, ImageInfo& info, IPosition& shape, ImageInfo& info,
Unit& brightnessUnit, RecordInterface& miscInfo , Unit& brightnessUnit, RecordInterface& miscInfo ,
Int& recsize, Int& recno, Int& recsize, Int& recno,
FITS::ValueType& dataType, FITS::ValueType& dataType,
Float& scale, Float& offset, Short& shortMagic, Float& scale, Float& offset,
uChar& uCharMagic, Short& shortMagic,
Int& longMagic, Bool& hasBlanks, const String& name, Int& longMagic, Bool& hasBlanks, const String& name,
uInt whichRep, uInt whichHDU); uInt whichRep, uInt whichHDU);
// Crack a primary header // Crack a primary header
template <typename T> template <typename T>
void crackHeader (CoordinateSystem& cSys, IPosition& shape, ImageInfo& i mageInfo, void crackHeader (CoordinateSystem& cSys, IPosition& shape, ImageInfo& i mageInfo,
Unit& brightnessUnit, RecordInterface& miscInfo, Unit& brightnessUnit, RecordInterface& miscInfo,
Float& scale, Float& offset, Short& magicShort, Float& scale, Float& offset, uChar& magicUChar, Short& magicShort,
Int& magicLong, Bool& hasBlanks, LogIO& os, FitsInput& infile, Int& magicLong, Bool& hasBlanks, LogIO& os, FitsInput& infile,
uInt whichRep); uInt whichRep);
// Crack an image extension header // Crack an image extension header
template <typename T> template <typename T>
void crackExtHeader (CoordinateSystem& cSys, IPosition& shape, ImageInfo & imageInfo, void crackExtHeader (CoordinateSystem& cSys, IPosition& shape, ImageInfo & imageInfo,
Unit& brightnessUnit, RecordInterface& miscInfo, Unit& brightnessUnit, RecordInterface& miscInfo,
Float& scale, Float& offset, Short& magicShort, Float& scale, Float& offset, uChar& uCharMagic,
Short& magicShort,
Int& magicLong, Bool& hasBlanks, LogIO& os, FitsInp ut& infile, Int& magicLong, Bool& hasBlanks, LogIO& os, FitsInp ut& infile,
uInt whichRep); uInt whichRep);
}; };
} //# NAMESPACE CASA - END } //# NAMESPACE CASA - END
#ifndef CASACORE_NO_AUTO_TEMPLATES #ifndef CASACORE_NO_AUTO_TEMPLATES
#include <images/Images/FITS2Image.tcc> #include <images/Images/FITS2Image.tcc>
#endif //# CASACORE_NO_AUTO_TEMPLATES #endif //# CASACORE_NO_AUTO_TEMPLATES
 End of changes. 5 change blocks. 
4 lines changed or deleted 7 lines changed or added


 FITSMask.h   FITSMask.h 
skipping to change at line 27 skipping to change at line 27
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# //#
//# $Id: FITSMask.h 18093 2004-11-30 17:51:10Z ddebonis $ //# $Id: FITSMask.h 21249 2012-05-18 01:38:49Z Malte.Marquarding $
#ifndef LATTICES_FITSMASK_H #ifndef LATTICES_FITSMASK_H
#define LATTICES_FITSMASK_H #define LATTICES_FITSMASK_H
//# Includes //# Includes
#include <casa/Arrays/Array.h> #include <casa/Arrays/Array.h>
#include <lattices/Lattices/Lattice.h> #include <lattices/Lattices/Lattice.h>
namespace casa { //# NAMESPACE CASA - BEGIN namespace casa { //# NAMESPACE CASA - BEGIN
skipping to change at line 102 skipping to change at line 102
//# </todo> //# </todo>
class FITSMask : public Lattice<Bool> class FITSMask : public Lattice<Bool>
{ {
public: public:
// Constructor (for 32 bit floating point). The pointer is not cloned, // Constructor (for 32 bit floating point). The pointer is not cloned,
// just copied. // just copied.
FITSMask (TiledFileAccess* tiledFileAccess); FITSMask (TiledFileAccess* tiledFileAccess);
// Constructor (for 8 bit integers). The pointer is not cloned, just cop
ied
// The scale, offset, magic blanking values must come from
// the FITS header ('bscale', 'bzero', 'blank')
FITSMask (TiledFileAccess* tiledFileAccess, Float scale, Float offset,
uChar magic, Bool hasBlanks);
// Constructor (for 16 bit integers). The pointer is not cloned, just co pied // Constructor (for 16 bit integers). The pointer is not cloned, just co pied
// The scale, offset, magic blanking values must come from // The scale, offset, magic blanking values must come from
// the FITS header ('bscale', 'bzero', 'blank') // the FITS header ('bscale', 'bzero', 'blank')
FITSMask (TiledFileAccess* tiledFileAccess, Float scale, Float offset, FITSMask (TiledFileAccess* tiledFileAccess, Float scale, Float offset,
Short magic, Bool hasBlanks); Short magic, Bool hasBlanks);
// Constructor (for 32 bit integers). The pointer is not cloned, just co pied // Constructor (for 32 bit integers). The pointer is not cloned, just co pied
// The scale, offset, magic blanking values must come from // The scale, offset, magic blanking values must come from
// the FITS header ('bscale', 'bzero', 'blank') // the FITS header ('bscale', 'bzero', 'blank')
FITSMask (TiledFileAccess* tiledFileAccess, Float scale, Float offset, FITSMask (TiledFileAccess* tiledFileAccess, Float scale, Float offset,
skipping to change at line 152 skipping to change at line 158
const IPosition& where, const IPosition& where,
const IPosition& stride); const IPosition& stride);
private: private:
FITSMask(); FITSMask();
// //
TiledFileAccess* itsTiledFilePtr; TiledFileAccess* itsTiledFilePtr;
Array<Float> itsBuffer; Array<Float> itsBuffer;
Float itsScale, itsOffset; Float itsScale, itsOffset;
Short itsUCharMagic;
Short itsShortMagic; Short itsShortMagic;
Int itsLongMagic; Int itsLongMagic;
Bool itsHasIntBlanks; Bool itsHasIntBlanks;
}; };
} //# NAMESPACE CASA - END } //# NAMESPACE CASA - END
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 9 lines changed or added


 Gaussian2DParam.tcc   Gaussian2DParam.tcc 
skipping to change at line 26 skipping to change at line 26
//# along with this library; if not, write to the Free Software Foundation, //# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# $Id: Gaussian2DParam.tcc 20253 2008-02-23 15:15:00Z gervandiepen $ //# $Id: Gaussian2DParam.tcc 21325 2013-03-19 10:48:23Z gervandiepen $
//# Includes //# Includes
#include <scimath/Functionals/Gaussian2DParam.h> #include <scimath/Functionals/Gaussian2DParam.h>
#include <casa/Arrays/ArrayMath.h> #include <casa/Arrays/ArrayMath.h>
#include <casa/Arrays/Vector.h> #include <casa/Arrays/Vector.h>
#include <casa/Exceptions/Error.h> #include <casa/Exceptions/Error.h>
#include <casa/Utilities/Assert.h> #include <casa/Utilities/Assert.h>
#include <casa/BasicSL/Constants.h> #include <casa/BasicSL/Constants.h>
#include <casa/BasicMath/Math.h> #include <casa/BasicMath/Math.h>
skipping to change at line 255 skipping to change at line 255
void Gaussian2DParam<T>::setPA(const T &pa) { void Gaussian2DParam<T>::setPA(const T &pa) {
if (abs(pa) > T(C::_2pi)) { if (abs(pa) > T(C::_2pi)) {
throw(AipsError("Gaussian2DParam<T>::setPA(const T &pa)" throw(AipsError("Gaussian2DParam<T>::setPA(const T &pa)"
" - PA must be in radians and between -2pi and 2pi")); " - PA must be in radians and between -2pi and 2pi"));
} }
theXwidth = param_p[YWIDTH]*param_p[RATIO]; theXwidth = param_p[YWIDTH]*param_p[RATIO];
if (abs(param_p[YWIDTH]) >= abs(theXwidth)) param_p[PANGLE] = pa; if (abs(param_p[YWIDTH]) >= abs(theXwidth)) param_p[PANGLE] = pa;
else param_p[PANGLE] = pa - T(C::pi_2); else param_p[PANGLE] = pa - T(C::pi_2);
theCpa = cos(param_p[PANGLE]); theCpa = cos(param_p[PANGLE]);
theSpa = sin(param_p[PANGLE]); theSpa = sin(param_p[PANGLE]);
thePA = param_p[PANGLE];
} }
} //# NAMESPACE CASA - END } //# NAMESPACE CASA - END
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 GenSort.h   GenSort.h 
skipping to change at line 26 skipping to change at line 26
//# along with this library; if not, write to the Free Software Foundation, //# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# $Id: GenSort.h 20551 2009-03-25 00:11:33Z Malte.Marquarding $ //# $Id: GenSort.h 21446 2014-06-03 14:04:37Z gervandiepen $
#ifndef CASA_GENSORT_H #ifndef CASA_GENSORT_H
#define CASA_GENSORT_H #define CASA_GENSORT_H
#include <casa/aips.h> #include <casa/aips.h>
#include <casa/Utilities/Sort.h> #include <casa/Utilities/Sort.h>
namespace casa { //# NAMESPACE CASA - BEGIN namespace casa { //# NAMESPACE CASA - BEGIN
//# Forward declarations. //# Forward declarations.
skipping to change at line 497 skipping to change at line 497
// The order must be Sort::Ascending or Sort::Descending. // The order must be Sort::Ascending or Sort::Descending.
// <group> // <group>
template<class T> template<class T>
inline inline
uInt genSort (Vector<uInt>& indexVector, const T* data, uInt nr, uInt genSort (Vector<uInt>& indexVector, const T* data, uInt nr,
Sort::Order order, int options) Sort::Order order, int options)
{ return GenSortIndirect<T>::sort (indexVector, data, nr, { return GenSortIndirect<T>::sort (indexVector, data, nr,
order, options); } order, options); }
template<class T> template<class T>
inline inline
uInt genSort (Vector<uInt>& indexVector, Array<T>& data, uInt genSort (Vector<uInt>& indexVector, const Array<T>& data,
Sort::Order order, int options) Sort::Order order, int options)
{ return GenSortIndirect<T>::sort (indexVector, data, order, options); } { return GenSortIndirect<T>::sort (indexVector, data, order, options); }
template<class T> template<class T>
inline inline
uInt genSort (Vector<uInt>& indexVector, const Block<T>& data, uInt genSort (Vector<uInt>& indexVector, const Block<T>& data,
Sort::Order order, int options) Sort::Order order, int options)
{ return GenSortIndirect<T>::sort (indexVector, data, data.nelements(), { return GenSortIndirect<T>::sort (indexVector, data, data.nelements(),
order, options); } order, options); }
template<class T> template<class T>
inline inline
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 HDF5Image.tcc   HDF5Image.tcc 
skipping to change at line 26 skipping to change at line 26
//# along with this library; if not, write to the Free Software Foundation, //# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# $Id: HDF5Image.tcc 21200 2012-03-20 09:55:47Z gervandiepen $ //# $Id: HDF5Image.tcc 21290 2012-11-22 14:46:41Z gervandiepen $
#include <images/Images/HDF5Image.h> #include <images/Images/HDF5Image.h>
#include <images/Regions/ImageRegion.h> #include <images/Regions/ImageRegion.h>
#include <images/Regions/RegionHandlerHDF5.h> #include <images/Regions/RegionHandlerHDF5.h>
#include <images/Images/ImageInfo.h> #include <images/Images/ImageInfo.h>
#include <lattices/Lattices/ArrayLattice.h> #include <lattices/Lattices/ArrayLattice.h>
#include <lattices/Lattices/LatticeNavigator.h> #include <lattices/Lattices/LatticeNavigator.h>
#include <lattices/Lattices/LatticeStepper.h> #include <lattices/Lattices/LatticeStepper.h>
#include <lattices/Lattices/LatticeIterator.h> #include <lattices/Lattices/LatticeIterator.h>
#include <lattices/Lattices/LatticeExprNode.h> #include <lattices/Lattices/LatticeExprNode.h>
skipping to change at line 389 skipping to change at line 389
Record rec; Record rec;
AlwaysAssert (coordinates().save(rec, "coords"), AipsError); AlwaysAssert (coordinates().save(rec, "coords"), AipsError);
HDF5Record::writeRecord (*map_p.group(), "coordinfo", rec); HDF5Record::writeRecord (*map_p.group(), "coordinfo", rec);
} }
return ok; return ok;
} }
template<class T> template<class T>
void HDF5Image<T>::restoreMiscInfo (const RecordInterface& rec) void HDF5Image<T>::restoreMiscInfo (const RecordInterface& rec)
{ {
if (rec.isDefined("miscinfo") && setMiscInfoMember (rec);
rec.dataType("miscinfo") == TpRecord) {
setMiscInfoMember (rec.asRecord ("miscinfo"));
}
} }
template<class T> template<class T>
Bool HDF5Image<T>::setMiscInfo (const RecordInterface& newInfo) Bool HDF5Image<T>::setMiscInfo (const RecordInterface& newInfo)
{ {
setMiscInfoMember (newInfo); setMiscInfoMember (newInfo);
HDF5Record::writeRecord (*map_p.group(), "miscinfo", newInfo); HDF5Record::writeRecord (*map_p.group(), "miscinfo", newInfo);
return True; return True;
} }
skipping to change at line 475 skipping to change at line 472
<< error << LogIO::POST; << error << LogIO::POST;
ok = False; ok = False;
} }
} }
return ok; return ok;
} }
template<class T> template<class T>
void HDF5Image<T>::restoreImageInfo (const RecordInterface& rec) void HDF5Image<T>::restoreImageInfo (const RecordInterface& rec)
{ {
if (rec.isDefined("imageinfo")) { String error;
String error; ImageInfo info;
ImageInfo info; Bool ok = info.fromRecord (error, rec);
Bool ok = info.fromRecord (error, rec.asRecord("imageinfo")); if (!ok) {
if (!ok) { LogIO os;
LogIO os; os << LogIO::WARN << "Failed to restore the ImageInfo because "
os << LogIO::WARN << "Failed to restore the ImageInfo because " << error << LogIO::POST;
<< error << LogIO::POST; } else {
} else { setImageInfoMember (info);
setImageInfoMember (info);
}
} }
} }
template<class T> template<class T>
void HDF5Image<T>::removeRegion (const String& name, void HDF5Image<T>::removeRegion (const String& name,
RegionHandler::GroupType type, RegionHandler::GroupType type,
Bool throwIfUnknown) Bool throwIfUnknown)
{ {
// Remove the default mask if it is the region to be removed. // Remove the default mask if it is the region to be removed.
if (name == getDefaultMask()) { if (name == getDefaultMask()) {
 End of changes. 3 change blocks. 
16 lines changed or deleted 11 lines changed or added


 HostInfo.h   HostInfo.h 
skipping to change at line 27 skipping to change at line 27
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# //#
//# $Id: HostInfo.h 20891 2010-05-17 07:10:15Z gervandiepen $ //# $Id: HostInfo.h 21266 2012-09-14 09:43:30Z gervandiepen $
#ifndef CASA_HOSTINFO_H #ifndef CASA_HOSTINFO_H
#define CASA_HOSTINFO_H #define CASA_HOSTINFO_H
#include <casa/aips.h> #include <casa/aips.h>
#include <cstring> #include <cstring>
#include <unistd.h> #include <cstddef>
namespace casa { //# NAMESPACE CASA - BEGIN namespace casa { //# NAMESPACE CASA - BEGIN
class String; class String;
class HostMachineInfo; class HostMachineInfo;
// <summary> // <summary>
// Miscellaneous information about this host and process. // Miscellaneous information about this host and process.
// </summary> // </summary>
skipping to change at line 121 skipping to change at line 121
// Returns True for big endian machines (like SUN). // Returns True for big endian machines (like SUN).
// Returns False for little endian machines (like PC). // Returns False for little endian machines (like PC).
static Bool bigEndian(); static Bool bigEndian();
// Returns 0 if unable to determine the number of CPUs. // Returns 0 if unable to determine the number of CPUs.
static Int numCPUs(bool use_aipsrc=false); static Int numCPUs(bool use_aipsrc=false);
// Get memory info (in KBytes). // Get memory info (in KBytes).
// Returns -1 if unable to determine memory info. // Returns -1 if unable to determine memory info.
// <group> // <group>
static ssize_t memoryTotal(bool use_aipsrc=false); static ptrdiff_t memoryTotal(bool use_aipsrc=false);
static ssize_t memoryUsed(); static ptrdiff_t memoryUsed();
static ssize_t memoryFree(); static ptrdiff_t memoryFree();
// </group> // </group>
// Get swap space info (in KBytes). // Get swap space info (in KBytes).
// Returns -1 if unable to determine swap info. // Returns -1 if unable to determine swap info.
// <group> // <group>
static ssize_t swapTotal(); static ptrdiff_t swapTotal();
static ssize_t swapUsed(); static ptrdiff_t swapUsed();
static ssize_t swapFree(); static ptrdiff_t swapFree();
// </group> // </group>
private: private:
// we don't want folks creating these... // we don't want folks creating these...
HostInfo( ); HostInfo( );
const HostInfo &operator=( const HostInfo & ); const HostInfo &operator=( const HostInfo & );
static HostMachineInfo *info; static HostMachineInfo *info;
}; };
 End of changes. 4 change blocks. 
8 lines changed or deleted 8 lines changed or added


 HostInfoBsd.h   HostInfoBsd.h 
/* /*
** Author Tony Maher ** Author Tony Maher
** **
** Based on HostInfoDarwin.h (just the scaffolding code). ** Based on HostInfoDarwin.h (just the scaffolding code).
** **
** $Id: HostInfoBsd.h 20766 2009-10-06 00:52:29Z Malte.Marquarding $ ** $Id: HostInfoBsd.h 21266 2012-09-14 09:43:30Z gervandiepen $
** **
** Copyright (c) 2009, Associated Universities Inc. ** Copyright (c) 2009, Associated Universities Inc.
*/ */
#ifndef CASA_HOSTINFOBSD_H #ifndef CASA_HOSTINFOBSD_H
#define CASA_HOSTINFOBSD_H #define CASA_HOSTINFOBSD_H
# if defined(HOSTINFO_DO_IMPLEMENT) # if defined(HOSTINFO_DO_IMPLEMENT)
#include <sys/types.h> #include <sys/types.h>
skipping to change at line 62 skipping to change at line 62
class HostMachineInfo { class HostMachineInfo {
friend class HostInfo; friend class HostInfo;
HostMachineInfo( ); HostMachineInfo( );
void update_info( ); void update_info( );
int valid; int valid;
int cpus; int cpus;
ssize_t memory_total; ptrdiff_t memory_total;
ssize_t memory_used; ptrdiff_t memory_used;
ssize_t memory_free; ptrdiff_t memory_free;
ssize_t swap_total; ptrdiff_t swap_total;
ssize_t swap_used; ptrdiff_t swap_used;
ssize_t swap_free; ptrdiff_t swap_free;
}; };
// </group> // </group>
HostMachineInfo::HostMachineInfo( ) : valid(1) { HostMachineInfo::HostMachineInfo( ) : valid(1) {
size_t len; size_t len;
pagesize = getpagesize(); // size of page in bytes. pagesize = getpagesize(); // size of page in bytes.
page_kb = pagesize / 1024; // in kilobytes. page_kb = pagesize / 1024; // in kilobytes.
 End of changes. 2 change blocks. 
8 lines changed or deleted 8 lines changed or added


 HostInfoDarwin.h   HostInfoDarwin.h 
skipping to change at line 38 skipping to change at line 38
** **
** AUTHOR: Darrell Schiebel <drs@nrao.edu> ** AUTHOR: Darrell Schiebel <drs@nrao.edu>
** **
** ORIGINAL AUTHOR: Anthony Baxter <anthony@aaii.oz.au> ** ORIGINAL AUTHOR: Anthony Baxter <anthony@aaii.oz.au>
** ORIGINAL CONTRIBUTORS: David S. Comay <dsc@seismo.css.gov> ** ORIGINAL CONTRIBUTORS: David S. Comay <dsc@seismo.css.gov>
** Claus Kalle ** Claus Kalle
** Pat Welch <tpw@physics.orst.edu> ** Pat Welch <tpw@physics.orst.edu>
** William LeFebvre <lefebvre@dis.anl.gov> ** William LeFebvre <lefebvre@dis.anl.gov>
** Rainer Orth <ro@techfak.uni-bielefeld.de> ** Rainer Orth <ro@techfak.uni-bielefeld.de>
** **
** $Id: HostInfoDarwin.h 21022 2011-03-01 10:07:47Z gervandiepen $ ** $Id: HostInfoDarwin.h 21266 2012-09-14 09:43:30Z gervandiepen $
** **
*/ */
#ifndef CASA_HOSTINFODARWIN_H #ifndef CASA_HOSTINFODARWIN_H
#define CASA_HOSTINFODARWIN_H #define CASA_HOSTINFODARWIN_H
# if defined(HOSTINFO_DO_IMPLEMENT) # if defined(HOSTINFO_DO_IMPLEMENT)
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
skipping to change at line 94 skipping to change at line 94
class HostMachineInfo { class HostMachineInfo {
friend class HostInfo; friend class HostInfo;
HostMachineInfo( ); HostMachineInfo( );
void update_info( ); void update_info( );
int valid; int valid;
int cpus; int cpus;
ssize_t memory_total; ptrdiff_t memory_total;
ssize_t memory_used; ptrdiff_t memory_used;
ssize_t memory_free; ptrdiff_t memory_free;
ssize_t swap_total; ptrdiff_t swap_total;
ssize_t swap_used; ptrdiff_t swap_used;
ssize_t swap_free; ptrdiff_t swap_free;
}; };
// </group> // </group>
HostMachineInfo::HostMachineInfo( ) : valid(1) { HostMachineInfo::HostMachineInfo( ) : valid(1) {
register int pagesize; register int pagesize;
kern_return_t ret; kern_return_t ret;
struct host_basic_info basic_info; struct host_basic_info basic_info;
unsigned int count = HOST_BASIC_INFO_COUNT; unsigned int count = HOST_BASIC_INFO_COUNT;
 End of changes. 2 change blocks. 
8 lines changed or deleted 8 lines changed or added


 HostInfoHpux.h   HostInfoHpux.h 
//# HostInfo_hpux.h: HP/UX specific memory, swap, and CPU code. //# HostInfo_hpux.h: HP/UX specific memory, swap, and CPU code.
//# $Id: HostInfoHpux.h 20739 2009-09-29 01:15:15Z Malte.Marquarding $ //# $Id: HostInfoHpux.h 21266 2012-09-14 09:43:30Z gervandiepen $
/* /*
** This is a greatly MODIFIED version of a "top" machine dependent file. ** This is a greatly MODIFIED version of a "top" machine dependent file.
** The only resemblance it bears to the original is with respect to the ** The only resemblance it bears to the original is with respect to the
** mechanics of finding various system details. The copyright details ** mechanics of finding various system details. The copyright details
** follow. ** follow.
** **
** --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -- - ** --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -- -
** **
** Top users/processes display for Unix ** Top users/processes display for Unix
skipping to change at line 84 skipping to change at line 84
class HostMachineInfo { class HostMachineInfo {
friend class HostInfo; friend class HostInfo;
HostMachineInfo( ); HostMachineInfo( );
void update_info( ); void update_info( );
int valid; int valid;
int cpus; int cpus;
ssize_t swap_total; ptrdiff_t swap_total;
ssize_t swap_used; ptrdiff_t swap_used;
ssize_t swap_free; ptrdiff_t swap_free;
ssize_t memory_total; ptrdiff_t memory_total;
ssize_t memory_used; ptrdiff_t memory_used;
ssize_t memory_free; ptrdiff_t memory_free;
int pageshift; /* log base 2 of the pagesize */ int pageshift; /* log base 2 of the pagesize */
}; };
// </group> // </group>
HostMachineInfo::HostMachineInfo( ) :valid(1) { HostMachineInfo::HostMachineInfo( ) :valid(1) {
struct pst_static info; struct pst_static info;
int pagesize; int pagesize;
 End of changes. 2 change blocks. 
8 lines changed or deleted 8 lines changed or added


 HostInfoIrix.h   HostInfoIrix.h 
//# HostInfo_irix.h: SGI Irix specific memory, swap, and CPU code. //# HostInfo_irix.h: SGI Irix specific memory, swap, and CPU code.
//# $Id: HostInfoIrix.h 20739 2009-09-29 01:15:15Z Malte.Marquarding $ //# $Id: HostInfoIrix.h 21266 2012-09-14 09:43:30Z gervandiepen $
/* /*
** This is a greatly MODIFIED version of a "top" machine dependent file. ** This is a greatly MODIFIED version of a "top" machine dependent file.
** The only resemblance it bears to the original is with respect to the ** The only resemblance it bears to the original is with respect to the
** mechanics of finding various system details. The copyright details ** mechanics of finding various system details. The copyright details
** follow. ** follow.
** **
** --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -- - ** --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -- -
** **
** Top users/processes display for Unix ** Top users/processes display for Unix
skipping to change at line 81 skipping to change at line 81
class HostMachineInfo { class HostMachineInfo {
friend class HostInfo; friend class HostInfo;
HostMachineInfo( ); HostMachineInfo( );
void update_info( ); void update_info( );
int valid; int valid;
int cpus; int cpus;
ssize_t swap_total; ptrdiff_t swap_total;
ssize_t swap_used; ptrdiff_t swap_used;
ssize_t swap_free; ptrdiff_t swap_free;
ssize_t memory_total; ptrdiff_t memory_total;
ssize_t memory_used; ptrdiff_t memory_used;
ssize_t memory_free; ptrdiff_t memory_free;
ssize_t pagesize; ptrdiff_t pagesize;
}; };
// </group> // </group>
HostMachineInfo::HostMachineInfo( ) : valid(1) { HostMachineInfo::HostMachineInfo( ) : valid(1) {
pagesize = getpagesize(); pagesize = getpagesize();
if ((cpus = sysmp(MP_NPROCS)) == -1) { if ((cpus = sysmp(MP_NPROCS)) == -1) {
 End of changes. 3 change blocks. 
9 lines changed or deleted 9 lines changed or added


 HostInfoLinux.h   HostInfoLinux.h 
//# HostInfo_linux.h: Linux specific memory, swap, and CPU code. //# HostInfo_linux.h: Linux specific memory, swap, and CPU code.
//# $Id: HostInfoLinux.h 21022 2011-03-01 10:07:47Z gervandiepen $ //# $Id: HostInfoLinux.h 21266 2012-09-14 09:43:30Z gervandiepen $
/* /*
** This is a greatly MODIFIED version of a "top" machine dependent file. ** This is a greatly MODIFIED version of a "top" machine dependent file.
** The only resemblance it bears to the original is with respect to the ** The only resemblance it bears to the original is with respect to the
** mechanics of finding various system details. The copyright details ** mechanics of finding various system details. The copyright details
** follow. ** follow.
** **
** --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -- - ** --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -- -
** **
** Top users/processes display for Unix ** Top users/processes display for Unix
skipping to change at line 92 skipping to change at line 92
class HostMachineInfo { class HostMachineInfo {
friend class HostInfo; friend class HostInfo;
HostMachineInfo( ); HostMachineInfo( );
void update_info( ); void update_info( );
int valid; int valid;
int cpus; int cpus;
ssize_t memory_total; ptrdiff_t memory_total;
ssize_t memory_used; ptrdiff_t memory_used;
ssize_t memory_free; ptrdiff_t memory_free;
ssize_t swap_total; ptrdiff_t swap_total;
ssize_t swap_used; ptrdiff_t swap_used;
ssize_t swap_free; ptrdiff_t swap_free;
}; };
// </group> // </group>
static inline char * static inline char *
skip_ws(const char *p) skip_ws(const char *p)
{ {
while (isspace(*p)) p++; while (isspace(*p)) p++;
return (char *)p; return (char *)p;
} }
 End of changes. 2 change blocks. 
8 lines changed or deleted 8 lines changed or added


 HostInfoOsf1.h   HostInfoOsf1.h 
//# HostInfo_osf1.h: DEC OSF/1 specific memory, swap, and CPU code. //# HostInfo_osf1.h: DEC OSF/1 specific memory, swap, and CPU code.
//# $Id: HostInfoOsf1.h 20739 2009-09-29 01:15:15Z Malte.Marquarding $ //# $Id: HostInfoOsf1.h 21266 2012-09-14 09:43:30Z gervandiepen $
/* /*
** This is a greatly MODIFIED version of a "top" machine dependent file. ** This is a greatly MODIFIED version of a "top" machine dependent file.
** The only resemblance it bears to the original is with respect to the ** The only resemblance it bears to the original is with respect to the
** mechanics of finding various system details. The copyright details ** mechanics of finding various system details. The copyright details
** follow. ** follow.
** **
** --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -- - ** --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -- -
** **
** Top users/processes display for Unix ** Top users/processes display for Unix
skipping to change at line 104 skipping to change at line 104
class HostMachineInfo { class HostMachineInfo {
friend class HostInfo; friend class HostInfo;
HostMachineInfo( ); HostMachineInfo( );
void update_info( ); void update_info( );
int valid; int valid;
int cpus; int cpus;
ssize_t swap_total; ptrdiff_t swap_total;
ssize_t swap_used; ptrdiff_t swap_used;
ssize_t swap_free; ptrdiff_t swap_free;
ssize_t memory_total; ptrdiff_t memory_total;
ssize_t memory_used; ptrdiff_t memory_used;
ssize_t memory_free; ptrdiff_t memory_free;
int pageshift; /* log base 2 of the pagesize */ int pageshift; /* log base 2 of the pagesize */
}; };
// </group> // </group>
HostMachineInfo::HostMachineInfo( ) : valid(1) { HostMachineInfo::HostMachineInfo( ) : valid(1) {
int i = 0; int i = 0;
int pagesize; int pagesize;
 End of changes. 2 change blocks. 
8 lines changed or deleted 8 lines changed or added


 HostInfoSolaris.h   HostInfoSolaris.h 
//# HostInfo_solaris.h: Solaris specific memory, swap, and CPU code. //# HostInfo_solaris.h: Solaris specific memory, swap, and CPU code.
//# $Id: HostInfoSolaris.h 20739 2009-09-29 01:15:15Z Malte.Marquarding $ //# $Id: HostInfoSolaris.h 21266 2012-09-14 09:43:30Z gervandiepen $
/* /*
** This is a greatly MODIFIED version of a "top" machine dependent file. ** This is a greatly MODIFIED version of a "top" machine dependent file.
** The only resemblance it bears to the original is with respect to the ** The only resemblance it bears to the original is with respect to the
** mechanics of finding various system details. The copyright details ** mechanics of finding various system details. The copyright details
** follow. ** follow.
** **
** --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -- - ** --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -- -
** **
** Top users/processes display for Unix ** Top users/processes display for Unix
skipping to change at line 122 skipping to change at line 122
static inline int pagetok_none(int size) { return(size); } static inline int pagetok_none(int size) { return(size); }
static inline int pagetok_left(int size) { return(size << pageshift); } static inline int pagetok_left(int size) { return(size << pageshift); }
static inline int pagetok_right(int size) { return(size >> pageshift); } static inline int pagetok_right(int size) { return(size >> pageshift); }
int valid; int valid;
kstat_ctl_t *kc; kstat_ctl_t *kc;
int cpus; int cpus;
ssize_t memory_total; ptrdiff_t memory_total;
ssize_t memory_used; ptrdiff_t memory_used;
ssize_t memory_free; ptrdiff_t memory_free;
ssize_t swap_total; ptrdiff_t swap_total;
ssize_t swap_used; ptrdiff_t swap_used;
ssize_t swap_free; ptrdiff_t swap_free;
}; };
// </group> // </group>
int HostMachineInfo::pageshift = 0; int HostMachineInfo::pageshift = 0;
HostMachineInfo::~HostMachineInfo( ) { if ( kc ) kstat_close(kc); } HostMachineInfo::~HostMachineInfo( ) { if ( kc ) kstat_close(kc); }
HostMachineInfo::HostMachineInfo( ) : valid(1), kc(NULL) HostMachineInfo::HostMachineInfo( ) : valid(1), kc(NULL)
{ {
 End of changes. 2 change blocks. 
8 lines changed or deleted 8 lines changed or added


 IPosition.h   IPosition.h 
skipping to change at line 26 skipping to change at line 26
//# along with this library; if not, write to the Free Software Foundation, //# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# $Id: IPosition.h 21197 2012-03-14 14:30:48Z gervandiepen $ //# $Id: IPosition.h 21269 2012-10-23 04:02:28Z Malte.Marquarding@gmail.com $
#ifndef CASA_IPOSITION_H #ifndef CASA_IPOSITION_H
#define CASA_IPOSITION_H #define CASA_IPOSITION_H
//# Includes //# Includes
#include <casa/aips.h> #include <casa/aips.h>
#include <casa/iosfwd.h> #include <casa/iosfwd.h>
#include <casa/BasicSL/String.h> #include <casa/BasicSL/String.h>
#include <vector> #include <vector>
#include <cstddef> // for ptrdiff_t #include <cstddef> // for ptrdiff_t
#include <sys/types.h>
namespace casa { //# NAMESPACE CASA - BEGIN namespace casa { //# NAMESPACE CASA - BEGIN
//# Forward Declarations //# Forward Declarations
class AipsIO; class AipsIO;
class LogIO; class LogIO;
template<class T> class Array; template<class T> class Array;
template<class T> class Vector; template<class T> class Vector;
// <summary> A Vector of integers, for indexing into Array<T> objects. </su mmary> // <summary> A Vector of integers, for indexing into Array<T> objects. </su mmary>
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 ImageProxy.h   ImageProxy.h 
skipping to change at line 27 skipping to change at line 27
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# //#
//# $Id: ImageProxy.h 21239 2012-04-05 14:35:49Z gervandiepen $ //# $Id: ImageProxy.h 21279 2012-11-02 15:01:56Z gervandiepen $
#ifndef IMAGES_IMAGEPROXY_H #ifndef IMAGES_IMAGEPROXY_H
#define IMAGES_IMAGEPROXY_H #define IMAGES_IMAGEPROXY_H
//# Includes //# Includes
#include <images/Images/MaskSpecifier.h> #include <images/Images/MaskSpecifier.h>
#include <lattices/Lattices/LatticeBase.h> #include <lattices/Lattices/LatticeBase.h>
#include <lattices/Lattices/TiledShape.h> #include <lattices/Lattices/TiledShape.h>
#include <casa/Utilities/CountedPtr.h> #include <casa/Utilities/CountedPtr.h>
#include <casa/Containers/ValueHolder.h> #include <casa/Containers/ValueHolder.h>
skipping to change at line 104 skipping to change at line 104
ImageProxy (const IPosition& shape, ImageProxy (const IPosition& shape,
const ValueHolder& value, const ValueHolder& value,
const Record& coordinates, const Record& coordinates,
const String& imageName = String(), const String& imageName = String(),
Bool overwrite = True, Bool overwrite = True,
Bool asHDF5 = False, Bool asHDF5 = False,
const String& maskName = String(), const String& maskName = String(),
const IPosition& tileShape = IPosition(), const IPosition& tileShape = IPosition(),
Int dummy=0); Int dummy=0);
// Construct from an existing image object.
ImageProxy (const CountedPtr<LatticeBase>&);
// Copy constructor (reference semantics). // Copy constructor (reference semantics).
ImageProxy (const ImageProxy&); ImageProxy (const ImageProxy&);
// Assignment (reference semantics). // Assignment (reference semantics).
ImageProxy& operator= (const ImageProxy&); ImageProxy& operator= (const ImageProxy&);
~ImageProxy(); ~ImageProxy();
// Open an image in the file/table with the given name. // Open an image in the file/table with the given name.
// The specified mask will be applied (default is default mask). // The specified mask will be applied (default is default mask).
 End of changes. 2 change blocks. 
1 lines changed or deleted 4 lines changed or added


 ImageRegrid.tcc   ImageRegrid.tcc 
skipping to change at line 27 skipping to change at line 27
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# //#
//# $Id: ImageRegrid.tcc 21130 2011-10-18 07:39:05Z gervandiepen $ //# $Id: ImageRegrid.tcc 21271 2012-10-26 05:09:33Z Malte.Marquarding@gmail .com $
#include <images/Images/ImageRegrid.h> #include <images/Images/ImageRegrid.h>
#include <casa/Arrays/ArrayAccessor.h> #include <casa/Arrays/ArrayAccessor.h>
#include <casa/Arrays/ArrayMath.h> #include <casa/Arrays/ArrayMath.h>
#include <casa/Arrays/ArrayLogical.h> #include <casa/Arrays/ArrayLogical.h>
#include <casa/Arrays/ArrayIO.h> #include <casa/Arrays/ArrayIO.h>
#include <casa/Arrays/Cube.h> #include <casa/Arrays/Cube.h>
#include <casa/Arrays/Vector.h> #include <casa/Arrays/Vector.h>
#include <casa/Arrays/Matrix.h> #include <casa/Arrays/Matrix.h>
skipping to change at line 687 skipping to change at line 687
cerr << "inIsMasked " << inIsMasked << endl; cerr << "inIsMasked " << inIsMasked << endl;
cerr << "outIsMasked " << outIsMasked << endl; cerr << "outIsMasked " << outIsMasked << endl;
} }
if (itsShowLevel>0) { if (itsShowLevel>0) {
if (method==Interpolate2D::NEAREST) { if (method==Interpolate2D::NEAREST) {
cerr << "Method is nearest" << endl; cerr << "Method is nearest" << endl;
} else if (method==Interpolate2D::LINEAR) { } else if (method==Interpolate2D::LINEAR) {
cerr << "Method is linear" << endl; cerr << "Method is linear" << endl;
} else if (method==Interpolate2D::CUBIC) { } else if (method==Interpolate2D::CUBIC) {
cerr << "Method is cubic" << endl; cerr << "Method is cubic" << endl;
} } else if (method==Interpolate2D::LANCZOS) {
cerr << "Method is Lanczos" << endl;
}
} }
// We iterate through the output image by tile. We iterate through // We iterate through the output image by tile. We iterate through
// each tile by matrix holding the Direction Coordinate axes (in // each tile by matrix holding the Direction Coordinate axes (in
// some order). We have a matrix(i=1:nrows,j=1:ncols). // some order). We have a matrix(i=1:nrows,j=1:ncols).
// //
// pixelAxisMap1(i) says where pixel axis i in the output image is // pixelAxisMap1(i) says where pixel axis i in the output image is
// in the input image // in the input image
// pixelAxisMap2(i) says where pixel axis i in the // pixelAxisMap2(i) says where pixel axis i in the
// input image is in the output image // input image is in the output image
skipping to change at line 1737 skipping to change at line 1739
} else if (method==Interpolate2D::LINEAR) { } else if (method==Interpolate2D::LINEAR) {
method1D = InterpolateArray1D<Float,Float>::linear; method1D = InterpolateArray1D<Float,Float>::linear;
if (itsShowLevel>0) { if (itsShowLevel>0) {
cerr << "Method = linear" << endl; cerr << "Method = linear" << endl;
} }
} else if (method==Interpolate2D::CUBIC) { } else if (method==Interpolate2D::CUBIC) {
method1D = InterpolateArray1D<Float,Float>::spline; method1D = InterpolateArray1D<Float,Float>::spline;
if (itsShowLevel>0) { if (itsShowLevel>0) {
cerr << "Method = cubic spline" << endl; cerr << "Method = cubic spline" << endl;
} }
} else if (method==Interpolate2D::LANCZOS) {
throw(AipsError("Lanczos interpolation not implemented for 1D interpo
lations"));
} }
// Progress meter // Progress meter
ProgressMeter* pProgressMeter = 0; ProgressMeter* pProgressMeter = 0;
if (showProgress) { if (showProgress) {
Double nMin = 0.0; Double nMin = 0.0;
Double nMax = Double(outLattice.shape().product()) / Double nMax = Double(outLattice.shape().product()) /
Double(outIter.cursorShape().product()); Double(outIter.cursorShape().product());
ostringstream oss; ostringstream oss;
 End of changes. 3 change blocks. 
2 lines changed or deleted 7 lines changed or added


 Interpolate2D.h   Interpolate2D.h 
skipping to change at line 26 skipping to change at line 26
//# along with this library; if not, write to the Free Software Foundation, //# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# $Id: Interpolate2D.h 21024 2011-03-01 11:46:18Z gervandiepen $ //# $Id: Interpolate2D.h 21271 2012-10-26 05:09:33Z Malte.Marquarding@gmail .com $
#ifndef SCIMATH_INTERPOLATE2D_H #ifndef SCIMATH_INTERPOLATE2D_H
#define SCIMATH_INTERPOLATE2D_H #define SCIMATH_INTERPOLATE2D_H
//# Includes //# Includes
#include <casa/aips.h> #include <casa/aips.h>
namespace casa { //# NAMESPACE CASA - BEGIN namespace casa { //# NAMESPACE CASA - BEGIN
//# Forward declarations //# Forward declarations
skipping to change at line 110 skipping to change at line 110
enum Method { enum Method {
// Nearest neighbour // Nearest neighbour
NEAREST, NEAREST,
// Bilinear // Bilinear
LINEAR, LINEAR,
// Bicubic // Bicubic
CUBIC}; CUBIC,
// Lanczos
LANCZOS};
// Constructor // Constructor
Interpolate2D(Interpolate2D::Method method=Interpolate2D::LINEAR); Interpolate2D(Interpolate2D::Method method=Interpolate2D::LINEAR);
// Copy constructor (copy semantics) // Copy constructor (copy semantics)
Interpolate2D(const Interpolate2D &other); Interpolate2D(const Interpolate2D &other);
// destructor // destructor
~Interpolate2D(); ~Interpolate2D();
skipping to change at line 212 skipping to change at line 215
Bool interpLinearBool(Bool &result, const Vector<Double> &where, Bool interpLinearBool(Bool &result, const Vector<Double> &where,
const Matrix<Bool> &data) const; const Matrix<Bool> &data) const;
// bi-cubic interpolation // bi-cubic interpolation
template <typename T> template <typename T>
Bool interpCubic(T &result, const Vector<Double> &where, Bool interpCubic(T &result, const Vector<Double> &where,
const Matrix<T> &data, const Matrix<T> &data,
const Matrix<Bool>* &maskPtr) const; const Matrix<Bool>* &maskPtr) const;
Bool interpCubicBool(Bool &result, const Vector<Double> &where, Bool interpCubicBool(Bool &result, const Vector<Double> &where,
const Matrix<Bool> &data) const; const Matrix<Bool> &data) const;
// Lanczos interpolation
template <typename T>
Bool interpLanczos(T &result, const Vector<Double> &where,
const Matrix<T> &data,
const Matrix<Bool>* &maskPtr) const;
Bool interpLanczosBool(Bool &result, const Vector<Double> &where,
const Matrix<Bool> &data) const;
// Lanczos interpolation: helper functions
template <typename T>
T sinc(const T x) const;
template <typename T>
T L(const T x, const Int a) const;
// helping routine from numerical recipes // helping routine from numerical recipes
void bcucof (Double c[4][4], const Double y[4], void bcucof (Double c[4][4], const Double y[4],
const Double y1[4], const Double y1[4],
const Double y2[4], const Double y12[4]) const; const Double y2[4], const Double y12[4]) const;
// //
Interpolate2D::Method itsMethod; Interpolate2D::Method itsMethod;
// Typedefs for function pointers // Typedefs for function pointers
typedef Bool(Interpolate2D::*FuncPtrFloat) typedef Bool(Interpolate2D::*FuncPtrFloat)
(Float &result, (Float &result,
 End of changes. 3 change blocks. 
2 lines changed or deleted 19 lines changed or added


 Interpolate2D2.tcc   Interpolate2D2.tcc 
skipping to change at line 26 skipping to change at line 26
//# along with this library; if not, write to the Free Software Foundation, //# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# $Id: Interpolate2D2.tcc 20253 2008-02-23 15:15:00Z gervandiepen $ //# $Id: Interpolate2D2.tcc 21271 2012-10-26 05:09:33Z Malte.Marquarding@gm ail.com $
#include <scimath/Mathematics/Interpolate2D.h> #include <scimath/Mathematics/Interpolate2D.h>
#include <casa/Arrays/Matrix.h> #include <casa/Arrays/Matrix.h>
#include <casa/Arrays/Vector.h> #include <casa/Arrays/Vector.h>
#include <casa/BasicSL/Constants.h>
namespace casa { //# NAMESPACE CASA - BEGIN namespace casa { //# NAMESPACE CASA - BEGIN
template <typename T> template <typename T>
Bool Interpolate2D::interpNearest(T &result, Bool Interpolate2D::interpNearest(T &result,
const Vector<Double> &where, const Vector<Double> &where,
const Matrix<T> &data, const Matrix<T> &data,
const Matrix<Bool>* &maskPtr) const { const Matrix<Bool>* &maskPtr) const {
// definition of the 'neighborhood' of outer edge data elements. // definition of the 'neighborhood' of outer edge data elements.
static const Double half= .5001; static const Double half= .5001;
skipping to change at line 250 skipping to change at line 251
bcucof(itsC, itsY, itsY1, itsY2, itsY12); bcucof(itsC, itsY, itsY1, itsY2, itsY12);
result = 0.0; result = 0.0;
for (Int i=3; i>=0; --i) { for (Int i=3; i>=0; --i) {
result = TT*result + ((itsC[i][3]*UU + itsC[i][2])*UU + result = TT*result + ((itsC[i][3]*UU + itsC[i][2])*UU +
itsC[i][1])*UU + itsC[i][0]; itsC[i][1])*UU + itsC[i][0];
} }
// //
return True; return True;
} }
template <typename T>
Bool Interpolate2D::interpLanczos(T &result,
const Vector<Double> &where,
const Matrix<T> &data,
const Matrix<Bool>* &maskPtr) const {
//
// Lanczos 2D interpolation
//
// Hardcoded kernel size
const Double a = 3;
const IPosition& shape = data.shape();
const Double x = where[0];
const Double y = where[1];
const T floorx = floor(x);
const T floory = floor(y);
// Handle mask
if (anyBadMaskPixels(maskPtr, x-a+1, x+a, y-a+1, y+a)) return False;
// Where we can't sum over the full support of the kernel due to proxim
ity
// to the edge, set the pixel value to zero. This is just one way of
// dealing with edge effects, another could be to revert to linear
// interpolation.
if (floorx < a || floorx >= shape[0] - a || floory < a || floory >= sha
pe[1] - a) {
result = 0;
return True;
}
// Interpolate
result = 0;
for (T i = floorx - a + 1; i <= floorx + a; ++i) {
for (T j = floory - a + 1; j <= floory + a; ++j) {
result += data(i, j) * L(x - i, a) * L(y - j, a);
}
}
return True;
}
// Lanczos interpolation: helper function
template <typename T>
T Interpolate2D::sinc(const T x) const {
if (x == 0) {
return 1;
} else {
return sin(C::pi * x) / (C::pi * x);
}
}
// Lanczos interpolation: helper function
template <typename T>
T Interpolate2D::L(const T x, const Int a) const {
if (-a < x && x < a) {
return sinc(x) * sinc (x/a);
} else {
return 0;
}
}
} //# NAMESPACE CASA - END } //# NAMESPACE CASA - END
 End of changes. 3 change blocks. 
1 lines changed or deleted 65 lines changed or added


 LCSlicer.h   LCSlicer.h 
skipping to change at line 26 skipping to change at line 26
//# along with this library; if not, write to the Free Software Foundation, //# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# $Id: LCSlicer.h 20505 2009-01-19 14:37:24Z gervandiepen $ //# $Id: LCSlicer.h 21349 2013-05-13 12:20:44Z gervandiepen $
#ifndef LATTICES_LCSLICER_H #ifndef LATTICES_LCSLICER_H
#define LATTICES_LCSLICER_H #define LATTICES_LCSLICER_H
//# Includes //# Includes
#include <lattices/Lattices/RegionType.h> #include <lattices/Lattices/RegionType.h>
#include <casa/Arrays/Vector.h> #include <casa/Arrays/Vector.h>
#include <casa/BasicSL/String.h> #include <casa/BasicSL/String.h>
namespace casa { //# NAMESPACE CASA - BEGIN namespace casa { //# NAMESPACE CASA - BEGIN
skipping to change at line 53 skipping to change at line 53
// <summary> // <summary>
// Class to define a rectangular box of interest with strides. // Class to define a rectangular box of interest with strides.
// </summary> // </summary>
// <use visibility=export> // <use visibility=export>
// <reviewed reviewer="" date="" tests=""> // <reviewed reviewer="" date="" tests="">
// </reviewed> // </reviewed>
// <prerequisite> // <prerequisite>
// <li> <linkto class=LCBox>LCBox</linkto> // <li> <linkto class=Slicer>Slicer</linkto>
// </prerequisite> // </prerequisite>
// <synopsis> // <synopsis>
// The LCSlicer makes it possible to define a rectangular box // The LCSlicer makes it possible to define a rectangular box
// with strides. Note that this class is not derived from // with strides. Note that this class is not derived from
// <linkto class=LCRegion>LCRegion</linkto>, so it cannot be used in // <linkto class=LCRegion>LCRegion</linkto>, so it cannot be used in
// a compound region object like <linkto class=LCUnion>LCUnion</linkto>. // a compound region object like <linkto class=LCUnion>LCUnion</linkto>.
// The reason is that strides make it impossible to use a region // The reason is that strides make it impossible to use a region
// in a compound. // in a compound.
// <br> // <br>
// The slicer region has to be defined from an // The slicer region can be defined from an
// <linkto class=LCBox>LCBox</linkto> object defining the blc/trc // <linkto class=Slicer>Slicer</linkto> object defining the blc/trc
// and a vector (of the same length) containing the strides. // and a vector (of the same length) containing the strides.
// The LCSlicer can be of any type (thus relative, fractional, unspecified) , // The LCSlicer can be of any type (thus relative, fractional, unspecified) ,
// while the strides can be defined as a number or a fraction. // while the strides can be defined as a number or a fraction.
// <br> // <br>
// It is also possible to construct it directly from a // It is also possible to construct it directly from a
// <linkto class=Slicer>Slicer</linkto> object, // <linkto class=Slicer>Slicer</linkto> object,
// </synopsis> // </synopsis>
// <example> // <example>
// <srcblock> // <srcblock>
skipping to change at line 91 skipping to change at line 91
class LCSlicer class LCSlicer
{ {
public: public:
LCSlicer(); LCSlicer();
// Construct a slicer from the blc, trc, and stride (default 1). // Construct a slicer from the blc, trc, and stride (default 1).
// The vectors can be different in lengths. The longest determines // The vectors can be different in lengths. The longest determines
// the dimensionality of the region. The shorter ones get padded // the dimensionality of the region. The shorter ones get padded
// with default values. // with default values.
// <br> For each axis (or all axes) it can be defined if the blc/trc ar
e
// given as pixel coordinates or as fractional values between 0 and 1.
In the
// latter case the true pixel coordinate is derived from the image shap
e.
// <br> Also the region type can be given, if needed per axis.
// <ul>
// <li> RegionType::Abs is absolute
// <li> RegionType::RelRef is relative to reference pixel given in toSl
ice().
// <li> RegionType::RelCen is relative to image center.
// </ul>
// <group> // <group>
LCSlicer (const Vector<Float>& blc, const Vector<Float>& trc, LCSlicer (const Vector<Float>& blc, const Vector<Float>& trc,
Bool fractionalBlcTrc = False, Bool fractionalBlcTrc = False,
RegionType::AbsRelType = RegionType::Abs); RegionType::AbsRelType = RegionType::Abs);
LCSlicer (const Vector<Float>& blc, const Vector<Float>& trc, LCSlicer (const Vector<Float>& blc, const Vector<Float>& trc,
const Vector<Float>& inc, Bool fractionalBlcTrc = False, const Vector<Float>& inc, Bool fractionalBlcTrc = False,
RegionType::AbsRelType = RegionType::Abs); RegionType::AbsRelType = RegionType::Abs);
LCSlicer (const Vector<Float>& blc, const Vector<Float>& trc, LCSlicer (const Vector<Float>& blc, const Vector<Float>& trc,
const Vector<Float>& inc, const Vector<Float>& inc,
const Vector<Bool>& fractionalBlc, const Vector<Bool>& fractionalBlc,
 End of changes. 4 change blocks. 
4 lines changed or deleted 17 lines changed or added


 LatticeFractile.tcc   LatticeFractile.tcc 
skipping to change at line 26 skipping to change at line 26
//# along with this library; if not, write to the Free Software Foundation, //# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# $Id: LatticeFractile.tcc 19909 2007-02-23 02:08:02Z Malte.Marquarding $ //# $Id: LatticeFractile.tcc 21251 2012-07-05 08:06:24Z gervandiepen $
#include <lattices/Lattices/LatticeFractile.h> #include <lattices/Lattices/LatticeFractile.h>
#include <lattices/Lattices/MaskedLattice.h> #include <lattices/Lattices/MaskedLattice.h>
#include <lattices/Lattices/MaskedLatticeIterator.h> #include <lattices/Lattices/MaskedLatticeIterator.h>
#include <casa/Arrays/Vector.h> #include <casa/Arrays/Vector.h>
#include <casa/Arrays/ArrayMath.h> #include <casa/Arrays/ArrayMath.h>
#include <casa/Containers/Block.h> #include <casa/Containers/Block.h>
#include <casa/Utilities/GenSort.h> #include <casa/Utilities/GenSort.h>
#include <casa/Utilities/COWPtr.h> #include <casa/Utilities/COWPtr.h>
#include <casa/Utilities/Assert.h> #include <casa/Utilities/Assert.h>
skipping to change at line 136 skipping to change at line 136
minv = dataPtr[i]; minv = dataPtr[i];
} else if (dataPtr[i] > maxv) { } else if (dataPtr[i] > maxv) {
maxv = dataPtr[i]; maxv = dataPtr[i];
} }
Int bin = Int((dataPtr[i] - stv)/step); Int bin = Int((dataPtr[i] - stv)/step);
if (bin < 0) { if (bin < 0) {
hist[0]++; hist[0]++;
} else if (bin >= Int(nbins)) { } else if (bin >= Int(nbins)) {
hist[nbins-1]++; hist[nbins-1]++;
} else { } else {
if (dataPtr[i] < boundaries[bin]) { if (dataPtr[i] < boundaries[bin] && bin > 0) {
bin--; bin--;
} else if (dataPtr[i] >= boundaries[bin+1]) { } else if (dataPtr[i] >= boundaries[bin+1] && bin < Int(nbins)-1) {
bin++; bin++;
} }
hist[bin]++; hist[bin]++;
} }
} }
array.freeStorage (dataPtr, delData); array.freeStorage (dataPtr, delData);
iter++; iter++;
} }
} }
skipping to change at line 203 skipping to change at line 203
} else if (dataPtr[i] > maxv) { } else if (dataPtr[i] > maxv) {
maxv = dataPtr[i]; maxv = dataPtr[i];
} }
} }
Int bin = Int((dataPtr[i] - stv)/step); Int bin = Int((dataPtr[i] - stv)/step);
if (bin < 0) { if (bin < 0) {
hist[0]++; hist[0]++;
} else if (bin >= Int(nbins)) { } else if (bin >= Int(nbins)) {
hist[nbins-1]++; hist[nbins-1]++;
} else { } else {
if (dataPtr[i] < boundaries[bin]) { if (dataPtr[i] < boundaries[bin] && bin > 0) {
bin--; bin--;
} else if (dataPtr[i] >= boundaries[bin+1]) { } else if (dataPtr[i] >= boundaries[bin+1] && bin < Int(nbins)-1 ) {
bin++; bin++;
} }
hist[bin]++; hist[bin]++;
} }
} }
} }
array.freeStorage (dataPtr, delData); array.freeStorage (dataPtr, delData);
mask->freeStorage (maskPtr, delMask); mask->freeStorage (maskPtr, delMask);
iter++; iter++;
} }
 End of changes. 5 change blocks. 
5 lines changed or deleted 5 lines changed or added


 List.h   List.h 
skipping to change at line 26 skipping to change at line 26
//# along with this library; if not, write to the Free Software Foundation, //# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# $Id: List.h 20551 2009-03-25 00:11:33Z Malte.Marquarding $ //# $Id: List.h 21287 2012-11-16 10:26:27Z gervandiepen $
#ifndef CASA_LIST_H #ifndef CASA_LIST_H
#define CASA_LIST_H #define CASA_LIST_H
//# Includes //# Includes
#include <casa/Utilities/Register.h> #include <casa/Utilities/Register.h>
#include <casa/Utilities/Notice.h> #include <casa/Utilities/Notice.h>
#include <casa/Containers/Link.h> #include <casa/Containers/Link.h>
#include <casa/Utilities/Assert.h> #include <casa/Utilities/Assert.h>
#include <casa/Containers/IterError.h> #include <casa/Containers/IterError.h>
skipping to change at line 631 skipping to change at line 631
// <group> // <group>
ListIter(const ListIter<t> &other); ListIter(const ListIter<t> &other);
ListIter(const ListIter<t> *other) : ConstListIter<t>(other), own(False ){} ListIter(const ListIter<t> *other) : ConstListIter<t>(other), own(False ){}
// </group> // </group>
// //
// This is the default constructor. It allows one // This is the default constructor. It allows one
// to create an initially invalid empty ListIter. The instantiated // to create an initially invalid empty ListIter. The instantiated
// class will accept assignment and thus become valid later. // class will accept assignment and thus become valid later.
// //
ListIter() : ConstListIter<t>() {} ListIter() : ConstListIter<t>(), own(False){}
// //
// This function adds the element to the right of the // This function adds the element to the right of the
// current cursor position. // current cursor position.
// //
void addRight(t e) { void addRight(t e) {
AlwaysAssert(this->isValid(),InvalidIterError); AlwaysAssert(this->isValid(),InvalidIterError);
Link<t> *c = this->cur; Link<t> *c = this->cur;
Link<t> *p = this->prev; Link<t> *p = this->prev;
this->cur = newLink(e,this->prev,this->cur); this->cur = newLink(e,this->prev,this->cur);
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 MSSummary.h   MSSummary.h 
skipping to change at line 26 skipping to change at line 26
//# along with this library; if not, write to the Free Software Foundation, //# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# $Id: MSSummary.h 21130 2011-10-18 07:39:05Z gervandiepen $ //# $Id: MSSummary.h 21259 2012-09-03 09:09:13Z gervandiepen $
//# //#
#ifndef MS_MSSUMMARY_H #ifndef MS_MSSUMMARY_H
#define MS_MSSUMMARY_H #define MS_MSSUMMARY_H
#include <casa/aips.h> #include <casa/aips.h>
#include <casa/BasicSL/String.h> #include <casa/BasicSL/String.h>
#include <ms/MeasurementSets/MSColumns.h> #include <ms/MeasurementSets/MSColumns.h>
namespace casa { //# NAMESPACE CASA - BEGIN namespace casa { //# NAMESPACE CASA - BEGIN
class MeasurementSet; class MeasurementSet;
skipping to change at line 110 skipping to change at line 110
// Retrieve number of rows // Retrieve number of rows
Int nrow() const; Int nrow() const;
// Retrieve image name // Retrieve image name
String name() const; String name() const;
// Set a new MS // Set a new MS
Bool setMS (const MeasurementSet& ms); Bool setMS (const MeasurementSet& ms);
// List all header information. // List all header information.
void list (LogIO& os, Bool verbose=False) const; void list (LogIO& os, Bool verbose=False, Bool oneBased=True) const;
//Return some useful info in a record too along with os //Return some useful info in a record too along with os
void list (LogIO& os, Record& outRec, Bool verbose=False, Bool fillReco void list (LogIO& os, Record& outRec, Bool verbose=False,
rd=True) const; Bool fillRecord=True, Bool oneBased=True) const;
// List a title for the Summary. // List a title for the Summary.
void listTitle (LogIO& os) const; void listTitle (LogIO& os) const;
// List convenient groupings of tables: list where MS obtained // List convenient groupings of tables: list where MS obtained
// (Observation and Array tables) // (Observation and Array tables)
void listWhere (LogIO& os, Bool verbose=False) const; void listWhere (LogIO& os, Bool verbose=False) const;
// List what was observed (Field and Main tables) // List what was observed (Field and Main tables)
void listWhat (LogIO& os, Bool verbose=False) const; void listWhat (LogIO& os, Bool verbose=False) const;
void listWhat (LogIO& os, Record& outRec, Bool verbose=False, Bool fill Record=True) const; void listWhat (LogIO& os, Record& outRec, Bool verbose=False, Bool fill Record=True) const;
// List how data were obtained (SpectralWindow, Feed, and Antenna tables) // List how data were obtained (SpectralWindow, Feed, and Antenna tables)
void listHow (LogIO& os, Bool verbose=False) const; void listHow (LogIO& os, Bool verbose=False, Bool oneBased=True) const;
// List main table // List main table
void listMain (LogIO& os, Bool verbose=False) const; void listMain (LogIO& os, Bool verbose=False) const;
//Return some useful info in a record too along with os //Return some useful info in a record too along with os
void listMain (LogIO& os, Record& outRec, Bool verbose=False, Bool fillR ecord=True) const; void listMain (LogIO& os, Record& outRec, Bool verbose=False, Bool fillR ecord=True) const;
// Return a Record with information derived from the main table // Return a Record with information derived from the main table
void getScanSummary (Record& outRec) const; void getScanSummary (Record& outRec) const;
// List subtables // List subtables
// <group> // <group>
void listAntenna (LogIO& os, Bool verbose=False) const; void listAntenna (LogIO& os, Bool verbose=False) const;
void listFeed (LogIO& os, Bool verbose=False) const; void listFeed (LogIO& os, Bool verbose=False, Bool oneBased=True) const;
void listField (LogIO& os, Bool verbose=False) const; void listField (LogIO& os, Bool verbose=False) const;
void listField (LogIO& os, Record& outRec, Bool verbose=False, void listField (LogIO& os, Record& outRec, Bool verbose=False,
Bool fillRecord=True) const; Bool fillRecord=True) const;
void listObservation (LogIO& os, Bool verbose=False) const; void listObservation (LogIO& os, Bool verbose=False) const;
void listHistory (LogIO& os) const; void listHistory (LogIO& os) const;
void listPolarization (LogIO& os, Bool verbose=False) const; void listPolarization (LogIO& os, Bool verbose=False) const;
void listSource (LogIO& os, Bool verbose=False) const; void listSource (LogIO& os, Bool verbose=False) const;
void listSpectralWindow (LogIO& os, Bool verbose=False) const; void listSpectralWindow (LogIO& os, Bool verbose=False) const;
void listSpectralAndPolInfo (LogIO& os, Bool verbose=False) const; void listSpectralAndPolInfo (LogIO& os, Bool verbose=False,
Bool oneBased=True) const;
void listSysCal (LogIO& os, Bool verbose=False) const; void listSysCal (LogIO& os, Bool verbose=False) const;
void listWeather (LogIO& os, Bool verbose=False) const; void listWeather (LogIO& os, Bool verbose=False) const;
// </group> // </group>
// List table size summary // List table size summary
void listTables (LogIO& os, Bool verbose=False) const; void listTables (LogIO& os, Bool verbose=False) const;
private: private:
// Clear formatting flags
void clearFlags (LogIO& os) const;
//# Data members.
// Pointer to MS // Pointer to MS
const MeasurementSet* pMS; const MeasurementSet* pMS;
// Formatting strings // Formatting strings
const String dashlin1, dashlin2; const String dashlin1, dashlin2;
// Clear formatting flags
void clearFlags (LogIO& os) const;
// For keeping track of the number of vis per field // For keeping track of the number of vis per field
mutable Vector<Int> nVisPerField_; mutable Vector<Int> nVisPerField_;
}; };
} //# NAMESPACE CASA - END } //# NAMESPACE CASA - END
#endif #endif
 End of changes. 8 change blocks. 
10 lines changed or deleted 12 lines changed or added


 PagedArray.h   PagedArray.h 
skipping to change at line 26 skipping to change at line 26
//# along with this library; if not, write to the Free Software Foundation, //# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# $Id: PagedArray.h 20364 2008-06-30 06:10:38Z gervandiepen $ //# $Id: PagedArray.h 21326 2013-03-19 10:56:12Z gervandiepen $
#ifndef LATTICES_PAGEDARRAY_H #ifndef LATTICES_PAGEDARRAY_H
#define LATTICES_PAGEDARRAY_H #define LATTICES_PAGEDARRAY_H
//# Includes //# Includes
#include <lattices/Lattices/Lattice.h> #include <lattices/Lattices/Lattice.h>
#include <lattices/Lattices/TiledShape.h> #include <lattices/Lattices/TiledShape.h>
#include <tables/Tables/ArrayColumn.h> #include <tables/Tables/ArrayColumn.h>
#include <tables/Tables/Table.h> #include <tables/Tables/Table.h>
#include <tables/Tables/TiledStManAccessor.h> #include <tables/Tables/TiledStManAccessor.h>
skipping to change at line 596 skipping to change at line 596
// Do the reopen of the table (if not open already). // Do the reopen of the table (if not open already).
// <group> // <group>
void doReopen() const; void doReopen() const;
void tempReopen() const; void tempReopen() const;
// </group> // </group>
mutable Table itsTable; mutable Table itsTable;
String itsColumnName; String itsColumnName;
uInt itsRowNumber; uInt itsRowNumber;
mutable Bool itsIsClosed; mutable Bool itsIsClosed;
mutable Bool itsMarkDelete;
String itsTableName; String itsTableName;
Bool itsWritable; Bool itsWritable;
TableLock itsLockOpt; TableLock itsLockOpt;
mutable ArrayColumn<T> itsRWArray; mutable ArrayColumn<T> itsRWArray;
mutable ROArrayColumn<T> itsROArray; mutable ROArrayColumn<T> itsROArray;
mutable ROTiledStManAccessor itsAccessor; mutable ROTiledStManAccessor itsAccessor;
}; };
template<class T> template<class T>
inline ArrayColumn<T>& PagedArray<T>::getRWArray() inline ArrayColumn<T>& PagedArray<T>::getRWArray()
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 PagedArray.tcc   PagedArray.tcc 
skipping to change at line 26 skipping to change at line 26
//# along with this library; if not, write to the Free Software Foundation, //# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# $Id: PagedArray.tcc 20652 2009-07-06 05:04:32Z Malte.Marquarding $ //# $Id: PagedArray.tcc 21326 2013-03-19 10:56:12Z gervandiepen $
#include <lattices/Lattices/PagedArray.h> #include <lattices/Lattices/PagedArray.h>
#include <lattices/Lattices/PagedArrIter.h> #include <lattices/Lattices/PagedArrIter.h>
#include <lattices/Lattices/LatticeNavigator.h> #include <lattices/Lattices/LatticeNavigator.h>
#include <lattices/Lattices/TiledShape.h> #include <lattices/Lattices/TiledShape.h>
#include <casa/Arrays/Array.h> #include <casa/Arrays/Array.h>
#include <casa/Arrays/ArrayLogical.h> #include <casa/Arrays/ArrayLogical.h>
#include <casa/Arrays/ArrayUtil.h> #include <casa/Arrays/ArrayUtil.h>
#include <casa/Exceptions/Error.h> #include <casa/Exceptions/Error.h>
#include <casa/Arrays/Slicer.h> #include <casa/Arrays/Slicer.h>
skipping to change at line 53 skipping to change at line 53
#include <tables/Tables/ColumnDesc.h> #include <tables/Tables/ColumnDesc.h>
#include <tables/Tables/ArrColDesc.h> #include <tables/Tables/ArrColDesc.h>
#include <tables/Tables/TableInfo.h> #include <tables/Tables/TableInfo.h>
#include <casa/Utilities/Assert.h> #include <casa/Utilities/Assert.h>
#include <casa/iostream.h> #include <casa/iostream.h>
namespace casa { //# NAMESPACE CASA - BEGIN namespace casa { //# NAMESPACE CASA - BEGIN
template<class T> template<class T>
PagedArray<T>::PagedArray() PagedArray<T>::PagedArray()
: itsIsClosed (True), : itsIsClosed (True),
itsWritable (False) itsMarkDelete (False),
itsWritable (False)
{ {
// Initializes all private data using their default consructor // Initializes all private data using their default consructor
} }
template<class T> template<class T>
PagedArray<T>::PagedArray (const TiledShape& shape, const String& filename) PagedArray<T>::PagedArray (const TiledShape& shape, const String& filename)
: itsColumnName (defaultColumn()), : itsColumnName (defaultColumn()),
itsRowNumber (defaultRow()), itsRowNumber (defaultRow()),
itsIsClosed (True) itsIsClosed (True)
{ {
skipping to change at line 90 skipping to change at line 91
setTableType(); setTableType();
DebugAssert (ok(), AipsError); DebugAssert (ok(), AipsError);
} }
template<class T> template<class T>
PagedArray<T>::PagedArray (const TiledShape& shape, Table& file) PagedArray<T>::PagedArray (const TiledShape& shape, Table& file)
: itsTable (file), : itsTable (file),
itsColumnName (defaultColumn()), itsColumnName (defaultColumn()),
itsRowNumber (defaultRow()), itsRowNumber (defaultRow()),
itsIsClosed (False), itsIsClosed (False),
itsMarkDelete (False),
itsWritable (file.isWritable()) itsWritable (file.isWritable())
{ {
makeArray (shape); makeArray (shape);
setTableType(); setTableType();
DebugAssert (ok(), AipsError); DebugAssert (ok(), AipsError);
} }
template<class T> template<class T>
PagedArray<T>::PagedArray (const TiledShape& shape, Table& file, PagedArray<T>::PagedArray (const TiledShape& shape, Table& file,
const String& columnName, uInt rowNumber) const String& columnName, uInt rowNumber)
: itsTable (file), : itsTable (file),
itsColumnName (columnName), itsColumnName (columnName),
itsRowNumber (rowNumber), itsRowNumber (rowNumber),
itsIsClosed (False) itsIsClosed (False),
itsMarkDelete (False)
{ {
makeArray (shape); makeArray (shape);
setTableType(); setTableType();
DebugAssert (ok(), AipsError); DebugAssert (ok(), AipsError);
} }
template<class T> template<class T>
PagedArray<T>::PagedArray (const String& filename) PagedArray<T>::PagedArray (const String& filename)
: itsTable (filename), : itsTable (filename),
itsColumnName (defaultColumn()), itsColumnName (defaultColumn()),
itsRowNumber (defaultRow()), itsRowNumber (defaultRow()),
itsIsClosed (False), itsIsClosed (False),
itsMarkDelete (False),
itsROArray (itsTable, itsColumnName), itsROArray (itsTable, itsColumnName),
itsAccessor (itsTable, itsColumnName) itsAccessor (itsTable, itsColumnName)
{ {
DebugAssert (ok(), AipsError); DebugAssert (ok(), AipsError);
} }
template<class T> PagedArray<T>::PagedArray (Table& file) template<class T> PagedArray<T>::PagedArray (Table& file)
: itsTable (file), : itsTable (file),
itsColumnName (defaultColumn()), itsColumnName (defaultColumn()),
itsRowNumber (defaultRow()), itsRowNumber (defaultRow()),
itsIsClosed (False), itsIsClosed (False),
itsMarkDelete (False),
itsROArray (itsTable, itsColumnName), itsROArray (itsTable, itsColumnName),
itsAccessor (itsTable, itsColumnName) itsAccessor (itsTable, itsColumnName)
{ {
DebugAssert (ok(), AipsError); DebugAssert (ok(), AipsError);
} }
template<class T> template<class T>
PagedArray<T>::PagedArray (Table& file, const String& columnName, PagedArray<T>::PagedArray (Table& file, const String& columnName,
uInt rowNumber) uInt rowNumber)
: itsTable (file), : itsTable (file),
itsColumnName (columnName), itsColumnName (columnName),
itsRowNumber (rowNumber), itsRowNumber (rowNumber),
itsIsClosed (False), itsIsClosed (False),
itsMarkDelete (False),
itsROArray (itsTable, itsColumnName), itsROArray (itsTable, itsColumnName),
itsAccessor (itsTable, itsColumnName) itsAccessor (itsTable, itsColumnName)
{ {
DebugAssert (ok(), AipsError); DebugAssert (ok(), AipsError);
} }
template<class T> template<class T>
PagedArray<T>::PagedArray (const PagedArray<T>& other) PagedArray<T>::PagedArray (const PagedArray<T>& other)
: Lattice<T>(), : Lattice<T>(),
itsTable (other.itsTable), itsTable (other.itsTable),
itsColumnName (other.itsColumnName), itsColumnName (other.itsColumnName),
itsRowNumber (other.itsRowNumber), itsRowNumber (other.itsRowNumber),
itsIsClosed (other.itsIsClosed), itsIsClosed (other.itsIsClosed),
itsMarkDelete (other.itsMarkDelete),
itsTableName (other.itsTableName), itsTableName (other.itsTableName),
itsWritable (other.itsWritable), itsWritable (other.itsWritable),
itsLockOpt (other.itsLockOpt), itsLockOpt (other.itsLockOpt),
itsRWArray (other.itsRWArray), itsRWArray (other.itsRWArray),
itsROArray (other.itsROArray), itsROArray (other.itsROArray),
itsAccessor (other.itsAccessor) itsAccessor (other.itsAccessor)
{ {
DebugAssert (ok(), AipsError); DebugAssert (ok(), AipsError);
} }
template<class T> template<class T>
PagedArray<T>::~PagedArray() PagedArray<T>::~PagedArray()
{ {
// Reopen if marked for delete to force that the table files get removed.
if (itsMarkDelete) {
tempReopen();
}
// Only need to do something if really constructed. // Only need to do something if really constructed.
if (! itsTable.isNull()) { if (! itsTable.isNull()) {
// Table may not be written if ref count > 1 - here we force a write. // Table may not be written if ref count > 1 - here we force a write.
// (but only if it is not a scratch table). // (but only if it is not a scratch table).
if (! itsTable.isMarkedForDelete()) { if (! itsTable.isMarkedForDelete()) {
DebugAssert (ok(), AipsError); DebugAssert (ok(), AipsError);
itsTable.flush(); itsTable.flush();
} }
} }
} }
template<class T> template<class T>
PagedArray<T>& PagedArray<T>::operator= (const PagedArray<T>& other) PagedArray<T>& PagedArray<T>::operator= (const PagedArray<T>& other)
{ {
if (this != &other) { if (this != &other) {
itsTable = other.itsTable; itsTable = other.itsTable;
itsColumnName = other.itsColumnName; itsColumnName = other.itsColumnName;
itsRowNumber = other.itsRowNumber; itsRowNumber = other.itsRowNumber;
itsIsClosed = other.itsIsClosed; itsIsClosed = other.itsIsClosed;
itsMarkDelete = other.itsMarkDelete;
itsTableName = other.itsTableName; itsTableName = other.itsTableName;
itsWritable = other.itsWritable; itsWritable = other.itsWritable;
itsLockOpt = other.itsLockOpt; itsLockOpt = other.itsLockOpt;
itsROArray.reference(other.itsROArray); itsROArray.reference(other.itsROArray);
itsRWArray.reference(other.itsRWArray); itsRWArray.reference(other.itsRWArray);
itsAccessor = other.itsAccessor; itsAccessor = other.itsAccessor;
} }
DebugAssert (ok(), AipsError); DebugAssert (ok(), AipsError);
return *this; return *this;
} }
skipping to change at line 497 skipping to change at line 509
} }
} }
} }
template<class T> template<class T>
void PagedArray<T>::makeTable (const String& filename, void PagedArray<T>::makeTable (const String& filename,
Table::TableOption option) Table::TableOption option)
{ {
SetupNewTable setupTable(filename, TableDesc(), option); SetupNewTable setupTable(filename, TableDesc(), option);
itsTable = Table(setupTable); itsTable = Table(setupTable);
itsIsClosed = False; itsIsClosed = False;
itsWritable = True; itsMarkDelete = False;
itsWritable = True;
} }
template<class T> template<class T>
String PagedArray<T>::defaultComment() String PagedArray<T>::defaultComment()
{ {
return String("version 4.0"); return String("version 4.0");
} }
template<class T> template<class T>
void PagedArray<T>::makeRWArray() void PagedArray<T>::makeRWArray()
skipping to change at line 555 skipping to change at line 568
} }
} }
template<class T> template<class T>
void PagedArray<T>::tempClose() void PagedArray<T>::tempClose()
{ {
if (!itsIsClosed) { if (!itsIsClosed) {
itsTable.flush(); itsTable.flush();
itsTableName = itsTable.tableName(); itsTableName = itsTable.tableName();
itsWritable = itsTable.isWritable(); itsWritable = itsTable.isWritable();
itsLockOpt = itsTable.lockOptions(); itsLockOpt = itsTable.lockOptions();
itsTable = Table(); // Take care that table does not get deleted on temporary close.
if (itsTable.isMarkedForDelete()) {
itsMarkDelete = True;
itsTable.unmarkForDelete();
}
itsTable = Table();
itsROArray.reference (ROArrayColumn<T>()); itsROArray.reference (ROArrayColumn<T>());
itsRWArray.reference (ArrayColumn<T>()); itsRWArray.reference (ArrayColumn<T>());
itsIsClosed = True; itsIsClosed = True;
} }
} }
template<class T> template<class T>
void PagedArray<T>::reopen() void PagedArray<T>::reopen()
{ {
doReopen(); doReopen();
skipping to change at line 581 skipping to change at line 599
if (itsIsClosed) { if (itsIsClosed) {
if (itsWritable) { if (itsWritable) {
itsTable = Table (itsTableName, itsLockOpt, Table::Update); itsTable = Table (itsTableName, itsLockOpt, Table::Update);
itsRWArray.attach (itsTable, itsColumnName); itsRWArray.attach (itsTable, itsColumnName);
} else { } else {
itsTable = Table (itsTableName, itsLockOpt); itsTable = Table (itsTableName, itsLockOpt);
} }
itsROArray.attach (itsTable, itsColumnName); itsROArray.attach (itsTable, itsColumnName);
itsAccessor = ROTiledStManAccessor (itsTable, itsColumnName); itsAccessor = ROTiledStManAccessor (itsTable, itsColumnName);
itsIsClosed = False; itsIsClosed = False;
// Mark the table for delete if needed.
if (itsMarkDelete) {
itsTable.markForDelete();
itsMarkDelete = False;
}
} }
} }
} //# NAMESPACE CASA - END } //# NAMESPACE CASA - END
 End of changes. 13 change blocks. 
7 lines changed or deleted 30 lines changed or added


 PagedImage.h   PagedImage.h 
skipping to change at line 26 skipping to change at line 26
//# along with this library; if not, write to the Free Software Foundation, //# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# $Id: PagedImage.h 21200 2012-03-20 09:55:47Z gervandiepen $ //# $Id: PagedImage.h 21326 2013-03-19 10:56:12Z gervandiepen $
#ifndef IMAGES_PAGEDIMAGE_H #ifndef IMAGES_PAGEDIMAGE_H
#define IMAGES_PAGEDIMAGE_H #define IMAGES_PAGEDIMAGE_H
//# Includes //# Includes
#include <images/Images/ImageInterface.h> #include <images/Images/ImageInterface.h>
#include <images/Images/ImageAttrHandlerCasa.h> #include <images/Images/ImageAttrHandlerCasa.h>
#include <lattices/Lattices/PagedArray.h> #include <lattices/Lattices/PagedArray.h>
#include <tables/Tables/Table.h> #include <tables/Tables/Table.h>
#include <casa/Utilities/DataType.h> #include <casa/Utilities/DataType.h>
skipping to change at line 408 skipping to change at line 408
// This must be called in every constructor and place where the image // This must be called in every constructor and place where the image
// is attached to a new image. // is attached to a new image.
void attach_logtable(); void attach_logtable();
void open_logtable(); void open_logtable();
void restoreUnits (const TableRecord& rec); void restoreUnits (const TableRecord& rec);
void restoreMiscInfo (const TableRecord& rec); void restoreMiscInfo (const TableRecord& rec);
void restoreImageInfo (const TableRecord& rec); void restoreImageInfo (const TableRecord& rec);
void restoreAll (const TableRecord& rec); void restoreAll (const TableRecord& rec);
void check_conformance (const Lattice<T>& other); void check_conformance (const Lattice<T>& other);
void reopenRW() void reopenRW();
{
//# Open for write if not done yet and if writable.
if (!table().isWritable() && isWritable()) {
doReopenRW();
}
}
void doReopenRW();
void setTableType(); void setTableType();
void applyMaskSpecifier (const MaskSpecifier&); void applyMaskSpecifier (const MaskSpecifier&);
void applyMask (const String& maskName); void applyMask (const String& maskName);
void makePagedImage (const TiledShape& mapShape, void makePagedImage (const TiledShape& mapShape,
const CoordinateSystem& coordinateInfo, const CoordinateSystem& coordinateInfo,
const String& nameOfNewFile, const String& nameOfNewFile,
const TableLock& lockOptions, const TableLock& lockOptions,
uInt rowNumber); uInt rowNumber);
void makePagedImage (const String& filename, const TableLock& lockOptions , void makePagedImage (const String& filename, const TableLock& lockOptions ,
const MaskSpecifier&, uInt rowNumber); const MaskSpecifier&, uInt rowNumber);
 End of changes. 2 change blocks. 
9 lines changed or deleted 2 lines changed or added


 PagedImage.tcc   PagedImage.tcc 
skipping to change at line 26 skipping to change at line 26
//# along with this library; if not, write to the Free Software Foundation, //# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# $Id: PagedImage.tcc 21200 2012-03-20 09:55:47Z gervandiepen $ //# $Id: PagedImage.tcc 21326 2013-03-19 10:56:12Z gervandiepen $
#include <images/Images/PagedImage.h> #include <images/Images/PagedImage.h>
#include <images/Regions/ImageRegion.h> #include <images/Regions/ImageRegion.h>
#include <images/Regions/RegionHandlerTable.h> #include <images/Regions/RegionHandlerTable.h>
#include <images/Images/ImageInfo.h> #include <images/Images/ImageInfo.h>
#include <lattices/Lattices/ArrayLattice.h> #include <lattices/Lattices/ArrayLattice.h>
#include <lattices/Lattices/LatticeNavigator.h> #include <lattices/Lattices/LatticeNavigator.h>
#include <lattices/Lattices/LatticeStepper.h> #include <lattices/Lattices/LatticeStepper.h>
#include <lattices/Lattices/LatticeIterator.h> #include <lattices/Lattices/LatticeIterator.h>
#include <lattices/Lattices/PagedArrIter.h> #include <lattices/Lattices/PagedArrIter.h>
skipping to change at line 275 skipping to change at line 275
return True; return True;
} }
template <class T> template <class T>
Bool PagedImage<T>::isWritable() const Bool PagedImage<T>::isWritable() const
{ {
return map_p.isWritable(); return map_p.isWritable();
} }
template<class T> template<class T>
void PagedImage<T>::doReopenRW() void PagedImage<T>::reopenRW()
{ {
table().reopenRW(); //# First reopen if needed.
map_p.reopen();
//# Open for write if not done yet and if writable.
if (!table().isWritable() && isWritable()) {
table().reopenRW();
}
} }
template<class T> template<class T>
Bool PagedImage<T>::hasPixelMask() const Bool PagedImage<T>::hasPixelMask() const
{ {
return (regionPtr_p != 0 && regionPtr_p->hasMask()); return (regionPtr_p != 0 && regionPtr_p->hasMask());
} }
template<class T> template<class T>
const Lattice<Bool>& PagedImage<T>::pixelMask() const const Lattice<Bool>& PagedImage<T>::pixelMask() const
skipping to change at line 501 skipping to change at line 506
if (rec.isDefined("miscinfo") && if (rec.isDefined("miscinfo") &&
rec.dataType("miscinfo") == TpRecord) { rec.dataType("miscinfo") == TpRecord) {
setMiscInfoMember (rec.asRecord ("miscinfo")); setMiscInfoMember (rec.asRecord ("miscinfo"));
} }
} }
template<class T> template<class T>
Bool PagedImage<T>::setMiscInfo (const RecordInterface& newInfo) Bool PagedImage<T>::setMiscInfo (const RecordInterface& newInfo)
{ {
setMiscInfoMember (newInfo); setMiscInfoMember (newInfo);
Table& tab = table();
reopenRW(); reopenRW();
Table& tab = table();
if (! tab.isWritable()) { if (! tab.isWritable()) {
return False; return False;
} }
if (tab.keywordSet().isDefined("miscinfo")) { if (tab.keywordSet().isDefined("miscinfo")) {
tab.rwKeywordSet().removeField("miscinfo"); tab.rwKeywordSet().removeField("miscinfo");
} }
tab.rwKeywordSet().defineRecord("miscinfo", newInfo); tab.rwKeywordSet().defineRecord("miscinfo", newInfo);
return True; return True;
} }
 End of changes. 5 change blocks. 
4 lines changed or deleted 9 lines changed or added


 Table.h   Table.h 
skipping to change at line 26 skipping to change at line 26
//# along with this library; if not, write to the Free Software Foundation, //# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# $Id: Table.h 21168 2012-01-04 08:11:03Z gervandiepen $ //# $Id: Table.h 21252 2012-07-17 09:28:31Z gervandiepen $
#ifndef TABLES_TABLE_H #ifndef TABLES_TABLE_H
#define TABLES_TABLE_H #define TABLES_TABLE_H
//# Includes //# Includes
#include <casa/aips.h> #include <casa/aips.h>
#include <tables/Tables/BaseTable.h> #include <tables/Tables/BaseTable.h>
#include <tables/Tables/TableLock.h> #include <tables/Tables/TableLock.h>
#include <tables/Tables/TSMOption.h> #include <tables/Tables/TSMOption.h>
#include <casa/Utilities/DataType.h> #include <casa/Utilities/DataType.h>
skipping to change at line 293 skipping to change at line 293
// </group> // </group>
// Create a table object as the virtual concatenation of // Create a table object as the virtual concatenation of
// one or more of existing tables. The descriptions of all those tables // one or more of existing tables. The descriptions of all those tables
// must be exactly the same. // must be exactly the same.
// <br>The keywordset of the virtual table is the set of the first tabl e // <br>The keywordset of the virtual table is the set of the first tabl e
// including its subtables. However, it is possible to specify the name s // including its subtables. However, it is possible to specify the name s
// of the subtables that have to be concantenated as well. // of the subtables that have to be concantenated as well.
// <br>In this way a concatenation of multiple MS-s can be made, where it // <br>In this way a concatenation of multiple MS-s can be made, where it
// can be specified that, say, the SYSCAL table has to be concatenated too. // can be specified that, say, the SYSCAL table has to be concatenated too.
// <br> When a concatenated table is written and if a non-empty
// <src>subDirName</src> is given, the tables to be concatenated will b
e
// moved to that subdirectory in the directory of the concatenated tabl
e.
// This option is mainly used by the MSS structure used in CASA.
// <br> // <br>
// The only open options allowed are Old and Update. // The only open options allowed are Old and Update.
// Locking options can be given (see class // Locking options can be given (see class
// <linkto class=TableLock>TableLock</linkto>. // <linkto class=TableLock>TableLock</linkto>.
// They apply to all underlying tables. // They apply to all underlying tables.
// If a table was already opened in this process, // If a table was already opened in this process,
// the existing and new locking options are merged using // the existing and new locking options are merged using
// <src>TableLock::merge</src>. // <src>TableLock::merge</src>.
// The default locking mechanism is DefaultLocking. If the table // The default locking mechanism is DefaultLocking. If the table
// is not open yet, it comes to AutoLocking with an inspection interval // is not open yet, it comes to AutoLocking with an inspection interval
// of 5 seconds. Otherwise DefaultLocking keeps the locking options // of 5 seconds. Otherwise DefaultLocking keeps the locking options
// of the already open table. // of the already open table.
// <group> // <group>
explicit Table (const Block<Table>& tables, explicit Table (const Block<Table>& tables,
const Block<String>& subTables = Block<String>()); const Block<String>& subTables = Block<String>(),
const String& subDirName = String());
explicit Table (const Block<String>& tableNames, explicit Table (const Block<String>& tableNames,
const Block<String>& subTables = Block<String>(), const Block<String>& subTables = Block<String>(),
TableOption = Table::Old, const TSMOption& = TSMOption() TableOption = Table::Old, const TSMOption& = TSMOption()
); ,
const String& subDirName = String());
Table (const Block<String>& tableNames, Table (const Block<String>& tableNames,
const Block<String>& subTables, const Block<String>& subTables,
const TableLock& lockOptions, const TableLock& lockOptions,
TableOption = Table::Old, const TSMOption& = TSMOption()); TableOption = Table::Old, const TSMOption& = TSMOption());
// </group> // </group>
// Copy constructor (reference semantics). // Copy constructor (reference semantics).
Table (const Table&); Table (const Table&);
// The destructor flushes (i.e. writes) the table if it is opened // The destructor flushes (i.e. writes) the table if it is opened
 End of changes. 4 change blocks. 
4 lines changed or deleted 12 lines changed or added


 TableProxy.h   TableProxy.h 
skipping to change at line 26 skipping to change at line 26
//# along with this library; if not, write to the Free Software Foundation, //# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# $Id: TableProxy.h 21025 2011-03-03 15:09:00Z gervandiepen $ //# $Id: TableProxy.h 21296 2012-12-04 09:11:45Z gervandiepen $
#ifndef TABLES_TABLEPROXY_H #ifndef TABLES_TABLEPROXY_H
#define TABLES_TABLEPROXY_H #define TABLES_TABLEPROXY_H
//# Includes //# Includes
#include <casa/aips.h> #include <casa/aips.h>
#include <tables/Tables/Table.h> #include <tables/Tables/Table.h>
#include <casa/Containers/Record.h> #include <casa/Containers/Record.h>
#include <casa/Arrays/Vector.h> #include <casa/Arrays/Vector.h>
#include <vector> #include <vector>
skipping to change at line 715 skipping to change at line 715
// Synchronize table if readlocking is in effect. // Synchronize table if readlocking is in effect.
// In this way the number of rows is up-to-date. // In this way the number of rows is up-to-date.
void syncTable (Table& table); void syncTable (Table& table);
// Get the type string as used externally (in e.g. glish). // Get the type string as used externally (in e.g. glish).
static String getTypeStr (DataType); static String getTypeStr (DataType);
// Optionally reverse the axes. // Optionally reverse the axes.
static IPosition fillAxes (const IPosition&, Bool cOrder); static IPosition fillAxes (const IPosition&, Bool cOrder);
// Check if the new shape is still the same.
// <br> same: 0=first time; 1=still the same; 2=different
static void stillSameShape (Int& same, IPosition& shape,
const IPosition& newShape);
// Copy the array contents of the record fields to a single array.
// This can only be done if the shape is constant.
template<typename T>
static Array<T> record2Array (const Record& rec)
{
if (rec.empty()) {
return Array<T>();
}
Array<T> tmp;
rec.get (0, tmp);
IPosition shp(tmp.shape());
shp.append (IPosition(1, rec.size()));
Array<T> arr(shp);
ArrayIterator<T> iter(arr, tmp.ndim());
for (uInt i=0; i<rec.size(); ++i, iter.next()) {
rec.get (i, iter.array());
}
return arr;
}
//# The data members. //# The data members.
Table table_p; Table table_p;
String asciiFormat_p; String asciiFormat_p;
Record calcResult_p; Record calcResult_p;
}; };
} //# NAMESPACE CASA - END } //# NAMESPACE CASA - END
#endif #endif
 End of changes. 2 change blocks. 
1 lines changed or deleted 26 lines changed or added


 TabularSpectrum.h   TabularSpectrum.h 
skipping to change at line 26 skipping to change at line 26
//# along with this library; if not, write to the Free Software Foundation, //# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# $Id: TabularSpectrum.h 21130 2011-10-18 07:39:05Z gervandiepen $ //# $Id: TabularSpectrum.h 21282 2012-11-05 11:04:19Z gervandiepen $
#ifndef COMPONENTS_TABULARSPECTRUM_H #ifndef COMPONENTS_TABULARSPECTRUM_H
#define COMPONENTS_TABULARSPECTRUM_H #define COMPONENTS_TABULARSPECTRUM_H
#include <casa/aips.h> #include <casa/aips.h>
#include <components/ComponentModels/ComponentType.h> #include <components/ComponentModels/ComponentType.h>
#include <components/ComponentModels/SpectralModel.h> #include <components/ComponentModels/SpectralModel.h>
#include <components/ComponentModels/Flux.h> #include <components/ComponentModels/Flux.h>
namespace casa { //# NAMESPACE CASA - BEGIN namespace casa { //# NAMESPACE CASA - BEGIN
skipping to change at line 173 skipping to change at line 173
virtual ~TabularSpectrum(); virtual ~TabularSpectrum();
// The assignment operator uses copy semantics. // The assignment operator uses copy semantics.
TabularSpectrum& operator=(const TabularSpectrum& other); TabularSpectrum& operator=(const TabularSpectrum& other);
// return the actual spectral type ie., ComponentType::TABULAR_SPECTRUM // return the actual spectral type ie., ComponentType::TABULAR_SPECTRUM
virtual ComponentType::SpectralShape type() const; virtual ComponentType::SpectralShape type() const;
// set/get the Tabular values // set/get the Tabular values
// <group> // <group>
const void values(Vector<MFrequency::MVType>& freq, Vector<Flux<Double> > & flux) const; void values(Vector<MFrequency::MVType>& freq, Vector<Flux<Double> >& flux ) const;
void setValues(const Vector<MFrequency::MVType>& frequencies, const Vecto r<Flux<Double> >& flux, const MFrequency::Ref& refFrame); void setValues(const Vector<MFrequency::MVType>& frequencies, const Vecto r<Flux<Double> >& flux, const MFrequency::Ref& refFrame);
// </group> // </group>
// Return the scaling factor that indicates what proportion of the flux i s at // Return the scaling factor that indicates what proportion of the flux i s at
// the specified frequency. ie. if the centreFrequency argument is the // the specified frequency. ie. if the centreFrequency argument is the
// reference frequency then this function will always return one. At othe r // reference frequency then this function will always return one. At othe r
// frequencies it will return a non-negative number. // frequencies it will return a non-negative number.
virtual Double sample(const MFrequency& centerFrequency) const; virtual Double sample(const MFrequency& centerFrequency) const;
// Same as the previous function except that many frequencies can be samp led // Same as the previous function except that many frequencies can be samp led
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TempLattice.h   TempLattice.h 
skipping to change at line 27 skipping to change at line 27
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# //#
//# $Id: TempLattice.h 20739 2009-09-29 01:15:15Z Malte.Marquarding $ //# $Id: TempLattice.h 21327 2013-03-21 14:23:24Z gervandiepen $
#ifndef LATTICES_TEMPLATTICE_H #ifndef LATTICES_TEMPLATTICE_H
#define LATTICES_TEMPLATTICE_H #define LATTICES_TEMPLATTICE_H
//# Includes //# Includes
#include <lattices/Lattices/Lattice.h> #include <lattices/Lattices/TempLatticeImpl.h>
#include <lattices/Lattices/TiledShape.h>
#include <casa/Utilities/CountedPtr.h> #include <casa/Utilities/CountedPtr.h>
namespace casa { //# NAMESPACE CASA - BEGIN namespace casa { //# NAMESPACE CASA - BEGIN
//# Forward Declarations
class Table;
// <summary> // <summary>
// A Lattice that can be used for temporary storage // A Lattice that can be used for temporary storage
// </summary> // </summary>
// <use visibility=export> // <use visibility=export>
// <reviewed reviewer="Peter Barnes" date="1999/10/30" tests="tTempLattice. cc" demos=""> // <reviewed reviewer="Peter Barnes" date="1999/10/30" tests="tTempLattice. cc" demos="">
// </reviewed> // </reviewed>
// <prerequisite> // <prerequisite>
skipping to change at line 97 skipping to change at line 93
// TempLattice class are always scratch arrays. // TempLattice class are always scratch arrays.
// <p> // <p>
// It is possible to temporarily close a TempLattice, which only takes effe ct // It is possible to temporarily close a TempLattice, which only takes effe ct
// when it is created as a PagedArray. In this way it is possible to reduce // when it is created as a PagedArray. In this way it is possible to reduce
// the number of open files in case a lot of TempLattice objects are used. // the number of open files in case a lot of TempLattice objects are used.
// A temporarily closed TempLattice will be reopened automatically when nee ded. // A temporarily closed TempLattice will be reopened automatically when nee ded.
// It can also be reopened explicitly. // It can also be reopened explicitly.
// <p> // <p>
// You can force the TempLattice to be disk based by setting the memory // You can force the TempLattice to be disk based by setting the memory
// argument in the constructors to 0 // argument in the constructors to 0
// <p>
// TempLattice is implemented using TempLatticeImpl for reasons explained
// in that class.
// </synopsis> // </synopsis>
// <example> // <example>
// <srcblock> // <srcblock>
// // Create a temporary lattice and initialize to 0. // // Create a temporary lattice and initialize to 0.
// TempLattice<Float> myLat (IPosition(2,1024,1024)); // TempLattice<Float> myLat (IPosition(2,1024,1024));
// myLat.set (0.); // myLat.set (0.);
// // Temporarily close the lattice. // // Temporarily close the lattice.
// myLat.tempClose(); // myLat.tempClose();
// // Do an operation, which will automatically reopen the lattice. // // Do an operation, which will automatically reopen the lattice.
skipping to change at line 134 skipping to change at line 133
//# <li> add this feature //# <li> add this feature
//# <li> fix this bug //# <li> fix this bug
//# <li> start discussion of this possible extension //# <li> start discussion of this possible extension
//# </todo> //# </todo>
template<class T> class TempLattice : public Lattice<T> template<class T> class TempLattice : public Lattice<T>
{ {
public: public:
// The default constructor creates a TempLattice containing a // The default constructor creates a TempLattice containing a
// default ArrayLattice object. // default ArrayLattice object.
TempLattice(); TempLattice()
: itsImpl (new TempLatticeImpl<T>()) {}
// Create a TempLattice of the specified shape. You can specify how much // Create a TempLattice of the specified shape. You can specify how much
// memory the Lattice can consume before it becomes disk based by giving a // memory the Lattice can consume before it becomes disk based by giving a
// non-negative value to the maxMemoryInMB argument. Otherwise it will as sume // non-negative value to the maxMemoryInMB argument. Otherwise it will as sume
// it can use up to 25% of the memory on your machine as defined in aipsr c // it can use up to 25% of the memory on your machine as defined in aipsr c
// (this algorithm may change). Setting maxMemoryInMB to zero will force // (this algorithm may change). Setting maxMemoryInMB to zero will force
// the lattice to disk. // the lattice to disk.
// <group> // <group>
explicit TempLattice (const TiledShape& shape, Int maxMemoryInMB=-1); explicit TempLattice (const TiledShape& shape, Int maxMemoryInMB=-1)
TempLattice (const TiledShape& shape, Double maxMemoryInMB); : itsImpl (new TempLatticeImpl<T>(shape, maxMemoryInMB)) {}
TempLattice (const TiledShape& shape, Double maxMemoryInMB)
: itsImpl (new TempLatticeImpl<T>(shape, maxMemoryInMB)) {}
// </group> // </group>
// The copy constructor uses reference semantics. ie modifying data in th e // The copy constructor uses reference semantics. ie modifying data in th e
// copied TempLattice also modifies the data in the original TempLattice. // copied TempLattice also modifies the data in the original TempLattice.
// Passing by value doesn't make sense, because it may require the creati on // Passing by value doesn't make sense, because it may require the creati on
// of a temporary (but possibly huge) file on disk. // of a temporary (but possibly huge) file on disk.
TempLattice (const TempLattice<T>& other) ; TempLattice (const TempLattice<T>& other)
: itsImpl (other.itsImpl) {}
// The destructor removes the Lattice from memory and if necessary disk. // The destructor removes the Lattice from memory and if necessary disk.
virtual ~TempLattice(); virtual ~TempLattice();
// The assignment operator with reference semantics. As with the copy // The assignment operator with reference semantics. As with the copy
// constructor assigning by value does not make sense. // constructor assigning by value does not make sense.
TempLattice<T>& operator= (const TempLattice<T>& other); TempLattice<T>& operator= (const TempLattice<T>& other)
{ itsImpl = other.itsImpl; }
// Make a copy of the object (reference semantics). // Make a copy of the object (reference semantics).
virtual Lattice<T>* clone() const; virtual Lattice<T>* clone() const;
// Is the TempLattice paged to disk? // Is the TempLattice paged to disk?
virtual Bool isPaged() const; virtual Bool isPaged() const;
// Can the lattice data be referenced as an array section? // Can the lattice data be referenced as an array section?
virtual Bool canReferenceArray() const; virtual Bool canReferenceArray() const;
skipping to change at line 265 skipping to change at line 269
// Do the actual getting of an array of values. // Do the actual getting of an array of values.
virtual Bool doGetSlice (Array<T>& buffer, const Slicer& section); virtual Bool doGetSlice (Array<T>& buffer, const Slicer& section);
// Do the actual getting of an array of values. // Do the actual getting of an array of values.
virtual void doPutSlice (const Array<T>& sourceBuffer, virtual void doPutSlice (const Array<T>& sourceBuffer,
const IPosition& where, const IPosition& where,
const IPosition& stride); const IPosition& stride);
private: private:
CountedPtr<TempLatticeImpl<T> > itsImpl;
void init (const TiledShape& shape, Double maxMemoryInMB=-1);
// Do the reopen of the table (if not open already).
// <group>
void doReopen() const
{ if (itsIsClosed) tempReopen(); }
void tempReopen() const;
// </group>
// Make sure that the temporary table gets deleted.
void deleteTable();
mutable Table* itsTablePtr;
mutable CountedPtr<Lattice<T> > itsLatticePtr;
String itsTableName;
mutable Bool itsIsClosed;
}; };
} //# NAMESPACE CASA - END } //# NAMESPACE CASA - END
#ifndef CASACORE_NO_AUTO_TEMPLATES #ifndef CASACORE_NO_AUTO_TEMPLATES
#include <lattices/Lattices/TempLattice.tcc> #include <lattices/Lattices/TempLattice.tcc>
#endif //# CASACORE_NO_AUTO_TEMPLATES #endif //# CASACORE_NO_AUTO_TEMPLATES
#endif #endif
 End of changes. 9 change blocks. 
27 lines changed or deleted 16 lines changed or added


 TempLattice.tcc   TempLattice.tcc 
skipping to change at line 26 skipping to change at line 26
//# along with this library; if not, write to the Free Software Foundation, //# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# $Id: TempLattice.tcc 20739 2009-09-29 01:15:15Z Malte.Marquarding $ //# $Id: TempLattice.tcc 21327 2013-03-21 14:23:24Z gervandiepen $
#include <lattices/Lattices/TempLattice.h> #include <lattices/Lattices/TempLattice.h>
#include <lattices/Lattices/PagedArray.h>
#include <lattices/Lattices/ArrayLattice.h>
#include <tables/Tables/Table.h>
#include <tables/Tables/SetupNewTab.h>
#include <tables/Tables/TableDesc.h>
#include <casa/Arrays/IPosition.h>
#include <casa/System/AppInfo.h>
#include <casa/OS/HostInfo.h>
namespace casa { //# NAMESPACE CASA - BEGIN namespace casa { //# NAMESPACE CASA - BEGIN
template<class T> template<class T>
TempLattice<T>::TempLattice()
: itsTablePtr (0),
itsIsClosed (False)
{
itsLatticePtr = new ArrayLattice<T>;
}
template<class T>
TempLattice<T>::TempLattice (const TiledShape& shape, Int maxMemoryInMB)
: itsTablePtr (0),
itsIsClosed (False)
{
init (shape, Double(maxMemoryInMB));
}
template<class T>
TempLattice<T>::TempLattice (const TiledShape& shape, Double maxMemoryInMB)
: itsTablePtr (0),
itsIsClosed (False)
{
init(shape, maxMemoryInMB);
}
template<class T>
TempLattice<T>::TempLattice (const TempLattice<T>& other)
: Lattice<T>(),
itsTablePtr (0),
itsIsClosed (False)
{
operator= (other);
}
template<class T>
TempLattice<T>::~TempLattice() TempLattice<T>::~TempLattice()
{ {}
// Reopen to make sure that temporary table gets deleted.
tempReopen();
delete itsTablePtr;
}
template<class T>
TempLattice<T>& TempLattice<T>::operator= (const TempLattice<T>& other)
{
if (this != &other) {
// Reopen to make sure that temporary table gets deleted.
tempReopen();
delete itsTablePtr;
itsTablePtr = other.itsTablePtr;
if (itsTablePtr != 0) {
itsTablePtr = new Table(*itsTablePtr);
}
itsLatticePtr = other.itsLatticePtr;
itsTableName = other.itsTableName;
itsIsClosed = other.itsIsClosed;
}
return *this;
}
template<class T> template<class T>
Lattice<T>* TempLattice<T>::clone() const Lattice<T>* TempLattice<T>::clone() const
{ {
return new TempLattice<T> (*this); return new TempLattice<T> (*this);
} }
template<class T> template<class T>
void TempLattice<T>::init (const TiledShape& shape, Double maxMemoryInMB)
{
Double memoryReq = Double(shape.shape().product()*sizeof(T))/(1024.0*1024
.0);
Double memoryAvail;
// maxMemoryInMb = 0.0 forces disk.
if (maxMemoryInMB < 0.0) {
memoryAvail = Double(HostInfo::memoryFree()/1024) / 2.0;
} else {
memoryAvail = maxMemoryInMB;
}
if (memoryReq > memoryAvail) {
// Create a table with a unique name in a work directory.
// We can use exclusive locking, since nobody else should use the table
.
itsTableName = AppInfo::workFileName (Int(memoryReq), "TempLattice");
SetupNewTable newtab (itsTableName, TableDesc(), Table::Scratch);
itsTablePtr = new Table (newtab, TableLock::PermanentLockingWait);
itsLatticePtr = new PagedArray<T> (shape, *itsTablePtr);
} else {
itsLatticePtr = new ArrayLattice<T> (shape.shape());
}
}
template<class T>
void TempLattice<T>::flush() void TempLattice<T>::flush()
{ {
if (itsTablePtr != 0) { itsImpl->flush();
itsTablePtr->flush();
}
} }
template<class T> template<class T>
void TempLattice<T>::tempClose() void TempLattice<T>::tempClose()
{ {
if (itsTablePtr != 0 && isPaged()) { itsImpl->tempClose();
// Take care that table does not get deleted, otherwise we cannot reope
n.
itsTablePtr->unmarkForDelete();
delete itsTablePtr;
itsTablePtr = 0;
itsLatticePtr = 0; // CountedPtr does delete of pointer
itsIsClosed = True;
}
} }
template<class T> template<class T>
void TempLattice<T>::reopen() void TempLattice<T>::reopen()
{ {
doReopen(); itsImpl->doReopen();
}
template<class T>
void TempLattice<T>::tempReopen() const
{
if (itsIsClosed && isPaged()) {
itsTablePtr = new Table (itsTableName,
TableLock(TableLock::PermanentLockingWait),
Table::Update);
itsLatticePtr = new PagedArray<T> (*itsTablePtr);
itsIsClosed = False;
}
if (itsTablePtr != 0) {
itsTablePtr->markForDelete();
}
} }
template<class T> template<class T>
Bool TempLattice<T>::isPaged() const Bool TempLattice<T>::isPaged() const
{ {
return (! itsTableName.empty()); return itsImpl->isPaged();
} }
template <class T> template <class T>
Bool TempLattice<T>::canReferenceArray() const Bool TempLattice<T>::canReferenceArray() const
{ {
return (itsTableName.empty()); return itsImpl->canReferenceArray();
} }
template<class T> template<class T>
Bool TempLattice<T>::isWritable() const Bool TempLattice<T>::isWritable() const
{ {
return True; return itsImpl->isWritable();
} }
template<class T> template<class T>
IPosition TempLattice<T>::shape() const IPosition TempLattice<T>::shape() const
{ {
doReopen(); return itsImpl->shape();
return itsLatticePtr->shape();
} }
template<class T> template<class T>
Bool TempLattice<T>::doGetSlice (Array<T>& buffer, const Slicer& section) Bool TempLattice<T>::doGetSlice (Array<T>& buffer, const Slicer& section)
{ {
doReopen(); return itsImpl->doGetSlice (buffer, section);
return itsLatticePtr->doGetSlice (buffer, section);
} }
template<class T> template<class T>
void TempLattice<T>::doPutSlice (const Array<T>& sourceBuffer, void TempLattice<T>::doPutSlice (const Array<T>& sourceBuffer,
const IPosition& where, const IPosition& where,
const IPosition& stride) const IPosition& stride)
{ {
doReopen(); itsImpl->doPutSlice (sourceBuffer, where, stride);
itsLatticePtr->putSlice (sourceBuffer, where, stride);
} }
template<class T> template<class T>
void TempLattice<T>::set (const T& value) void TempLattice<T>::set (const T& value)
{ {
doReopen(); itsImpl->set (value);
itsLatticePtr->set (value);
} }
template<class T> template<class T>
void TempLattice<T>::apply (T (*function)(T)) void TempLattice<T>::apply (T (*function)(T))
{ {
doReopen(); itsImpl->apply (function);
itsLatticePtr->apply (function);
} }
template<class T> template<class T>
void TempLattice<T>::apply (T (*function)(const T&)) void TempLattice<T>::apply (T (*function)(const T&))
{ {
doReopen(); itsImpl->apply (function);
itsLatticePtr->apply (function);
} }
template<class T> template<class T>
void TempLattice<T>::apply (const Functional<T,T>& function) void TempLattice<T>::apply (const Functional<T,T>& function)
{ {
doReopen(); itsImpl->apply (function);
itsLatticePtr->apply (function);
} }
template<class T> template<class T>
uInt TempLattice<T>::advisedMaxPixels() const uInt TempLattice<T>::advisedMaxPixels() const
{ {
doReopen(); return itsImpl->advisedMaxPixels();
return itsLatticePtr->advisedMaxPixels();
} }
template<class T> template<class T>
IPosition TempLattice<T>::doNiceCursorShape (uInt maxPixels) const IPosition TempLattice<T>::doNiceCursorShape (uInt maxPixels) const
{ {
doReopen(); return itsImpl->doNiceCursorShape (maxPixels);
return itsLatticePtr->niceCursorShape (maxPixels);
} }
template<class T> template<class T>
uInt TempLattice<T>::maximumCacheSize() const uInt TempLattice<T>::maximumCacheSize() const
{ {
return itsLatticePtr->maximumCacheSize(); return itsImpl->maximumCacheSize();
} }
template<class T> template<class T>
void TempLattice<T>::setMaximumCacheSize (uInt howManyPixels) void TempLattice<T>::setMaximumCacheSize (uInt howManyPixels)
{ {
itsLatticePtr->setMaximumCacheSize (howManyPixels); itsImpl->setMaximumCacheSize (howManyPixels);
} }
template<class T> template<class T>
void TempLattice<T>::setCacheSizeFromPath (const IPosition& sliceShape, void TempLattice<T>::setCacheSizeFromPath (const IPosition& sliceShape,
const IPosition& windowStart, const IPosition& windowStart,
const IPosition& windowLength, const IPosition& windowLength,
const IPosition& axisPath) const IPosition& axisPath)
{ {
itsLatticePtr->setCacheSizeFromPath (sliceShape, windowStart, windowLengt itsImpl->setCacheSizeFromPath (sliceShape, windowStart, windowLength,
h, axisPath);
axisPath);
} }
template<class T> template<class T>
void TempLattice<T>::setCacheSizeInTiles (uInt howManyTiles) void TempLattice<T>::setCacheSizeInTiles (uInt howManyTiles)
{ {
itsLatticePtr->setCacheSizeInTiles (howManyTiles); itsImpl->setCacheSizeInTiles (howManyTiles);
} }
template<class T> template<class T>
void TempLattice<T>::clearCache() void TempLattice<T>::clearCache()
{ {
itsLatticePtr->clearCache(); itsImpl->clearCache();
} }
template<class T> template<class T>
void TempLattice<T>::showCacheStatistics (ostream& os) const void TempLattice<T>::showCacheStatistics (ostream& os) const
{ {
itsLatticePtr->showCacheStatistics (os); itsImpl->showCacheStatistics (os);
} }
template<class T> template<class T>
T TempLattice<T>::getAt (const IPosition& where) const T TempLattice<T>::getAt (const IPosition& where) const
{ {
doReopen(); return itsImpl->getAt (where);
return itsLatticePtr->getAt (where);
} }
template<class T> template<class T>
void TempLattice<T>::putAt (const T& value, const IPosition& where) void TempLattice<T>::putAt (const T& value, const IPosition& where)
{ {
doReopen(); itsImpl->putAt (value, where);
itsLatticePtr->putAt (value, where);
} }
template<class T> template<class T>
Bool TempLattice<T>::ok() const Bool TempLattice<T>::ok() const
{ {
doReopen(); return itsImpl->ok();
return itsLatticePtr->ok();
} }
template<class T> template<class T>
LatticeIterInterface<T>* TempLattice<T>::makeIter (const LatticeNavigator& nav, LatticeIterInterface<T>* TempLattice<T>::makeIter (const LatticeNavigator& nav,
Bool useRef) const Bool useRef) const
{ {
doReopen(); return itsImpl->makeIter (nav, useRef);
return itsLatticePtr->makeIter (nav, useRef);
} }
} //# NAMESPACE CASA - END } //# NAMESPACE CASA - END
 End of changes. 30 change blocks. 
155 lines changed or deleted 28 lines changed or added


 TiledFileAccess.h   TiledFileAccess.h 
skipping to change at line 26 skipping to change at line 26
//# along with this library; if not, write to the Free Software Foundation, //# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# $Id: TiledFileAccess.h 20859 2010-02-03 13:14:15Z gervandiepen $ //# $Id: TiledFileAccess.h 21249 2012-05-18 01:38:49Z Malte.Marquarding $
#ifndef TABLES_TILEDFILEACCESS_H #ifndef TABLES_TILEDFILEACCESS_H
#define TABLES_TILEDFILEACCESS_H #define TABLES_TILEDFILEACCESS_H
//# Includes //# Includes
#include <tables/Tables/TSMCube.h> #include <tables/Tables/TSMCube.h>
#include <tables/Tables/TSMOption.h> #include <tables/Tables/TSMOption.h>
#include <casa/Utilities/DataType.h> #include <casa/Utilities/DataType.h>
namespace casa { //# NAMESPACE CASA - BEGIN namespace casa { //# NAMESPACE CASA - BEGIN
skipping to change at line 122 skipping to change at line 122
Bool isWritable() const Bool isWritable() const
{ return itsWritable; } { return itsWritable; }
DataType dataType() const DataType dataType() const
{ return itsDataType; } { return itsDataType; }
// Get part of the array. // Get part of the array.
// The Array object is resized if needed. // The Array object is resized if needed.
// <group> // <group>
Array<Bool> getBool (const Slicer& section); Array<Bool> getBool (const Slicer& section);
Array<uChar> getUChar (const Slicer& section);
Array<Short> getShort (const Slicer& section); Array<Short> getShort (const Slicer& section);
Array<Int> getInt (const Slicer& section); Array<Int> getInt (const Slicer& section);
Array<Float> getFloat (const Slicer& section); Array<Float> getFloat (const Slicer& section);
Array<Double> getDouble (const Slicer& section); Array<Double> getDouble (const Slicer& section);
Array<Complex> getComplex (const Slicer& section); Array<Complex> getComplex (const Slicer& section);
Array<DComplex> getDComplex (const Slicer& section); Array<DComplex> getDComplex (const Slicer& section);
void get (Array<Bool>&, const Slicer& section); void get (Array<Bool>&, const Slicer& section);
void get (Array<uChar>&, const Slicer& section);
void get (Array<Short>&, const Slicer& section); void get (Array<Short>&, const Slicer& section);
void get (Array<Int>&, const Slicer& section); void get (Array<Int>&, const Slicer& section);
void get (Array<Float>&, const Slicer& section); void get (Array<Float>&, const Slicer& section);
void get (Array<Double>&, const Slicer& section); void get (Array<Double>&, const Slicer& section);
void get (Array<Complex>&, const Slicer& section); void get (Array<Complex>&, const Slicer& section);
void get (Array<DComplex>&, const Slicer& section); void get (Array<DComplex>&, const Slicer& section);
// </group> // </group>
// Get the array and scale/offset the data using the given values. // Get the array and scale/offset the data using the given values.
// It is meant for FITS, so for now they can only be used for TpShort // It is meant for FITS, so for now they can only be used for TpUChar, Tp Short
// or TpInt TiledFileAccess objects. // or TpInt TiledFileAccess objects.
// A deleteValue is set to a NaN without being scaled. // A deleteValue is set to a NaN without being scaled.
// <group> // <group>
Array<Float> getFloat (const Slicer& section, Float scale, Float offset, Array<Float> getFloat (const Slicer& section, Float scale, Float offset,
uChar deleteValue, Bool examineForDeleteValues=True
);
Array<Float> getFloat (const Slicer& section, Float scale, Float offset,
Short deleteValue, Bool examineForDeleteValues=True ); Short deleteValue, Bool examineForDeleteValues=True );
Array<Float> getFloat (const Slicer& section, Float scale, Float offset, Array<Float> getFloat (const Slicer& section, Float scale, Float offset,
Int deleteValue, Bool examineForDeleteValues=True); Int deleteValue, Bool examineForDeleteValues=True);
void get (Array<Float>&, const Slicer& section, void get (Array<Float>&, const Slicer& section,
Float scale, Float offset, uChar deleteValue,
Bool examineForDeleteValues=True);
void get (Array<Float>&, const Slicer& section,
Float scale, Float offset, Short deleteValue, Float scale, Float offset, Short deleteValue,
Bool examineForDeleteValues=True); Bool examineForDeleteValues=True);
void get (Array<Float>&, const Slicer& section, void get (Array<Float>&, const Slicer& section,
Float scale, Float offset, Int deleteValue, Float scale, Float offset, Int deleteValue,
Bool examineForDeleteValues=True); Bool examineForDeleteValues=True);
// </group> // </group>
// Put part of the array. // Put part of the array.
// <group> // <group>
void put (const Array<Bool>&, const Slicer& section); void put (const Array<Bool>&, const Slicer& section);
void put (const Array<uChar>&, const Slicer& section);
void put (const Array<Short>&, const Slicer& section); void put (const Array<Short>&, const Slicer& section);
void put (const Array<Int>&, const Slicer& section); void put (const Array<Int>&, const Slicer& section);
void put (const Array<Float>&, const Slicer& section); void put (const Array<Float>&, const Slicer& section);
void put (const Array<Double>&, const Slicer& section); void put (const Array<Double>&, const Slicer& section);
void put (const Array<Complex>&, const Slicer& section); void put (const Array<Complex>&, const Slicer& section);
void put (const Array<DComplex>&, const Slicer& section); void put (const Array<DComplex>&, const Slicer& section);
// </group> // </group>
// Flush the cache. // Flush the cache.
void flush() void flush()
 End of changes. 7 change blocks. 
2 lines changed or deleted 11 lines changed or added


 aipsdef.h   aipsdef.h 
skipping to change at line 26 skipping to change at line 26
//# along with this library; if not, write to the Free Software Foundation, //# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# //#
//# Correspondence concerning AIPS++ should be addressed as follows: //# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu. //# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office //# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory //# National Radio Astronomy Observatory
//# 520 Edgemont Road //# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA //# Charlottesville, VA 22903-2475 USA
//# //#
//# $Id: aipsdef.h 20551 2009-03-25 00:11:33Z Malte.Marquarding $ //# $Id: aipsdef.h 21415 2014-03-12 08:17:23Z gervandiepen $
#ifndef CASA_AIPSDEF_H #ifndef CASA_AIPSDEF_H
#define CASA_AIPSDEF_H #define CASA_AIPSDEF_H
//# Define the aips++ global macros //# Define the aips++ global macros
//# Defined the "aips_name2" macro which is used to join two tokens. //# Defined the "aips_name2" macro which is used to join two tokens.
#if defined(__STDC__) || defined(__ANSI_CPP__) || defined(__hpux) #if defined(__STDC__) || defined(__ANSI_CPP__) || defined(__hpux)
#define aips_name2(a,b) a##b #define aips_name2(a,b) a##b
skipping to change at line 94 skipping to change at line 94
// SUN Native compiler has trouble with typedef inside class. // SUN Native compiler has trouble with typedef inside class.
// PGI compiler (QK_USER) on Cray XT3 needs throw specification in .cc file . // PGI compiler (QK_USER) on Cray XT3 needs throw specification in .cc file .
#if defined(AIPS_SUN_NATIVE) #if defined(AIPS_SUN_NATIVE)
#define WHATEVER_SUN_TYPEDEF(X) X:: #define WHATEVER_SUN_TYPEDEF(X) X::
#define WHATEVER_TYPENAME #define WHATEVER_TYPENAME
#define WHATEVER_SUN_EXCEPTSPEC(X) throw(X) #define WHATEVER_SUN_EXCEPTSPEC(X) throw(X)
#else #else
#define WHATEVER_SUN_TYPEDEF(X) #define WHATEVER_SUN_TYPEDEF(X)
#define WHATEVER_TYPENAME typename #define WHATEVER_TYPENAME typename
#if defined(AIPS_CRAY_PGI) #if defined(AIPS_CRAY_PGI) || defined(AIPS_GCC4)
#define WHATEVER_SUN_EXCEPTSPEC(X) throw(X) #define WHATEVER_SUN_EXCEPTSPEC(X) throw(X)
#else #else
#define WHATEVER_SUN_EXCEPTSPEC(X) #define WHATEVER_SUN_EXCEPTSPEC(X)
#endif #endif
#endif #endif
#if defined(AIPS_USE_NEW_SGI) || defined(AIPS_GCC3) || defined(AIPS_GCC4) | | defined(AIPS_CRAY_PGI) #if defined(AIPS_USE_NEW_SGI) || defined(AIPS_GCC3) || defined(AIPS_GCC4) | | defined(AIPS_CRAY_PGI)
#if defined(WHATEVER_VECTOR_FORWARD_DEC) #if defined(WHATEVER_VECTOR_FORWARD_DEC)
#undef WHATEVER_VECTOR_FORWARD_DEC #undef WHATEVER_VECTOR_FORWARD_DEC
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/