#include <synthesis/CalTables/CLPatchPanel.h>
#include <synthesis/CalTables/CTInterface.h>
#include <synthesis/CalTables/CTIter.h>
#include <casacore/scimath/Mathematics/InterpolateArray1D.h>
#include <casacore/casa/Utilities/GenSort.h>
#include <casacore/casa/OS/Path.h>
#include <casacore/ms/MSSel/MSSelectableTable.h>
#include <casacore/ms/MSSel/MSSelection.h>
#include <casacore/ms/MSSel/MSSelectionTools.h>
#include <casacore/casa/aips.h>
#define CTPATCHPANELVERB false
#include <casacore/casa/Logging/LogMessage.h>
#include <casacore/casa/Logging/LogSink.h>
#include <casacore/casa/Logging/LogIO.h>
using namespace casacore;
CalPatchKey::CalPatchKey(IPosition keyids) :
Bool CalPatchKey::operator<(const CalPatchKey& other) const {
if (cpk_[i]>-1 && other.cpk_[i]>-1 && cpk_[i]!=other.cpk_[i])
return cpk_[i]<other.cpk_[i];
MSCalPatchKey::MSCalPatchKey(Int obs,Int scan,Int fld,Int ent,Int spw,Int ant) :
CalPatchKey(IPosition(6,obs,scan,fld,ent,spw,ant)),
obs_(obs),scan_(scan),fld_(fld),ent_(ent),spw_(spw),ant_(ant)
String MSCalPatchKey::print() const {
return "obs="+(obs_<0 ? "*" : String::toString(obs_))+" "
"scan="+(scan_<0 ? "*" : String::toString(scan_))+" "
"fld="+(fld_<0 ? "*" : String::toString(fld_))+" "
"intent="+(ent_<0 ? "*" : String::toString(ent_))+" "
"spw="+(spw_<0 ? "*" : String::toString(spw_))+" "
"ant="+(ant_<0 ? "*" : String::toString(ant_));
CTCalPatchKey::CTCalPatchKey(Int clsl,Int obs,Int scan,Int fld,Int spw,Int ant) :
CalPatchKey(IPosition(6,clsl,obs,scan,fld,spw,ant)),