Source
xxxxxxxxxx
CalSolvingVi2LayerFactoryByVE::CalSolvingVi2LayerFactoryByVE(VisEquation *ve,const casacore::Bool& corrDepFlags)
//# CalibratingVi2.cc: Implementation of the CalibratingVi2 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
//# $Id: $
using namespace casacore;
namespace casa { //# NAMESPACE CASA - BEGIN
namespace vi { //# NAMESPACE VI - BEGIN
// -----------------------------------------------------------------------
//
CalibratingParameters::CalibratingParameters() :
byCalLib_p(false),
calLibRecord_p(Record()),
corrFactor_p(1.0) // temporary, for initial testing (default is a non-trivial factor)
{}
CalibratingParameters::CalibratingParameters(const Record& calLibRecord) :
byCalLib_p(false),
calLibRecord_p(calLibRecord),
corrFactor_p(1.0)
{
if (calLibRecord_p.isDefined("calfactor")) {
//cout << "CalibratingParameters::ctor: found calfactor." << endl;
// Detect calfactor in the specified Record
corrFactor_p=calLibRecord_p.asFloat("calfactor");
byCalLib_p = false; // signal not using a real callib
}
else if (calLibRecord_p.nfields()>0) {
//cout << "CalibratingParameters::ctor: found non-trivial callib." << endl;
// Apparently this will be a real callib
byCalLib_p = true; // signal using a real callib
}
else
throw(AipsError("Invalid use of callib Record"));
validate();
}
// Construct using callib parser
CalibratingParameters::CalibratingParameters(const String& callib) :
byCalLib_p(true),
calLibRecord_p(callibSetParams(callib)),
corrFactor_p(1.0)
{
validate();
}
CalibratingParameters::CalibratingParameters(Float corrFactor) :
byCalLib_p(false),
calLibRecord_p(Record()),
corrFactor_p(corrFactor) // temporary, for initial testing
{
validate();
}
CalibratingParameters::CalibratingParameters(const CalibratingParameters& other)
{
*this = other;