- Stokes values converted to string representation
units - String - units of the arr array (the data units)
arr (TpArrayFloat || TpArrayComplex)(nchan, nstokes)
flag TpArrayBool (nchan, nstokes)
when flag(i,j) == True arr(i,j) is bad and should
not be used
weight TpArrayFloat (nchan, nstokes)
sigma TpArrayFloat (nchan, nstokes)
header TpRecord (fixed)
time - MEpoch as a MeasureHolder
scan_number - TpInt
source_name - TpString
direction - MDirection as a MeasureHolder
refdirection - MDirection as a MeasureHolder
veldef - TpString - velocity definition (RADIO, OPTICAL, ...)
transition - TpString
exposure - Double - seconds
duration - DOuble - seconds
observer - TpString
project - TpString
resolution - Double - channel resulution at reffrequency - Hz
bandwidth - Double - total bandwidth - Hz
tcal - TpArrayFloat(nstokes) - K
trx - TpArrayFloat(nstokes) - K
tsys - TpArrayFloat(nstokes) - K
telescope - TpString
telescope_position - MPosition as MeasureHolder
pressure - hPa
dewpoint - K
tambient - K
wind_dir - rad
wind_speed - m/s
azel - MDirection as MeasureHolder
hist TpArrayString - the history of this SDRecord
other - TpRecord - the contents of this depend on the data source
if the source is a MeaurementSet, this record contains sub-records having
the same names as the subtables found in the MeasurementSet. The contents of
these records will be the appropriate single row from that subtable.
Each record has an interp_method attribut which is a String that indicates
how that row was filled from the Measurements. "direct" means that the
row was directly indexed and no interpolation was necessary. "nearest" means
that the nearest row in time and falling within the appropriate interval,
as appropriate, was used. Other interpolation schemes are planned.
In addition to the sub-table records, there will also be a "keys" record to
hold the keys from the Main table. Non-standard subtables will be included
here IF they have a TIME column and optionally an INTERVAL column or if they
have an NS_KEYS keyword which indicates integer key columns.
if the source is a table from an SDFITS binary table, any column/keyword not used
should be added to an sdfits subrecord in the other record.
if the source is an Image, any information not used in data and header should be
added to an image subrecord in the other record
Anything with the above structure is a valid SDRecord
It is intended to hold data originally from a
MeasurementSet, a table constructed from an SDFITS table, or from
an image cube and still be independent from these original data sources.
As such, the data and header and intended to contain the most comonly
used standard information about single dish data. Some data sources,
most notably the MeasurementSet, will also typically duplicate some of
the information found in the data and header records in the
other records.
This class also provides convenient access to the
required fields.
Example
Motivation
DISH works on individual rows of a MS and this structure helps that.
Thrown Exceptions
To Do
- Should there be some indication where an SDRecord came from (appart from anything in the history)
- Is the overhead in flag, weight, and sigma too much for most cases?
- Should a CoordinateSystem be used instead of the contents of desc?
Member Description
friend ostream& operator<< (ostream& os, const SDRecord& rec)
This is mostly useful during debugging
SDRecord(DataType dataType = TpFloat)
The default SDRecord has the basic structure but indicates
an empty data array, a default CoordinateSystem, empty
header values and indexes.
Primarily useful for assignments except within SDIterator
which starts from this and constructs the full record.
The type of an SDRecord can be either TpFloat or TpComplex.
This determines the data type of the arr field and it must
be set when the SDRecord is first constructed.
SDRecord(const SDRecord& other)
SDRecords are generally constructed within an SDIterator
Sets this to an empty SDRecord and raises the error flag
if other is not valid. The data type of this SDRecord will be
the same as that of other
SDRecord& operator=(const SDRecord& other)
the data sub-record
the desc sub-record
the header record
the history vector
the other record
resize all standard array fields to be consistent with the new data shape
return the current data shape
verify that this SDRecord is still valid
verify that this SDRecord is consistent, a message describing the first failed inconsistency
is return in errmsg when the return value is False.
DataType arrType() const
what type of a data array is this
These methods provide quick access to some fields.
Quick access to the data array.
One of farr and carr will be empty, depending on the type of record.
arr field when this contains Complex data
Quick access to the data array.
One of farr and carr will be empty, depending on the type of record.
verify that a record is a valid SDRecord
return the minimum required description
ostream & show(ostream &os) const
used by ostream << operator
static ostream & showRecord(ostream &os, const Record &rec)
this actually does the work, hierachically on each subrecord
function to initialize itsBasicDesc and itsBasicComplexDesc
initialize the pointers
set the default values
set the default values for variable shaped matrices
set the default values for variable shaped vectors
get shape from the arr field
function to set all fields to their default values by type