- ADD = 0
- COMPONENT
- REPLACE
- CONCATENATE
- REMOVE
- PURGE
- RECOVER
- LENGTH
- INDICES
- SORT
- SAMPLE
- IS_PHYSICAL
- RENAME
- CLOSE
- SELECT
- DESELECT
- SELECTED
- GETFLUXVALUE
- GETFLUXUNIT
- GETFLUXPOL
- GETFLUXERROR
- SETFLUX
- CONVERTFLUXUNIT
- CONVERTFLUXPOL
- SIMULATE
- GETREFDIR
- GETREFDIRRA
- GETREFDIRDEC
- GETREFDIRFRAME
- SETREFDIR
- SETREFDIRFRAME
- CONVERTREFDIR
- SHAPETYPE
- SPECTRUMTYPE
- GETLABEL
- SETLABEL
- SETSHAPE
- SETSPECTRUM
- GETSHAPE
- GETSHAPEERROR
- CONVERTSHAPE
- GETSPECTRUM
- CONVERTSPECTRUM
- GETFREQ
- GETFREQVALUE
- GETFREQUNIT
- GETFREQFRAME
- SETFREQ
- SETFREQFRAME
- CONVERTFREQUNIT
- NUM_METHODS
This class is differs from the ComponentList class in the following ways:
There is a one-to-one correspondence between the functions in the glish componentlist object (see the AIPS++ User Reference manual) and functions in this class. This is make simplify the porting from glish to C++ of a glish script using the componentlist distributed object.
Read a componentlist from an existing table. By default the Table is opened read-write. It is recommended that you create a const componentlist if you open the Table read-only. This will insure that you can determine at compile time that you are using functions which do not modify the list. This prevents a runtime exception for being thrown.
The copy constructor uses reference semantics
The destructor saves the list to disk if it has a name A name can be assigned using the rename member function or specified at construction time.
The assignment operator uses reference semantics
Add a SkyComponent to the end of the componentlist. The list length is increased by one when using this function.
returns a copy of the specified element in the list.
Replace the specified components with the ones in the supplied list.
Copy the specified components from the specified componentlist to the end of the current componentlist.
Remove the specified SkyComponents from the componentlist. After removing a component all the components with an indices greater than this one will be reduced. For example in a five element list removing elements [1,3,5] will result in a two element list, now indexed as elements one and two, containing what was previously the second and fourth components. which is a vector than contains indices that MUST be greater than zero and less than or equal to the number of components in the list, as the first component is at which=1. Components are not completely deleted from the list until the purge function is called.
Permanently remove all the components from the list that have been deleted using the remove function.
Replace all the components removed from the list. This cannot replace components that have been removed before the list was last purged.
returns the number of elements in the list.
returns a Vector whose length is the number of elements in the list, and contents are from 1 to the list length. If the list contains no elements the an empty Vector is returned.
Sort the components in the list using the given criteria. The criteria string is identical to those in the ComponentList::Sort enumerator but the string matching is case insensitive.
Returns True if all the specified components are physically plausable. See the isPhysical function in the SkyCompBase class for a precise definition of what this means.
Return the flux (in Jy) of the component in a pixel of specified size at the specified frequency & direction, . The Vector contains all the polarizations (Stokes I,Q,U,V) of the radiation and will be of length 4. The pixel size is assumed to be square.
Make the componentlist persistant by supplying a filename. If the componentlist is already associated with a Table then the Table will be renamed. Hence this function cannot be used with componentlist's that are opened readonly. If a file with the specified filename already exists then a AipsError will be thrown.
If the current componentlist is associated with a Table then write the list to disk and close the Table. After executation of this function the componentlist always contains no elements and is not associated with any Table. It is as if the default constructor had just been called. If the current list is not associated with a Table then its contents are lost.
select the specified component. Throws an exception (AipsError) if the index is out of range, ie. index > length().
deselect the specified component. Throws an exception (AipsError) if the index is out of range, ie. index > length().
Returns a Vector indicating which components are selected.
get the label of the specified component
set the label of the specified components
get the flux values of the specified component
get the flux unit of the specified component
get the polarisation of the flux of the specified component
get the errors in the flux of the specified component
set the flux on the specified components to the specified values with the specified units and polarisation representation.
convert the flux on the specified components to the specified units
convert the flux on the specified components to the specified polarisation representation
Return the reference direction of the specified component
get the RA or dec of the reference direction as a string. The units and precision can be specified. Valid units are any angular units (eg., "rad", "deg") or "time" or "angle". For the latter two the returned string will be HH:MM:SS.sss or +DDD.MM.SS.sss respectively. Parsing of the unit string is case insensitive. The precision is the number of significant digits in the returned value. For time and angle units a precision of two returns only the degrees or hours, four adds the minutes and six includes the integral seconds. Note that RA and Dec really mean the latitude or longitude if the reference is something other than J2000 or B1950.
return as an uppercase string the reference frame of the current reference direction for the specified component.
set the reference direction of the specified components to the specified value. The units must be either, "time", "angle" or an angular unit (eg., "rad" or "deg"). If the units are "time" or "angle" then the ra/dec string will be parsed (for special characters like ":" or .) to generate the angular unit. Otherwise the ra/dec string will be treated as a floating point number in the units specified by the corresponding unit string. The parsing of all strings is case insensitive.
set the reference direction frame, of the specified components, to the specified value. No conversions are performed.
convert the reference direction frame, of the specified components, to the specified value.
get the shape used by the specified component.
get the shape part of the component. The returned record may be empty (for a point shape) or contain fields (typically majoraxis, minoraxis and positionangle) that depend on the shape.
get the errors in the shape part of the component. The returned record may be empty (for a point shape) or contain fields (typically majoraxis, minoraxis and positionangle) that represent the errors in the shape parameters.
change the shape used by the specified components. The parameters for the shape are contained in the parameters record. Only the fields appropriate to the specified shape are used, other fields are ignored. Does not change the shape if the newType string cannot be translated into a valid shape.
change the units used by the shape parameters in the specified components. The parameters for the shape are contained in the parameters record and are identical to those used in the setshape function. Only the fields appropriate shape of the specified components are used, other fields are ignored. The specified units must have the same dimensions as the ones currently in use for the specified parameter.
get the spectral model used by the specified component.
get the spectrum part of the component. The returned record always contains a type field (as a string), a frequency field (a frequency measure) and may contain other fields depending on the spectral model.
Return the reference frequency of the specified component
get the value, unit or reference frame of the reference frequency. The frame is always returned as an uppercase string.
set the reference frequency of the specified components to the specified value and unit. The units must have the same dimensions as the "Hz".
set the reference direction frame, of the specified components, to the specified value. No conversions are performed.
convert the reference frequency value to the specified unit.
change the spectrum used by the specified components. The parameters for the spectrum are contained in the parameters record. Only the fields appropriate to the specified spectrum are used, other fields are ignored. Does not change the spectrum if the newType string cannot be translated into a valid spectral type or if there is any other error.
change the units used by the spectrum parameters in the specified components. The parameters for the spectrum are contained in the parameters record and are identical to those used in the setspectrum function. Only the fields appropriate to the spectrum model of the specified components are used, other fields are ignored. The specified units must have the same dimensions as the ones currently in use for the specified parameter.
Add the specified number of components to the list. All the components will be Point components with a flux of 1 Jy in I only, at the J2000 North pole The spectrum is constant. This behaviour will probably change so that all the simulated components are different.
Function which checks the internal data of this class for consistant values. Returns True if everything is fine otherwise returns False.
return the name of this object type the distributed object system. This function is required as part of the DO system
the returned vector contains the names of all the methods which may be used via the distributed object system. This function is required as part of the DO system
the returned vector contains the names of all the methods which are to trivial to warrent automatic logging. This function is required as part of the DO system
Run the specified method. This is the function used by the distributed object system to invoke any of the specified member functions in thios class. This function is required as part of the DO system