|
|||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Class Summary | |
AEDF | An abstract class for the AEDF types This class defines a set of properties and methods common to all the AEDF basic classes. |
AlmaCorrelatorMode | Processor mode information. |
AlmaCorrelatorModeTable | |
Antenna | Antenna characteristics. |
AntennaTable | |
CalDevice | Calibration device characteristics. |
CalDeviceTable | |
CalWidget | CalWidget : calibration widgets. |
CalWidgetTable | |
ConfigDescription | Configuration description. |
ConfigDescriptionTable | |
DataDescription | Data description tableThis table sets a referential constraint in the AEDF. |
DataDescriptionTable | |
Doppler | Doppler tracking information. |
DopplerTable | |
ExecuteSummary | Schedule and Execute summary. |
ExecuteSummaryTable | |
Feed | Feed charactersitics. |
FeedTable | |
Field | Field position for each source. |
FieldTable | |
FlagCmd | Flag commands. |
FlagCmdTable | |
Focus | Focus information. |
FocusTable | |
FreqOffset | Frequency offset information. |
FreqOffsetTable | |
GainCurve | Gain curves in pointed directions. |
GainCurveTable | |
GainTracking | Antenna gain tracking information. |
GainTrackingTable | |
History | History information. |
HistoryTable | |
Main | Data, coordinates and flags. |
MainTable | |
ObsSummary | Observation summary information. |
ObsSummaryTable | |
ObsUnit | Observation unit characteristics. |
ObsUnitTable | |
Pointing | Antenna pointing information. |
PointingTable | |
Polarization | Polarization information. |
PolarizationTable | |
Processor | Processor characteristics. |
ProcessorTable | |
Receiver | Receiver properties. |
ReceiverTable | |
ScanSummary | Scan summary information. |
ScanSummaryTable | |
Schedule | Schedule characteristics. |
ScheduleTable | |
Seeing | Seeing information. |
SeeingTable | |
Source | Source information. |
SourceParameter | Source parameter information. |
SourceParameterTable | |
SourceTable | |
SpectralWindow | Spectral window description. |
SpectralWindowTable | |
State | State information. |
StateTable | |
SwitchCycle | Cycle information in switching modes. |
SwitchCycleTable | |
SysCal | System calibration. |
SysCalTable | |
Table | A abstract class ancestor of all tables of AEDF instances. |
TestTable1 | A simple test program. |
TestTable2 | A simple test program. |
TestTablePerf1 | |
TestXPath | A simple test program. |
TotPowMonitoring | Total power data monitoring. |
TotPowMonitoringTable | |
Weather | Weather station information. |
WeatherTable | |
WvmCal | Radiometric calibration method. |
WvmCalTable |
Exception Summary | |
AEDFException | A Exception class to report problems occurring with classes in this packages. |
Provides classes implementing the different types of data structures defined in the Alma Export Data Format document and tables of these structures.
Type | "non-defined" value |
---|---|
int | Integer.MIN_VALUE |
float | Float.NaN |
double | Double.NaN |
String | null |
any array | null |
Antenna
implements the AEDF ANTENNA
which is defined as follows :
ANTENNA : antenna characteristics | |
---|---|
Characteristic name | Characteristic type |
NAME | String |
STATION | String |
TYPE | String |
MOUNT | String |
POSITION | Double(3) |
OFFSET | Double(3) |
DISH_DIAMETER | Double |
ORBIT_ID | Int |
MEAN_ORBIT | Double(6) |
PHASED_ARRAY_ID | Double |
FLAG_ROW | Bool |
Antenna
class can be created as follows:
import alma.aedf.types.Antenna; . . . String name; String station; String type; String mount; double[] position; double[] offset; double dishDiameter; int orbitId; double[] meanOrbit; int phasesArrayId; boolean flagRow; . . // Assign appropriate values to every variable declared above. // and build an instance of Antenna Antenna myAntenna = new Antenna(name, station, type, mount, position, offset, dishDiameter, orbitId, meanOrbit, phasesArrayId, flagRow);
import alma.aedf.types.Antenna; Antenna myAntenna; . . . // Some code to instantiate myAntenna . . // Use some setters and getters. myAntenna.setMount("Mount31"); double offset = {10.0, 10.0, -4.}; myAntenna.setOffset(offset); double[] position = myAntenna.getPosition(); if (position != null) { System.out.println(position[0]+","+position[1]+","+position[2]); }
toTR produces a String
whose content
is the XML representation of this instance. This representation consists
of a TR element with a collection of TD children elements.
Example:
import alma.aedf.types.DataDescription;
.
.
.
DataDescription myDD = new DataDescription(1, 2, -1, false);
System.out.println(myDD.toTR());
.
.
.
should display :
<TD>1</TD><TD>2</TD><TD>-1</TD><TD>false</TD>
Tables of AEDF classes instances.
For each AEDF class there is a class implementing a table of instances of this AEDF class. The
name of such a table consists of the word Table
appended to the name of the AEDF class.
For example the Antenna
class has its AntennaTable
class.
Creating a table.
A table can be created and filled in different ways :
- using a constructor.
- reading and parsing its VO Table representation, i.e. with a call to
fromXML
static method.
Example with a constructor.
import alma.aedf.type.SpectralWindow;
import alma.aedf.type.SpectralWindowTable;
SpectralWindowTable mySPWinTable;
.
.
try {
mySPWinTable = new SpectralWindowTable("myUID", "myProjectUID");
}
catch (Exception e) {
e.printStackTrace();
}
One can see that the constructor expects two String
arguments. Both are
used to store identifiers; the first one is the identifier of the table itself in some archiving system
(very likely the ALMA Archiving system) and the second one the identifier of the project
this table belongs to. Once it's created the table is empty, it contains no SpectralWindow
instances, a call to its nRows
returns 0
.
Example with a call to fromXML
.
import alma.aedf.types.SpectralWindowTable;
String xmlString;
/*
** Here some code to assign to xmlString the text of a VO Table describing
** a SpectralWindow table (e.g. retrieving it from the Archive, or reading it
** in a file).
**
*/
.
.
.
/*
** Then build a SpectralWindowTable from the value of xmlString.
*/
SpectralWindowTable mySPWin = SpectralWindowTable.fromXML(xmlString);
System.out.println("This table belongs to project with UID = " + spt.getProjectUID());
System.out.println("It has " + spt.nRows() + " rows");
The table created with this method, contains as many instances of SpectralWindow
as there are TR
elements in the TABLEDATA
part of the VO Table. One can see in the example above the use of two querying
methods getProjectUID
and nRows
returning
respectively the identifier of the project the table belongs to and the number
of SpectralWindow instances stored in it.
Adding a row in a table: add
.
Example
import alma.aedf.types.DataDescription;
import alma.aedf.types.DataDescriptionTable;
DataDescription myDDTable = new DataDescriptionTable("someId", "someProjectId");
System.out.println(myDDTable.nRows);
myDDTable.add(new DataDescription(1, 2, -1, false));
System.out.println(myDDTable.nRows);
.
.
The DataDescriptionTable instance initially contains no DataDescription instance, then one
DataDescription is added to the table. The example above output successively 0 and 1.
Set methods
The most important/useful set methods are :
-
setProjectUID
to set the project's UID (the string that is used to reference
the project this table belongs to in the archive).
Get methods
Useful get methods are :
-
getRow
: returns an instance of the AEDF class that this table contains. The method
takes as an argument the index of the instance that one wants to retrieve.
Example:
int SpectralWindowId = myDDTable.getRow(2).getSpectralWindowId();
int numChan = mySPWinTable.getRow(1).getNumChan();
double freq0 = mySPWinTable.getRow(1).getChanFreq()[4];
-
nRows
: returns the number of AEDF class instances that this table contains.
-
getProjectUID
: returns the project's UID (the string that is used to reference
the project this table belongs to in the archive).
-
VO Table output : toXML
This method returns the VO Table representation of the table :
Example:
import alma.aedf.types.DataDescription;
import alma.aedf.types.DataDescriptionTable;
.
.
DataDescriptionTable myDDTable = new DataDescriptionTable("someUID", "someProjectUID");
myDDTable.add(new DataDescription(0, 0, -1, false));
myDDTable.add(new DataDescription(1, 2, -1, false));
String xmlString = myDDTable.toXML();
System.out.println(xmlString);
displays :
<?xml version="1.0"?>
<!-- New document created at Thu Jan 29 11:03:32 CET 2004 -->
<VOTABLE version="1">
<RESOURCE name="PARAMS">
<PARAM datatype="char" name="AEDF_TYPE" value="DATA_DESCRIPTION">
<DESCRIPTION>Data description table. This table defines the shape of
the associated DATA in MAIN, and is indexed directly by DATA_DESC_ID.
</DESCRIPTION>
</PARAM>
<PARAM datatype="char" name="PROJECT_UID" value="TBD">
<DESCRIPTION>This parameter contains the identifier of the project this table
belongs to.
</DESCRIPTION>
</PARAM>
</RESOURCE>
<RESOURCE name="TABLE">
<TABLE>
<FIELD datatype="int" name="SPECTRAL_WINDOW_ID">
<DESCRIPTION>
Spectral Window Identifier (0-based index into the collection of TABLEDATA's
TRs children of the attached SPECTRAL_WINDOW VOTABLE. )
</DESCRIPTION>
</FIELD>
<FIELD datatype="int" name="POLARIZATION_ID">
<DESCRIPTION>Polarization Identifier (0-based index into the collection of
TABLEDATA's TRs children of the attached SPECTRAL_WINDOW VOTABLE.) </DESCRIPTION>
</FIELD>
<FIELD datatype="int" name="LAG_ID">
<DESCRIPTION>Lag function identifier</DESCRIPTION>
</FIELD>
<FIELD datatype="boolean" name="FLAG_ROW">
<DESCRIPTION>Row Flag</DESCRIPTION>
</FIELD>
<DATA>
<TABLEDATA>
<TR>
<TD>0</TD><TD>0</TD><TD>-1</TD><TD>false</TD>
</TR>
<TR>
<TD>1</TD><TD>2</TD><TD>-1</TD><TD>false</TD>
</TR>
</TABLEDATA>
</DATA>
</TABLE>
</RESOURCE>
</VOTABLE>
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES