Source
//cerr << "peakResidual " << resRec.asFloat("peakresidual") << " cyclethreshold " << iterBotRec_p.asFloat("cyclethreshold") << " as double " << iterBotRec_p.asDouble("cyclethreshold") << endl;
//# CubeMinorCycleAlgorithm.cc: implementation of class to deconvolve cube in parallel/serial
//# Copyright (C) 2019
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU General Public License as published by
//# the Free Software Foundation; either version 3 of the License, or (at your
//# option) any later version.
//#
//# This library is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
//# License for more details.
//#
//# https://www.gnu.org/licenses/
//#
//# Queries concerning CASA should be submitted at
//# https://help.nrao.edu
//#
//# Postal address: CASA Project Manager
//# National Radio Astronomy Observatory
//# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA
//#
//#
//# $Id$
using namespace casacore;
namespace casa { //# NAMESPACE CASA - BEGIN
extern Applicator applicator;
CubeMinorCycleAlgorithm::CubeMinorCycleAlgorithm() : myName_p("CubeMinorCycleAlgorithm"), autoMaskOn_p(False),chanFlag_p(0), status_p(False){
}
CubeMinorCycleAlgorithm::~CubeMinorCycleAlgorithm() {
}
void CubeMinorCycleAlgorithm::get() {
///New instructions reset previous state
reset();
//cerr << "in get for child process " << applicator.isWorker() << endl;
Record decParsRec;
// get deconv params record #1
applicator.get(decParsRec);
// get iter control rec #2
applicator.get(iterBotRec_p);
// channel range to deconvolve #3
applicator.get(chanRange_p);
//get psf image name #4
applicator.get(psfName_p);
//get residual name #5
applicator.get(residualName_p);
//get model name #6
applicator.get(modelName_p);
//get mask name #7
applicator.get(maskName_p);
// get pb name #8
applicator.get(pbName_p);
//get beamsetrec #9
//applicator.get(beamsetRec_p);
//get psfsidelobelev #9
applicator.get(psfSidelobeLevel_p);
//get chanflag #10
Record chanflagRec;
applicator.get(chanflagRec);
chanFlag_p.resize();
chanflagRec.get("chanflag", chanFlag_p);
statsRec_p=chanflagRec.asRecord("statsrec");
//cerr <<"GET statsRec " << statsRec_p << endl;
decPars_p.fromRecord(decParsRec);
}
void CubeMinorCycleAlgorithm::put() {
///# 1 chanrange processed
applicator.put(chanRange_p);
//cerr << "in put " << status_p << endl;
//#2 chanflag
chanFlagRec_p.define("chanflag", chanFlag_p);
//cerr << "PUT statsRec "<< statsRec_p << endl;
chanFlagRec_p.defineRecord("statsrec", statsRec_p);