Source
<< "Examples of such issues are that all the data were originally flagged "
//# StatWtTVI.cc: This file contains the implementation of the StatWtTVI class.
//#
//# CASA - Common Astronomy Software Applications (http://casa.nrao.edu/)
//# Copyright (C) Associated Universities, Inc. Washington DC, USA 2011, All
//# rights reserved.
//# Copyright (C) European Southern Observatory, 2011, All rights reserved.
//#
//# This library is free software; you can redistribute it and/or
//# modify it under the terms of the GNU Lesser General Public
//# License as published by the Free software Foundation; either
//# version 2.1 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
//# Lesser General Public License for more details.
//#
//# You should have received a copy of the GNU Lesser General Public
//# License along with this library; if not, write to the Free Software
//# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
//# MA 02111-1307 USA
using namespace casacore;
using namespace casac;
namespace casa {
namespace vi {
const String StatWtTVI::CHANBIN = "stchanbin";
StatWtTVI::StatWtTVI(ViImplementation2 * inputVii, const Record &configuration)
: TransformingVi2 (inputVii) {
// Parse and check configuration parameters
// Note: if a constructor finishes by throwing an exception, the memory
// associated with the object itself is cleaned up there is no memory leak.
ThrowIf(
! _parseConfiguration(configuration),
"Error parsing StatWtTVI configuration"
);
LogIO log(LogOrigin("StatWtTVI", __func__));
log << LogIO::NORMAL << "Using " << StatWtTypes::asString(_column)
<< " to compute weights" << LogIO::POST;
// FIXME when the TVI framework has methods to
// check for metadata, like the existence of
// columns, remove references to the original MS
const auto& origMS = ms();