CalFocusTable

class CalFocusTable(container)[source]

Bases: object

The CalFocusTable class is an Alma table.

Result of focus calibration performed on-line by TelCal.

Shown here are the fields found in each row.

The key fields are shown first and used (together) to index a unique row. Key fields are all required and indicated by “Key.” following the description.

Other fields are required unless “optional” is shown for that field.

The field description text here is as found in the model used to generate the code.

Types may be an enumeration or extended pyasdm type. Fields that are python lists are indicated that by “[]” in the type and having the word “Array” at the start of description followed by the expected number of elements in that list in parentheses. Lists (arrays) may be multi-dimensional (lists of lists) and are indicated by [][] … etc as needed to indicate the expected number of dimensions. Multi-dimenstional lists will show the expected number of elements for each dimension also in the parenthese after “Array”.

The use of “auto-incrementable” indicates that that field is auto-generated when the table is created and that field is set, as necessary, to create a unique key for the specific row being added, by incrementing that value from the previous highest value needed for the rest of the elements of the key on that row. Such a field can not be set independently, it is only set when the row is added to the table by that auto-increment mechanism.

antennaName

the name of the antenna. key.

Type

str

receiverBand

identifies the receiver band. key.

Type

ReceiverBand

calDataId

refers to a unique row in CalData Table. key.

Type

Tag

calReductionId

refers to a unique row in CalReduction Table. key.

Type

Tag

startValidTime

the start time of the result validity period.

Type

ArrayTime

endValidTime

the end time of the result validity period.

Type

ArrayTime

ambientTemperature

the ambient temperature.

Type

Temperature

atmPhaseCorrection

qualifies how the atmospheric phase correction has been applied.

Type

AtmPhaseCorrection

focusMethod

identifies the method used during the calibration.

Type

FocusMethod

frequencyRange

Array(2) the frequency range over which the result is valid.

Type

Frequency []

pointingDirection

Array(2) the antenna pointing direction (horizontal coordinates).

Type

Angle []

numReceptor

the number of receptors.

Type

int

polarizationTypes

Array(numReceptor) identifies the polarization types (one value per receptor).

Type

PolarizationType []

wereFixed

Array(3) coordinates were fixed (true) or not fixed (false) (one value per individual coordinate).

Type

bool []

offset

Array(numReceptor, 3) the measured focus offsets in X,Y,Z (one triple of values per receptor).

Type

Length [] []

offsetError

Array(numReceptor, 3) the statistical uncertainties on measured focus offsets (one triple per receptor).

Type

Length [] []

offsetWasTied

Array(numReceptor, 3) focus was tied (true) or not tied (false) (one value per receptor and focus individual coordinate).

Type

bool [] []

reducedChiSquared

Array(numReceptor, 3) a measure of the quality of the fit (one triple per receptor).

Type

float [] []

position

Array(numReceptor, 3) the absolute focus position in X,Y,Z (one triple of values per receptor).

Type

Length [] []

polarizationsAveraged

Polarizations were averaged. Optional.

Type

bool

focusCurveWidth

Array(numReceptor, 3) half power width of fitted focus curve (one triple per receptor). Optional.

Type

Length [] []

focusCurveWidthError

Array(numReceptor, 3) Uncertainty of the focus curve width. Optional.

Type

Length [] []

focusCurveWasFixed

Array(3) each coordinate of the focus curve width was set (true) or not set (false) to an assumed value. Optional.

Type

bool []

offIntensity

Array(numReceptor) the off intensity levels (one value per receptor). Optional.

Type

Temperature []

offIntensityError

Array(numReceptor) the uncertainties on the off intensity levels (one value per receptor). Optional.

Type

Temperature []

offIntensityWasFixed

the off intensity level was fixed (true) or not fixed (false). Optional.

Type

bool

peakIntensity

Array(numReceptor) the maximum intensities (one value per receptor). Optional.

Type

Temperature []

peakIntensityError

Array(numReceptor) the uncertainties on the maximum intensities (one value per receptor). Optional.

Type

Temperature []

peakIntensityWasFixed

the maximum intensity was fixed (true) or not fixed (false). Optional.

Type

bool

astigmPlus

Array(numReceptor) the astigmatism component with 0 degree symmetry axis. Optional.

Type

Length []

astigmPlusError

