Skip to content
Snippets Groups Projects
Commit 00fb76dc authored by Jan David Mol's avatar Jan David Mol
Browse files

Task #3877: Reverted r23182 (which was merging the release branch into the trunk)

parent cf8f8cc4
No related branches found
No related tags found
No related merge requests found
Showing
with 172 additions and 61 deletions
......@@ -38,9 +38,9 @@
namespace LOFAR {
class ParameterSet;
namespace DPPP {
class ParSet;
// @ingroup NDPPP
// This class is a DPStep class flagging data points based on the
......@@ -70,7 +70,7 @@ namespace LOFAR {
public:
// Construct the object.
// Parameters are obtained from the parset using the given prefix.
AORFlagger (DPInput*, const ParameterSet&, const string& prefix);
AORFlagger (DPInput*, const ParSet&, const string& prefix);
virtual ~AORFlagger();
......
......@@ -33,9 +33,9 @@
namespace LOFAR {
class ParameterSet;
namespace DPPP {
class ParSet;
// @ingroup NDPPP
// This class is a DPStep class calculating the weighted average of
......@@ -55,7 +55,7 @@ namespace LOFAR {
public:
// Construct the object.
// Parameters are obtained from the parset using the given prefix.
Averager (DPInput*, const ParameterSet&, const string& prefix);
Averager (DPInput*, const ParSet&, const string& prefix);
// Construct the object using the given parameters.
Averager (DPInput*, const string& stepname,
......
......@@ -27,14 +27,13 @@
// @file
// @brief Class to handle the baseline selection
#include <DPPP/ParSet.h>
#include <DPPP/DPInfo.h>
#include <Common/ParameterValue.h>
#include <casa/Arrays/Vector.h>
#include <casa/Arrays/Matrix.h>
namespace LOFAR {
class ParameterSet;
class ParameterValue;
namespace DPPP {
// Class containing a few static functions to parse a baseline selection
......@@ -54,7 +53,7 @@ namespace LOFAR {
// <li> minbl: minimum baseline length (in m); only if minmax=true
// <li> maxbl: maximum baseline length (in m); only if minmax=true
// </ul>
BaselineSelection (const ParameterSet&, const string& prefix,
BaselineSelection (const ParSet&, const string& prefix,
bool minmax=false,
const string& defaultCorrType=string());
......
......@@ -3,7 +3,7 @@
# List of header files that will be installed.
set(inst_HEADERS
DPRun.h DPStep.h DPInput.h DPBuffer.h DPInfo.h
DPLogger.h ProgressMeter.h FlagCounter.h
ParSet.h DPLogger.h ProgressMeter.h FlagCounter.h
UVWCalculator.h BaselineSelection.h
MSReader.h MSWriter.h MSUpdater.h Counter.h
Averager.h MedFlagger.h PreFlagger.h UVWFlagger.h AORFlagger.h
......
......@@ -33,9 +33,9 @@
namespace LOFAR {
class ParameterSet;
namespace DPPP {
class ParSet;
// @ingroup NDPPP
// This class is a DPStep class counting the number of flags per
......@@ -48,7 +48,7 @@ namespace LOFAR {
public:
// Construct the object.
// Parameters are obtained from the parset using the given prefix.
Counter (DPInput*, const ParameterSet&, const string& prefix);
Counter (DPInput*, const ParSet&, const string& prefix);
virtual ~Counter();
......
......@@ -29,7 +29,7 @@
#include <lofar_config.h>
#include <DPPP/DPStep.h>
#include <Common/ParameterSet.h>
#include <DPPP/ParSet.h>
namespace LOFAR {
namespace DPPP {
......@@ -49,7 +49,7 @@ namespace LOFAR {
private:
// Create the step objects.
// It fills DPInfo object and the name of the MS being written.
static DPStep::ShPtr makeSteps (const ParameterSet& parset,
static DPStep::ShPtr makeSteps (const ParSet& parset,
std::string& msName);
};
......
......@@ -46,9 +46,9 @@
namespace LOFAR {
class ParameterSet;
namespace DPPP {
class ParSet;
// @ingroup NDPPP
typedef vector<Patch::ConstPtr> PatchList;
......@@ -68,7 +68,7 @@ namespace LOFAR {
public:
// Construct the object.
// Parameters are obtained from the parset using the given prefix.
Demixer (DPInput*, const ParameterSet&, const string& prefix);
Demixer (DPInput*, const ParSet&, const string& prefix);
// Process the data.
// It keeps the data.
......
......@@ -33,9 +33,9 @@
namespace LOFAR {
class ParameterSet;
namespace DPPP {
class ParSet;
// @ingroup NDPPP
// This class is a DPInput step reading the data from a MeasurementSet.
......@@ -128,7 +128,7 @@ namespace LOFAR {
// Construct the object for the given MS.
// Parameters are obtained from the parset using the given prefix.
Filter (DPInput* input, const ParameterSet&, const string& prefix);
Filter (DPInput* input, const ParSet&, const string& prefix);
// Construct the object for the given MS and baseline selection.
Filter (DPInput* input, const BaselineSelection&);
......
......@@ -33,11 +33,11 @@
#include <casa/Arrays/Vector.h>
namespace LOFAR {
class ParameterSet;
namespace DPPP {
//# Forward Declarations.
class DPInfo;
class ParSet;
// @ingroup NDPPP
......@@ -57,8 +57,7 @@ namespace LOFAR {
// This constructor creates an empty object.
// It reads info from the parset to see if percentages have to be saved.
FlagCounter (const string& msName, const ParameterSet&,
const string& prefix);
FlagCounter (const string& msName, const ParSet&, const string& prefix);
// Size all counters and initialize them to zero using the sizes
// from the DPInfo object.
......
......@@ -38,9 +38,9 @@
namespace LOFAR {
class ParameterSet;
namespace DPPP {
class ParSet;
// @ingroup NDPPP
// This class is a DPInput step reading the data from a MeasurementSet.
......@@ -135,7 +135,7 @@ namespace LOFAR {
// Parameters are obtained from the parset using the given prefix.
// The missingData argument is for MultiMSReader.
MSReader (const std::string& msName,
const ParameterSet&, const string& prefix,
const ParSet&, const string& prefix,
bool missingData = false);
virtual ~MSReader();
......@@ -172,8 +172,8 @@ namespace LOFAR {
virtual casa::Cube<bool> getFullResFlags (const casa::RefRows& rowNrs);
// Read the given data column at the given row numbers.
/// virtual casa::Cube<casa::Complex> getData (const casa::String& columnName,
/// const casa::RefRows& rowNrs);
virtual casa::Cube<casa::Complex> getData (const casa::String& columnName,
const casa::RefRows& rowNrs);
// Write the flags at the given row numbers.
// It is used by MSUpdater.
......
......@@ -32,9 +32,9 @@
namespace LOFAR {
class ParameterSet;
namespace DPPP {
class ParSet;
//# Forward Declarations.
class MSReader;
......@@ -50,7 +50,7 @@ namespace LOFAR {
class MSUpdater: public DPStep
{
public:
MSUpdater (MSReader*, const ParameterSet& parset,
MSUpdater (MSReader*, const ParSet& parset,
const std::string& prefix);
virtual ~MSUpdater();
......
......@@ -39,6 +39,8 @@ namespace LOFAR {
class ParameterSet;
namespace DPPP {
class ParSet;
// @ingroup NDPPP
// This class is a DPStep creating a new MeasurementSet and writing
......@@ -62,7 +64,7 @@ namespace LOFAR {
public:
explicit MSWriter (MSReader* reader, const std::string& outName,
const DPInfo&,
const ParameterSet&, const string& prefix);
const ParSet&, const string& prefix);
virtual ~MSWriter();
......
......@@ -33,9 +33,10 @@
#include <Common/lofar_vector.h>
namespace LOFAR {
class ParameterSet;
namespace DPPP {
class ParSet;
// @ingroup NDPPP
// This class is a DPStep class flagging data points based on the median
......@@ -77,7 +78,7 @@ namespace LOFAR {
public:
// Construct the object.
// Parameters are obtained from the parset using the given prefix.
MedFlagger (DPInput*, const ParameterSet&, const string& prefix);
MedFlagger (DPInput*, const ParSet&, const string& prefix);
virtual ~MedFlagger();
......
......@@ -38,9 +38,9 @@
namespace LOFAR {
class ParameterSet;
namespace DPPP {
class ParSet;
// @ingroup NDPPP
// This class is a DPInput step reading the data from a MeasurementSet.
......@@ -131,7 +131,7 @@ namespace LOFAR {
// Construct the object for the given MS.
// Parameters are obtained from the parset using the given prefix.
MultiMSReader (const vector<string>& msNames,
const ParameterSet&, const string& prefix);
const ParSet&, const string& prefix);
virtual ~MultiMSReader();
......@@ -167,8 +167,8 @@ namespace LOFAR {
virtual casa::Cube<bool> getFullResFlags (const casa::RefRows& rowNrs);
// Read the given data column at the given row numbers.
/// virtual casa::Cube<casa::Complex> getData (const casa::String& columnName,
/// const casa::RefRows& rowNrs);
virtual casa::Cube<casa::Complex> getData (const casa::String& columnName,
const casa::RefRows& rowNrs);
// Tell if the visibility data are to be read.
virtual void setReadVisData (bool readVisData);
......
//# ParSet.h: Wrapper around ParaMeterSet to keep track of parameters asked for
//# Copyright (C) 2010
//# ASTRON (Netherlands Institute for Radio Astronomy)
//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
//#
//# This file is part of the LOFAR software suite.
//# The LOFAR software suite 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.
//#
//# The LOFAR software suite 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.
//#
//# You should have received a copy of the GNU General Public License along
//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>.
//#
//# $Id$
//#
//# @author Ger van Diepen
#ifndef DPPP_PARSET_H
#define DPPP_PARSET_H
// @file
// @brief Wrapper around ParaMeterSet to keep track of parameters asked for
#include <Common/ParameterSet.h>
#include <Common/lofar_string.h>
#include <Common/lofar_vector.h>
#include <Common/lofar_set.h>
namespace LOFAR {
namespace DPPP {
// @ingroup NDPPP
// This class keeps track of the parameters asked for.
// In this way it is possible to give a warning or error that the
// ParameterSet has more parameters than asked for. It is an aid in
// detecting misspelled parameters names.
class ParSet
{
public:
ParSet (const ParameterSet&);
// Ask a parameter with a possible default value.
// @{
bool getBool (const string& aKey) const;
bool getBool (const string& aKey, bool aValue) const;
int getInt (const string& aKey) const;
int getInt (const string& aKey, int aValue) const;
uint getUint (const string& aKey) const;
uint getUint (const string& aKey, uint aValue) const;
float getFloat (const string& aKey) const;
float getFloat (const string& aKey, float aValue) const;
double getDouble(const string& aKey) const;
double getDouble(const string& aKey, double aValue) const;
string getString(const string& aKey) const;
string getString(const string& aKey, const string& aValue) const;
vector<bool> getBoolVector (const string& aKey,
bool expandable = false) const;
vector<bool> getBoolVector (const string& aKey,
const vector<bool>& aValue,
bool expandable = false) const;
vector<int> getIntVector (const string& aKey,
bool expandable = false) const;
vector<int> getIntVector (const string& aKey,
const vector<int>& aValue,
bool expandable = false) const;
vector<uint> getUintVector (const string& aKey,
bool expandable = false) const;
vector<uint> getUintVector (const string& aKey,
const vector<uint>& aValue,
bool expandable = false) const;
vector<float> getFloatVector (const string& aKey,
bool expandable = false) const;
vector<float> getFloatVector (const string& aKey,
const vector<float>& aValue,
bool expandable = false) const;
vector<double> getDoubleVector(const string& aKey,
bool expandable = false) const;
vector<double> getDoubleVector(const string& aKey,
const vector<double>& aValue,
bool expandable = false) const;
vector<string> getStringVector(const string& aKey,
bool expandable = false) const;
vector<string> getStringVector(const string& aKey,
const vector<string>& aValue,
bool expandable = false) const;
ParameterRecord getRecord (const string& aKey) const;
// Get all unused parameters.
vector<string> unusedKeys() const;
// Get the underlying ParameterSet.
const ParameterSet& parameterSet() const
{ return itsParSet; }
private:
ParameterSet itsParSet;
mutable set<string> itsAskedParms;
};
} //# end namespace
}
#endif
......@@ -33,9 +33,9 @@
namespace LOFAR {
class ParameterSet;
namespace DPPP {
class ParSet;
// @ingroup NDPPP
// This class is a DPStep class to shift the data and UVW coordinates
......@@ -50,13 +50,13 @@ namespace LOFAR {
// Construct the object.
// Parameters are obtained from the parset using the given prefix.
// This is the standard constructor where the phasecenter must be given.
PhaseShift (DPInput*, const ParameterSet&, const string& prefix);
PhaseShift (DPInput*, const ParSet&, const string& prefix);
// Construct the object.
// Parameters are obtained from the parset using the given prefix.
// This is a constructor for Demixer where the phasecenter has the
// given default value.
PhaseShift (DPInput*, const ParameterSet&, const string& prefix,
PhaseShift (DPInput*, const ParSet&, const string& prefix,
const vector<string>& defVal);
virtual ~PhaseShift();
......@@ -87,10 +87,6 @@ namespace LOFAR {
const casa::Matrix<casa::DComplex>& getPhasors() const
{ return itsPhasors; }
// Get the phase center.
const vector<string>& getPhaseCenter() const
{ return itsCenter; }
private:
// Interpret the phase center specification.
// Currently only J2000 RA and DEC can be given.
......
......@@ -34,10 +34,11 @@
#include <measures/Measures/MDirection.h>
namespace LOFAR {
class ParameterSet;
class ParameterValue;
namespace DPPP {
class ParSet;
// @ingroup NDPPP
// This class is a DPStep class flagging data points based on data
......@@ -74,7 +75,7 @@ namespace LOFAR {
// Construct the object.
// Parameters are obtained from the parset using the given prefix.
PreFlagger (DPInput*, const ParameterSet&, const string& prefix);
PreFlagger (DPInput*, const ParSet&, const string& prefix);
virtual ~PreFlagger();
......@@ -124,7 +125,7 @@ namespace LOFAR {
{}
// Construct from the parset parameters.
PSet (DPInput*, const ParameterSet& parset, const string& prefix);
PSet (DPInput*, const ParSet& parset, const string& prefix);
// Set and return the flags.
casa::Cube<bool>* process (DPBuffer&, uint timeSlot,
......
......@@ -34,9 +34,10 @@
#include <measures/Measures/MPosition.h>
namespace LOFAR {
class ParameterSet;
namespace DPPP {
class ParSet;
// @ingroup NDPPP
// This class is a DPStep class summing stations to a superstation.
......@@ -62,7 +63,7 @@ namespace LOFAR {
public:
// Construct the object.
// Parameters are obtained from the parset using the given prefix.
StationAdder (DPInput*, const ParameterSet&, const string& prefix);
StationAdder (DPInput*, const ParSet&, const string& prefix);
virtual ~StationAdder();
......
......@@ -33,10 +33,11 @@
#include <Common/lofar_vector.h>
namespace LOFAR {
class ParameterSet;
class ParameterValue;
namespace DPPP {
class ParSet;
// @ingroup NDPPP
// This class is a DPStep class flagging data points based on data
......@@ -58,7 +59,7 @@ namespace LOFAR {
// The antenna names are used to find antenna numbers.
// The channel frequencies as they are in the input step must be given
// starting at the start-channel.
UVWFlagger (DPInput*, const ParameterSet&, const string& prefix);
UVWFlagger (DPInput*, const ParSet&, const string& prefix);
virtual ~UVWFlagger();
......@@ -96,7 +97,7 @@ namespace LOFAR {
// (min and max are also turned into a range).
// Optionally the values are squared to avoid having to take a sqrt
// of the data's UVW coordinates.
vector<double> fillUVW (const ParameterSet& parset,
vector<double> fillUVW (const ParSet& parset,
const string& prefix,
const string& name,
bool square);
......
......@@ -25,7 +25,7 @@
#include <DPPP/AORFlagger.h>
#include <DPPP/DPBuffer.h>
#include <DPPP/DPInfo.h>
#include <Common/ParameterSet.h>
#include <DPPP/ParSet.h>
#include <Common/LofarLogger.h>
#include <casa/OS/HostInfo.h>
......@@ -68,8 +68,7 @@ namespace LOFAR {
namespace DPPP {
AORFlagger::AORFlagger (DPInput* input,
const ParameterSet& parset,
const string& prefix)
const ParSet& parset, const string& prefix)
: itsInput (input),
itsName (prefix),
itsBufIndex (0),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment