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

AntennaResponses provides access to antenna response data. More...

#include <AntennaResponses.h>

Public Types

enum  FuncTypes {
  NA,
  AIF,
  EFP,
  VP,
  VPMAN,
  INTERNAL,
  N_FuncTypes,
  ANY,
  INVALID
}
 

Public Member Functions

 AntennaResponses ()
 this can of course be extended for additional types if necessary More...
 
 AntennaResponses (const casacore::String &path)
 Constructor, calls init() More...
 
casacore::Bool init (const casacore::String &path="")
 Takes the path (as taken from the new ANTENNA_RESPONSES column of the Observatories table) and uses it as the name and location of the AntennaResponses table, and then initializes the member vectors; can be called repeatedly with different paths; each call will overwrite the vectors. More...
 
casacore::Bool append (const casacore::String &path)
 As init but does not overwrite the table (member vectors) in memory. More...
 
casacore::Bool isInit ()
 returns true if paths_p has at least one member More...
 
casacore::Bool isInit (const casacore::String &path)
 returns true if path is a member element of paths_p, i.e. More...
 
casacore::Bool getRowAndIndex (casacore::uInt &row, casacore::uInt &subBand, const casacore::String &obsName, const casacore::MEpoch &obsTime, const casacore::MFrequency &freq, const FuncTypes &requFType=ANY, const casacore::String &antennaType="", const casacore::MDirection &center=casacore::MDirection(casacore::Quantity(0.,"deg"), casacore::Quantity(90.,"deg"), casacore::MDirection::AZEL), const casacore::String &receiverType="", const casacore::Int &beamNumber=0)
 find the row containing the information pertinent to the given parameters (this is also the index in the member vectors) and the index (subband) to the frequency channel of the response return false if no matching row could be found More...
 
