casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
casa::PointingDirectionCalculator Class Reference

#include <PointingDirectionCalculator.h>

Public Types

enum  DC_ {
  DIRECTION,
  TARGET,
  POINTING_OFFSET,
  SOURCE_OFFSET,
  ENCODER,
  nItems
}
 
enum  MatrixShape {
  COLUMN_MAJOR,
  ROW_MAJOR
}
 Enumerations for memory layout of the output pointing direction array. More...
 
typedef casacore::MDirection(* ACCESSOR )(casacore::MSPointingColumns &pointingColumns, casacore::uInt rownr)
 
  • CAS-8418: typedef of accessor_ and Direction column types.
More...
 
typedef enum
casa::PointingDirectionCalculator::DC_ 
PtColID
 
typedef casacore::Vector
< casacore::Vector
< casacore::Vector
< casacore::Vector
< casacore::Double > > > > 
COEFF
 

Public Member Functions

 PointingDirectionCalculator (casacore::MeasurementSet const &ms)
 
  • Constructor
More...
 
 ~PointingDirectionCalculator ()
 Destructor. More...
 
void selectData (casacore::String const &antenna="", casacore::String const &spw="", casacore::String const &field="", casacore::String const &time="", casacore::String const &scan="", casacore::String const &feed="", casacore::String const &intent="", casacore::String const &observation="", casacore::String const &uvrange="", casacore::String const &msselect="")
 Select data in the given MS. More...
 
void setDirectionColumn (casacore::String const &columnName="DIRECTION")
 
  • Select which POINTING column to use for pointing direction calculation.
More...
 
void setFrame (casacore::String const frameType)
 
  • Set output direction reference frame.
More...
 
void setDirectionListMatrixShape (PointingDirectionCalculator::MatrixShape const shape)
 
  • Set output direction matrix shape.
More...
 
void setMovingSource (casacore::String const sourceName)
 
More...
 
void setMovingSource (casacore::MDirection const &sourceDirection)
 
void unsetMovingSource ()
 
  • Clear the moving source setting.
More...
 
casacore::uInt getNrowForSelectedMS ()
 
  • Return number of rows for selected MS.
More...
 
casacore::MDirection::Types const & getDirectionType ()
  More...
 
casacore::MDirection const & getMovingSourceDirection ()
 
  • Return an information on the moving source as a MDirection instance.
More...
 
casacore::Matrix
< casacore::Double
getDirection ()
 
  • Return pointing direction matrix.
More...
 
casacore::Vector
< casacore::Double
getDirection (casacore::uInt irow)
 
  • Return pointing direction for specified row.
More...
 
casacore::Vector< casacore::uIntgetRowId ()
 Return a list of row ids for selected rows. More...
 
casacore::Vector< casacore::uIntgetRowIdForOriginalMS ()
 
casacore::uInt getRowId (casacore::uInt irow)
 
  • Return a row id for specified row.
More...
 
void setSplineInterpolation (bool mode)
 
PtColID getCurretAccessorId ()
 Curret Direction column (=accessor in this source) (for UT) More...
 
bool isCoefficientReady ()
 Exporting COEFF table. More...
 
COEFF exportCoeff ()
 

Private Member Functions

void init ()
 
void initPointingTable (casacore::Int const antennaId)
 
void resetAntennaPosition (casacore::Int const antennaId)
 
void resetTime (casacore::Double const timestamp)
 
void inspectAntenna ()
 
void configureMovingSourceCorrection ()
 
casacore::Vector
< casacore::Double
doGetDirection (casacore::uInt irow)
 
casacore::Vector
< casacore::Double
doGetDirection (casacore::uInt irow, casacore::uInt antID)
 
 PointingDirectionCalculator ()
 privatize default constructor More...
 
bool checkColumn (casacore::MeasurementSet const &ms, casacore::String const &columnName)
 check specified Column when creating Spline-Object. More...
 
bool initializeSplinefromPointingColumn (casacore::MeasurementSet const &ms, PtColID colNo)
 Initialize Coefficient table. More...
 
