Source
45
45
46
46
#include <casa/OS/HostInfo.h>
47
47
48
48
#include <images/Images/TempImage.h>
49
49
#include <images/Images/SubImage.h>
50
50
#include <images/Regions/ImageRegion.h>
51
51
#include <lattices/Lattices/LatticeLocker.h>
52
52
#include <synthesis/ImagerObjects/CubeMinorCycleAlgorithm.h>
53
53
#include <imageanalysis/ImageAnalysis/CasaImageBeamSet.h>
54
54
#include <synthesis/ImagerObjects/SynthesisDeconvolver.h>
55
+
#include <synthesis/ImagerObjects/SIMinorCycleController.h>
55
56
56
57
#include <sys/types.h>
57
58
#include <unistd.h>
58
59
using namespace std;
59
60
60
61
using namespace casacore;
61
62
extern casa::Applicator casa::applicator;
62
63
namespace casa { //# NAMESPACE CASA - BEGIN
63
64
64
65
839
840
SynthesisUtilMethods::getResource("Restoration");
840
841
841
842
itsDeconvolver->restore(itsImages);
842
843
itsImages->releaseLocks();
843
844
844
845
}
845
846
846
847
void SynthesisDeconvolver::mergeReturnRecord(const Record& inRec, Record& outRec, const Int chan){
847
848
848
849
///Something has to be done about what is done in SIIterBot_state::mergeMinorCycleSummary if it is needed
849
-
Matrix<Double> summaryminor(8,0);
850
+
Matrix<Double> summaryminor(SIMinorCycleController::nSummaryFields,0);
850
851
if(outRec.isDefined("summaryminor"))
851
852
summaryminor=Matrix<Double>(outRec.asArrayDouble("summaryminor"));
852
853
Matrix<Double> subsummaryminor;
853
854
if(inRec.isDefined("summaryminor"))
854
855
subsummaryminor=Matrix<Double>(inRec.asArrayDouble("summaryminor"));
855
856
if(subsummaryminor.nelements() !=0){
856
857
///The 6th element is supposed to be the subimage id
857
858
subsummaryminor.row(5)= subsummaryminor.row(5)+(Double(chan));
858
-
Matrix<Double> newsummary(8, summaryminor.shape()[1]+subsummaryminor.shape()[1]);
859
+
Matrix<Double> newsummary(SIMinorCycleController::nSummaryFields, summaryminor.shape()[1]+subsummaryminor.shape()[1]);
859
860
Int ocol=0;
860
861
for (Int col=0; col< summaryminor.shape()[1]; ++col, ++ocol)
861
862
newsummary.column(ocol)=summaryminor.column(col);
862
863
for (Int col=0; col< subsummaryminor.shape()[1]; ++col, ++ocol)
863
864
newsummary.column(ocol)=subsummaryminor.column(col);
864
865
summaryminor.resize(newsummary.shape());
865
866
summaryminor=newsummary;
866
867
}
867
868
outRec.define("summaryminor", summaryminor);
868
869
//cerr << "inRec summ minor " << inRec.asArrayDouble("summaryminor") << endl;