VLAADA.h

Classes

VLAADA -- Interprets the data in an antenna data area of a VLA logical record. (full description)

class VLAADA

Interface

Public Members
VLAADA()
VLAADA(ByteSource& record, uInt offset)
~VLAADA()
VLAADA(const VLAADA& other)
VLAADA& operator=(const VLAADA& other)
void attach(ByteSource& record, uInt offset)
String antName() const
uInt antId() const
String padName() const
Double u() const
Double v() const
Double w() const
Double bx() const
Double by() const
Double bz() const
Vector<Double> pos() const
uInt ifStatus(VLAEnum::IF which) const
Float nominalSensitivity(VLAEnum::IF which) const
Stokes::StokesTypes ifPol(VLAEnum::IF which) const
Bool ok() const

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

The antenna data is, in memo 188, frequently shortened to the acronym ADA. As this is specific to the VLA the name VLAADA seemed appropriate.

Synopsis

This class contains functions which access and interpret the data in an antenna data area of a VLA logical record. Only data within one antenna data are is accessable with this class, and multiple instances of this class are needed to simultaneously look at the data in the other antenna data areas in a VLA logical record.

The functions in this class access the specified data in the antenna data area, and may convert the units and data types so something more suitable for general use. They also interpret the data and provide some derived quantities eg., the padName function.

Example

This code fragment shows how to initialise a Block of objects of this class and then use these objects to determine which antenna is on which pad. It is assumed that the Bytesource object contains a VLA Logical record.
   ByteSource VLARecord(...);
   Block<VLAADA> adaBlock;
   VLARCA rca(VLARecord);
   const uInt nant = rca.nAntennas();
   adaBlock.resize(nant);
   for (uInt a = 0; a < nant; a++) {
     adaBlock[a].attach(VLARecord, rca.ADAOffset(a));
     cout << "Antenna " << adaBlock[a].antName() 
 	 << " is on pad " << adaBlock[a].padName() << endl;
   }

Motivation

This class was needed as part of the VLA filler application.

Thrown Exceptions

To Do

Member Description

VLAADA()

The default constructor creates a unusable object. You need to use the assignment operator or the attach function to create a usable object.

VLAADA(ByteSource& record, uInt offset)

Construct this object to read data from the specified VLA logical record. The antenna data area that will be used begins at the specified number of bytes from the beginning of the record.

~VLAADA()

The destructor is trivial.

VLAADA(const VLAADA& other)

The copy constructor uses reference semantics.

VLAADA& operator=(const VLAADA& other)

The assignment constructor uses reference semantics.

void attach(ByteSource& record, uInt offset)

Re-initialise this object so that it now reads data from the given VLA logical record. The antenna data area that will be used begins at the specified number of bytes from the beginning of the record.

String antName() const

return the antenna name. This is a string version of the antenna id n is a one or two digit number that contains the antenna identifier (see below).

uInt antId() const

returns the antenna Id. This is a number which stays with the "steel" and gets moved to new locations. It is not the pad number. It is between 1 and 28 inclusive.

String padName() const

return the pad name that this antenna is currently located on. This is obtained by knowing where the pads are and looking at the bx position of the antenna (the bx position in the logical record has to be within half a meter of the value given in an table). Pad names are of the form "Nn" or "En" or "Wn" where n is a one or two digit number that has an approximate correspondence with the distance of the pad from the centre of the array.

Double u() const

return the u coordinate in meters of this antenna at the centre of the integration.

Double v() const

return the v coordinate in meters of this antenna at the centre of the integration.

Double w() const

return the w coordinate in meters of this antenna at the centre of the integration.

Double bx() const

return the Bx position in meters of this antenna, from the centre of the Array.

Double by() const

return the By position in meters of this antenna, from the centre of the Array.

Double bz() const

return the Bz position in meters of this antenna, from the centre of the Array.

Vector<Double> pos() const

return the bx, by, bz positions in meters of this antenna, from the centre of the Array.

uInt ifStatus(VLAEnum::IF which) const

return the IF status. The status indicates how bad the data probably is for the specified if and the current antenna. Values of zero indicate the IF is OK, 1 is a warning, 2 means not so good, and bigger numbers, up to 15 mean the IF is successively worse.

Float nominalSensitivity(VLAEnum::IF which) const

returns the nominal sensitivity of the specified IF. These numbers are multiplied by the raw correlaton co-efficients to produce the numbers in the correlation data area.

Stokes::StokesTypes ifPol(VLAEnum::IF which) const

return the IF polarisation. Normally at the VLA IF's A & B measure right-hand-circular polarisation, and IF's C & D measure left-hand-circular polarisation. But in special circumstances this can be swapped. This function returns Stokes::RCircular or Stokes::LCircular.

Bool ok() const

Function which checks the internal data of this class for consistant values. Returns True if everything is fine otherwise returns False.