CalAtmosphereTable

class CalAtmosphereTable(container)[source]

Bases: object

The CalAtmosphereTable class is an Alma table.

Results of atmosphere calibration by TelCal. This calibration determines the system temperatures corrected for atmospheric absorption. Ionospheric effects are not dealt with in the Table.

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

basebandName

identifies the baseband. key.

Type

BasebandName

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 result validity period.

Type

ArrayTime

endValidTime

the end time of result validity period.

Type

ArrayTime

numFreq

the number of frequency points.

Type

int

numLoad

the number of loads.

Type

int

numReceptor

the number of receptors.

Type

int

forwardEffSpectrum

Array(numReceptor, numFreq) the spectra of forward efficiencies (one value per receptor, per frequency).

Type

float [] []

frequencyRange

Array(2) the frequency range.

Type

Frequency []

groundPressure

the ground pressure.

Type

Pressure

groundRelHumidity

the ground relative humidity.

Type

Humidity

frequencySpectrum

Array(numFreq) the frequencies.

Type

Frequency []

groundTemperature

the ground temperature.

Type

Temperature

polarizationTypes

Array(numReceptor) the polarizations of the receptors (an array with one value per receptor).

Type

PolarizationType []

powerSkySpectrum

Array(numReceptor, numFreq) the powers on the sky (one value per receptor per frequency).

Type

float [] []

powerLoadSpectrum

Array(numLoad, numReceptor, numFreq) the powers on the loads (one value per load per receptor per frequency).

Type

float [] [] []

syscalType

the type of calibration used.

Type

SyscalMethod

tAtmSpectrum

Array(numReceptor, numFreq) the spectra of atmosphere physical temperatures (one value per receptor per frequency).

Type

Temperature [] []

tRecSpectrum

Array(numReceptor, numFreq) the spectra of the receptors temperatures (one value per receptor per frequency).

Type

Temperature [] []

tSysSpectrum

Array(numReceptor, numFreq) the spectra of system temperatures (one value per receptor per frequency).

Type

Temperature [] []

tauSpectrum

Array(numReceptor, numFreq) the spectra of atmosheric optical depths (one value per receptor per frequency).

Type

float [] []

tAtm

Array(numReceptor) the atmosphere physical temperatures (one value per receptor).

Type

Temperature []

tRec

Array(numReceptor) the receptors temperatures (one value per receptor).

Type

Temperature []

tSys

Array(numReceptor) the system temperatures (one value per receptor).

Type

Temperature []

tau

Array(numReceptor) the atmospheric optical depths (one value per receptor).

Type

float []

water

Array(numReceptor) the water vapor path lengths (one value per receptor).

Type

Length []

waterError

Array(numReceptor) the uncertainties of water vapor contents (one value per receptor).

Type

Length []

alphaSpectrum

Array(numReceptor, numFreq) the alpha coefficients, two loads only (one value per receptor per frequency). Optional.

Type

float [] []

forwardEfficiency

Array(numReceptor) the forward efficiencies (one value per receptor). Optional.

Type

float []

forwardEfficiencyError

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

Type

float []

sbGain

Array(numReceptor) the relative gains of LO1 sideband (one value per receptor). Optional.

Type

float []

sbGainError

Array(numReceptor) the uncertainties on the relative gains of LO1 sideband (one value per receptor). Optional.

Type

float []

sbGainSpectrum

Array(numReceptor, numFreq) the spectra of relative sideband gains (one value per receptor per frequency). Optional.

Type

float [] []

Methods Summary

Key(antennaName, receiverBand, basebandName, …)

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 CalAtmosphere (CalAtmosphereTable.xsd).

get()

Get all rows.

getContainer()

Return the container to which this table belongs.

getEntity()

Returns the table’s entity.

getFrequencyRangeEqTolerance()

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

getFrequencySpectrumEqTolerance()

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

getGroundPressureEqTolerance()

A getter for the tolerance on groundPressure Returns the tolerance as a Pressure

getGroundRelHumidityEqTolerance()

A getter for the tolerance on groundRelHumidity Returns the tolerance as a Humidity

getGroundTemperatureEqTolerance()

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

getKeyName()

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

getName()

Return the name of this table.

getRowByKey(antennaName, receiverBand, …)

Returns a CalAtmosphereRow given a key.

getRows()

get the rows, synonymous with the get method.

getTAtmEqTolerance()

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

getTAtmSpectrumEqTolerance()

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

getTRecEqTolerance()

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

getTRecSpectrumEqTolerance()

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

getTSysEqTolerance()

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

getTSysSpectrumEqTolerance()

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

getVersion()

getWaterEqTolerance()

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

getWaterErrorEqTolerance()

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

lookup(antennaName, receiverBand, …)

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

newRow(antennaName, receiverBand, …)

Create a new CalAtmosphereRow initialized to the specified values.

newRowCopy(row)

Create a new row using a copy constructor mechanism.

newRowDefault()

Create a new row with default values.

setEntity(e)

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

setFrequencyRangeEqTolerance(tolerance)

A setter for the tolerance on frequencyRange

setFrequencySpectrumEqTolerance(tolerance)

A setter for the tolerance on frequencySpectrum

setFromFile(directory)

Reads and parses a file containing a representation of a CalAtmosphereTable 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.

setGroundPressureEqTolerance(tolerance)

A setter for the tolerance on groundPressure

setGroundRelHumidityEqTolerance(tolerance)

A setter for the tolerance on groundRelHumidity

setGroundTemperatureEqTolerance(tolerance)