casa::SplineInterpolationgetCurrentSplineObj ()
 Current Spline-Object handle. More...
 

Private Attributes

casacore::CountedPtr
< casacore::MeasurementSet
originalMS_
 table access stuff More...
 
casacore::CountedPtr
< casacore::MeasurementSet
selectedMS_
 
casacore::CountedPtr
< casacore::MSPointing
pointingTable_
 
casacore::CountedPtr
< casacore::MSPointingColumns
pointingColumns_
 
casacore::ScalarMeasColumn
< casacore::MEpoch
timeColumn_
 
casacore::ScalarColumn
< casacore::Double
intervalColumn_
 
casacore::ScalarColumn
< casacore::Int
antennaColumn_
 
casacore::String directionColumnName_
 
casacore::MDirection(* accessor_ )(casacore::MSPointingColumns &pointingColumns, casacore::uInt rownr)
 
casacore::MPosition antennaPosition_
 conversion stuff More...
 
casacore::MEpoch referenceEpoch_
 
casacore::MeasFrame referenceFrame_
 
casacore::CountedPtr
< casacore::MDirection::Convert
directionConvert_
 
casacore::MDirection::Types directionType_
 
casacore::CountedPtr
< casacore::MDirection
movingSource_
 
casacore::CountedPtr
< casacore::MDirection::Convert
movingSourceConvert_
 
void(* movingSourceCorrection_ )(casacore::CountedPtr< casacore::MDirection::Convert > &convertToAzel, casacore::CountedPtr< casacore::MDirection::Convert > &convertToCelestial, casacore::Vector< casacore::Double > &direction)
 
casacore::Vector< casacore::uIntantennaBoundary_
 other More...
 
casacore::uInt numAntennaBoundary_
 
casacore::Vector
< casacore::Double
pointingTimeUTC_
 
casacore::Double lastTimeStamp_
 
casacore::Int lastAntennaIndex_
 
casacore::uInt pointingTableIndexCache_
 
PointingDirectionCalculator::MatrixShape shape_
 
bool useSplineInterpolation_
 
casa::SplineInterpolationcurrSpline_
 Current Spline Object (become active with specified Direction Column) More...
 
casacore::vector
< std::unique_ptr
< casa::SplineInterpolation > > 
splineObj_
 Spline Object for each Direction-Column. More...
 
casacore::Vector< bool > initializeReady_
 Internal conditions to check limitted service. More...
 
casacore::Vector< bool > coefficientReady_
 
PtColID accessorId_
 Accessor ID (See typedef above.) More...
 

Detailed Description

Definition at line 131 of file PointingDirectionCalculator.h.

Member Typedef Documentation

typedef casacore::MDirection(* casa::PointingDirectionCalculator::ACCESSOR)(casacore::MSPointingColumns &pointingColumns, casacore::uInt rownr)

  • CAS-8418: typedef of accessor_ and Direction column types.

Definition at line 138 of file PointingDirectionCalculator.h.

Definition at line 144 of file PointingDirectionCalculator.h.

Member Enumeration Documentation

Enumerator
DIRECTION 
TARGET 
POINTING_OFFSET 
SOURCE_OFFSET 
ENCODER 
nItems 

Definition at line 140 of file PointingDirectionCalculator.h.

Enumerations for memory layout of the output pointing direction array.

User should select the layout according to an usercase of this class.

Enumerator
COLUMN_MAJOR 

Memory layout is "column major".

ROW_MAJOR 

Memory layout is "row major".

Definition at line 148 of file PointingDirectionCalculator.h.

Constructor & Destructor Documentation

casa::PointingDirectionCalculator::PointingDirectionCalculator ( casacore::MeasurementSet const &  ms)

  • Constructor

  • Create Spline five Objects on PointingDirectionCalculator.
    • The setDirectionColumn(name) performs all the initialization and make Coefficient table.
    • In this constructor, init() and setDirectionColumn("DIRECTION") are called, soon or later, setDirectionColumn will be called, whenever new Direction column is used and interporation is made.
    • The spline object is created by a column, which contains all antenna_Id.
    • Cofficient table is obtained from SDPosInterpolation.
    • SplineInterpolation class in this file provides calculation but it is sort of customize for PoinitngDirectionCalculator.
    • To see the initialization, please start from setDirectionColumn().
