29 #ifndef COMPONENTS_COMPONENTLIST_H
30 #define COMPONENTS_COMPONENTLIST_H
48 template <
class T>
class Vector;
49 template <
class Ms>
class MeasRef;
void setRefFrequency(const casacore::Vector< casacore::Int > &which, const casacore::MVFrequency &newFreq)
set the reference frequency on the specified components to the specified frequency.
A Measure: astronomical direction.
void add(SkyComponent component)
Add a SkyComponent to the end of the ComponentList.
void setShape(const casacore::Vector< casacore::Int > &which, const ComponentShape &newShape)
set the shape on the specified components to the specified one.
void setFlux(const casacore::Vector< casacore::Int > &which, const Flux< casacore::Double > &newFlux)
set the flux on the specified components to the specified flux
casacore::Vector< casacore::Int > selected() const
Returns a casacore::Vector whose indices indicate which components are selected.
std::vector< double > Vector
casacore::Bool itsRewriteTable
casacore::Bool ok() const
casacore::Function which checks the internal data of this class for consistant values.
Main interface class to a read/write table.
Internal value for MFrequency.
ComponentList copy() const
Make a real copy of this componentList.
casacore::uInt itsNelements
void readTable(const casacore::Path &fileName, const casacore::Bool readOnly)
Private function to read the components from disk.
casacore::Bool itsAddOptCol
casacore::Block< SkyComponent > itsList
casacore::Bool toRecord(casacore::String &error, casacore::RecordInterface &outRec) const
void setRefDirection(const casacore::Vector< casacore::Int > &which, const casacore::MVDirection &newDir)
set the reference direction on the specified components to the specified direction.
void writeTable()
Private function to write the components to disk.
static ComponentList::SortCriteria type(const casacore::String &criteria)
Convert a given casacore::String to a Type enumerator.
void setOptParms(const casacore::Vector< casacore::Int > &which, const ComponentShape &newShape)
Read, store, and manipulate an astronomical image based on a component list.
void convertRefDirection(const casacore::Vector< casacore::Int > &which, casacore::MDirection::Types newFrame)
Convert the reference direction frame on the specified components to the specified one...
void sort(ComponentList::SortCriteria criteria)
casacore::Sort the components in the list using the given criteria.
static casacore::String name(ComponentList::SortCriteria enumerator)
Convert the SortCriteria enumerator to a string.
Types
Types of known MDirections Warning: The order defines the order in the translation matrix FromTo in ...
casacore::Block< casacore::Bool > itsSelectedFlags
A Measure: wave characteristics.
casacore::String summarize(casacore::uInt index) const
Summarize specified component as a formatted string.
const casacore::Table & getTable() const
get the underlying table.
Base class for component shapes.
void setSpectrum(const casacore::Vector< casacore::Int > &which, const SpectralModel &newSpectrum)
set the spectrum on the specified components to the specified one.
casacore::Sort the components by distance from the reference, closest first.
void rename(const casacore::Path &newName, const casacore::Table::TableOption option=casacore::Table::New)
Make the ComponentList persistant by supplying a filename.
void setSpectrumParms(const casacore::Vector< casacore::Int > &which, const SpectralModel &newSpectrum)
set the spectrum on the specified components to the specified one.
void deselect(const casacore::Vector< casacore::Int > &index)
deselect the specified component.
casacore::Vector< casacore::String > getStokes(const casacore::Int &which) const
get the associated polarizations as a vector of strings for the specified component.
casacore::uInt nelements() const
returns how many components are in the list.
casacore::MDirection getRefDirection(casacore::Int which) const
void setShapeParms(const casacore::Vector< casacore::Int > &which, const ComponentShape &newShape)
set the shape on the specified components to the specified one.
ComponentList()
Construct a componentList with no members in the list.
bool Bool
Define the standard types used by Casacore.
Base class for spectral models.
Quantities (i.e. dimensioned values)
Flux< casacore::Double > sample(const casacore::MDirection &sampleDir, const casacore::MVAngle &pixelLatSize, const casacore::MVAngle &pixelLongSize, const casacore::MFrequency ¢erFreq) const
Calculate the integrated flux of all the members of the componentlist at the specified direction & fr...
void setRefFrequencyUnit(const casacore::Vector< casacore::Int > &which, const casacore::Unit &unit)
set the reference frequency unit on the specified components to the specified one.
casacore::Bool fromRecord(casacore::String &error, const casacore::RecordInterface &inRec)
methods to store itself as a casacore::Record and recover from a casacore::Record its state ...
casacore::Bool isPhysical(const casacore::Vector< casacore::Int > &index) const
Returns true if all the specified components are physically plausable.
The number of criteria in this enumerator.
void addList(const ComponentList &list)
Add a SkyComponents in a ComponentList to the end of this ComponentList.
void setRefFrequencyFrame(const casacore::Vector< casacore::Int > &which, casacore::MFrequency::Types newFrame)
set the reference frequency frame on the specified components to the specified one.
casacore::Sort the components by ABS(I flux), largest first.
~ComponentList()
The destructor saves the list to disk if it has a name (assigned using the setName member function) ...
void select(const casacore::Vector< casacore::Int > &index)
select the specified component.
void setLabel(const casacore::Vector< casacore::Int > &which, const casacore::String &newLabel)
set the label on the specified components to the specified string
void convertFluxPol(const casacore::Vector< casacore::Int > &which, ComponentType::Polarisation pol)
convert the flux on the specified components to the specified polarisation representation ...
void createTable(const casacore::Path &fileName, const casacore::Table::TableOption option)
Privarte function to create the casacore::Table which will hold the components void createTable(cons...
A class for manipulating groups of components.
A component of a model of the sky.
void getFlux(casacore::Vector< casacore::Quantity > &fluxQuant, const casacore::Int &which) const
get the the flux as a double param: which - the component number (0 based) return The flux as a Quant...
Polarisation
The ways the Flux polarisation can be represented.
ComponentList & operator=(const ComponentList &other)
The assignment operator uses reference semantics.
const ComponentShape * getShape(casacore::Int which) const
get the shape of the specified component as a const pointer.
String: the storage and methods of handling collections of characters.
casacore::Sort the components by fractional polarisation, biggest first.
Vector of three direction cosines.
void setRefDirectionFrame(const casacore::Vector< casacore::Int > &which, casacore::MDirection::Types newFrame)
set the reference direction frame on the specified components to the specified one.
Abstract base class for Record classes.
Types
Types of known MFrequencies Warning: The order defines the order in the translation matrix FromTo in...
const SkyComponent & component(const casacore::uInt &index) const
returns a reference to the specified element in the list.
casacore::Table & _getTable()
void convertFluxUnit(const casacore::Vector< casacore::Int > &which, const casacore::Unit &unit)
convert the flux on the specified components to the specified units
Class to handle angle type conversions and I/O.
TableOption
Define the possible options how a table can be opened.
casacore::Block< casacore::uInt > itsOrder
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.
SortCriteria
Sorting criteria for components.