#include <casa/Arrays/Matrix.h>
#include <casa/Arrays/Cube.h>
#include <casa/Arrays/ArrayMath.h>
#include <casa/Arrays/MatrixMath.h>
#include <casa/Arrays/ArrayIO.h>
#include <casa/BasicMath/Math.h>
#include <casa/BasicSL/Complex.h>
#include <casa/Logging/LogIO.h>
#include <casa/OS/File.h>
#include <casa/Containers/Record.h>
#include <lattices/LRegions/LCBox.h>
#include <casa/Arrays/Slicer.h>
#include <scimath/Mathematics/FFTServer.h>
#include <casa/OS/HostInfo.h>
#include <casa/Arrays/ArrayError.h>
#include <casa/Arrays/ArrayIter.h>
#include <casa/Arrays/VectorIter.h>
#include <casa/Utilities/GenSort.h>
#include <casa/BasicSL/String.h>
#include <casa/Utilities/Assert.h>
#include <casa/Utilities/Fallible.h>
#include <casa/BasicSL/Constants.h>
#include <casa/Logging/LogSink.h>
#include <casa/Logging/LogMessage.h>
#include <synthesis/MeasurementEquations/MatrixCleaner.h>
#include <coordinates/Coordinates/TabularCoordinate.h>
#include <lattices/Lattices/SubLattice.h>
#include <scimath/Mathematics/MatrixMathLA.h>
#include <images/Images/PagedImage.h>
#include<synthesis/MeasurementEquations/MultiTermMatrixCleaner.h>
using namespace casacore;
#define MIN(a,b) ((a)<=(b) ? (a) : (b))
#define MAX(a,b) ((a)>=(b) ? (a) : (b))
MultiTermMatrixCleaner::MultiTermMatrixCleaner():
ntaylor_p(0),psfntaylor_p(0),nscales_p(0),nx_p(0),ny_p(0),totalIters_p(0),
maxscaleindex_p(0), globalmaxpos_p(IPosition(0)),
donePSP_p(false),doneCONV_p(false),memoryMB_p(0),