casa::PointingDirectionCalculator::~PointingDirectionCalculator ( )

Destructor.

casa::PointingDirectionCalculator::PointingDirectionCalculator ( )
private

privatize default constructor

Member Function Documentation

bool casa::PointingDirectionCalculator::checkColumn ( casacore::MeasurementSet const &  ms,
casacore::String const &  columnName 
)
private

check specified Column when creating Spline-Object.

void casa::PointingDirectionCalculator::configureMovingSourceCorrection ( )
private
casacore::Vector<casacore::Double> casa::PointingDirectionCalculator::doGetDirection ( casacore::uInt  irow)
private
casacore::Vector<casacore::Double> casa::PointingDirectionCalculator::doGetDirection ( casacore::uInt  irow,
casacore::uInt  antID 
)
private
COEFF casa::PointingDirectionCalculator::exportCoeff ( )
casa::SplineInterpolation* casa::PointingDirectionCalculator::getCurrentSplineObj ( )
inlineprivate

Current Spline-Object handle.

(only available SplineInterpolation class)

Definition at line 397 of file PointingDirectionCalculator.h.

References currSpline_.

PtColID casa::PointingDirectionCalculator::getCurretAccessorId ( )
inline

Curret Direction column (=accessor in this source) (for UT)

Definition at line 306 of file PointingDirectionCalculator.h.

References accessorId_.

casacore::Matrix<casacore::Double> casa::PointingDirectionCalculator::getDirection ( )

  • Return pointing direction matrix.

Its shape depends on the user set the shape to "ROW_MAJOR" or "COLUMN_MAJOR". Returned directions are interpolated to timestamps recorded in the selected MS, and are converted to desired direction reference frame if necessary.

casacore::Vector<casacore::Double> casa::PointingDirectionCalculator::getDirection ( casacore::uInt  irow)

  • Return pointing direction for specified row.

If irow is larger than or equal to the number of rows for selected MS, exception will be thrown.

casacore::MDirection::Types const& casa::PointingDirectionCalculator::getDirectionType ( )
inline

Definition at line 252 of file PointingDirectionCalculator.h.

References directionType_.

casacore::MDirection const& casa::PointingDirectionCalculator::getMovingSourceDirection ( )
inline

  • Return an information on the moving source as a MDirection instance.

Definition at line 259 of file PointingDirectionCalculator.h.

References movingSource_.

casacore::uInt casa::PointingDirectionCalculator::getNrowForSelectedMS ( )
inline

  • Return number of rows for selected MS.

Definition at line 245 of file PointingDirectionCalculator.h.

References selectedMS_.

casacore::Vector<casacore::uInt> casa::PointingDirectionCalculator::getRowId ( )

Return a list of row ids for selected rows.

The getRowId will return the ids in selected MS. On the other hand, the getRowIdForOriginalMS will return the ids in original MS.

casacore::uInt casa::PointingDirectionCalculator::getRowId ( casacore::uInt  irow)

  • Return a row id for specified row.

If irow is larger than or equal to the number of rows for selected MS, exception will be thrown.

casacore::Vector<casacore::uInt> casa::PointingDirectionCalculator::getRowIdForOriginalMS ( )
void casa::PointingDirectionCalculator::init ( )
private
bool casa::PointingDirectionCalculator::initializeSplinefromPointingColumn ( casacore::MeasurementSet const &  ms,
PtColID  colNo 
)
private

Initialize Coefficient table.

void casa::PointingDirectionCalculator::initPointingTable ( casacore::Int const  antennaId)
private
void casa::PointingDirectionCalculator::inspectAntenna ( )
private
bool casa::PointingDirectionCalculator::isCoefficientReady ( )

Exporting COEFF table.

//