casacore::Bool getRowAndIndex (casacore::uInt &row, casacore::uInt &subBand, const casacore::String &obsName, const casacore::Int &beamId, const casacore::MFrequency &freq)
 overloaded method: as previous method but using beamId (instead of obs. More...
 
casacore::Bool getImageName (casacore::String &functionImageName, casacore::uInt &funcChannel, casacore::MFrequency &nomFreq, FuncTypes &fType, casacore::MVAngle &rotAngOffset, const casacore::String &obsName, const casacore::MEpoch &obsTime, const casacore::MFrequency &freq, const FuncTypes &requFType=ANY, const casacore::String &antennaType="", const casacore::MDirection &center=casacore::MDirection(casacore::Quantity(0.,"deg"), casacore::Quantity(90.,"deg"), casacore::MDirection::AZEL), const casacore::String &receiverType="", const casacore::Int &beamNumber=0)
 getRowAndIndex is then used by the following methods More...
 
casacore::Bool getImageName (casacore::String &functionImageName, casacore::uInt &funcChannel, casacore::MFrequency &nomFreq, casacore::MFrequency &loFreq, casacore::MFrequency &hiFreq, FuncTypes &fType, casacore::MVAngle &rotAngOffset, const casacore::String &obsName, const casacore::MEpoch &obsTime, const casacore::MFrequency &freq, const FuncTypes &requFType=ANY, const casacore::String &antennaType="", const casacore::MDirection &center=casacore::MDirection(casacore::Quantity(0.,"deg"), casacore::Quantity(90.,"deg"), casacore::MDirection::AZEL), const casacore::String &receiverType="", const casacore::Int &beamNumber=0)
 Overloaded method: returning the validity range. More...
 
casacore::Bool getImageName (casacore::String &functionImageName, casacore::uInt &funcChannel, casacore::MFrequency &nomFreq, FuncTypes &fType, casacore::MVAngle &rotAngOffset, const casacore::String &obsName, const casacore::Int &beamId, const casacore::MFrequency &freq)
 Overloaded method: as previous method but using beamId (instead of obs. More...
 
casacore::Bool getAntennaTypes (casacore::Vector< casacore::String > &antTypes, const casacore::String &obsName, const casacore::MEpoch &obsTime, const casacore::MFrequency &freq, const FuncTypes &requFType=ANY, const casacore::MDirection &center=casacore::MDirection(casacore::Quantity(0.,"deg"), casacore::Quantity(90.,"deg"), casacore::MDirection::AZEL), const casacore::String &receiverType="", const casacore::Int &beamNumber=0)
 Get a vector containing all unique antenna type strings for the given constraints. More...
 
casacore::Bool putRow (casacore::uInt &row, const casacore::String &obsName, const casacore::Int &beamId, const casacore::Vector< casacore::String > &bandName, const casacore::Vector< casacore::MVFrequency > &subbandMinFreq, const casacore::Vector< casacore::MVFrequency > &subbandMaxFreq, const casacore::Vector< FuncTypes > &funcType, const casacore::Vector< casacore::String > &funcName, const casacore::Vector< casacore::uInt > &funcChannel, const casacore::Vector< casacore::MVFrequency > &nomFreq, const casacore::Vector< casacore::MVAngle > &rotAngOffset, const casacore::String &antennaType="", const casacore::MEpoch &startTime=casacore::MEpoch(casacore::MVEpoch(casacore::Quantity(40588.,"d")), casacore::MEpoch::UTC), const casacore::MDirection &center=casacore::MDirection(casacore::Quantity(0.,"deg"), casacore::Quantity(90.,"deg"), casacore::MDirection::AZEL), const casacore::MDirection &validCenterMin=casacore::MDirection(casacore::Quantity(0.,"deg"), casacore::Quantity(0.,"deg"), casacore::MDirection::AZEL), const casacore::MDirection &validCenterMax=casacore::MDirection(casacore::Quantity(360.,"deg"), casacore::Quantity(90.,"deg"), casacore::MDirection::AZEL), const casacore::String &receiverType="", const casacore::Int &beamNumber=0)
 Put the given row into the present antenna reponses table (in memory). More...
 
void create (const casacore::String &path)
 Create an new AntennaReponses table on disk at the given path and fill it with the table contents presently in memory. More...
 
FuncTypes FuncType (casacore::Int i)
 Convert from casacore::Int to FuncType. More...
 
casacore::Bool getBandName (casacore::String &bandName, const casacore::String &obsName, const casacore::MVFrequency &freq)
 get the name of the band corresponding to the frequency (in the rest frame of the observatory) More...
 

Static Public Member Functions

static FuncTypes FuncType (const casacore::String &sftyp)
 Convert from casacore::String to FuncType. More...
 

Private Attributes

casacore::Vector
< casacore::String
paths_p
 after initialization, this contains the name of the path where the AntennaResponses table was read from; if append was used to read additional tables in the memory table, then this vector has several elements representing the different tables More...
 
casacore::uInt numRows_p
 here a complete copy of the AntennaResponses table is stored More...
 
casacore::Vector
< casacore::String
ObsName_p
 
casacore::Vector
< casacore::MEpoch
StartTime_p
 
casacore::Vector
< casacore::String
AntennaType_p
 
casacore::Vector
< casacore::String
ReceiverType_p
 
casacore::Vector< casacore::IntBeamId_p
 
casacore::Vector< casacore::IntBeamNumber_p
 
casacore::Vector
< casacore::MDirection
ValidCenter_p
 
casacore::Vector
< casacore::MDirection
ValidCenterMin_p
 
casacore::Vector
< casacore::MDirection
ValidCenterMax_p
 
casacore::Vector< casacore::uIntNumSubbands_p
 
casacore::Vector
< casacore::Vector
< casacore::String > > 
BandName_p
 
casacore::Vector
< casacore::Vector
< casacore::MVFrequency > > 
SubbandMinFreq_p
 
casacore::Vector
< casacore::Vector
< casacore::MVFrequency > > 
SubbandMaxFreq_p
 
casacore::Vector
< casacore::Vector< FuncTypes > > 
FuncType_p
 
casacore::Vector
< casacore::Vector
< casacore::String > > 
FuncName_p
 
casacore::Vector
< casacore::Vector
< casacore::uInt > > 
FuncChannel_p
 
casacore::Vector
< casacore::Vector
< casacore::MVFrequency > > 
NomFreq_p
 
casacore::Vector
< casacore::Vector
< casacore::MVAngle > > 
RotAngOffset_p
 
casacore::Vector< casacore::uIntpathIndex_p
 not part of the table but same number of elements: memory of the path from which the row was read (index to paths_p) More...
 

Detailed Description

AntennaResponses provides access to antenna response data.

Intended use:

Internal

Review Status

Reviewed By:
Ger van Diepen, Max Voronkov, Dirk Petry, Remy Indebetouw
Date Reviewed:
Jan 2011
Test programs:
tAntennaResponses

Prerequisite

Etymology

Synopsis

The location of the AntennaResponses table for a given observatory is set in the column casacore::String ANTENNA_RESPONSES in the "Observatories" table (accessed via the casacore::MeasTable class).

The detailed rules of how the location and name of the table is derived from the string found in ANTENNA_RESPONSES is described further down in the comment to the initAntennaResponses() method.

E.g., for ALMA, the location of the table would be

data/alma/AntennaResponses

and the entry in the Observatories table would be simply "alma/AntennaResponses".

"AntennaResponses" is the recommended name of the table but in principle any name can be used. That name will then have to be given in the Observatories table.

Contents of the AntennaResponses table:

column 0: casacore::Int BEAM_ID (a unique number in the table for the given observatory name) column 1: casacore::String NAME (name of the observatory as in the observatory table) column 2: casacore::Int BEAM_NUMBER (for observataories which support several simultaneous beams, zero-based) column 3: casacore::Double START_TIME (a casacore::Measure, the time from which onwards this table row is valid) column 4: casacore::String ANTENNA_TYPE (for ALMA: "DV", "DA", "PM", or "CM") column 5: casacore::String RECEIVER_TYPE (for ALMA this will not be filled, at least for the moment) column 6: casacore::Int NUM_SUBBANDS (number of response frequency sub-bands) column 7: casacore::Array casacore::String (size set by NUM_SUBBANDS) BAND_NAME (for ALMA: "1", "2" etc.) (if there is more than one sub-band per band, the band name repeats) column 8: casacore::Array casacore::Double (a casacore::Quantum, size set by NUM_SUBBANDS) SUBBAND_MIN_FREQ column 9: casacore::Array casacore::Double (a casacore::Quantum, size set by NUM_SUBBANDS) SUBBAND_MAX_FREQ column 10: casacore::MDirection CENTER (the nominal center sky position where this row is valid, default (0.,90.) AZEL) column 11: casacore::MDirection VALID_CENTER_MIN (sky position validity range min values, default (0.,0.) AZEL) column 12: casacore::MDirection VALID_CENTER_MAX (sky position validity range max values, default (360.,90.) AZEL) column 13: casacore::Array casacore::Int (size set by NUM_SUBBANDS) FUNCTION_TYPE (uses enum FuncTypes defined below: EFP = complex electric field pattern image, VP = voltage pattern image, AIF = complex aperture illumination function image, NA = the function is not yet available, here other codes can be easily added, e.g. VPMAN = the function is available in casa via the vp manager (details t.b.d.), INTERNAL = the function is generated on the fly internally using ray-tracing as for the EVLA) column 14: casacore::Array casacore::String (size set by NUM_SUBBANDS) FUNCTION_NAME (names of the images as paths relative to the directory where this table is located, empty string if no image is available for the band, e.g. "ticra_efield_patterns/melco12m_band6_efp.im") column 15: casacore::Array casacore::uInt (size set by NUM_SUBBANDS) FUNCTION_CHANNEL (the spectral image channel to use, can be different from 0 in the case that several antenna responses are stored in one image file) column 16: casacore::Array casacore::Double (a casacore::Quantum, size set by NUM_SUBBANDS) NOMINAL_FREQ (the nominal frequency of the channel given by FUNCTION_CHANNEL) column 17: casacore::Array casacore::Double (a casacore::Quantum, size set by NUM_SUBBANDS) RESPONSE_ROTATION_OFFSET (the angle of an additional constant rotation of the response image) project-dependent implementation)

It is assured by the table filling code that columns 10, 11, and 12 use the same casacore::MDirection type.

Example

Motivation

Information on receiver bands and corresponding primary beams (in whatever form) for different antenna types needs to be made available to the CASA code in a place where imaging code can pick it up.

To Do

Definition at line 147 of file AntennaResponses.h.

Member Enumeration Documentation

Enumerator
NA 
AIF 
EFP 
VP 
VPMAN 
INTERNAL 
N_FuncTypes 
ANY 
INVALID 

Definition at line 151 of file AntennaResponses.h.

Constructor & Destructor Documentation

casa::AntennaResponses::AntennaResponses ( )
inline

this can of course be extended for additional types if necessary

Constructor, does not call init()

Definition at line 165 of file AntennaResponses.h.

casa::AntennaResponses::AntennaResponses ( const casacore::String path)

Constructor, calls init()

Member Function Documentation

casacore::Bool casa::AntennaResponses::append ( const casacore::String path)

As init but does not overwrite the table (member vectors) in memory.

Instead it appends to the vectors. Returns false if the path was already read before.

void casa::AntennaResponses::create ( const casacore::String path)

Create an new AntennaReponses table on disk at the given path and fill it with the table contents presently in memory.

Throw exceptions if there are problems writing the table.

FuncTypes casa::AntennaResponses::FuncType ( casacore::Int  i)

Convert from casacore::Int to FuncType.

static FuncTypes casa::AntennaResponses::FuncType ( const casacore::String sftyp)
static

Convert from casacore::String to FuncType.

casacore::Bool casa::AntennaResponses::getAntennaTypes ( casacore::Vector< casacore::String > &  antTypes,
const casacore::String obsName,
const casacore::MEpoch obsTime,
const casacore::MFrequency freq,
const FuncTypes requFType = ANY,
const casacore::MDirection center = casacore::MDirection(casacore::Quantity(0.,"deg"), casacore::Quantity(90.,"deg"), casacore::MDirection::AZEL),
const casacore::String receiverType = "",
const casacore::Int beamNumber = 0 
)

Get a vector containing all unique antenna type strings for the given constraints.

casacore::Bool casa::AntennaResponses::getBandName ( casacore::String bandName,
const casacore::String obsName,
const casacore::MVFrequency freq 
)

get the name of the band corresponding to the frequency (in the rest frame of the observatory)

casacore::Bool casa::AntennaResponses::getImageName ( casacore::String functionImageName,
casacore::uInt funcChannel,
casacore::MFrequency nomFreq,
FuncTypes fType,
casacore::MVAngle rotAngOffset,
const casacore::String obsName,
const casacore::MEpoch obsTime,
const casacore::MFrequency freq,
const FuncTypes requFType = ANY,
const casacore::String antennaType = "",
const casacore::MDirection center = casacore::MDirection(casacore::Quantity(0.,"deg"), casacore::Quantity(90.,"deg"), casacore::MDirection::AZEL),
const casacore::String receiverType = "",
const casacore::Int beamNumber = 0 
)

getRowAndIndex is then used by the following methods

Access methods for the response images: takes an observatory name, an observation time, the antenna type (e.g. "DV"), the receiverType, a frequency, a function type (enum FuncTypes, can be ANY, i.e. take the first available), a direction, and a beam number and finds the appropriate image in the AntennaResponses table which contains the image of the requested type and returns the path, the channel to use, the frequency of that channel, and the FuncType of the image. The image will contain a spectral axis even if degenerate. The direction axis pair of the stored images is set as follows: The axes are parallel to the ones given by the coordinate system type of the CENTER column of the AntennaReponses table. The center of the image is that given by the CENTER column. Furthermore, the images contain a casacore::Stokes axis (even if degenerate) to express the beams for the different polarizations or polarization products. Returns false if no appropriate image could be found.

casacore::Bool casa::AntennaResponses::getImageName ( casacore::String functionImageName,
casacore::uInt funcChannel,
casacore::MFrequency nomFreq,
casacore::MFrequency loFreq,
casacore::MFrequency hiFreq,
FuncTypes fType,
casacore::MVAngle rotAngOffset,
const casacore::String obsName,
const casacore::MEpoch obsTime,
const casacore::MFrequency freq,
const FuncTypes requFType = ANY,
const casacore::String antennaType = "",
const casacore::MDirection center = casacore::MDirection(casacore::Quantity(0.,"deg"), casacore::Quantity(90.,"deg"), casacore::MDirection::AZEL),
const casacore::String receiverType = "",
const casacore::Int beamNumber = 0 
)

Overloaded method: returning the validity range.

casacore::Bool casa::AntennaResponses::getImageName ( casacore::String functionImageName,
casacore::uInt funcChannel,
casacore::MFrequency nomFreq,
FuncTypes fType,
casacore::MVAngle rotAngOffset,
const casacore::String obsName,
const casacore::Int beamId,
const casacore::MFrequency freq 
)

Overloaded method: as previous method but using beamId (instead of obs.

time, ant. type, rec. type, center, and functype)

casacore::Bool casa::AntennaResponses::getRowAndIndex ( casacore::uInt row,
casacore::uInt subBand,
const casacore::String obsName,
const casacore::MEpoch obsTime,
const casacore::MFrequency freq,
const FuncTypes requFType = ANY,
const casacore::String antennaType = "",
const casacore::MDirection center = casacore::MDirection(casacore::Quantity(0.,"deg"), casacore::Quantity(90.,"deg"), casacore::MDirection::AZEL),
const casacore::String receiverType = "",
const casacore::Int beamNumber = 0 
)

find the row containing the information pertinent to the given parameters (this is also the index in the member vectors) and the index (subband) to the frequency channel of the response return false if no matching row could be found

casacore::Bool casa::AntennaResponses::getRowAndIndex ( casacore::uInt row,
casacore::uInt subBand,
const casacore::String obsName,
const casacore::Int beamId,
const casacore::MFrequency freq 
)

overloaded method: as previous method but using beamId (instead of obs.

time, ant. type, rec. type, center, and beam number)

casacore::Bool casa::AntennaResponses::init ( const casacore::String path = "")

Takes the path (as taken from the new ANTENNA_RESPONSES column of the Observatories table) and uses it as the name and location of the AntennaResponses table, and then initializes the member vectors; can be called repeatedly with different paths; each call will overwrite the vectors.

If the path is an empty string, the member vectors will be reset to empty, i.e. this is interpreted to mean that there is no AntennaResponses table on disk. Returns true unless for some reason the initialisation fails (other than path=="").

casacore::Bool casa::AntennaResponses::isInit ( )

returns true if paths_p has at least one member

casacore::Bool casa::AntennaResponses::isInit ( const casacore::String path)

returns true if path is a member element of paths_p, i.e.

the contents of path was read

casacore::Bool casa::AntennaResponses::putRow ( casacore::uInt row,
const casacore::String obsName,
const casacore::Int beamId,
const casacore::Vector< casacore::String > &  bandName,
const casacore::Vector< casacore::MVFrequency > &  subbandMinFreq,
const casacore::Vector< casacore::MVFrequency > &  subbandMaxFreq,
const casacore::Vector< FuncTypes > &  funcType,
const casacore::Vector< casacore::String > &  funcName,
const casacore::Vector< casacore::uInt > &  funcChannel,
const casacore::Vector< casacore::MVFrequency > &  nomFreq,
const casacore::Vector< casacore::MVAngle > &  rotAngOffset,
const casacore::String antennaType = "",
const casacore::MEpoch startTime = casacore::MEpoch(casacore::MVEpoch(casacore::Quantity(40588.,"d")), casacore::MEpoch::UTC),
const casacore::MDirection center = casacore::MDirection(casacore::Quantity(0.,"deg"), casacore::Quantity(90.,"deg"), casacore::MDirection::AZEL),
const casacore::MDirection validCenterMin = casacore::MDirection(casacore::Quantity(0.,"deg"), casacore::Quantity(0.,"deg"), casacore::MDirection::AZEL),
const casacore::MDirection validCenterMax = casacore::MDirection(casacore::Quantity(360.,"deg"), casacore::Quantity(90.,"deg"), casacore::MDirection::AZEL),
const casacore::String receiverType = "",
const casacore::Int beamNumber = 0 
)

Put the given row into the present antenna reponses table (in memory).

If the row exists at the position given by casacore::uInt row, it is overwritten. If it doesn't exist, the table is resized by one in memory and the new row is added at the last position. The variable "row" then contains the actual row that was filled. Returns false, if the table was not initialised or the given data was not consistent. Consistency checks:

  • all vectors have same dimension which is then used to set numSubbands
  • beamId is unique for the given observatory
  • center, validCenterMin, and validCenterMax have the same casacore::MDirection type

Member Data Documentation

casacore::Vector<casacore::String> casa::AntennaResponses::AntennaType_p
private

Definition at line 353 of file AntennaResponses.h.

casacore::Vector<casacore::Vector<casacore::String> > casa::AntennaResponses::BandName_p
private

Definition at line 361 of file AntennaResponses.h.

casacore::Vector<casacore::Int> casa::AntennaResponses::BeamId_p
private

Definition at line 355 of file AntennaResponses.h.

casacore::Vector<casacore::Int> casa::AntennaResponses::BeamNumber_p
private

Definition at line 356 of file AntennaResponses.h.

casacore::Vector<casacore::Vector<casacore::uInt> > casa::AntennaResponses::FuncChannel_p
private

Definition at line 366 of file AntennaResponses.h.

casacore::Vector<casacore::Vector<casacore::String> > casa::AntennaResponses::FuncName_p
private

Definition at line 365 of file AntennaResponses.h.

casacore::Vector<casacore::Vector<FuncTypes> > casa::AntennaResponses::FuncType_p
private

Definition at line 364 of file AntennaResponses.h.

casacore::Vector<casacore::Vector<casacore::MVFrequency> > casa::AntennaResponses::NomFreq_p
private

Definition at line 367 of file AntennaResponses.h.

casacore::uInt casa::AntennaResponses::numRows_p
private

here a complete copy of the AntennaResponses table is stored

Definition at line 350 of file AntennaResponses.h.

casacore::Vector<casacore::uInt> casa::AntennaResponses::NumSubbands_p
private

Definition at line 360 of file AntennaResponses.h.

casacore::Vector<casacore::String> casa::AntennaResponses::ObsName_p
private

Definition at line 351 of file AntennaResponses.h.

casacore::Vector<casacore::uInt> casa::AntennaResponses::pathIndex_p
private

not part of the table but same number of elements: memory of the path from which the row was read (index to paths_p)

Definition at line 372 of file AntennaResponses.h.

casacore::Vector<casacore::String> casa::AntennaResponses::paths_p
private

after initialization, this contains the name of the path where the AntennaResponses table was read from; if append was used to read additional tables in the memory table, then this vector has several elements representing the different tables

Definition at line 347 of file AntennaResponses.h.

casacore::Vector<casacore::String> casa::AntennaResponses::ReceiverType_p
private

Definition at line 354 of file AntennaResponses.h.

casacore::Vector<casacore::Vector<casacore::MVAngle> > casa::AntennaResponses::RotAngOffset_p
private

Definition at line 368 of file AntennaResponses.h.

casacore::Vector<casacore::MEpoch> casa::AntennaResponses::StartTime_p
private

Definition at line 352 of file AntennaResponses.h.

casacore::Vector<casacore::Vector<casacore::MVFrequency> > casa::AntennaResponses::SubbandMaxFreq_p
private

Definition at line 363 of file AntennaResponses.h.

casacore::Vector<casacore::Vector<casacore::MVFrequency> > casa::AntennaResponses::SubbandMinFreq_p
private

Definition at line 362 of file AntennaResponses.h.

casacore::Vector<casacore::MDirection> casa::AntennaResponses::ValidCenter_p
private

Definition at line 357 of file AntennaResponses.h.

casacore::Vector<casacore::MDirection> casa::AntennaResponses::ValidCenterMax_p
private

Definition at line 359 of file AntennaResponses.h.

casacore::Vector<casacore::MDirection> casa::AntennaResponses::ValidCenterMin_p
private

Definition at line 358 of file AntennaResponses.h.


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