Array(numReceptor) the statistical error on astigmPlus Optional.

Type

Length []

astigmMult

Array(numReceptor) the astigmatism component with 45 degrees symmetry axis. Optional.

Type

Length []

astigmMultError

Array(numReceptor) the statistical error on astigmMult Optional.

Type

Length []

illumOffset

Array(numReceptor, 2) the illumination offset of the primary reflector expressed as a pair of values. Optional.

Type

Length [] []

illumOffsetError

Array(numReceptor, 2) the statistical error on illumOffset. Optional.

Type

Length [] []

fitRMS

Array(numReceptor) The RMS of the half path length after removing the best fit parabola. Optional.

Type

Length []

Methods Summary

Key(antennaName, receiverBand, calDataId, …)

Returns a string built by concatenating the ascii representation of the parameters values suffixed with a “_” character.

MIMEXMLPart(byteOrder)

Used in both the small XML file as well as the bin file when writing out as binary.

add(x)

Add a row.

checkAndAdd(x)

A method to append a row to it’s table, used by input conversion methods.

checkPresenceInMemory()

Check if the table is present in memory.

fromXML(xmlstr)

Populate this table from the content of a XML document that is required to conform to the XML schema defined for a CalFocus (CalFocusTable.xsd).

get()

Get all rows.

getAmbientTemperatureEqTolerance()

A getter for the tolerance on ambientTemperature Returns the tolerance as a Temperature

getAstigmMultEqTolerance()

A getter for the tolerance on astigmMult Returns the tolerance as a Length

getAstigmMultErrorEqTolerance()

A getter for the tolerance on astigmMultError Returns the tolerance as a Length

getAstigmPlusEqTolerance()

A getter for the tolerance on astigmPlus Returns the tolerance as a Length

getAstigmPlusErrorEqTolerance()

A getter for the tolerance on astigmPlusError Returns the tolerance as a Length

getContainer()

Return the container to which this table belongs.

getEntity()

Returns the table’s entity.

getFitRMSEqTolerance()

A getter for the tolerance on fitRMS Returns the tolerance as a Length

getFocusCurveWidthEqTolerance()

A getter for the tolerance on focusCurveWidth Returns the tolerance as a Length

getFocusCurveWidthErrorEqTolerance()

A getter for the tolerance on focusCurveWidthError Returns the tolerance as a Length

getFrequencyRangeEqTolerance()

A getter for the tolerance on frequencyRange Returns the tolerance as a Frequency

getIllumOffsetEqTolerance()

A getter for the tolerance on illumOffset Returns the tolerance as a Length

getIllumOffsetErrorEqTolerance()

A getter for the tolerance on illumOffsetError Returns the tolerance as a Length

getKeyName()

Return the list of field names that make up key key as a list of strings.

getName()

Return the name of this table.

getOffIntensityEqTolerance()

A getter for the tolerance on offIntensity Returns the tolerance as a Temperature

getOffIntensityErrorEqTolerance()

A getter for the tolerance on offIntensityError Returns the tolerance as a Temperature

getOffsetEqTolerance()

A getter for the tolerance on offset Returns the tolerance as a Length

getOffsetErrorEqTolerance()

A getter for the tolerance on offsetError Returns the tolerance as a Length

getPeakIntensityEqTolerance()

A getter for the tolerance on peakIntensity Returns the tolerance as a Temperature

getPeakIntensityErrorEqTolerance()

A getter for the tolerance on peakIntensityError Returns the tolerance as a Temperature

getPointingDirectionEqTolerance()

A getter for the tolerance on pointingDirection Returns the tolerance as a Angle

getPositionEqTolerance()

A getter for the tolerance on position Returns the tolerance as a Length

getRowByKey(antennaName, receiverBand, …)

Returns a CalFocusRow given a key.

getRows()

get the rows, synonymous with the get method.

getVersion()

lookup(antennaName, receiverBand, calDataId, …)

Look up the table for a row whose all attributes are equal to the corresponding parameters of the method.

newRow(antennaName, receiverBand, calDataId, …)

Create a new CalFocusRow initialized to the specified values.

newRowCopy(row)

Create a new row using a copy constructor mechanism.

newRowDefault()

Create a new row with default values.

setAmbientTemperatureEqTolerance(tolerance)

A setter for the tolerance on ambientTemperature

setAstigmMultEqTolerance(tolerance)

A setter for the tolerance on astigmMult

setAstigmMultErrorEqTolerance(tolerance)

A setter for the tolerance on astigmMultError

setAstigmPlusEqTolerance(tolerance)

A setter for the tolerance on astigmPlus

setAstigmPlusErrorEqTolerance(tolerance)

A setter for the tolerance on astigmPlusError

setEntity(e)

Set the table’s entity The parameter, e, must be an Entity

setFitRMSEqTolerance(tolerance)

A setter for the tolerance on fitRMS

setFocusCurveWidthEqTolerance(tolerance)

A setter for the tolerance on focusCurveWidth

setFocusCurveWidthErrorEqTolerance(tolerance)

A setter for the tolerance on focusCurveWidthError

setFrequencyRangeEqTolerance(tolerance)

A setter for the tolerance on frequencyRange

setFromFile(directory)

Reads and parses a file containing a representation of a CalFocusTable as those produced by the toFile method.

setFromMIME(byteStream)

Extracts the binary part of a MIME message and deserialize its content to fill this with the result of the deserialization.

setFromMIMEFile(directory)

Set this table from a MIME file.

setFromXMLFile(directory)

This is the function used by setFromFile when the file is an XML file Not intended for external use.

setIllumOffsetEqTolerance(tolerance)

A setter for the tolerance on illumOffset

setIllumOffsetErrorEqTolerance(tolerance)

A setter for the tolerance on illumOffsetError

setNotPresentInMemory()

Set the state to indicate it is not present in memory and needs to be loaded before being used.

setOffIntensityEqTolerance(tolerance)

A setter for the tolerance on offIntensity

setOffIntensityErrorEqTolerance(tolerance)

A setter for the tolerance on offIntensityError

setOffsetEqTolerance(tolerance)

A setter for the tolerance on offset

setOffsetErrorEqTolerance(tolerance)

A setter for the tolerance on offsetError

setPeakIntensityEqTolerance(tolerance)

A setter for the tolerance on peakIntensity

setPeakIntensityErrorEqTolerance(tolerance)

A setter for the tolerance on peakIntensityError

setPointingDirectionEqTolerance(tolerance)

A setter for the tolerance on pointingDirection

setPositionEqTolerance(tolerance)

A setter for the tolerance on position

setVersion(version)

size()

Return the number of rows in the table.

toFile(directory)

Stores a representation (binary or XML) of this table into a file.

toMIME(mimeFilePath, mimeXMLpart, byteOrder)

Write this out to mimeFilePath as a serialized MIME file with a leading XML part and a following binary part.

toXML()

Translate this table to an XML representation conforming to the schema defined for CalFocus (CalFocusTable.xsd).

Methods Documentation

Key(antennaName, receiverBand, calDataId, calReductionId)[source]

Returns a string built by concatenating the ascii representation of the parameters values suffixed with a “_” character.

MIMEXMLPart(byteOrder)[source]

Used in both the small XML file as well as the bin file when writing out as binary. The byte order is set by byteOrder.

add(x)[source]

Add a row. raises a DuplicateKey Thrown if the new row has a key that is already in the table. If x is a list then this method is called recursively on each element of that list. In that case, None is returned. returns the row that was added.

checkAndAdd(x)[source]

A method to append a row to it’s table, used by input conversion methods. Not indended for external use.

If this table has an autoincrementable attribute then check if x verifies the rule of uniqueness and raise an exception if not.

Append x to its table. x is the row to be appended. returns x.

checkPresenceInMemory()[source]

Check if the table is present in memory. If not, load the table from the file using the directory of the container.

fromXML(xmlstr)[source]

Populate this table from the content of a XML document that is required to conform to the XML schema defined for a CalFocus (CalFocusTable.xsd).

get()[source]

Get all rows. return Alls rows as a list of CalFocusRow

getAmbientTemperatureEqTolerance()[source]

A getter for the tolerance on ambientTemperature Returns the tolerance as a Temperature

getAstigmMultEqTolerance()[source]

A getter for the tolerance on astigmMult Returns the tolerance as a Length

getAstigmMultErrorEqTolerance()[source]

A getter for the tolerance on astigmMultError Returns the tolerance as a Length

getAstigmPlusEqTolerance()[source]

A getter for the tolerance on astigmPlus Returns the tolerance as a Length

getAstigmPlusErrorEqTolerance()[source]

A getter for the tolerance on astigmPlusError Returns the tolerance as a Length

getContainer()[source]

Return the container to which this table belongs. return a ASDM.

getEntity()[source]

Returns the table’s entity.

getFitRMSEqTolerance()[source]

A getter for the tolerance on fitRMS Returns the tolerance as a Length

getFocusCurveWidthEqTolerance()[source]

A getter for the tolerance on focusCurveWidth Returns the tolerance as a Length

getFocusCurveWidthErrorEqTolerance()[source]

A getter for the tolerance on focusCurveWidthError Returns the tolerance as a Length

getFrequencyRangeEqTolerance()[source]

A getter for the tolerance on frequencyRange Returns the tolerance as a Frequency

getIllumOffsetEqTolerance()[source]

A getter for the tolerance on illumOffset Returns the tolerance as a Length

getIllumOffsetErrorEqTolerance()[source]

A getter for the tolerance on illumOffsetError Returns the tolerance as a Length

getKeyName()[source]

Return the list of field names that make up key key as a list of strings.

getName()[source]

Return the name of this table.

getOffIntensityEqTolerance()[source]

A getter for the tolerance on offIntensity Returns the tolerance as a Temperature

getOffIntensityErrorEqTolerance()[source]

A getter for the tolerance on offIntensityError Returns the tolerance as a Temperature

getOffsetEqTolerance()[source]

A getter for the tolerance on offset Returns the tolerance as a Length

getOffsetErrorEqTolerance()[source]

A getter for the tolerance on offsetError Returns the tolerance as a Length

getPeakIntensityEqTolerance()[source]

A getter for the tolerance on peakIntensity Returns the tolerance as a Temperature

getPeakIntensityErrorEqTolerance()[source]

A getter for the tolerance on peakIntensityError Returns the tolerance as a Temperature

getPointingDirectionEqTolerance()[source]

A getter for the tolerance on pointingDirection Returns the tolerance as a Angle

getPositionEqTolerance()[source]

A getter for the tolerance on position Returns the tolerance as a Length

getRowByKey(antennaName, receiverBand, calDataId, calReductionId)[source]

Returns a CalFocusRow given a key. return the row having the key whose values are passed as parameters, or None if no row exists for that key.

param antennaName.

param receiverBand.

param calDataId.

param calReductionId.

getRows()[source]

get the rows, synonymous with the get method.

getVersion()[source]
lookup(antennaName, receiverBand, calDataId, calReductionId, startValidTime, endValidTime, ambientTemperature, atmPhaseCorrection, focusMethod, frequencyRange, pointingDirection, numReceptor, polarizationTypes, wereFixed, offset, offsetError, offsetWasTied, reducedChiSquared, position)[source]

Look up the table for a row whose all attributes are equal to the corresponding parameters of the method. return this row if any, None otherwise.

param antennaName.

param receiverBand.

param calDataId.

param calReductionId.

param startValidTime.

param endValidTime.

param ambientTemperature.

param atmPhaseCorrection.

param focusMethod.

param frequencyRange.

param pointingDirection.

param numReceptor.

param polarizationTypes.

param wereFixed.

param offset.

param offsetError.

param offsetWasTied.

param reducedChiSquared.

param position.

newRow(antennaName, receiverBand, calDataId, calReductionId, startValidTime, endValidTime, ambientTemperature, atmPhaseCorrection, focusMethod, frequencyRange, pointingDirection, numReceptor, polarizationTypes, wereFixed, offset, offsetError, offsetWasTied, reducedChiSquared, position)[source]

Create a new CalFocusRow initialized to the specified values.

The new row is not added to this table, but it does know about it. (the autoincrementable attribute, if any, is not in the parameter list)

newRowCopy(row)[source]

Create a new row using a copy constructor mechanism.

The method creates a new CalFocusRow which knows about this table. Each attribute of the created row is a (deep) copy of the corresponding attribute of row. The method does not add the created row to this, it simply parents it to this, a call to the add method has to be done in order to get the row added (very likely after having modified some of its attributes. If row is None then the method returns a new CalFocusRow with default values for its attributes.

newRowDefault()[source]

Create a new row with default values. The new row is not added to this table but it knows about it.

setAmbientTemperatureEqTolerance(tolerance)[source]

A setter for the tolerance on ambientTemperature

setAstigmMultEqTolerance(tolerance)[source]

A setter for the tolerance on astigmMult

setAstigmMultErrorEqTolerance(tolerance)[source]

A setter for the tolerance on astigmMultError

setAstigmPlusEqTolerance(tolerance)[source]

A setter for the tolerance on astigmPlus

setAstigmPlusErrorEqTolerance(tolerance)[source]

A setter for the tolerance on astigmPlusError

setEntity(e)[source]

Set the table’s entity The parameter, e, must be an Entity

setFitRMSEqTolerance(tolerance)[source]

A setter for the tolerance on fitRMS

setFocusCurveWidthEqTolerance(tolerance)[source]

A setter for the tolerance on focusCurveWidth

setFocusCurveWidthErrorEqTolerance(tolerance)[source]

A setter for the tolerance on focusCurveWidthError

setFrequencyRangeEqTolerance(tolerance)[source]

A setter for the tolerance on frequencyRange

setFromFile(directory)[source]

Reads and parses a file containing a representation of a CalFocusTable as those produced by the toFile method. This table is populated with the result of the parsing. param directory The name of the directory containing the file te be read and parsed. raises ConversionException If any error occurs while reading the files in the directory or parsing them.

setFromMIME(byteStream)[source]

Extracts the binary part of a MIME message and deserialize its content to fill this with the result of the deserialization. param byteStream the previously opened io.BufferedReader instance containing the data to be extracted.

It is the responsibility of this method to close byteStream.

setFromMIMEFile(directory)[source]

Set this table from a MIME file. Used internally by setFromFile. Not intended for external use.

setFromXMLFile(directory)[source]

This is the function used by setFromFile when the file is an XML file Not intended for external use.

setIllumOffsetEqTolerance(tolerance)[source]

A setter for the tolerance on illumOffset

setIllumOffsetErrorEqTolerance(tolerance)[source]

A setter for the tolerance on illumOffsetError

setNotPresentInMemory()[source]

Set the state to indicate it is not present in memory and needs to be loaded before being used. This is used by the container class when loaded from a file and this table is present with non-zero rows. Tables are loaded on demand when the get function in the container for that table is used.

setOffIntensityEqTolerance(tolerance)[source]

A setter for the tolerance on offIntensity

setOffIntensityErrorEqTolerance(tolerance)[source]

A setter for the tolerance on offIntensityError

setOffsetEqTolerance(tolerance)[source]

A setter for the tolerance on offset

setOffsetErrorEqTolerance(tolerance)[source]

A setter for the tolerance on offsetError

setPeakIntensityEqTolerance(tolerance)[source]

A setter for the tolerance on peakIntensity

setPeakIntensityErrorEqTolerance(tolerance)[source]

A setter for the tolerance on peakIntensityError

setPointingDirectionEqTolerance(tolerance)[source]

A setter for the tolerance on pointingDirection

setPositionEqTolerance(tolerance)[source]

A setter for the tolerance on position

setVersion(version)[source]
size()[source]

Return the number of rows in the table.

toFile(directory)[source]

Stores a representation (binary or XML) of this table into a file.

Depending on the boolean value of its _fileAsBin data member a binary serialization of this (_fileAsBin==True) will be saved in a file “CalFocus.bin” or an XML representation (_fileAsBin==False) will be saved in a file “CalFocus.xml”. The file is always written in a directory whose name is passed as a parameter. param directory The name of directory where the file containing the table’s representation will be saved. raises ConversionException for any errors while writing that file.

toMIME(mimeFilePath, mimeXMLpart, byteOrder)[source]

Write this out to mimeFilePath as a serialized MIME file with a leading XML part and a following binary part.

The mimeXMLpart is a string that should have already been written to the corresponding small XML file (and is returned by the MIMEXMLPart method here). The byteOrder is a ByteOrder instance that gives the byte order to use when writing the binary data. That instance should have also been used to generate mimeXMLpart.

toXML()[source]

Translate this table to an XML representation conforming to the schema defined for CalFocus (CalFocusTable.xsd).

returns a string containing the XML representation.