void casa::PointingDirectionCalculator::resetAntennaPosition ( casacore::Int const  antennaId)
private
void casa::PointingDirectionCalculator::resetTime ( casacore::Double const  timestamp)
private
void casa::PointingDirectionCalculator::selectData ( casacore::String const &  antenna = "",
casacore::String const &  spw = "",
casacore::String const &  field = "",
casacore::String const &  time = "",
casacore::String const &  scan = "",
casacore::String const &  feed = "",
casacore::String const &  intent = "",
casacore::String const &  observation = "",
casacore::String const &  uvrange = "",
casacore::String const &  msselect = "" 
)

Select data in the given MS.

Each selection parameters accept MS data selection syntax.

void casa::PointingDirectionCalculator::setDirectionColumn ( casacore::String const &  columnName = "DIRECTION")

  • Select which POINTING column to use for pointing direction calculation.

Possible values are "DIRECTION" (default), "TARGET", "POINTING_OFFSET", "SOURCE_OFFSET", and "ENCODER". These values are all case-sensitive.

CAS-8418 Update Spline-Interpolation initialization is inserted for each POINTING Column. Once this is done, the object will be reused.

void casa::PointingDirectionCalculator::setDirectionListMatrixShape ( PointingDirectionCalculator::MatrixShape const  shape)

  • Set output direction matrix shape.

If "ROW_MAJOR" is given, the shape will be (2, nrow) where nrow is a number of selected rows in MS. If "COLUMN_MAJOR" is set, the shape will be (nrow, 2). User can choose appropriate shape according to the access pattern for the output direction matrix.

void casa::PointingDirectionCalculator::setFrame ( casacore::String const  frameType)

  • Set output direction reference frame.

This accepts reference strings which MDirection can recognize. If given string is invalid, the frame will be set to "J2000".

void casa::PointingDirectionCalculator::setMovingSource ( casacore::String const  sourceName)

Set source name for the moving source. The method accepts source names which MDirection can recognize (e.g. "Moon", "Jupiter"). If given string is invalid, exception will be thrown. User can specify the moving source using a string or the MDirection instance.

void casa::PointingDirectionCalculator::setMovingSource ( casacore::MDirection const &  sourceDirection)
void casa::PointingDirectionCalculator::setSplineInterpolation ( bool  mode)
inline

Definition at line 302 of file PointingDirectionCalculator.h.

References useSplineInterpolation_.

void casa::PointingDirectionCalculator::unsetMovingSource ( )

  • Clear the moving source setting.

Member Data Documentation

casacore::MDirection(* casa::PointingDirectionCalculator::accessor_)(casacore::MSPointingColumns &pointingColumns, casacore::uInt rownr)
private

Definition at line 336 of file PointingDirectionCalculator.h.

PtColID casa::PointingDirectionCalculator::accessorId_
private

Accessor ID (See typedef above.)

Definition at line 386 of file PointingDirectionCalculator.h.

Referenced by getCurretAccessorId().

casacore::Vector<casacore::uInt> casa::PointingDirectionCalculator::antennaBoundary_
private

other

Definition at line 355 of file PointingDirectionCalculator.h.

casacore::ScalarColumn<casacore::Int> casa::PointingDirectionCalculator::antennaColumn_
private

Definition at line 333 of file PointingDirectionCalculator.h.

casacore::MPosition casa::PointingDirectionCalculator::antennaPosition_
private

conversion stuff

Definition at line 340 of file PointingDirectionCalculator.h.

casacore::Vector<bool> casa::PointingDirectionCalculator::coefficientReady_
private

Definition at line 383 of file PointingDirectionCalculator.h.

casa::SplineInterpolation* casa::PointingDirectionCalculator::currSpline_
private

Current Spline Object (become active with specified Direction Column)

Definition at line 376 of file PointingDirectionCalculator.h.

Referenced by getCurrentSplineObj().

casacore::String casa::PointingDirectionCalculator::directionColumnName_
private

Definition at line 334 of file PointingDirectionCalculator.h.

casacore::CountedPtr<casacore::MDirection::Convert> casa::PointingDirectionCalculator::directionConvert_
private