A setter for the tolerance on groundTemperature

setNotPresentInMemory()

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

setTAtmEqTolerance(tolerance)

A setter for the tolerance on tAtm

setTAtmSpectrumEqTolerance(tolerance)

A setter for the tolerance on tAtmSpectrum

setTRecEqTolerance(tolerance)

A setter for the tolerance on tRec

setTRecSpectrumEqTolerance(tolerance)

A setter for the tolerance on tRecSpectrum

setTSysEqTolerance(tolerance)

A setter for the tolerance on tSys

setTSysSpectrumEqTolerance(tolerance)

A setter for the tolerance on tSysSpectrum

setVersion(version)

setWaterEqTolerance(tolerance)

A setter for the tolerance on water

setWaterErrorEqTolerance(tolerance)

A setter for the tolerance on waterError

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 CalAtmosphere (CalAtmosphereTable.xsd).

Methods Documentation

Key(antennaName, receiverBand, basebandName, 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 CalAtmosphere (CalAtmosphereTable.xsd).

get()[source]

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

getContainer()[source]

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

getEntity()[source]

Returns the table’s entity.

getFrequencyRangeEqTolerance()[source]

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

getFrequencySpectrumEqTolerance()[source]

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

getGroundPressureEqTolerance()[source]

A getter for the tolerance on groundPressure Returns the tolerance as a Pressure

getGroundRelHumidityEqTolerance()[source]

A getter for the tolerance on groundRelHumidity Returns the tolerance as a Humidity

getGroundTemperatureEqTolerance()[source]

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

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.

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

Returns a CalAtmosphereRow 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 basebandName.

param calDataId.

param calReductionId.

getRows()[source]

get the rows, synonymous with the get method.

getTAtmEqTolerance()[source]

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

getTAtmSpectrumEqTolerance()[source]

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

getTRecEqTolerance()[source]

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

getTRecSpectrumEqTolerance()[source]

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

getTSysEqTolerance()[source]

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

getTSysSpectrumEqTolerance()[source]

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

getVersion()[source]
getWaterEqTolerance()[source]

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

getWaterErrorEqTolerance()[source]

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

lookup(antennaName, receiverBand, basebandName, calDataId, calReductionId, startValidTime, endValidTime, numFreq, numLoad, numReceptor, forwardEffSpectrum, frequencyRange, groundPressure, groundRelHumidity, frequencySpectrum, groundTemperature, polarizationTypes, powerSkySpectrum, powerLoadSpectrum, syscalType, tAtmSpectrum, tRecSpectrum, tSysSpectrum, tauSpectrum, tAtm, tRec, tSys, tau, water, waterError)[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 basebandName.

param calDataId.

param calReductionId.

param startValidTime.

param endValidTime.

param numFreq.

param numLoad.

param numReceptor.

param forwardEffSpectrum.

param frequencyRange.

param groundPressure.

param groundRelHumidity.

param frequencySpectrum.

param groundTemperature.

param polarizationTypes.

param powerSkySpectrum.

param powerLoadSpectrum.

param syscalType.

param tAtmSpectrum.

param tRecSpectrum.

param tSysSpectrum.

param tauSpectrum.

param tAtm.

param tRec.

param tSys.

param tau.

param water.

param waterError.

newRow(antennaName, receiverBand, basebandName, calDataId, calReductionId, startValidTime, endValidTime, numFreq, numLoad, numReceptor, forwardEffSpectrum, frequencyRange, groundPressure, groundRelHumidity, frequencySpectrum, groundTemperature, polarizationTypes, powerSkySpectrum, powerLoadSpectrum, syscalType, tAtmSpectrum, tRecSpectrum, tSysSpectrum, tauSpectrum, tAtm, tRec, tSys, tau, water, waterError)[source]

Create a new CalAtmosphereRow 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 CalAtmosphereRow 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 CalAtmosphereRow 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.

setEntity(e)[source]

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

setFrequencyRangeEqTolerance(tolerance)[source]

A setter for the tolerance on frequencyRange

setFrequencySpectrumEqTolerance(tolerance)[source]

A setter for the tolerance on frequencySpectrum

setFromFile(directory)[source]

Reads and parses a file containing a representation of a CalAtmosphereTable 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.

setGroundPressureEqTolerance(tolerance)[source]

A setter for the tolerance on groundPressure

setGroundRelHumidityEqTolerance(tolerance)[source]

A setter for the tolerance on groundRelHumidity

setGroundTemperatureEqTolerance(tolerance)[source]

A setter for the tolerance on groundTemperature

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.

setTAtmEqTolerance(tolerance)[source]

A setter for the tolerance on tAtm

setTAtmSpectrumEqTolerance(tolerance)[source]

A setter for the tolerance on tAtmSpectrum

setTRecEqTolerance(tolerance)[source]

A setter for the tolerance on tRec

setTRecSpectrumEqTolerance(tolerance)[source]

A setter for the tolerance on tRecSpectrum

setTSysEqTolerance(tolerance)[source]

A setter for the tolerance on tSys

setTSysSpectrumEqTolerance(tolerance)[source]

A setter for the tolerance on tSysSpectrum

setVersion(version)[source]
setWaterEqTolerance(tolerance)[source]

A setter for the tolerance on water

setWaterErrorEqTolerance(tolerance)[source]

A setter for the tolerance on waterError

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 “CalAtmosphere.bin” or an XML representation (_fileAsBin==False) will be saved in a file “CalAtmosphere.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 CalAtmosphere (CalAtmosphereTable.xsd).

returns a string containing the XML representation.