29 #ifndef BIMA_FILLMETADATA_H
30 #define BIMA_FILLMETADATA_H
136 return ! (*
this == that);
151 li.getRight()->id = -1;
258 return ! (*
this == that);
280 li.getRight()->clear();
445 return find(poltype, li);
586 for(li.toStart(); ! li.atEnd(); ++li)
706 return ! (*
this == that);
729 li.getRight()->id = -1;
730 if (li.getRight()->flds.len() > 0) {
749 if (
flds.
len() > 1)
return true;
757 motion_p =
new std::map<casacore::Double, casacore::OrderedPair<casacore::Double, casacore::Double> >(
775 std::map<casacore::Double, casacore::OrderedPair<casacore::Double, casacore::Double> >::iterator iter
motion_p->begin( );
777 time(i) = iter.getKey();
778 ra(i) = iter.getVal().x();
779 dec(i) = iter.getVal().y();
792 std::map<casacore::Double, casacore::OrderedPair<casacore::Double, casacore::Double> > *
motion_p;
951 return (ddids.isDefined(ddid) ? ddids(ddid) : -1);
969 for(i=
nants-1; i >= 0; i--) {
974 return ((i >= 0) ? i+1 :
nants);
a container for a single Miriad polarization correlation
IDIndex nfidx
the narrow window mapping index.
MirFreqSetup(casacore::Int mir_handle)
create a new setup by reading the relevent variable data from the given miriad dataset handle ...
std::map< casacore::Double, casacore::OrderedPair< casacore::Double, casacore::Double > > * motion_p
t & getRight()
Returns the element to the right of the cursor.
casacore::Int find(casacore::Stokes::StokesTypes pol)
find the position of the given polarization type.
casacore::ListIter< casacore::Stokes::StokesTypes > iter
casacore::Double * rfreq
the rest frequency for each window
casacore::String toString(casacore::Int i) const
return a string representing the i-th polarization
casacore::Float * corbw
the correlator filter bandwidths
casacore::Bool exists() const
static void clearIDs(casacore::List< MirField * > &fldlist)
clear the ID values for all the fields in a field list by setting them to -1.
MirPolCorr(casacore::Int poltype)
create a container.
casacore::Int id
the ID assigned to this setup within the casacore::MeasurementSet being filled.
casacore::Int * nschan
the number of channels in each window
casacore::Stokes::StokesTypes getFirstPolType() const
return the polarization type associated with the first receptor for this correlation type...
void getMotion(casacore::Vector< casacore::Double > &time, casacore::Vector< casacore::Double > &ra, casacore::Vector< casacore::Double > &dec)
load the motion data into the given arrays
SolSysObject solsys
a planet identifier
void clearIDs()
clear all the IDs associated with the polarization correlation types in this list ...
casacore::String name
the source name
casacore::Bool setCorr(casacore::Int poltype)
set the current polarization correlation to the given type.
a container for a set of Miriad (single-) polarization receptor types
an editable container for a set of Miriad polarization correlation types
casacore::Int id
the ID assigned to this field within the casacore::MeasurementSet being filled.
casacore::Float dra
the position offsets
ABSTRACT TOOL CLASSES A PlotTool is a higher level event handler for a PlotCanvas The idea is to take common tasks which may require multiple events and put them in one place PlotTools also provide additional functionality in that they can be active and blocking non blocking The PlotCanvas will only send events to active and will not send events to later tools or event handlers if the latest tool was blocking In this way a single tool can be used to handle ALL user interaction via the GUI at one time
casacore::Int getType() const
return the polarization correlation type in the Miriad convention (i.e.
casacore::Bool operator==(MirFreqSetup &that)
return true if this setup is the same as another.
casacore::Double time
the time of first observation
casacore::Float epoch
the position epoch
casacore::Double freq
the reference frequency for this setup.
void clearID() const
clear the independent ID value
casacore::Bool isMoving()
return true if this source is a moving object (by virtue of having multiple positions added to this c...
static SolSysObject matchSolSysObj(const casacore::String &name)
void addPolsFor(ConstMirPolSetup &pol)
add the polarization types involved in the cross-correlations represented by the correlation types in...
MirSource * findNameIn(casacore::List< MirSource * > &srclist)
return a pointer to a source in a given list of source that has the same name as this source...
casacore::Float * corf
the correlator LO frequencies
MirField * findIn(casacore::List< MirField * > &fldlist)
return a pointer to a field in a given list of fields that is equal to this field.
StokesTypes
The Stokes types are defined by this enum.
a base for classes that rely on assumptions regarding privitive type sizes.
void clear()
clear the id and index maps
MirSource * findIn(casacore::List< MirSource * > &srclist)
return a pointer to a source in a given list of source that is equal to this source.
casacore::Int getSpectralWindowID() const
return the spectral window ID component
static casacore::Int nextID()
static casacore::Stokes::StokesTypes toAips(casacore::Int pol)
convert the Miriad polarization code to the AIPS
void setID(casacore::Int val) const
set the independent ID.
uInt len() const
Returns the length of the list.
casacore::Float * wfreq
the center frequency of each wideband channel
static void clearIDs(casacore::List< MirFreqSetup * > &setuplist)
clear the ID values for all the setups in a setup list by setting them to -1.
casacore::String toString() const
return a string representation of this polarization
casacore::Double * sdf
the frequency separation between channels in each window
casacore::Int row
the first row of this source record appears in the SOURCE table.
virtual ~ConstMirPolSetup()
casacore::Stokes::StokesTypes getSecondPolType() const
return the polarization type associated with the second receptor for the given correlation type...
static String name(StokesTypes stokesType)
convert StokesTypes to String, Stokes::Undefined returns "??".
void toEnd()
This function moves the cursor to the end of the list.
MirFreqSetup * findIn(casacore::List< MirFreqSetup * > &setuplist)
return a pointer to a setup in a given list of setups that is equal to this setup.
casacore::Bool operator==(const DataDescComponents &other) const
virtual uInt pos(uInt)
"pos()" without arguments returns the current postion of the cursor.
linear correlation products
const casacore::List< MirPolCorr > & getCorrs()
return the list of polarization correlation types stored in this set
void addPol(casacore::Stokes::StokesTypes pol)
add a polarization type if it isn't already added.
casacore::Bool operator==(const MirField &that)
return true if this field's offsets match those of another
casacore::Int nspect
the number of spectral windows
void addPosition(casacore::Double mtime, casacore::Double mra, casacore::Double mdec)
add a new position for this source
static const casacore::String solSysNames[]
Planet names.
casacore::List< casacore::Stokes::StokesTypes > pols
casacore::List< MirField * > flds
a list of fields
MirPolCorr & getCurrent()
return the currently selected polarization
casacore::uInt getPolCount() const
return the number of distinct single polarization that make up this setup
casacore::Bool operator==(casacore::Int poltype) const
a container for data buffers used to fill a measurement set
MirSource(casacore::String source, casacore::Double sra, casacore::Double sdec, casacore::Float sepoch, casacore::Double stime=0, casacore::Int sid=-1)
casacore::ListIter< MirPolCorr > iter
casacore::Int getPolarizationID() const
return the polarization ID component
static casacore::Int toMiriad(casacore::Stokes::StokesTypes pol)
convert the Aips casacore::Stokes polarization code to the Miriad convention
MirField(casacore::Float delra, casacore::Float deldec, casacore::Int fid=-1)
create a new field description
bool Bool
Define the standard types used by Casacore.
IDIndex wfidx
the wideband mapping index.
casacore::Double * sfreq
the frequency of the first channel in each window
casacore::Bool hasPol(casacore::Stokes::StokesTypes pol)
return true if the given polarization is present in this list
static casacore::Int nxtid_p
a container for source information
const casacore::List< casacore::Stokes::StokesTypes > & getPols() const
return the unique list of single polarization types that comprise the correlation types...
casacore::Bool offSource()
return true if any of the fields is pointed off the main source position (as given by ra and dec) ...
casacore::Int getID() const
return the independent ID.
casacore::Bool isSolSysObj()
return true if this source is identified as a major solar system object
casacore::Int * ischan
the number of the first channel in each window
virtual ~MirField()
delete this field
a pair of indicies identifying the spectral window and polarization ids that make up a data descripti...
casacore::List< MirPolCorr > corrs
void addRight(t e)
This function adds the element to the right of the current cursor position.
A Table intended to hold astronomical data (a set of Measurements).
casacore::Int nwide
the number of wideband channels
casacore::Bool operator==(const MirPolCorr &that) const
casacore::Bool hasPol(casacore::Stokes::StokesTypes pol) const
return true if the given single polarization type is one of the components of this correlation type ...
DataDescComponents(casacore::Int spwid=-1, casacore::Int polid=-1)
casacore::Int nchan
the total number of spectral line channels
casacore::Int id
the source id
virtual ~MirPolCorr()
delete the container
Doubly linked non-constant list iterator The List class above only provides for the list framework...
casacore::Bool operator!=(MirFreqSetup &that)
return false if this setup is the same as another.
casacore::Stokes::StokesTypes getCurrentAipsType()
return the AIPS type for the current polarization.
a container for field information
void clear()
remove all ID mappings.
casacore::Bool find(casacore::Int poltype, casacore::ConstListIter< MirPolCorr > &li)
A class to provide easy read-write access to MeasurementSet columns.
casacore::Double ra
the initial source position
a static container for a set of Miriad polarization correlation types
void addCorr(casacore::Int poltype)
add a new correlation type to this list.
String: the storage and methods of handling collections of characters.
casacore::Float * wwidth
the bandwidth of each wideband channel
static const casacore::Stokes::StokesTypes corratopol[]
static casacore::String polToString(casacore::Stokes::StokesTypes pol)
return a string representing the given polarization
casacore::Stokes::StokesTypes getAipsType() const
return the AIPS++ casacore::Stokes type for the current polarization
const t & getRight() const
Returns the element to the right of the cursor.
void resize(size_t len, Bool copyValues=False)
casacore::Bool operator!=(const MirField &that)
return false if this field's offsets match those of another
casacore::Bool hasCorr(casacore::Int poltype)
return true if the given polarization correlation type is a member of this set
casacore::Bool operator==(const MirSource &that)
return true if this source is the same as another.
MirPolCorr(const MirPolCorr &that)
create a copy of a container.
casacore::Bool isPlanet()
return true if this source is identified as a planet
an abstract base for classes that contain information about some part of a Miriad Dataset ...
void toStart()
This function moves the cursor to the beginning of the list.
casacore::Bool operator!=(const MirSource &that)
return false if this source is the same as another.
casacore::uInt getCorrCount()
return the number of polarization correlation types in this setup
a simple mapping from one indexing system to another
casacore::Bool setCorr(casacore::Int poltype)
set the current polarization correlation to the given type.
casacore::Int mode
the correlator mode
static void clearIDs(casacore::List< MirSource * > &srclist)
clear the ID values for all the source in a source list by setting them to -1.
static const casacore::Stokes::StokesTypes corrbtopol[]
void addPolsFor(const MirPolCorr &pol)
add the polarization types involved in the cross-correlation represented by the given correlation typ...
A description of a Miriad spectroscopy (correlator) setup.
casacore::Stokes::StokesTypes getPol(casacore::Int i) const
return the i-th polarization
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.