Skip to content
Snippets Groups Projects
Commit cbb0b7f5 authored by Ger van Diepen's avatar Ger van Diepen
Browse files

bug 1660:

Added classes for the LOFAR specific MS tables
parent c7399c54
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,10 @@ set (inst_HEADERS
MSAntennaFieldColumns.h
MSElementFailure.h
MSElementFailureColumns.h
MSLofarAntenna.h
MSLofarAntennaColumns.h
MSLofarObservation.h
MSLofarObsColumns.h
MSStation.h
MSStationColumns.h
BeamTables.h
......
//# MSLofarAntenna.h: LOFAR MS ANTENNA_FIELD subtable
//# Copyright (C) 2011
//# 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 MSLOFAR_MSLOFARANTENNA_H
#define MSLOFAR_MSLOFARANTENNA_H
#include <ms/MeasurementSets/MSAntenna.h>
#include <MSLofar/MSLofarTable.h>
namespace LOFAR {
class MSLofarAntenna: public casa::MSAntenna
{
public:
// Default constructor creates an unusable object.
MSLofarAntenna();
// Create from an existing table.
MSLofarAntenna (const casa::String& tableName,
casa::Table::TableOption option);
// Create a new table.
MSLofarAntenna (casa::SetupNewTable& newTab, casa::uInt nrrow,
casa::Bool initialize);
// Create from an existing Table object.
MSLofarAntenna (const casa::Table& table);
// Copy constructor (reference semnatics).
MSLofarAntenna (const MSLofarAntenna& that);
// The destructor flushes the table if not done yet.
~MSLofarAntenna();
// Assignment (reference semantics).
MSLofarAntenna& operator= (const MSLofarAntenna& that);
// Create the table description containing the required columns.
static casa::TableDesc requiredTableDesc();
};
} //# end namespace
#endif
//# MSLofarAntennaColumns.h: provides easy access to LOFAR's MSAntenna columns
//# Copyright (C) 2011
//# 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 MSLOFAR_MSLOFARANTENNACOLUMNS_H
#define MSLOFAR_MSLOFARANTENNACOLUMNS_H
#include <ms/MeasurementSets/MSAntennaColumns.h>
namespace LOFAR {
//# Forward Declaration
class MSLofarAntenna;
// This class provides read-only access to the columns in the MSLofarAntenna
// Table. It does the declaration of all the Scalar and ArrayColumns with the
// correct types, so the application programmer doesn't have to worry about
// getting those right. There is an access function for every predefined
// column. Access to non-predefined columns will still have to be done with
// explicit declarations.
class ROMSLofarAntennaColumns: public casa::ROMSAntennaColumns
{
public:
// Create a columns object that accesses the data in the specified Table.
ROMSLofarAntennaColumns(const MSLofarAntenna& msLofarAntenna);
// The destructor does nothing special.
~ROMSLofarAntennaColumns();
// Access to columns.
// <group>
const casa::ROScalarColumn<casa::Int>& stationId() const
{ return stationId_p; }
const casa::ROArrayColumn<casa::Double>& phaseReference() const
{ return phaseReference_p; }
const casa::ROArrayQuantColumn<casa::Double>& phaseReferenceQuant() const
{ return phaseReferenceQuant_p; }
const casa::ROScalarMeasColumn<casa::MPosition>& phaseReferenceMeas() const
{ return phaseReferenceMeas_p; }
// </group>
protected:
//# Default constructor creates a object that is not usable. Use the attach
//# function correct this.
ROMSLofarAntennaColumns();
//# Attach this object to the supplied table.
void attach (const MSLofarAntenna& msLofarAntenna);
private:
//# Make the assignment operator and the copy constructor private to prevent
//# any compiler generated one from being used.
ROMSLofarAntennaColumns(const ROMSLofarAntennaColumns&);
ROMSLofarAntennaColumns& operator=(const ROMSLofarAntennaColumns&);
//# required columns
casa::ROScalarColumn<casa::Int> stationId_p;
casa::ROArrayColumn<casa::Double> phaseReference_p;
//# Access to Measure columns
casa::ROScalarMeasColumn<casa::MPosition> phaseReferenceMeas_p;
//# Access to Quantum columns
casa::ROArrayQuantColumn<casa::Double> phaseReferenceQuant_p;
};
// This class provides read/write access to the columns in the MSLofarAntenna
// Table. It does the declaration of all the Scalar and ArrayColumns with the
// correct types, so the application programmer doesn't have to
// worry about getting those right. There is an access function
// for every predefined column. Access to non-predefined columns will still
// have to be done with explicit declarations.
class MSLofarAntennaColumns: public casa::MSAntennaColumns
{
public:
// Create a columns object that accesses the data in the specified Table.
MSLofarAntennaColumns(MSLofarAntenna& msLofarAntenna);
// The destructor does nothing special.
~MSLofarAntennaColumns();
// Read-write access to required columns.
// <group>
const casa::ROScalarColumn<casa::Int>& stationId() const
{ return roStationId_p; }
casa::ScalarColumn<casa::Int>& stationId()
{ return rwStationId_p; }
const casa::ROArrayColumn<casa::Double>& phaseReference() const
{ return roPhaseReference_p; }
casa::ArrayColumn<casa::Double>& phaseReference()
{ return rwPhaseReference_p; }
const casa::ROArrayQuantColumn<casa::Double>& phaseReferenceQuant() const
{ return roPhaseReferenceQuant_p; }
casa::ArrayQuantColumn<casa::Double>& phaseReferenceQuant()
{ return rwPhaseReferenceQuant_p; }
casa::ROScalarMeasColumn<casa::MPosition>& phaseReferenceMeas()
{ return roPhaseReferenceMeas_p; }
const casa::ScalarMeasColumn<casa::MPosition>& phaseReferenceMeas() const
{ return rwPhaseReferenceMeas_p; }
// </group>
protected:
//# Default constructor creates a object that is not usable. Use the attach
//# function correct this.
MSLofarAntennaColumns();
//# Attach this object to the supplied table.
void attach(MSLofarAntenna& msLofarAntenna);
private:
//# Make the assignment operator and the copy constructor private to prevent
//# any compiler generated one from being used.
MSLofarAntennaColumns(const MSLofarAntennaColumns&);
MSLofarAntennaColumns& operator=(const MSLofarAntennaColumns&);
//# required columns
casa::ROScalarColumn<casa::Int> roStationId_p;
casa::ScalarColumn<casa::Int> rwStationId_p;
casa::ROArrayColumn<casa::Double> roPhaseReference_p;
casa::ArrayColumn<casa::Double> rwPhaseReference_p;
//# Access to Measure columns
casa::ROScalarMeasColumn<casa::MPosition> roPhaseReferenceMeas_p;
casa::ScalarMeasColumn<casa::MPosition> rwPhaseReferenceMeas_p;
//# Access to Quantum columns
casa::ROArrayQuantColumn<casa::Double> roPhaseReferenceQuant_p;
casa::ArrayQuantColumn<casa::Double> rwPhaseReferenceQuant_p;
};
} //# end namespace
#endif
//# MSLofarObsColumns.h: provides easy access to LOFAR's MSObservation columns
//# Copyright (C) 2011
//# 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 MSLOFAR_MSLOFAROBSCOLUMNS_H
#define MSLOFAR_MSLOFAROBSCOLUMNS_H
#include <ms/MeasurementSets/MSObsColumns.h>
namespace LOFAR {
//# Forward Declaration
class MSLofarObservation;
// This class provides read-only access to the columns in the MSLofarObservation
// Table. It does the declaration of all the Scalar and ArrayColumns with the
// correct types, so the application programmer doesn't have to worry about
// getting those right. There is an access function for every predefined
// column. Access to non-predefined columns will still have to be done with
// explicit declarations.
class ROMSLofarObservationColumns: public casa::ROMSObservationColumns
{
public:
// Create a columns object that accesses the data in the specified Table.
ROMSLofarObservationColumns(const MSLofarObservation& msLofarObservation);
// The destructor does nothing special.
~ROMSLofarObservationColumns();
// Access to columns.
// <group>
const casa::ROScalarColumn<casa::String>& projectTitle() const
{ return projectTitle_p; }
const casa::ROScalarColumn<casa::String>& projectPI() const
{ return projectPI_p; }
const casa::ROArrayColumn<casa::String>& projectCoI() const
{ return projectCoI_p; }
const casa::ROScalarColumn<casa::String>& projectContact() const
{ return projectContact_p; }
const casa::ROScalarColumn<casa::String>& observationId() const
{ return observationId_p; }
const casa::ROScalarColumn<casa::Double>& observationStart() const
{ return observationStart_p; }
const casa::ROScalarColumn<casa::Double>& observationEnd() const
{ return observationEnd_p; }
const casa::ROScalarColumn<casa::Double>& observationFrequencyMax() const
{ return observationFrequencyMax_p; }
const casa::ROScalarColumn<casa::Double>& observationFrequencyMin() const
{ return observationFrequencyMin_p; }
const casa::ROScalarColumn<casa::Double>& observationFrequencyCenter() const
{ return observationFrequencyCenter_p; }
const casa::ROScalarColumn<casa::Int>& subArrayPointing() const
{ return subArrayPointing_p; }
const casa::ROScalarColumn<casa::String>& antennaSet() const
{ return antennaSet_p; }
const casa::ROScalarColumn<casa::String>& filterSelection() const
{ return filterSelection_p; }
const casa::ROScalarColumn<casa::Double>& clockFrequency() const
{ return clockFrequency_p; }
const casa::ROArrayColumn<casa::String>& target() const
{ return target_p; }
const casa::ROScalarColumn<casa::String>& systemVersion() const
{ return systemVersion_p; }
const casa::ROScalarColumn<casa::String>& pipelineName() const
{ return pipelineName_p; }
const casa::ROScalarColumn<casa::String>& pipelineVersion() const
{ return pipelineVersion_p; }
const casa::ROScalarColumn<casa::String>& fileName() const
{ return fileName_p; }
const casa::ROScalarColumn<casa::String>& fileType() const
{ return fileType_p; }
const casa::ROScalarColumn<casa::Double>& fileDate() const
{ return fileDate_p; }
// </group>
// Access to Quantity columns
// <group>
const casa::ROScalarQuantColumn<casa::Double>& observationStartQuant() const
{ return observationStartQuant_p; }
const casa::ROScalarQuantColumn<casa::Double>& observationEndQuant() const
{ return observationEndQuant_p; }
const casa::ROScalarQuantColumn<casa::Double>& observationFrequencyMaxQuant() const
{ return observationFrequencyMaxQuant_p; }
const casa::ROScalarQuantColumn<casa::Double>& observationFrequencyMinQuant() const
{ return observationFrequencyMinQuant_p; }
const casa::ROScalarQuantColumn<casa::Double>& clockFrequencyQuant() const
{ return clockFrequencyQuant_p; }
const casa::ROScalarQuantColumn<casa::Double>& observationFrequencyCenterQuant() const
{ return observationFrequencyCenterQuant_p; }
const casa::ROScalarQuantColumn<casa::Double>& fileDateQuant() const
{ return fileDateQuant_p; }
// </group>
// Access to Measure columns
// <group>
const casa::ROScalarMeasColumn<casa::MEpoch>& observationStartMeas() const
{ return observationStartMeas_p; }
const casa::ROScalarMeasColumn<casa::MEpoch>& observationEndMeas() const
{ return observationEndMeas_p; }
const casa::ROScalarMeasColumn<casa::MEpoch>& fileDateMeas() const
{ return fileDateMeas_p; }
// </group>
protected:
//# Default constructor creates a object that is not usable. Use the attach
//# function correct this.
ROMSLofarObservationColumns();
//# Attach this object to the supplied table.
void attach (const MSLofarObservation& msLofarObservation);
private:
//# Make the assignment operator and the copy constructor private to prevent
//# any compiler generated one from being used.
ROMSLofarObservationColumns(const ROMSLofarObservationColumns&);
ROMSLofarObservationColumns& operator=(const ROMSLofarObservationColumns&);
//# required columns
casa::ROScalarColumn<casa::String> projectTitle_p;
casa::ROScalarColumn<casa::String> projectPI_p;
casa::ROArrayColumn<casa::String> projectCoI_p;
casa::ROScalarColumn<casa::String> projectContact_p;
casa::ROScalarColumn<casa::String> observationId_p;
casa::ROScalarColumn<casa::Double> observationStart_p;
casa::ROScalarColumn<casa::Double> observationEnd_p;
casa::ROScalarColumn<casa::Double> observationFrequencyMax_p;
casa::ROScalarColumn<casa::Double> observationFrequencyMin_p;
casa::ROScalarColumn<casa::Double> observationFrequencyCenter_p;
casa::ROScalarColumn<casa::Int> subArrayPointing_p;
casa::ROScalarColumn<casa::String> antennaSet_p;
casa::ROScalarColumn<casa::String> filterSelection_p;
casa::ROScalarColumn<casa::Double> clockFrequency_p;
casa::ROArrayColumn<casa::String> target_p;
casa::ROScalarColumn<casa::String> systemVersion_p;
casa::ROScalarColumn<casa::String> pipelineName_p;
casa::ROScalarColumn<casa::String> pipelineVersion_p;
casa::ROScalarColumn<casa::String> fileName_p;
casa::ROScalarColumn<casa::String> fileType_p;
casa::ROScalarColumn<casa::Double> fileDate_p;
//# Access to Quantum columns
casa::ROScalarQuantColumn<casa::Double> observationStartQuant_p;
casa::ROScalarQuantColumn<casa::Double> observationEndQuant_p;
casa::ROScalarQuantColumn<casa::Double> observationFrequencyMaxQuant_p;
casa::ROScalarQuantColumn<casa::Double> observationFrequencyMinQuant_p;
casa::ROScalarQuantColumn<casa::Double> observationFrequencyCenterQuant_p;
casa::ROScalarQuantColumn<casa::Double> clockFrequencyQuant_p;
casa::ROScalarQuantColumn<casa::Double> fileDateQuant_p;
//# Access to Measure columns
casa::ROScalarMeasColumn<casa::MEpoch> observationStartMeas_p;
casa::ROScalarMeasColumn<casa::MEpoch> observationEndMeas_p;
casa::ROScalarMeasColumn<casa::MEpoch> fileDateMeas_p;
};
// This class provides read/write access to the columns in the MSLofarObservation
// Table. It does the declaration of all the Scalar and ArrayColumns with the
// correct types, so the application programmer doesn't have to
// worry about getting those right. There is an access function
// for every predefined column. Access to non-predefined columns will still
// have to be done with explicit declarations.
class MSLofarObservationColumns: public casa::MSObservationColumns
{
public:
// Create a columns object that accesses the data in the specified Table.
MSLofarObservationColumns(MSLofarObservation& msLofarObservation);
// The destructor does nothing special.
~MSLofarObservationColumns();
// Readonly access to columns.
// <group>
const casa::ROScalarColumn<casa::String>& projectTitle() const
{ return roProjectTitle_p; }
const casa::ROScalarColumn<casa::String>& projectPI() const
{ return roProjectPI_p; }
const casa::ROArrayColumn<casa::String>& projectCoI() const
{ return roProjectCoI_p; }
const casa::ROScalarColumn<casa::String>& projectContact() const
{ return roProjectContact_p; }
const casa::ROScalarColumn<casa::String>& observationId() const
{ return roObservationId_p; }
const casa::ROScalarColumn<casa::Double>& observationStart() const
{ return roObservationStart_p; }
const casa::ROScalarColumn<casa::Double>& observationEnd() const
{ return roObservationEnd_p; }
const casa::ROScalarColumn<casa::Double>& observationFrequencyMax() const
{ return roObservationFrequencyMax_p; }
const casa::ROScalarColumn<casa::Double>& observationFrequencyMin() const
{ return roObservationFrequencyMin_p; }
const casa::ROScalarColumn<casa::Double>& observationFrequencyCenter() const
{ return roObservationFrequencyCenter_p; }
const casa::ROScalarColumn<casa::Int>& subArrayPointing() const
{ return roSubArrayPointing_p; }
const casa::ROScalarColumn<casa::String>& antennaSet() const
{ return roAntennaSet_p; }
const casa::ROScalarColumn<casa::String>& filterSelection() const
{ return roFilterSelection_p; }
const casa::ROScalarColumn<casa::Double>& clockFrequency() const
{ return roClockFrequency_p; }
const casa::ROArrayColumn<casa::String>& target() const
{ return roTarget_p; }
const casa::ROScalarColumn<casa::String>& systemVersion() const
{ return roSystemVersion_p; }
const casa::ROScalarColumn<casa::String>& pipelineName() const
{ return roPipelineName_p; }
const casa::ROScalarColumn<casa::String>& pipelineVersion() const
{ return roPipelineVersion_p; }
const casa::ROScalarColumn<casa::String>& fileName() const
{ return roFileName_p; }
const casa::ROScalarColumn<casa::String>& fileType() const
{ return roFileType_p; }
const casa::ROScalarColumn<casa::Double>& fileDate() const
{ return roFileDate_p; }
// </group>
// Readonly access to Quantity columns
// <group>
const casa::ROScalarQuantColumn<casa::Double>& observationStartQuant() const
{ return roObservationStartQuant_p; }
const casa::ROScalarQuantColumn<casa::Double>& observationEndQuant() const
{ return roObservationEndQuant_p; }
const casa::ROScalarQuantColumn<casa::Double>& observationFrequencyMaxQuant() const
{ return roObservationFrequencyMaxQuant_p; }
const casa::ROScalarQuantColumn<casa::Double>& observationFrequencyMinQuant() const
{ return roObservationFrequencyMinQuant_p; }
const casa::ROScalarQuantColumn<casa::Double>& observationFrequencyCenterQuant() const
{ return roObservationFrequencyCenterQuant_p; }
const casa::ROScalarQuantColumn<casa::Double>& clockFrequencyQuant() const
{ return roClockFrequencyQuant_p; }
const casa::ROScalarQuantColumn<casa::Double>& fileDateQuant() const
{ return roFileDateQuant_p; }
// </group>
// Readonly access to Measure columns
// <group>
const casa::ROScalarMeasColumn<casa::MEpoch>& observationStartMeas() const
{ return roObservationStartMeas_p; }
const casa::ROScalarMeasColumn<casa::MEpoch>& observationEndMeas() const
{ return roObservationEndMeas_p; }
const casa::ROScalarMeasColumn<casa::MEpoch>& fileDateMeas() const
{ return roFileDateMeas_p; }
// </group>
// Read/write access to columns.
// <group>
casa::ScalarColumn<casa::String>& projectTitle()
{ return rwProjectTitle_p; }
casa::ScalarColumn<casa::String>& projectPI()
{ return rwProjectPI_p; }
casa::ArrayColumn<casa::String>& projectCoI()
{ return rwProjectCoI_p; }
casa::ScalarColumn<casa::String>& projectContact()
{ return rwProjectContact_p; }
casa::ScalarColumn<casa::String>& observationId()
{ return rwObservationId_p; }
casa::ScalarColumn<casa::Double>& observationStart()
{ return rwObservationStart_p; }
casa::ScalarColumn<casa::Double>& observationEnd()
{ return rwObservationEnd_p; }
casa::ScalarColumn<casa::Double>& observationFrequencyMax()
{ return rwObservationFrequencyMax_p; }
casa::ScalarColumn<casa::Double>& observationFrequencyMin()
{ return rwObservationFrequencyMin_p; }
casa::ScalarColumn<casa::Double>& observationFrequencyCenter()
{ return rwObservationFrequencyCenter_p; }
casa::ScalarColumn<casa::Int>& subArrayPointing()
{ return rwSubArrayPointing_p; }
casa::ScalarColumn<casa::String>& antennaSet()
{ return rwAntennaSet_p; }
casa::ScalarColumn<casa::String>& filterSelection()
{ return rwFilterSelection_p; }
casa::ScalarColumn<casa::Double>& clockFrequency()
{ return rwClockFrequency_p; }
casa::ArrayColumn<casa::String>& target()
{ return rwTarget_p; }
casa::ScalarColumn<casa::String>& systemVersion()
{ return rwSystemVersion_p; }
casa::ScalarColumn<casa::String>& pipelineName()
{ return rwPipelineName_p; }
casa::ScalarColumn<casa::String>& pipelineVersion()
{ return rwPipelineVersion_p; }
casa::ScalarColumn<casa::String>& fileName()
{ return rwFileName_p; }
casa::ScalarColumn<casa::String>& fileType()
{ return rwFileType_p; }
casa::ScalarColumn<casa::Double>& fileDate()
{ return rwFileDate_p; }
// </group>
// Read/write access to Quantity columns
// <group>
casa::ScalarQuantColumn<casa::Double>& observationStartQuant()
{ return rwObservationStartQuant_p; }
casa::ScalarQuantColumn<casa::Double>& observationEndQuant()
{ return rwObservationEndQuant_p; }
casa::ScalarQuantColumn<casa::Double>& observationFrequencyMaxQuant()
{ return rwObservationFrequencyMaxQuant_p; }
casa::ScalarQuantColumn<casa::Double>& observationFrequencyMinQuant()
{ return rwObservationFrequencyMinQuant_p; }
casa::ScalarQuantColumn<casa::Double>& observationFrequencyCenterQuant()
{ return rwObservationFrequencyCenterQuant_p; }
casa::ScalarQuantColumn<casa::Double>& clockFrequencyQuant()
{ return rwClockFrequencyQuant_p; }
casa::ScalarQuantColumn<casa::Double>& fileDateQuant()
{ return rwFileDateQuant_p; }
// </group>
// Read/write access to Measure columns
// <group>
casa::ScalarMeasColumn<casa::MEpoch>& observationStartMeas()
{ return rwObservationStartMeas_p; }
casa::ScalarMeasColumn<casa::MEpoch>& observationEndMeas()
{ return rwObservationEndMeas_p; }
casa::ScalarMeasColumn<casa::MEpoch>& fileDateMeas()
{ return rwFileDateMeas_p; }
// </group>
protected:
//# Default constructor creates a object that is not usable. Use the attach
//# function correct this.
MSLofarObservationColumns();
//# Attach this object to the supplied table.
void attach(MSLofarObservation& msLofarObservation);
private:
//# Make the assignment operator and the copy constructor private to prevent
//# any compiler generated one from being used.
MSLofarObservationColumns(const MSLofarObservationColumns&);
MSLofarObservationColumns& operator=(const MSLofarObservationColumns&);
//# required columns
casa::ROScalarColumn<casa::String> roProjectTitle_p;
casa::ROScalarColumn<casa::String> roProjectPI_p;
casa::ROArrayColumn<casa::String> roProjectCoI_p;
casa::ROScalarColumn<casa::String> roProjectContact_p;
casa::ROScalarColumn<casa::String> roObservationId_p;
casa::ROScalarColumn<casa::Double> roObservationStart_p;
casa::ROScalarColumn<casa::Double> roObservationEnd_p;
casa::ROScalarColumn<casa::Double> roObservationFrequencyMax_p;
casa::ROScalarColumn<casa::Double> roObservationFrequencyMin_p;
casa::ROScalarColumn<casa::Double> roObservationFrequencyCenter_p;
casa::ROScalarColumn<casa::Int> roSubArrayPointing_p;
casa::ROScalarColumn<casa::String> roAntennaSet_p;
casa::ROScalarColumn<casa::String> roFilterSelection_p;
casa::ROScalarColumn<casa::Double> roClockFrequency_p;
casa::ROArrayColumn<casa::String> roTarget_p;
casa::ROScalarColumn<casa::String> roSystemVersion_p;
casa::ROScalarColumn<casa::String> roPipelineName_p;
casa::ROScalarColumn<casa::String> roPipelineVersion_p;
casa::ROScalarColumn<casa::String> roFileName_p;
casa::ROScalarColumn<casa::String> roFileType_p;
casa::ROScalarColumn<casa::Double> roFileDate_p;
//# Access to Quantum columns
casa::ROScalarQuantColumn<casa::Double> roObservationStartQuant_p;
casa::ROScalarQuantColumn<casa::Double> roObservationEndQuant_p;
casa::ROScalarQuantColumn<casa::Double> roObservationFrequencyMaxQuant_p;
casa::ROScalarQuantColumn<casa::Double> roObservationFrequencyMinQuant_p;
casa::ROScalarQuantColumn<casa::Double> roObservationFrequencyCenterQuant_p;
casa::ROScalarQuantColumn<casa::Double> roClockFrequencyQuant_p;
casa::ROScalarQuantColumn<casa::Double> roFileDateQuant_p;
//# Access to Measure columns
casa::ROScalarMeasColumn<casa::MEpoch> roObservationStartMeas_p;
casa::ROScalarMeasColumn<casa::MEpoch> roObservationEndMeas_p;
casa::ROScalarMeasColumn<casa::MEpoch> roFileDateMeas_p;
//# required columns
casa::ScalarColumn<casa::String> rwProjectTitle_p;
casa::ScalarColumn<casa::String> rwProjectPI_p;
casa::ArrayColumn<casa::String> rwProjectCoI_p;
casa::ScalarColumn<casa::String> rwProjectContact_p;
casa::ScalarColumn<casa::String> rwObservationId_p;
casa::ScalarColumn<casa::Double> rwObservationStart_p;
casa::ScalarColumn<casa::Double> rwObservationEnd_p;
casa::ScalarColumn<casa::Double> rwObservationFrequencyMax_p;
casa::ScalarColumn<casa::Double> rwObservationFrequencyMin_p;
casa::ScalarColumn<casa::Double> rwObservationFrequencyCenter_p;
casa::ScalarColumn<casa::Int> rwSubArrayPointing_p;
casa::ScalarColumn<casa::String> rwAntennaSet_p;
casa::ScalarColumn<casa::String> rwFilterSelection_p;
casa::ScalarColumn<casa::Double> rwClockFrequency_p;
casa::ArrayColumn<casa::String> rwTarget_p;
casa::ScalarColumn<casa::String> rwSystemVersion_p;
casa::ScalarColumn<casa::String> rwPipelineName_p;
casa::ScalarColumn<casa::String> rwPipelineVersion_p;
casa::ScalarColumn<casa::String> rwFileName_p;
casa::ScalarColumn<casa::String> rwFileType_p;
casa::ScalarColumn<casa::Double> rwFileDate_p;
//# Access to Quantum columns
casa::ScalarQuantColumn<casa::Double> rwObservationStartQuant_p;
casa::ScalarQuantColumn<casa::Double> rwObservationEndQuant_p;
casa::ScalarQuantColumn<casa::Double> rwObservationFrequencyMaxQuant_p;
casa::ScalarQuantColumn<casa::Double> rwObservationFrequencyMinQuant_p;
casa::ScalarQuantColumn<casa::Double> rwObservationFrequencyCenterQuant_p;
casa::ScalarQuantColumn<casa::Double> rwClockFrequencyQuant_p;
casa::ScalarQuantColumn<casa::Double> rwFileDateQuant_p;
//# Access to Measure columns
casa::ScalarMeasColumn<casa::MEpoch> rwObservationStartMeas_p;
casa::ScalarMeasColumn<casa::MEpoch> rwObservationEndMeas_p;
casa::ScalarMeasColumn<casa::MEpoch> rwFileDateMeas_p;
};
} //# end namespace
#endif
//# MSLofarObservation.h: LOFAR MS OBSERVATION_FIELD subtable
//# Copyright (C) 2011
//# 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 MSLOFAR_MSLOFAROBSERVATION_H
#define MSLOFAR_MSLOFAROBSERVATION_H
#include <ms/MeasurementSets/MSObservation.h>
#include <MSLofar/MSLofarTable.h>
namespace LOFAR {
class MSLofarObservation: public casa::MSObservation
{
public:
// Default constructor creates an unusable object.
MSLofarObservation();
// Create from an existing table.
MSLofarObservation (const casa::String& tableName,
casa::Table::TableOption option);
// Create a new table.
MSLofarObservation (casa::SetupNewTable& newTab, casa::uInt nrrow,
casa::Bool initialize);
// Create from an existing Table object.
MSLofarObservation (const casa::Table& table);
// Copy constructor (reference semnatics).
MSLofarObservation (const MSLofarObservation& that);
// The destructor flushes the table if not done yet.
~MSLofarObservation();
// Assignment (reference semantics).
MSLofarObservation& operator= (const MSLofarObservation& that);
// Create the table description containing the required columns.
static casa::TableDesc requiredTableDesc();
};
} //# end namespace
#endif
......@@ -122,10 +122,12 @@ void BeamTables::create (Table& ms,
blitz::Array<double,2> hbaOffsets; // offsets of HBA dipoles in a tile
bool done = false;
int firstHbaOffset = 0;
if (antFieldName == "HBA") {
if (antFieldType == "HBA") {
// Get the offsets of HBA dipoles w.r.t. tile center.
hbaOffsets.reference (getHBADeltas (hbaDeltaPath + stationName +
"-iHBADeltas.conf"));
}
if (antFieldName == "HBA") {
// HBA can be split into HBA0 and HBA1.
// They have to be written separately.
if (antFieldName == "HBA") {
......
......@@ -9,6 +9,10 @@ lofar_add_library(mslofar
MSAntennaFieldColumns.cc
MSElementFailure.cc
MSElementFailureColumns.cc
MSLofarAntenna.cc
MSLofarAntennaColumns.cc
MSLofarObservation.cc
MSLofarObsColumns.cc
MSStation.cc
MSStationColumns.cc
BeamTables.cc
......
//# MSLofar.cc: Class handling a LOFAR MeasurementSet
//# Copyright (C) 2011
//# 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
#include<lofar_config.h>
#include <MSLofar/MSLofar.h
namespace LOFAR {
MeasurementSet::MeasurementSet()
{}
MeasurementSet::MeasurementSet(const String &tableName,
TableOption option)
: MeasurementSet (tableName, option);
{
initRefs();
}
MeasurementSet::MeasurementSet(const String &tableName,
const TableLock& lockOptions,
TableOption option)
: MeasurementSet (tableName, lockOptions, option);
{
initRefs();
}
MeasurementSet::MeasurementSet(SetupNewTable &newTab, uInt nrrow,
Bool initialize)
: MeasurementSet (newTab, nrrow, initialize);
{}
MeasurementSet::MeasurementSet(SetupNewTable &newTab,
const TableLock& lockOptions, uInt nrrow,
Bool initialize)
: MeasurementSet (newTab, lockOptions, nrrow, initialize);
{}
MeasurementSet::MeasurementSet(const Table &table)
: MeasurementSet (table)
{
initRefs();
}
MeasurementSet::MeasurementSet(const MeasurementSet &other)
: MeasurementSet (other)
{
if (!isNull()) initRefs();
}
MeasurementSet::~MeasurementSet()
{}
MeasurementSet& MeasurementSet::operator=(const MeasurementSet &other)
{
if (&other != this) {
MeasurementSet::operator= (other);
if (!isNull()) initRefs(True);
}
return *this;
}
MeasurementSet MeasurementSet::referenceCopy(const String& newTableName,
const Block<String>& writableColumns) const
{
return MSLofar (MeasurementSet::referenceCopy (newTableName,
writableColumns));
}
void MeasurementSet::initRefs(Bool clear)
{
if (isNull()||clear) {
// clear subtable references
antenna_p=MSAntenna();
dataDesc_p=MSDataDescription();
doppler_p=MSDoppler();
feed_p=MSFeed();
field_p=MSField();
flagCmd_p=MSFlagCmd();
freqOffset_p=MSFreqOffset();
history_p=MSHistory();
observation_p=MSObservation();
pointing_p=MSPointing();
polarization_p=MSPolarization();
processor_p=MSProcessor();
source_p=MSSource();
spectralWindow_p=MSSpectralWindow();
state_p=MSState();
sysCal_p=MSSysCal();
weather_p=MSWeather();
}
if (!isNull()) {
// write the table info if needed
if (this->tableInfo().type()=="") {
String reqdType=this->tableInfo().type(TableInfo::MEASUREMENTSET);
this->tableInfo().setType(reqdType);
String reqdSubType=this->tableInfo().subType(TableInfo::MEASUREMENTSET);
this->tableInfo().setSubType(reqdSubType);
this->tableInfo().readmeAddLine("This is a MeasurementSet Table"
" holding measurements from a Telescope");
}
if(this->tableOption() != Table::Scratch){
if (this->keywordSet().isDefined("ANTENNA"))
antenna_p=MSAntenna(this->keywordSet().asTable("ANTENNA", mainLock_p));
if (this->keywordSet().isDefined("DATA_DESCRIPTION"))
dataDesc_p=MSDataDescription(this->keywordSet().
asTable("DATA_DESCRIPTION", mainLock_p));
if (this->keywordSet().isDefined("DOPPLER"))
doppler_p=MSDoppler(this->keywordSet().asTable("DOPPLER", mainLock_p));
if (this->keywordSet().isDefined("FEED"))
feed_p=MSFeed(this->keywordSet().asTable("FEED", mainLock_p));
if (this->keywordSet().isDefined("FIELD"))
field_p=MSField(this->keywordSet().asTable("FIELD", mainLock_p));
if (this->keywordSet().isDefined("FLAG_CMD"))
flagCmd_p=MSFlagCmd(this->keywordSet().asTable("FLAG_CMD",
mainLock_p));
if (this->keywordSet().isDefined("FREQ_OFFSET"))
freqOffset_p=MSFreqOffset(this->keywordSet().
asTable("FREQ_OFFSET", mainLock_p));
if (this->keywordSet().isDefined("HISTORY"))
history_p=MSHistory(this->keywordSet().asTable("HISTORY", mainLock_p));
if (this->keywordSet().isDefined("OBSERVATION"))
observation_p=MSObservation(this->keywordSet().
asTable("OBSERVATION",mainLock_p));
if (this->keywordSet().isDefined("POINTING"))
pointing_p=MSPointing(this->keywordSet().
asTable("POINTING", mainLock_p));
if (this->keywordSet().isDefined("POLARIZATION"))
polarization_p=MSPolarization(this->keywordSet().
asTable("POLARIZATION",mainLock_p));
if (this->keywordSet().isDefined("PROCESSOR"))
processor_p=MSProcessor(this->keywordSet().
asTable("PROCESSOR", mainLock_p));
if (this->keywordSet().isDefined("SOURCE"))
source_p=MSSource(this->keywordSet().asTable("SOURCE", mainLock_p));
if (this->keywordSet().isDefined("SPECTRAL_WINDOW"))
spectralWindow_p=MSSpectralWindow(this->keywordSet().
asTable("SPECTRAL_WINDOW",mainLock_p));
if (this->keywordSet().isDefined("STATE"))
state_p=MSState(this->keywordSet().asTable("STATE", mainLock_p));
if (this->keywordSet().isDefined("SYSCAL"))
sysCal_p=MSSysCal(this->keywordSet().asTable("SYSCAL", mainLock_p));
if (this->keywordSet().isDefined("WEATHER"))
weather_p=MSWeather(this->keywordSet().asTable("WEATHER", mainLock_p));
}
else{ //if its scratch...don't bother about the lock as
//We can't close and reopen subtables hence we can't use the version
//of astable that does that.
if (this->keywordSet().isDefined("ANTENNA"))
antenna_p=MSAntenna(this->keywordSet().asTable("ANTENNA"));
if (this->keywordSet().isDefined("DATA_DESCRIPTION"))
dataDesc_p=MSDataDescription(this->keywordSet().
asTable("DATA_DESCRIPTION"));
if (this->keywordSet().isDefined("DOPPLER"))
doppler_p=MSDoppler(this->keywordSet().asTable("DOPPLER"));
if (this->keywordSet().isDefined("FEED"))
feed_p=MSFeed(this->keywordSet().asTable("FEED"));
if (this->keywordSet().isDefined("FIELD"))
field_p=MSField(this->keywordSet().asTable("FIELD"));
if (this->keywordSet().isDefined("FLAG_CMD"))
flagCmd_p=MSFlagCmd(this->keywordSet().asTable("FLAG_CMD"));
if (this->keywordSet().isDefined("FREQ_OFFSET"))
freqOffset_p=MSFreqOffset(this->keywordSet().
asTable("FREQ_OFFSET"));
if (this->keywordSet().isDefined("HISTORY"))
history_p=MSHistory(this->keywordSet().asTable("HISTORY"));
if (this->keywordSet().isDefined("OBSERVATION"))
observation_p=MSObservation(this->keywordSet().
asTable("OBSERVATION"));
if (this->keywordSet().isDefined("POINTING"))
pointing_p=MSPointing(this->keywordSet().
asTable("POINTING"));
if (this->keywordSet().isDefined("POLARIZATION"))
polarization_p=MSPolarization(this->keywordSet().
asTable("POLARIZATION"));
if (this->keywordSet().isDefined("PROCESSOR"))
processor_p=MSProcessor(this->keywordSet().
asTable("PROCESSOR"));
if (this->keywordSet().isDefined("SOURCE"))
source_p=MSSource(this->keywordSet().asTable("SOURCE"));
if (this->keywordSet().isDefined("SPECTRAL_WINDOW"))
spectralWindow_p=MSSpectralWindow(this->keywordSet().
asTable("SPECTRAL_WINDOW"));
if (this->keywordSet().isDefined("STATE"))
state_p=MSState(this->keywordSet().asTable("STATE"));
if (this->keywordSet().isDefined("SYSCAL"))
sysCal_p=MSSysCal(this->keywordSet().asTable("SYSCAL"));
if (this->keywordSet().isDefined("WEATHER"))
weather_p=MSWeather(this->keywordSet().asTable("WEATHER"));
}
}
}
void MeasurementSet::createDefaultSubtables(Table::TableOption option)
{
SetupNewTable antennaSetup(antennaTableName(),
MSAntenna::requiredTableDesc(),option);
rwKeywordSet().defineTable(MS::keywordName(MS::ANTENNA),
Table(antennaSetup));
SetupNewTable dataDescSetup(dataDescriptionTableName(),
MSDataDescription::requiredTableDesc(),option);
rwKeywordSet().defineTable(MS::keywordName(MS::DATA_DESCRIPTION),
Table(dataDescSetup));
SetupNewTable feedSetup(feedTableName(),
MSFeed::requiredTableDesc(),option);
rwKeywordSet().defineTable(MS::keywordName(MS::FEED), Table(feedSetup));
SetupNewTable flagCmdSetup(flagCmdTableName(),
MSFlagCmd::requiredTableDesc(),option);
rwKeywordSet().defineTable(MS::keywordName(MS::FLAG_CMD),
Table(flagCmdSetup));
SetupNewTable fieldSetup(fieldTableName(),
MSField::requiredTableDesc(),option);
rwKeywordSet().defineTable(MS::keywordName(MS::FIELD), Table(fieldSetup));
SetupNewTable historySetup(historyTableName(),
MSHistory::requiredTableDesc(),option);
rwKeywordSet().defineTable(MS::keywordName(MS::HISTORY),
Table(historySetup));
SetupNewTable observationSetup(observationTableName(),
MSObservation::requiredTableDesc(),option);
rwKeywordSet().defineTable(MS::keywordName(MS::OBSERVATION),
Table(observationSetup));
SetupNewTable pointingSetup(pointingTableName(),
MSPointing::requiredTableDesc(),option);
// Pointing table can be large, set some sensible defaults for storageMgrs
IncrementalStMan ismPointing ("ISMPointing");
StandardStMan ssmPointing("SSMPointing",32768);
pointingSetup.bindAll(ismPointing,True);
pointingSetup.bindColumn(MSPointing::columnName(MSPointing::ANTENNA_ID),
ssmPointing);
rwKeywordSet().defineTable(MS::keywordName(MS::POINTING),
Table(pointingSetup));
SetupNewTable polarizationSetup(polarizationTableName(),
MSPolarization::requiredTableDesc(),option);
rwKeywordSet().defineTable(MS::keywordName(MS::POLARIZATION),
Table(polarizationSetup));
SetupNewTable processorSetup(processorTableName(),
MSProcessor::requiredTableDesc(),option);
rwKeywordSet().defineTable(MS::keywordName(MS::PROCESSOR),
Table(processorSetup));
SetupNewTable spectralWindowSetup(spectralWindowTableName(),
MSSpectralWindow::requiredTableDesc(),option);
rwKeywordSet().defineTable(MS::keywordName(MS::SPECTRAL_WINDOW),
Table(spectralWindowSetup));
SetupNewTable stateSetup(stateTableName(),
MSState::requiredTableDesc(),option);
rwKeywordSet().defineTable(MS::keywordName(MS::STATE),
Table(stateSetup));
initRefs();
}
Bool MeasurementSet::makeComplexData()
{
// for now we use an extremely simplistic implementation (should find out
// storage managers and tiles and keep things the same)
if (tableDesc().isColumn(MS::columnName(MS::DATA))) return False;
if (!tableDesc().isColumn(MS::columnName(MS::FLOAT_DATA))) return False;
// we have FLOAT_DATA but not DATA
// add DATA
addColumn(ArrayColumnDesc<Complex>("DATA",2));
// now copy data across from FLOAT_DATA
ArrayColumn<Float> floatData(*this,MS::columnName(MS::FLOAT_DATA));
ArrayColumn<Complex> data(*this,MS::columnName(MS::DATA));
for (uInt i=0; i<nrow(); i++) {
Array<Float> floatArr(floatData(i));
Array<Complex> dataArr(floatArr.shape());
convertArray(dataArr,floatArr);
data.put(i,dataArr);
}
return True;
}
Bool MeasurementSet::validateMeasureRefs()
{
Bool ok=True;
// check main table
{
Int nCol = tableDesc().ncolumn();
for (Int i=0; i<nCol; i++) {
Int fld = tableDesc()[i].keywordSet().fieldNumber("MEASINFO");
if (fld>=0) {
Int refFld = tableDesc()[i].keywordSet().asRecord(fld).
fieldNumber("Ref");
if (refFld<0 || tableDesc()[i].keywordSet().asRecord(fld).
asString(refFld) == "") {
cerr << "Missing Measure reference for column "<<tableDesc()[i].name()
<< endl;
ok = False;
}
}
}
}
// check all subtables
Int nKey = keywordSet().nfields();
for (Int i=0; i<nKey; i++) {
if (keywordSet().type(i)== TpTable) {
Table tab = keywordSet().asTable(i);
Int nCol = tab.tableDesc().ncolumn();
for (Int i=0; i<nCol; i++) {
Int fld = tab.tableDesc()[i].keywordSet().fieldNumber("MEASINFO");
if (fld>=0) {
Int refFld = tab.tableDesc()[i].keywordSet().asRecord(fld).
fieldNumber("Ref");
if (refFld<0 || tab.tableDesc()[i].keywordSet().asRecord(fld).
asString(refFld) == "") {
cerr << "Missing Measure reference for column "
<<tab.tableDesc()[i].name()<<" in subtable "<<tab.tableName()
<< endl;
ok = False;
}
}
}
}
}
return ok;
}
void MeasurementSet::flush(Bool sync) {
MSTable<MSMainEnums::PredefinedColumns, MSMainEnums::PredefinedKeywords>::flush(sync);
antenna_p.flush(sync);
dataDesc_p.flush(sync);
if (!doppler_p.isNull()) doppler_p.flush(sync);
feed_p.flush(sync);
field_p.flush(sync);
flagCmd_p.flush(sync);
if (!freqOffset_p.isNull()) freqOffset_p.flush(sync);
history_p.flush(sync);
observation_p.flush(sync);
pointing_p.flush(sync);
polarization_p.flush(sync);
processor_p.flush(sync);
if (!source_p.isNull()) source_p.flush(sync);
spectralWindow_p.flush(sync);
state_p.flush(sync);
if (!sysCal_p.isNull()) sysCal_p.flush(sync);
if (!weather_p.isNull()) weather_p.flush(sync);
}
void MeasurementSet::checkVersion()
{
// Check that the MS is the latest version (2.0). Throw an
// exception and advise the user to use the MS converter if it is not.
//
if (!keywordSet().isDefined("MS_VERSION") ||
(keywordSet().isDefined("MS_VERSION") &&
keywordSet().asFloat("MS_VERSION")!=2.0)) {
throw(AipsError("These data are not in MSv2 format - use ms1toms2 to convert"));
}
}
Record MeasurementSet::msseltoindex(const String& spw, const String& field,
const String& baseline, const String& time,
const String& scan, const String& uvrange,
const String& taql){
Record retval;
MSSelection thisSelection;
thisSelection.setSpwExpr(spw);
thisSelection.setFieldExpr(field);
thisSelection.setAntennaExpr(baseline);
thisSelection.setTimeExpr(time);
thisSelection.setScanExpr(scan);
thisSelection.setUvDistExpr(uvrange);
thisSelection.setTaQLExpr(taql);
TableExprNode exprNode=thisSelection.toTableExprNode(this);
Vector<Int> fieldlist=thisSelection.getFieldList();
Vector<Int> spwlist=thisSelection.getSpwList();
Vector<Int> scanlist=thisSelection.getScanList();
Vector<Int> antenna1list=thisSelection.getAntenna1List();
Vector<Int> antenna2list=thisSelection.getAntenna2List();
Matrix<Int> chanlist=thisSelection.getChanList();
Matrix<Int> baselinelist=thisSelection.getBaselineList();
Vector<Int> ddIDList=thisSelection.getDDIDList();
OrderedMap<Int, Vector<Int > > polMap=thisSelection.getPolMap();
OrderedMap<Int, Vector<Vector<Int> > > corrMap=thisSelection.getCorrMap();
retval.define("spw", spwlist);
retval.define("field", fieldlist);
retval.define("scan",scanlist);
retval.define("antenna1", antenna1list);
retval.define("antenna2", antenna2list);
retval.define("baselines",baselinelist);
retval.define("channel", chanlist);
retval.define("dd",ddIDList);
// retval.define("polmap",polMap);
// retrval.define("corrmap",corrMap);
return retval;
}
} //# NAMESPACE CASA - END
//# MSLofarAntenna.cc: MS ANTENNA subtable with LOFAR extensions
//# Copyright (C) 2011
//# 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
#include <lofar_config.h>
#include <MSLofar/MSLofarAntenna.h>
#include <measures/Measures/MPosition.h>
using namespace casa;
namespace LOFAR {
MSLofarAntenna::MSLofarAntenna()
{}
MSLofarAntenna::MSLofarAntenna (const String& tableName,
Table::TableOption option)
: MSAntenna (tableName, option)
{}
MSLofarAntenna::MSLofarAntenna (SetupNewTable& newTab, uInt nrrow,
Bool initialize)
: MSAntenna (newTab, nrrow, initialize)
{}
MSLofarAntenna::MSLofarAntenna (const Table& table)
: MSAntenna (table)
{}
MSLofarAntenna::MSLofarAntenna (const MSLofarAntenna& that)
: MSAntenna (that)
{}
MSLofarAntenna::~MSLofarAntenna()
{}
MSLofarAntenna& MSLofarAntenna::operator= (const MSLofarAntenna& that)
{
MSAntenna::operator= (that);
return *this;
}
TableDesc MSLofarAntenna::requiredTableDesc()
{
TableDesc td (MSAntenna::requiredTableDesc());
MSLofarTable::addColumn (td, "LOFAR_STATION_ID", TpInt,
"ID in LOFAR_STATION table");
MSLofarTable::addColumn (td, "LOFAR_PHASE_REFERENCE", TpArrayDouble,
"Beamformer phase reference position",
"m", "POSITION", MPosition::ITRF,
1, IPosition(1,3),
ColumnDesc::FixedShape + ColumnDesc::Direct);
return td;
}
} //# end namespace
//# MSLofarAntennaColumns.cc: provides easy access to LOFAR's MSAntenna columns
//# Copyright (C) 2011
//# 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
#include <lofar_config.h>
#include <MSLofar/MSLofarAntennaColumns.h>
#include <MSLofar/MSLofarAntenna.h>
using namespace casa;
namespace LOFAR {
ROMSLofarAntennaColumns::ROMSLofarAntennaColumns
(const MSLofarAntenna& msLofarAntenna)
{
attach (msLofarAntenna);
}
ROMSLofarAntennaColumns::~ROMSLofarAntennaColumns()
{}
ROMSLofarAntennaColumns::ROMSLofarAntennaColumns()
{}
void ROMSLofarAntennaColumns::attach
(const MSLofarAntenna& msLofarAntenna)
{
ROMSAntennaColumns::attach (msLofarAntenna);
stationId_p.attach (msLofarAntenna, "LOFAR_STATION_ID");
phaseReference_p.attach (msLofarAntenna, "LOFAR_PHASE_REFERENCE");
phaseReferenceQuant_p.attach (msLofarAntenna, "LOFAR_PHASE_REFERENCE");
phaseReferenceMeas_p.attach (msLofarAntenna, "LOFAR_PHASE_REFERENCE");
}
MSLofarAntennaColumns::MSLofarAntennaColumns
(MSLofarAntenna& msLofarAntenna)
{
attach (msLofarAntenna);
}
MSLofarAntennaColumns::~MSLofarAntennaColumns()
{}
MSLofarAntennaColumns::MSLofarAntennaColumns()
{}
void MSLofarAntennaColumns::attach
(MSLofarAntenna& msLofarAntenna)
{
MSAntennaColumns::attach (msLofarAntenna);
roStationId_p.attach (msLofarAntenna, "LOFAR_STATION_ID");
rwStationId_p.attach (msLofarAntenna, "LOFAR_STATION_ID");
roPhaseReference_p.attach (msLofarAntenna, "LOFAR_PHASE_REFERENCE");
rwPhaseReference_p.attach (msLofarAntenna, "LOFAR_PHASE_REFERENCE");
roPhaseReferenceQuant_p.attach (msLofarAntenna, "LOFAR_PHASE_REFERENCE");
rwPhaseReferenceQuant_p.attach (msLofarAntenna, "LOFAR_PHASE_REFERENCE");
roPhaseReferenceMeas_p.attach (msLofarAntenna, "LOFAR_PHASE_REFERENCE");
rwPhaseReferenceMeas_p.attach (msLofarAntenna, "LOFAR_PHASE_REFERENCE");
}
} //# end namespace
//# MSLofarObsColumns.cc: provides easy access to LOFAR's MSObservation columns
//# Copyright (C) 2011
//# 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
#include <lofar_config.h>
#include <MSLofar/MSLofarObsColumns.h>
#include <MSLofar/MSLofarObservation.h>
using namespace casa;
namespace LOFAR {
ROMSLofarObservationColumns::ROMSLofarObservationColumns
(const MSLofarObservation& msLofarObservation)
{
attach (msLofarObservation);
}
ROMSLofarObservationColumns::~ROMSLofarObservationColumns()
{}
ROMSLofarObservationColumns::ROMSLofarObservationColumns()
{}
void ROMSLofarObservationColumns::attach
(const MSLofarObservation& msLofarObservation)
{
ROMSObservationColumns::attach (msLofarObservation);
projectTitle_p.attach (msLofarObservation, "LOFAR_PROJECT_TITLE");
projectPI_p.attach (msLofarObservation, "LOFAR_PROJECT_PI");
projectCoI_p.attach (msLofarObservation, "LOFAR_PROJECT_CO_I");
projectContact_p.attach (msLofarObservation, "LOFAR_PROJECT_CONTACT");
observationId_p.attach (msLofarObservation, "LOFAR_OBSERVATION_ID");
observationStart_p.attach (msLofarObservation, "LOFAR_OBSERVATION_START");
observationEnd_p.attach (msLofarObservation, "LOFAR_OBSERVATION_END");
observationFrequencyMax_p.attach (msLofarObservation, "LOFAR_OBSERVATION_FREQUENCY_MAX");
observationFrequencyMin_p.attach (msLofarObservation, "LOFAR_OBSERVATION_FREQUENCY_MIN");
observationFrequencyCenter_p.attach (msLofarObservation, "LOFAR_OBSERVATION_FREQUENCY_CENTER");
subArrayPointing_p.attach (msLofarObservation, "LOFAR_SUB_ARRAY_POINTING");
antennaSet_p.attach (msLofarObservation, "LOFAR_ANTENNA_SET");
filterSelection_p.attach (msLofarObservation, "LOFAR_FILTER_SELECTION");
clockFrequency_p.attach (msLofarObservation, "LOFAR_CLOCK_FREQUENCY");
target_p.attach (msLofarObservation, "LOFAR_TAGET");
systemVersion_p.attach (msLofarObservation, "LOFAR_SYSTEM_VERSION");
pipelineName_p.attach (msLofarObservation, "LOFAR_PIPELINE_NAME");
pipelineVersion_p.attach (msLofarObservation, "LOFAR_PIPELINE_VERSION");
fileName_p.attach (msLofarObservation, "LOFAR_FILE_NAME");
fileType_p.attach (msLofarObservation, "LOFAR_FILE_TYPE");
fileDate_p.attach (msLofarObservation, "LOFAR_FILE_DATE");
observationStartQuant_p.attach (msLofarObservation, "LOFAR_OBSERVATION_START");
observationEndQuant_p.attach (msLofarObservation, "LOFAR_OBSERVATION_END");
observationFrequencyMaxQuant_p.attach (msLofarObservation, "LOFAR_OBSERVATION_FREQUENCY_MAX");
observationFrequencyMinQuant_p.attach (msLofarObservation, "LOFAR_OBSERVATION_FREQUENCY_MIN");
observationFrequencyCenterQuant_p.attach (msLofarObservation, "LOFAR_OBSERVATION_FREQUENCY_CENTER");
clockFrequencyQuant_p.attach (msLofarObservation, "LOFAR_CLOCK_FREQUENCY");
fileDateQuant_p.attach (msLofarObservation, "LOFAR_FILE_DATE");
observationStartMeas_p.attach (msLofarObservation, "LOFAR_OBSERVATION_START");
observationEndMeas_p.attach (msLofarObservation, "LOFAR_OBSERVATION_END");
fileDateMeas_p.attach (msLofarObservation, "LOFAR_FILE_DATE");
}
MSLofarObservationColumns::MSLofarObservationColumns
(MSLofarObservation& msLofarObservation)
{
attach (msLofarObservation);
}
MSLofarObservationColumns::~MSLofarObservationColumns()
{}
MSLofarObservationColumns::MSLofarObservationColumns()
{}
void MSLofarObservationColumns::attach
(MSLofarObservation& msLofarObservation)
{
MSObservationColumns::attach (msLofarObservation);
// Readonly.
roProjectTitle_p.attach (msLofarObservation, "LOFAR_PROJECT_TITLE");
roProjectPI_p.attach (msLofarObservation, "LOFAR_PROJECT_PI");
roProjectCoI_p.attach (msLofarObservation, "LOFAR_PROJECT_CO_I");
roProjectContact_p.attach (msLofarObservation, "LOFAR_PROJECT_CONTACT");
roObservationId_p.attach (msLofarObservation, "LOFAR_OBSERVATION_ID");
roObservationStart_p.attach (msLofarObservation, "LOFAR_OBSERVATION_START");
roObservationEnd_p.attach (msLofarObservation, "LOFAR_OBSERVATION_END");
roObservationFrequencyMax_p.attach (msLofarObservation, "LOFAR_OBSERVATION_FREQUENCY_MAX");
roObservationFrequencyMin_p.attach (msLofarObservation, "LOFAR_OBSERVATION_FREQUENCY_MIN");
roObservationFrequencyCenter_p.attach (msLofarObservation, "LOFAR_OBSERVATION_FREQUENCY_CENTER");
roSubArrayPointing_p.attach (msLofarObservation, "LOFAR_SUB_ARRAY_POINTING");
roAntennaSet_p.attach (msLofarObservation, "LOFAR_ANTENNA_SET");
roFilterSelection_p.attach (msLofarObservation, "LOFAR_FILTER_SELECTION");
roClockFrequency_p.attach (msLofarObservation, "LOFAR_CLOCK_FREQUENCY");
roTarget_p.attach (msLofarObservation, "LOFAR_TAGET");
roSystemVersion_p.attach (msLofarObservation, "LOFAR_SYSTEM_VERSION");
roPipelineName_p.attach (msLofarObservation, "LOFAR_PIPELINE_NAME");
roPipelineVersion_p.attach (msLofarObservation, "LOFAR_PIPELINE_VERSION");
roFileName_p.attach (msLofarObservation, "LOFAR_FILE_NAME");
roFileType_p.attach (msLofarObservation, "LOFAR_FILE_TYPE");
roFileDate_p.attach (msLofarObservation, "LOFAR_FILE_DATE");
roObservationStartQuant_p.attach (msLofarObservation, "LOFAR_OBSERVATION_START");
roObservationEndQuant_p.attach (msLofarObservation, "LOFAR_OBSERVATION_END");
roObservationFrequencyMaxQuant_p.attach (msLofarObservation, "LOFAR_OBSERVATION_FREQUENCY_MAX");
roObservationFrequencyMinQuant_p.attach (msLofarObservation, "LOFAR_OBSERVATION_FREQUENCY_MIN");
roObservationFrequencyCenterQuant_p.attach (msLofarObservation, "LOFAR_OBSERVATION_FREQUENCY_CENTER");
roClockFrequencyQuant_p.attach (msLofarObservation, "LOFAR_CLOCK_FREQUENCY");
roFileDateQuant_p.attach (msLofarObservation, "LOFAR_FILE_DATE");
roObservationStartMeas_p.attach (msLofarObservation, "LOFAR_OBSERVATION_START");
roObservationEndMeas_p.attach (msLofarObservation, "LOFAR_OBSERVATION_END");
roFileDateMeas_p.attach (msLofarObservation, "LOFAR_FILE_DATE");
// Read/write
rwProjectTitle_p.attach (msLofarObservation, "LOFAR_PROJECT_TITLE");
rwProjectPI_p.attach (msLofarObservation, "LOFAR_PROJECT_PI");
rwProjectCoI_p.attach (msLofarObservation, "LOFAR_PROJECT_CO_I");
rwProjectContact_p.attach (msLofarObservation, "LOFAR_PROJECT_CONTACT");
rwObservationId_p.attach (msLofarObservation, "LOFAR_OBSERVATION_ID");
rwObservationStart_p.attach (msLofarObservation, "LOFAR_OBSERVATION_START");
rwObservationEnd_p.attach (msLofarObservation, "LOFAR_OBSERVATION_END");
rwObservationFrequencyMax_p.attach (msLofarObservation, "LOFAR_OBSERVATION_FREQUENCY_MAX");
rwObservationFrequencyMin_p.attach (msLofarObservation, "LOFAR_OBSERVATION_FREQUENCY_MIN");
rwObservationFrequencyCenter_p.attach (msLofarObservation, "LOFAR_OBSERVATION_FREQUENCY_CENTER");
rwSubArrayPointing_p.attach (msLofarObservation, "LOFAR_SUB_ARRAY_POINTING");
rwAntennaSet_p.attach (msLofarObservation, "LOFAR_ANTENNA_SET");
rwFilterSelection_p.attach (msLofarObservation, "LOFAR_FILTER_SELECTION");
rwClockFrequency_p.attach (msLofarObservation, "LOFAR_CLOCK_FREQUENCY");
rwTarget_p.attach (msLofarObservation, "LOFAR_TAGET");
rwSystemVersion_p.attach (msLofarObservation, "LOFAR_SYSTEM_VERSION");
rwPipelineName_p.attach (msLofarObservation, "LOFAR_PIPELINE_NAME");
rwPipelineVersion_p.attach (msLofarObservation, "LOFAR_PIPELINE_VERSION");
rwFileName_p.attach (msLofarObservation, "LOFAR_FILE_NAME");
rwFileType_p.attach (msLofarObservation, "LOFAR_FILE_TYPE");
rwFileDate_p.attach (msLofarObservation, "LOFAR_FILE_DATE");
rwObservationStartQuant_p.attach (msLofarObservation, "LOFAR_OBSERVATION_START");
rwObservationEndQuant_p.attach (msLofarObservation, "LOFAR_OBSERVATION_END");
rwObservationFrequencyMaxQuant_p.attach (msLofarObservation, "LOFAR_OBSERVATION_FREQUENCY_MAX");
rwObservationFrequencyMinQuant_p.attach (msLofarObservation, "LOFAR_OBSERVATION_FREQUENCY_MIN");
rwObservationFrequencyCenterQuant_p.attach (msLofarObservation, "LOFAR_OBSERVATION_FREQUENCY_CENTER");
rwClockFrequencyQuant_p.attach (msLofarObservation, "LOFAR_CLOCK_FREQUENCY");
rwFileDateQuant_p.attach (msLofarObservation, "LOFAR_FILE_DATE");
rwObservationStartMeas_p.attach (msLofarObservation, "LOFAR_OBSERVATION_START");
rwObservationEndMeas_p.attach (msLofarObservation, "LOFAR_OBSERVATION_END");
rwFileDateMeas_p.attach (msLofarObservation, "LOFAR_FILE_DATE");
}
} //# end namespace
//# MSLofarObservation.cc: MS OBSERVATION subtable with LOFAR extensions
//# Copyright (C) 2011
//# 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
#include <lofar_config.h>
#include <MSLofar/MSLofarObservation.h>
#include <measures/Measures/MEPoch.h>
using namespace casa;
namespace LOFAR {
MSLofarObservation::MSLofarObservation()
{}
MSLofarObservation::MSLofarObservation (const String& tableName,
Table::TableOption option)
: MSObservation (tableName, option)
{}
MSLofarObservation::MSLofarObservation (SetupNewTable& newTab, uInt nrrow,
Bool initialize)
: MSObservation (newTab, nrrow, initialize)
{}
MSLofarObservation::MSLofarObservation (const Table& table)
: MSObservation (table)
{}
MSLofarObservation::MSLofarObservation (const MSLofarObservation& that)
: MSObservation (that)
{}
MSLofarObservation::~MSLofarObservation()
{}
MSLofarObservation& MSLofarObservation::operator= (const MSLofarObservation& that)
{
MSObservation::operator= (that);
return *this;
}
TableDesc MSLofarObservation::requiredTableDesc()
{
TableDesc td (MSObservation::requiredTableDesc());
MSLofarTable::addColumn (td, "LOFAR_PROJECT_TITLE", TpString,
"Project description");
MSLofarTable::addColumn (td, "LOFAR_PROJECT_PI", TpString,
"Principal investigator");
MSLofarTable::addColumn (td, "LOFAR_PROJECT_CO_I", TpArrayString,
"Co investigators");
MSLofarTable::addColumn (td, "LOFAR_PROJECT_CONTACT", TpString,
"Contact author");
MSLofarTable::addColumn (td, "LOFAR_OBSERVATION_ID", TpString,
"Observation ID");
MSLofarTable::addColumn (td, "LOFAR_OBSERVATION_START", TpDouble,
"Observation start",
"s", "EPOCH", MEpoch::UTC);
MSLofarTable::addColumn (td, "LOFAR_OBSERVATION_END", TpDouble,
"Observation end",
"s", "EPOCH", MEpoch::UTC);
MSLofarTable::addColumn (td, "LOFAR_OBSERVATION_FREQUENCY_MAX", TpDouble,
"Maximum frequency",
"MHz");
MSLofarTable::addColumn (td, "LOFAR_OBSERVATION_FREQUENCY_MIN", TpDouble,
"Minimum frequency",
"MHz");
MSLofarTable::addColumn (td, "LOFAR_OBSERVATION_FREQUENCY_CENTER", TpDouble,
"Center frequency",
"MHz");
MSLofarTable::addColumn (td, "LOFAR_SUB_ARRAY_POINTING", TpInt,
"Subarray pointing id");
MSLofarTable::addColumn (td, "LOFAR_ANTENNA_SET", TpString,
"SAS Antenna set name");
MSLofarTable::addColumn (td, "LOFAR_FILTER_SELECTION", TpString,
"SAS Filter selection");
MSLofarTable::addColumn (td, "LOFAR_CLOCK_FREQUENCY", TpDouble,
"SAS Clock setting",
"MHz");
MSLofarTable::addColumn (td, "LOFAR_TARGET", TpArrayString,
"List of targets");
MSLofarTable::addColumn (td, "LOFAR_SYSTEM_VERSION", TpString,
"Version of the system");
MSLofarTable::addColumn (td, "LOFAR_PIPELINE_NAME", TpString,
"Pipeline identification");
MSLofarTable::addColumn (td, "LOFAR_PIPELINE_VERSION", TpString,
"Pipeline version");
MSLofarTable::addColumn (td, "LOFAR_FILE_NAME", TpString,
"Name of raw data set");
MSLofarTable::addColumn (td, "LOFAR_FILE_TYPE", TpString,
"Data type (uv)");
MSLofarTable::addColumn (td, "LOFAR_FILE_DATE", TpDouble,
"File creation time",
"s", "EPOCH", MEpoch::UTC);
return td;
}
} //# end namespace
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment