CalPointingTable¶
-
class
CalPointingTable(container)[source]¶ Bases:
objectThe CalPointingTable class is an Alma table.
Result of the pointing 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¶ Antenna Name key.
- Type
str
-
receiverBand¶ identifies the receiver band. key.
- Type
-
ambientTemperature¶ the ambient temperature.
- Type
-
antennaMake¶ identifies the antenna make.
- Type
-
atmPhaseCorrection¶ describes how the atmospheric phase correction has been applied.
- Type
-
pointingModelMode¶ identifies the pointing model mode.
- Type
-
pointingMethod¶ identifies the pointing method.
- Type
-
numReceptor¶ the number of receptors.
- Type
int
-
polarizationTypes¶ Array(numReceptor) identifies the polarizations types (one value per receptor).
- Type
-
collOffsetRelative¶ Array(numReceptor, 2) the collimation offsets (relative) (one pair of angles per receptor).
- Type
Angle [] []
-
collOffsetAbsolute¶ Array(numReceptor, 2) the collimation offsets (absolute) (one pair of angles per receptor).
- Type
Angle [] []
-
collError¶ Array(numReceptor, 2) the uncertainties on collimation (one pair of angles per receptor)
- Type
Angle [] []
-
collOffsetTied¶ Array(numReceptor, 2) indicates if a collimation offset was tied (true) or not tied (false) to another polar (one pair of boolean values per receptor).
- Type
bool [] []
-
reducedChiSquared¶ Array(numReceptor) a measure of the quality of the least square fit.
- Type
float []
-
averagedPolarizations¶ true when the polarizations were averaged together to improve sensitivity. Optional.
- Type
bool
-
beamPA¶ Array(numReceptor) the fitted beam position angles (one value per receptor). Optional.
- Type
Angle []
-
beamPAError¶ Array(numReceptor) the uncertaintes on the fitted beam position angles (one value per receptor). Optional.
- Type
Angle []
-
beamPAWasFixed¶ indicates if the beam position was fixed (true) or not fixed (false). Optional.
- Type
bool
-
beamWidth¶ Array(numReceptor, 2) the fitted beam widths (one pair of angles per receptor). Optional.
- Type
Angle [] []
-
beamWidthError¶ Array(numReceptor, 2) the uncertainties on the fitted beam widths (one pair of angles per receptor). Optional.
- Type
Angle [] []
-
beamWidthWasFixed¶ Array(2) indicates if the beam width was fixed (true) or not fixed (true) (one pair of booleans). 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¶ indicates if 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. Optional.
- Type
bool
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 CalPointing (CalPointingTable.xsd).
get()Get all rows.
getAmbientTemperatureEqTolerance()A getter for the tolerance on ambientTemperature Returns the tolerance as a Temperature
getBeamPAEqTolerance()A getter for the tolerance on beamPA Returns the tolerance as a Angle
getBeamPAErrorEqTolerance()A getter for the tolerance on beamPAError Returns the tolerance as a Angle
getBeamWidthEqTolerance()A getter for the tolerance on beamWidth Returns the tolerance as a Angle
getBeamWidthErrorEqTolerance()A getter for the tolerance on beamWidthError Returns the tolerance as a Angle
getCollErrorEqTolerance()A getter for the tolerance on collError Returns the tolerance as a Angle
getCollOffsetAbsoluteEqTolerance()A getter for the tolerance on collOffsetAbsolute Returns the tolerance as a Angle
getCollOffsetRelativeEqTolerance()A getter for the tolerance on collOffsetRelative Returns the tolerance as a Angle
getContainer()Return the container to which this table belongs.
getDirectionEqTolerance()A getter for the tolerance on direction Returns the tolerance as a Angle
getEntity()Returns the table’s entity.
getFrequencyRangeEqTolerance()A getter for the tolerance on frequencyRange Returns the tolerance as a Frequency
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
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
getRowByKey(antennaName, receiverBand, …)Returns a CalPointingRow 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 CalPointingRow 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
setBeamPAEqTolerance(tolerance)A setter for the tolerance on beamPA
setBeamPAErrorEqTolerance(tolerance)A setter for the tolerance on beamPAError
setBeamWidthEqTolerance(tolerance)A setter for the tolerance on beamWidth
setBeamWidthErrorEqTolerance(tolerance)A setter for the tolerance on beamWidthError
setCollErrorEqTolerance(tolerance)A setter for the tolerance on collError
setCollOffsetAbsoluteEqTolerance(tolerance)A setter for the tolerance on collOffsetAbsolute
setCollOffsetRelativeEqTolerance(tolerance)A setter for the tolerance on collOffsetRelative
setDirectionEqTolerance(tolerance)A setter for the tolerance on direction
setEntity(e)Set the table’s entity The parameter, e, must be an Entity
setFrequencyRangeEqTolerance(tolerance)A setter for the tolerance on frequencyRange
setFromFile(directory)Reads and parses a file containing a representation of a CalPointingTable 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.
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
setPeakIntensityEqTolerance(tolerance)A setter for the tolerance on peakIntensity
setPeakIntensityErrorEqTolerance(tolerance)A setter for the tolerance on peakIntensityError
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 CalPointing (CalPointingTable.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 CalPointing (CalPointingTable.xsd).
-
getAmbientTemperatureEqTolerance()[source]¶ A getter for the tolerance on ambientTemperature Returns the tolerance as a Temperature
-
getBeamPAEqTolerance()[source]¶ A getter for the tolerance on beamPA Returns the tolerance as a Angle
-
getBeamPAErrorEqTolerance()[source]¶ A getter for the tolerance on beamPAError Returns the tolerance as a Angle
-
getBeamWidthEqTolerance()[source]¶ A getter for the tolerance on beamWidth Returns the tolerance as a Angle
-
getBeamWidthErrorEqTolerance()[source]¶ A getter for the tolerance on beamWidthError Returns the tolerance as a Angle
-
getCollErrorEqTolerance()[source]¶ A getter for the tolerance on collError Returns the tolerance as a Angle
-
getCollOffsetAbsoluteEqTolerance()[source]¶ A getter for the tolerance on collOffsetAbsolute Returns the tolerance as a Angle
-
getCollOffsetRelativeEqTolerance()[source]¶ A getter for the tolerance on collOffsetRelative Returns the tolerance as a Angle
-
getDirectionEqTolerance()[source]¶ A getter for the tolerance on direction Returns the tolerance as a Angle
-
getFrequencyRangeEqTolerance()[source]¶ A getter for the tolerance on frequencyRange Returns the tolerance as a Frequency
-
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
-
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
-
getRowByKey(antennaName, receiverBand, calDataId, calReductionId)[source]¶ Returns a CalPointingRow 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.
-
lookup(antennaName, receiverBand, calDataId, calReductionId, startValidTime, endValidTime, ambientTemperature, antennaMake, atmPhaseCorrection, direction, frequencyRange, pointingModelMode, pointingMethod, numReceptor, polarizationTypes, collOffsetRelative, collOffsetAbsolute, collError, collOffsetTied, reducedChiSquared)[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 antennaMake.
param atmPhaseCorrection.
param direction.
param frequencyRange.
param pointingModelMode.
param pointingMethod.
param numReceptor.
param polarizationTypes.
param collOffsetRelative.
param collOffsetAbsolute.
param collError.
param collOffsetTied.
param reducedChiSquared.
-
newRow(antennaName, receiverBand, calDataId, calReductionId, startValidTime, endValidTime, ambientTemperature, antennaMake, atmPhaseCorrection, direction, frequencyRange, pointingModelMode, pointingMethod, numReceptor, polarizationTypes, collOffsetRelative, collOffsetAbsolute, collError, collOffsetTied, reducedChiSquared)[source]¶ Create a new CalPointingRow 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 CalPointingRow 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 CalPointingRow 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
-
setCollOffsetAbsoluteEqTolerance(tolerance)[source]¶ A setter for the tolerance on collOffsetAbsolute
-
setCollOffsetRelativeEqTolerance(tolerance)[source]¶ A setter for the tolerance on collOffsetRelative
-
setFromFile(directory)[source]¶ Reads and parses a file containing a representation of a CalPointingTable 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.
-
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.
-
setPeakIntensityErrorEqTolerance(tolerance)[source]¶ A setter for the tolerance on peakIntensityError
-
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 “CalPointing.bin” or an XML representation (_fileAsBin==False) will be saved in a file “CalPointing.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.
-