Definition at line 343 of file PointingDirectionCalculator.h.

casacore::MDirection::Types casa::PointingDirectionCalculator::directionType_
private

Definition at line 344 of file PointingDirectionCalculator.h.

Referenced by getDirectionType().

casacore::Vector<bool> casa::PointingDirectionCalculator::initializeReady_
private

Internal conditions to check limitted service.

Definition at line 382 of file PointingDirectionCalculator.h.

casacore::ScalarColumn<casacore::Double> casa::PointingDirectionCalculator::intervalColumn_
private

Definition at line 332 of file PointingDirectionCalculator.h.

casacore::Int casa::PointingDirectionCalculator::lastAntennaIndex_
private

Definition at line 359 of file PointingDirectionCalculator.h.

casacore::Double casa::PointingDirectionCalculator::lastTimeStamp_
private

Definition at line 358 of file PointingDirectionCalculator.h.

casacore::CountedPtr<casacore::MDirection> casa::PointingDirectionCalculator::movingSource_
private

Definition at line 345 of file PointingDirectionCalculator.h.

Referenced by getMovingSourceDirection().

casacore::CountedPtr<casacore::MDirection::Convert> casa::PointingDirectionCalculator::movingSourceConvert_
private

Definition at line 346 of file PointingDirectionCalculator.h.

void(* casa::PointingDirectionCalculator::movingSourceCorrection_)(casacore::CountedPtr< casacore::MDirection::Convert > &convertToAzel, casacore::CountedPtr< casacore::MDirection::Convert > &convertToCelestial, casacore::Vector< casacore::Double > &direction)
private

Definition at line 348 of file PointingDirectionCalculator.h.

casacore::uInt casa::PointingDirectionCalculator::numAntennaBoundary_
private

Definition at line 356 of file PointingDirectionCalculator.h.

casacore::CountedPtr<casacore::MeasurementSet> casa::PointingDirectionCalculator::originalMS_
private

table access stuff

Definition at line 327 of file PointingDirectionCalculator.h.

casacore::CountedPtr<casacore::MSPointingColumns> casa::PointingDirectionCalculator::pointingColumns_
private

Definition at line 330 of file PointingDirectionCalculator.h.

casacore::CountedPtr<casacore::MSPointing> casa::PointingDirectionCalculator::pointingTable_
private

Definition at line 329 of file PointingDirectionCalculator.h.

casacore::uInt casa::PointingDirectionCalculator::pointingTableIndexCache_
private

Definition at line 360 of file PointingDirectionCalculator.h.

casacore::Vector<casacore::Double> casa::PointingDirectionCalculator::pointingTimeUTC_
private

Definition at line 357 of file PointingDirectionCalculator.h.

casacore::MEpoch casa::PointingDirectionCalculator::referenceEpoch_
private

Definition at line 341 of file PointingDirectionCalculator.h.

casacore::MeasFrame casa::PointingDirectionCalculator::referenceFrame_
private

Definition at line 342 of file PointingDirectionCalculator.h.

casacore::CountedPtr<casacore::MeasurementSet> casa::PointingDirectionCalculator::selectedMS_
private

Definition at line 328 of file PointingDirectionCalculator.h.

Referenced by getNrowForSelectedMS().

PointingDirectionCalculator::MatrixShape casa::PointingDirectionCalculator::shape_
private

Definition at line 361 of file PointingDirectionCalculator.h.

casacore::vector<std::unique_ptr<casa::SplineInterpolation> > casa::PointingDirectionCalculator::splineObj_
private

Spline Object for each Direction-Column.

Definition at line 379 of file PointingDirectionCalculator.h.

casacore::ScalarMeasColumn<casacore::MEpoch> casa::PointingDirectionCalculator::timeColumn_
private

Definition at line 331 of file PointingDirectionCalculator.h.

bool casa::PointingDirectionCalculator::useSplineInterpolation_
private

Definition at line 373 of file PointingDirectionCalculator.h.

Referenced by setSplineInterpolation().


The documentation for this class was generated from the following file: