casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ComponentList.h
Go to the documentation of this file.
1 //# ComponentList: this defines ComponentList.h
2 //# Copyright (C) 1996,1997,1998,1999,2000,2001,2002
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //#
27 //# $Id: ComponentList.h 21229 2012-04-02 12:00:20Z gervandiepen $
28 
29 #ifndef COMPONENTS_COMPONENTLIST_H
30 #define COMPONENTS_COMPONENTLIST_H
31 
32 
33 #include <casa/aips.h>
37 #include <casa/Containers/Block.h>
38 #include <tables/Tables/Table.h>
39 
40 namespace casacore{
41 
42 class String;
43 class Path;
44 class MVDirection;
45 class MVFrequency;
46 class MVAngle;
47 class Unit;
48 template <class T> class Vector;
49 template <class Ms> class MeasRef;
50 }
51 
52 namespace casa { //# NAMESPACE CASA - BEGIN
53 
54 
55 // <summary> A class for manipulating groups of components </summary>
56 
57 // <use visibility=export>
58 
59 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
60 // </reviewed>
61 
62 // <prerequisite>
63 // <li> <linkto class="SkyCompBase">SkyCompBase</linkto>
64 // </prerequisite>
65 //
66 // <etymology>
67 // Because the SkyComponents were originally stored in a linked list
68 // ComponentList seemed like a good name for this class. Now the list is gone
69 // (in favour of a casacore::Block<SkyComponent>) but the name has stuck.
70 // </etymology>
71 //
72 // <synopsis>
73 
74 // This class is a container that allows many SkyComponents to be grouped
75 // together and manipulated as one large compound component. The major
76 // operations of this class are:
77 // <dl>
78 // <dt> Functions to traverse the list and extract individual components
79 // <dd> See the <src>nelements</src> & <src>component</src> functions
80 // <dt> Functions to add and delete components.
81 // <dd> See the <src>add</src>, <src>remove</src> & <src>copy</src> functions
82 // <dt> Functions to designate components as being selected or not.
83 // <dd> See the <src>select</src>, <src>deselect</src> & <src>selected</src>
84 // functions
85 // <dt> Functions to sample the flux of the components in any direction and
86 // frequency or to grid them onto an Image.
87 // <dd> See the <src>sample</src> & <src>project</src> functions.
88 // <dt> Functions to save the components to a table and read them back
89 // again
90 // <dd> See the <src>rename</src> function and the appropriate constructor.
91 // <dt> Functions to manipulate the flux of all components
92 // <dd> See the <src>setFlux</src>, <src>convertFluxUnit</src> &
93 // <src>convertFluxPol</src> functions.
94 // <dt> Functions to manipulate the reference direction of all components
95 // <dd> See the <src>setRefDirection</src> & <src>convertRefFrame</src>
96 // functions.
97 // <dt> functions to sort the components
98 // <dd> See the <src>sort</src>, <src>type</src> &
99 // <src>namel</src> functions.
100 // </dl>
101 
102 // ComponentLists are memory based objects that can write their contents to and
103 // from disk (ie a casacore::Table). To read a componentList from a casacore::Table the appropriate
104 // constructor must be used. Alternatively an empty componentlist can be
105 // created that is not associated with a Table. To save the list to disk it
106 // must be given a name. This is done using the rename function. This will
107 // rename the casacore::Table if the ComponentList was already associated with a Table.
108 // Saving changes to the table on disk happens automatically when the list
109 // is destructed or reset via the assignment operator (unless the table was
110 // opened read-only).
111 
112 // The elements of a componentlist (ie., SkyComponents) are accessed via the
113 // component functions. These functions return the SkyComponent by reference
114 // and hence manipulating the supplied component manipulates the specified
115 // element of the list.
116 
117 // </synopsis>
118 //
119 // <example>
120 // These examples are coded in the tComponentList.h file.
121 // <h4>Example 1:</h4>
122 // In this example a ComponentList object is created and used to calculate the
123 // ...
124 // <srcblock>
125 // </srcblock>
126 // </example>
127 //
128 // <motivation>
129 // A way was needed to read/write groups of components to disk and
130 // manipulate them as a whole.
131 // </motivation>
132 //
133 // <thrown>
134 // <li> casacore::AipsError - If an internal inconsistancy is detected, when compiled in
135 // debug mode only.
136 // </thrown>
137 //
138 // <todo asof="1998/05/22">
139 // <li> Nothing I hope. But I expect users will disagree.
140 // </todo>
141 
143 public:
144  // Sorting criteria for components
146  // casacore::Sort the components by ABS(I flux), largest first.
147  FLUX = 0,
148  // casacore::Sort the components by distance from the reference, closest first.
150  // casacore::Sort the components by fractional polarisation, biggest first.
152  // No sorting is necessary
154  // The number of criteria in this enumerator
156  };
157  // Construct a componentList with no members in the list
158  ComponentList();
159 
160  // Read a componentList from an existing table. By default the casacore::Table is
161  // opened read-write. Any subsequent changes made to a list opened
162  // read-only (i.e. via add(), remove(), or editing a non-const member
163  // component returned by component()) will not be saved to disk.
164  //
165  // rewriteTable indicates if the table, if it exists and is not readOnly, should be
166  // rewritten on copies (operator=()) and on destruction. Rewriting this table is always
167  // how it has worked in the past (which is why the default is true), however, classes
168  // like ComponentListImage must be able to write things like metadata and subtables to
169  // the main table (so need write access), but do not alter data in the main table, so
170  // that rewriting the main table is unnecessary. Rewriting the table also causes an
171  // increase in the table size on disk. This occurs even when the data being written is
172  // identical to the the data being overwritten, and on the surface seems to be a bug,
173  // but requires more investigation.
174  //
175  // In any case, rewriting the entire table seems overkill, and this needs to be addressed.
176  // The table should only be written to when data are changed. CAS-10717 is meant to address
177  // this, although it will take some effort to complete. The main issue is that the non-const
178  // version of method component() needs to be removed, because it allows callers to change
179  // SkyComponent data without the knowledge of the ComponentList object. This breaks
180  // encapsulation; when changing an object's data, the object should be aware.
182  const casacore::Path& fileName, casacore::Bool readOnly=false,
183  casacore::Bool rewriteTable=casacore::True
184  );
185 
186  // The Copy constructor uses reference semantics
187  ComponentList(const ComponentList& other);
188 
189  // The destructor saves the list to disk if it has a name (assigned using the
190  // setName member function)
191  ~ComponentList();
192 
193  // The assignment operator uses reference semantics
194  ComponentList& operator=(const ComponentList& other);
195 
196  // Returns true if all the specified components are physically plausable. See
197  // the isPhysical function in the
198  // <linkto class="SkyCompBase">SkyCompBase</linkto> class
199  // for a precise definition of what this means.
200  // <thrown>
201  // <li> casacore::AipsError - If the index is equal to or larger than the number of
202  // elements in the list or less than zero
203  // </thrown>
205 
206  // Calculate the integrated flux of all the members of the componentlist at
207  // the specified direction & frequency, in a pixel of specified size.
209  const casacore::MVAngle& pixelLatSize,
210  const casacore::MVAngle& pixelLongSize,
211  const casacore::MFrequency& centerFreq) const;
212 
213  // Same as the previous function except that many directions & frequencies
214  // are done at once. The Flux is added into the values supplied in the
215  // samples argument and this cube must have dimensions of:
216  // [4, nDirs, nFreqs]. The polarisation and units of the flux added are
217  // specified with the reqUnit and reqPol arguments.
219  const casacore::Unit& reqUnit,
220  const casacore::Vector<casacore::MVDirection>& directions,
222  const casacore::MVAngle& pixelLatSize,
223  const casacore::MVAngle& pixelLongSize,
224  const casacore::Vector<casacore::MVFrequency>& frequencies,
225  const casacore::MeasRef<casacore::MFrequency>& freqRef) const;
226 
227  // Add a SkyComponent to the end of the ComponentList. The list length is
228  // increased by one when using this function. By default the newly added
229  // component is not selected. Note that it is possible to add a component
230  // to a list that was opened read-only; however, the table on disk will
231  // not be updated with new component.
232  void add(SkyComponent component);
233 
234  // Add a SkyComponents in a ComponentList to the end of this ComponentList. The list length is
235  // increased by the number of components in the added list. By default the newly added
236  // components are not selected. Note that it is possible to add a component list
237  // to a list that was opened read-only; however, the table on disk will
238  // not be updated with new components.
239  void addList(const ComponentList& list);
240 
241  // Remove the specified SkyComponent(s) from the ComponentList. After
242  // removing a component all the components with an indices greater than this
243  // one will be reduced by one. For example in a five element list removing
244  // elements [0,2,4] will result in a two element list, now indexed as
245  // elements zero and one, containing what was previously the second and
246  // fourth components. Note that it is possible to remove a component
247  // from a list that was opened read-only; however, the table on disk will
248  // not be updated accordingly.
249  // <thrown>
250  // <li> casacore::AipsError - If the index is equal to or larger than the number of
251  // elements in the list or is negative.
252  // </thrown>
253  // <group>
254  void remove(const casacore::uInt& index);
255  void remove(const casacore::Vector<casacore::Int>& indices);
256  // </group>
257 
258  // returns how many components are in the list.
259  casacore::uInt nelements() const;
260 
261  // deselect the specified component. Throws an exception (casacore::AipsError) if any
262  // element in the index is out of range, ie. index >= nelements().
263  // <thrown>
264  // <li> casacore::AipsError - If the index is equal to or larger than the number of
265  // elements in the list or less than zero
266  // </thrown>
267  void deselect(const casacore::Vector<casacore::Int>& index);
268 
269  // select the specified component. Throws an exception (casacore::AipsError) if any
270  // element in the index is out of range, ie. index >= nelements().
271  // <thrown>
272  // <li> casacore::AipsError - If the index is equal to or larger than the number of
273  // elements in the list or less than zero
274  // </thrown>
275  void select(const casacore::Vector<casacore::Int>& index);
276 
277  // Returns a casacore::Vector whose indices indicate which components are selected
279 
280 
281  // set the label on the specified components to the specified string
282  // <thrown>
283  // <li> casacore::AipsError - If the index is equal to or larger than the number of
284  // elements in the list or less than zero
285  // </thrown>
286  void setLabel(const casacore::Vector<casacore::Int>& which,
287  const casacore::String& newLabel);
288 
289  // get the the flux as a double
290  // param: which - the component number (0 based)
291  // return The flux as a Quantity
292  void getFlux(casacore::Vector<casacore::Quantity>& fluxQuant, const casacore::Int& which) const;
294 
295  // get the associated polarizations as a vector of strings for the
296  // specified component. Returned vector always has 4 elements.
298 
299  // set the flux on the specified components to the specified flux
300  // <thrown>
301  // <li> casacore::AipsError - If the index is equal to or larger than the number of
302  // elements in the list or less than zero
303  // </thrown>
304  void setFlux(const casacore::Vector<casacore::Int>& which,
305  const Flux<casacore::Double>& newFlux);
306 
307  // convert the flux on the specified components to the specified units
308  // <thrown>
309  // <li> casacore::AipsError - If the index is equal to or larger than the number of
310  // elements in the list or less than zero
311  // </thrown>
313  const casacore::Unit& unit);
314 
315  // convert the flux on the specified components to the specified
316  // polarisation representation
317  // <thrown>
318  // <li> casacore::AipsError - If the index is equal to or larger than the number of
319  // elements in the list or less than zero
320  // </thrown>
323 
324  // set the reference direction on the specified components to the specified
325  // direction. The reference frame is not changed, use the
326  // <src>setRefFrame</src> function to do that.
327  // <thrown>
328  // <li> casacore::AipsError - If the index is equal to or larger than the number of
329  // elements in the list or less than zero
330  // </thrown>
332  const casacore::MVDirection& newDir);
333 
334  // set the reference direction frame on the specified components to the
335  // specified one. Does not convert the direction values.
336  // <thrown>
337  // <li> casacore::AipsError - If the index is equal to or larger than the number of
338  // elements in the list or less than zero
339  // </thrown>
341  casacore::MDirection::Types newFrame);
342 
343  // Convert the reference direction frame on the specified components to the
344  // specified one. Changes the direction values.
345  // <thrown>
346  // <li> casacore::AipsError - If the index is equal to or larger than the number of
347  // elements in the list or less than zero
348  // </thrown>
350  casacore::MDirection::Types newFrame);
351 
353 
354  // set the shape on the specified components to the specified one.
355  // <thrown>
356  // <li> casacore::AipsError - If the index is equal to or larger than the number of
357  // elements in the list or less than zero
358  // </thrown>
359  void setShape(const casacore::Vector<casacore::Int>& which,
360  const ComponentShape& newShape);
361 
362  // get the shape of the specified component as a const pointer. No need to
363  // delete it, it will be deleted when the variable goes out of scope.
364  const ComponentShape* getShape(casacore::Int which) const;
365 
366  // set the shape on the specified components to the specified one. However
367  // this function unlike the previous one does not change the reference
368  // direction to the one specified in the newShape object.
369  // <thrown>
370  // <li> casacore::AipsError - If the index is equal to or larger than the number of
371  // elements in the list or less than zero
372  // </thrown>
374  const ComponentShape& newShape);
375 
376 
378  const ComponentShape& newShape);
379 
380  // set the spectrum on the specified components to the specified one.
381  // <thrown>
382  // <li> casacore::AipsError - If the index is equal to or larger than the number of
383  // elements in the list or less than zero
384  // </thrown>
386  const SpectralModel& newSpectrum);
387 
388  // set the spectrum on the specified components to the specified one. However
389  // this function unlike the previous one does not change the reference
390  // frequency to the one specified in the newSpectrum object.
391  // <thrown>
392  // <li> casacore::AipsError - If the index is equal to or larger than the number of
393  // elements in the list or less than zero
394  // </thrown>
396  const SpectralModel& newSpectrum);
397 
398  // set the reference frequency on the specified components to the specified
399  // frequency. The reference frame is not changed, use the
400  // <src>setRefFrequencyFrame</src> function to do that.
401  // <thrown>
402  // <li> casacore::AipsError - If the index is equal to or larger than the number of
403  // elements in the list or less than zero
404  // </thrown>
405  void setRefFrequency(const casacore::Vector<casacore::Int>& which, const casacore::MVFrequency& newFreq);
406 
407  // set the reference frequency frame on the specified components to the
408  // specified one. Does not convert the frequency values.
409  // <thrown>
410  // <li> casacore::AipsError - If the index is equal to or larger than the number of
411  // elements in the list or less than zero
412  // </thrown>
414  casacore::MFrequency::Types newFrame);
415 
416  // set the reference frequency unit on the specified components to the
417  // specified one. The unit must have the same dimensions as the Hz.
418  // <thrown>
419  // <li> casacore::AipsError - If the index is equal to or larger than the number of
420  // elements in the list or less than zero
421  // </thrown>
423 
424  // returns a reference to the specified element in the list.
425  // <thrown>
426  // <li> casacore::AipsError - If the list is associated with a table that was opened
427  // readonly (non-const version only).
428  // <li> casacore::AipsError - If the index is equal to or larger than the number of
429  // elements in the list.
430  // </thrown>
431  // <group>
432  const SkyComponent& component(const casacore::uInt& index) const;
433  SkyComponent& component(const casacore::uInt& index);
434  // </group>
435 
436  // Make the ComponentList persistant by supplying a filename. If the
437  // ComponentList is already associated with a casacore::Table then the casacore::Table will be
438  // renamed. Hence this function cannot be used with ComponentLists that are
439  // constructed with readonly=true.
440  // <thrown>
441  // <li> casacore::AipsError - If the list is associated with a table that was opened
442  // readonly
443  // <li> casacore::AipsError - If option is casacore::Table::Old as this does not make sense
444  // </thrown>
445  void rename(const casacore::Path& newName,
447 
448  // Make a real copy of this componentList. As the copy constructor and the
449  // assignment operator use reference semantics this is the only way to get a
450  // distinct version of the componentList.
451  ComponentList copy() const;
452 
453  // casacore::Sort the components in the list using the given criteria.
454  void sort(ComponentList::SortCriteria criteria);
455 
456  // Convert the SortCriteria enumerator to a string
458 
459  // Convert a given casacore::String to a Type enumerator
460  static ComponentList::SortCriteria type(const casacore::String& criteria);
461 
462  // casacore::Function which checks the internal data of this class for consistant
463  // values. Returns true if everything is fine otherwise returns false.
464  casacore::Bool ok() const;
465 
466  // methods to store itself as a casacore::Record and recover from a casacore::Record its state
467 
470 
471  // Summarize specified component as a formatted string.
473 
474  // get the underlying table. This method was added specifically for use by ComponenetListImage;
475  // it is not advised that it be called outside that class.
476  // casacore::Table& getTable();
477 
478  const casacore::Table& getTable() const;
479 
480 private:
481  // Privarte function to create the casacore::Table which will hold the components
482  //void createTable(const casacore::Path& fileName, const casacore::Table::TableOption option, const casacore::Bool addOptCol);
483  void createTable(const casacore::Path& fileName, const casacore::Table::TableOption option);
484  // Private function to write the components to disk
485  // <thrown>
486  // <li> casacore::AipsError - If the table is not writable
487  // </thrown>
488  void writeTable();
489 
490  friend class ComponentListImage;
492 
493  // Private function to read the components from disk
494  // <thrown>
495  // <li> casacore::AipsError - If the table is not readable
496  // <li> casacore::AipsError - If the table is not writable (and readOnly==false)
497  // </thrown>
498  void readTable(const casacore::Path& fileName, const casacore::Bool readOnly);
507 };
508 
509 } //# NAMESPACE CASA - END
510 
511 #endif
512 
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.
Definition: MDirection.h:174
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
int Int
Definition: aipstype.h:50
casacore::Vector< casacore::Int > selected() const
Returns a casacore::Vector whose indices indicate which components are selected.
std::vector< double > Vector
Definition: ds9context.h:24
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.
Definition: Table.h:153
Internal value for MFrequency.
Definition: MVFrequency.h:97
No sorting is necessary.
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...
casacore::Bool itsROFlag
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.
Path name of a file.
Definition: Path.h:126
Types
Types of known MDirections Warning: The order defines the order in the translation matrix FromTo in ...
Definition: MDirection.h:188
casacore::Block< casacore::Bool > itsSelectedFlags
defines physical units
Definition: Unit.h:189
A Measure: wave characteristics.
Definition: MFrequency.h:161
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.
Definition: aipstype.h:42
Base class for spectral models.
Quantities (i.e. dimensioned values)
Definition: QuantumHolder.h:44
Flux< casacore::Double > sample(const casacore::MDirection &sampleDir, const casacore::MVAngle &pixelLatSize, const casacore::MVAngle &pixelLongSize, const casacore::MFrequency &centerFreq) const
Calculate the integrated flux of all the members of the componentlist at the specified direction &amp; fr...
const Bool False
Definition: aipstype.h:44
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.
simple 1-D array
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.
casacore::Table itsTable
A component of a model of the sky.
Definition: SkyComponent.h:130
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.
Definition: String.h:223
casacore::Sort the components by fractional polarisation, biggest first.
Vector of three direction cosines.
Definition: MVDirection.h:106
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.
create table
Definition: Table.h:172
Types
Types of known MFrequencies Warning: The order defines the order in the translation matrix FromTo in...
Definition: MFrequency.h:176
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.
Definition: MVAngle.h:245
const Bool True
Definition: aipstype.h:43
unsigned int uInt
Definition: aipstype.h:51
TableOption
Define the possible options how a table can be opened.
Definition: Table.h:168
casacore::Block< casacore::uInt > itsOrder
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42
SortCriteria
Sorting criteria for components.