casa
$Rev:20696$
|
A component of a model of the sky. More...
#include <SkyComponent.h>
Public Member Functions | |
SkyComponent () | |
The default SkyComponent is a point source with a constant spectrum. | |
SkyComponent (const ComponentType::Shape &shape) | |
Construct a SkyCompRep of the specified shape. | |
SkyComponent (const ComponentType::Shape &shape, const ComponentType::SpectralShape &spectralModel) | |
Construct a SkyCompRep with the user specified model for the shape and spectrum. | |
SkyComponent (const Flux< Double > &flux, const ComponentShape &shape, const SpectralModel &spectrum) | |
Construct a SkyComponent with a fully specified model for the shape, spectrum and flux. | |
SkyComponent (const SkyComponent &other) | |
The copy Constructor uses reference semantics. | |
virtual | ~SkyComponent () |
the destructor does nothing obvious (its all done by the CountedPtr) | |
SkyComponent & | operator= (const SkyComponent &other) |
The assignment operator uses reference semantics. | |
virtual Flux< Double > & | flux () |
See the corresponding functions in the SkyCompBase class for a description of these functions. | |
virtual const Flux< Double > & | flux () const |
return a reference to the flux of the component. | |
virtual const ComponentShape & | shape () const |
See the corresponding functions in the SkyCompBase class for a description of these functions. | |
virtual ComponentShape & | shape () |
virtual void | setShape (const ComponentShape &newShape) |
virtual const SpectralModel & | spectrum () const |
See the corresponding functions in the SkyCompBase class for a description of these functions. | |
virtual SpectralModel & | spectrum () |
virtual void | setSpectrum (const SpectralModel &newSpectrum) |
virtual String & | label () |
See the corresponding functions in the SkyCompBase class for a description of these functions. | |
virtual const String & | label () const |
virtual Vector< Double > & | optionalParameters () |
See the corresponding functions in the SkyCompBase class for a description of these functions. | |
virtual const Vector< Double > & | optionalParameters () const |
virtual Bool | isPhysical () const |
See the corresponding function in the SkyCompBase class for a description of this function. | |
virtual Flux< Double > | sample (const MDirection &direction, const MVAngle &pixelLatSize, const MVAngle &pixelLongSize, const MFrequency ¢erFrequency) const |
See the corresponding functions in the SkyCompBase class for a description of this function. | |
virtual void | sample (Cube< Double > &samples, const Unit &reqUnit, const Vector< MVDirection > &directions, const MeasRef< MDirection > &dirRef, const MVAngle &pixelLatSize, const MVAngle &pixelLongSize, const Vector< MVFrequency > &frequencies, const MeasRef< MFrequency > &freqRef) const |
See the corresponding function in the SkyCompBase class for a description of this function. | |
virtual Flux< Double > | visibility (const Vector< Double > &uvw, const Double &frequency) const |
See the corresponding function in the SkyCompBase class for a description of this function. | |
virtual void | visibility (Cube< DComplex > &visibilities, const Matrix< Double > &uvws, const Vector< Double > &frequencies) const |
See the corresponding function in the SkyCompBase class for a description of this function. | |
virtual Bool | fromRecord (String &errorMessage, const RecordInterface &record) |
See the corresponding functions in the SkyCompBase class for a description of these functions. | |
virtual Bool | toRecord (String &errorMessage, RecordInterface &record) const |
Convert the class to an Record representation. | |
SkyComponent | copy () const |
Return a distinct copy of this component. | |
Bool | ok () const |
See the corresponding functions in the SkyCompBase class for a description of this function. | |
Vector< Double > | toPixel (const Unit &brightnessUnitIn, const GaussianBeam &restoringBeam, const CoordinateSystem &cSys, Stokes::StokesTypes stokes) const |
Convert from and to pixel vectors. | |
void | fromPixel (Double &fluxRatio, const Vector< Double > ¶meters, const Unit &brightnessUnitIn, const GaussianBeam &restoringBeam, const CoordinateSystem &cSys, ComponentType::Shape componentShape, Stokes::StokesTypes stokes) |
virtual String | summarize (const CoordinateSystem *const &coordinates=0) const |
Get a nicely formatted string summarizing the component. | |
String | positionToString (const CoordinateSystem *const &coordinates=0) const |
If the coordinates parameter is specified, also return the corresponding world coordinates. | |
Private Attributes | |
CountedPtr< SkyCompRep > | itsCompPtr |
A component of a model of the sky.
Public interface
This class is concrete implementation of a class that represents a component of a model of the sky brightness.
The base class ( SkyCompBase ) contains a description of components and all the member functions used to manipulate them and hence will not be discussed here. But the base class does not include any constructors or a description of the copy semantics. This will be discussed below.
A SkyComponent is an "envelope" class in the sense that it can contain one of a variety of different component shapes and spectral models. It is necessary to specify the which shape and spectral model you want at construction time. This can be done either with enumerators or by constructing the classes derived from ComponentShape & SpectralModel and supplying them as construction arguments.
This class uses reference semantics for both the copy constructor and the assignment operator. Becuase of this the only way to make a true copy of a SkyComponent is to use the copy
member function.
These examples are coded in the tSkyCompRep.h file.
In this example a SkyCompRep object is created and used to calculate the ...
Model fitting is an important part of astronomical data reduction/interpretation. This class defines a model component. Many components can be strung together (using the ComponentList class) to construct a model. It is expected that this class will eventually allow you to solve for parameters of the model.
Definition at line 126 of file SkyComponent.h.
The default SkyComponent is a point source with a constant spectrum.
See the default constructors in the PointShape, ConstantSpectrum and Flux classes for the default values for the flux, shape and spectrum.
casa::SkyComponent::SkyComponent | ( | const ComponentType::Shape & | shape | ) |
Construct a SkyCompRep of the specified shape.
The resultant component has a constant spectrum and a shape given by the default constructor of the specified ComponentShape class.
casa::SkyComponent::SkyComponent | ( | const ComponentType::Shape & | shape, |
const ComponentType::SpectralShape & | spectralModel | ||
) |
Construct a SkyCompRep with the user specified model for the shape and spectrum.
The resultant component has a shape given by the default constructor of the specified ComponentShape class and a spectrum given by the default constructor of the specified SpectralModel class
casa::SkyComponent::SkyComponent | ( | const Flux< Double > & | flux, |
const ComponentShape & | shape, | ||
const SpectralModel & | spectrum | ||
) |
Construct a SkyComponent with a fully specified model for the shape, spectrum and flux.
casa::SkyComponent::SkyComponent | ( | const SkyComponent & | other | ) |
The copy Constructor uses reference semantics.
virtual casa::SkyComponent::~SkyComponent | ( | ) | [virtual] |
the destructor does nothing obvious (its all done by the CountedPtr)
SkyComponent casa::SkyComponent::copy | ( | ) | const |
Return a distinct copy of this component.
As both the assignment operator and the copy constructor use reference semantics this is the only way to get a real copy.
virtual Flux<Double>& casa::SkyComponent::flux | ( | ) | [virtual] |
See the corresponding functions in the SkyCompBase class for a description of these functions.
Implements casa::SkyCompBase.
virtual const Flux<Double>& casa::SkyComponent::flux | ( | ) | const [virtual] |
return a reference to the flux of the component.
Because this is a reference, manipulation of the flux values is performed through the functions in the Flux class. eg., comp.flux().setValue(newVal)
. If the component flux varies with frequency then the flux set using this function is the value at the reference frequency.
Implements casa::SkyCompBase.
void casa::SkyComponent::fromPixel | ( | Double & | fluxRatio, |
const Vector< Double > & | parameters, | ||
const Unit & | brightnessUnitIn, | ||
const GaussianBeam & | restoringBeam, | ||
const CoordinateSystem & | cSys, | ||
ComponentType::Shape | componentShape, | ||
Stokes::StokesTypes | stokes | ||
) |
virtual Bool casa::SkyComponent::fromRecord | ( | String & | errorMessage, |
const RecordInterface & | record | ||
) | [virtual] |
See the corresponding functions in the SkyCompBase class for a description of these functions.
Implements casa::SkyCompBase.
virtual Bool casa::SkyComponent::isPhysical | ( | ) | const [virtual] |
See the corresponding function in the SkyCompBase class for a description of this function.
Implements casa::SkyCompBase.
virtual String& casa::SkyComponent::label | ( | ) | [virtual] |
See the corresponding functions in the SkyCompBase class for a description of these functions.
Implements casa::SkyCompBase.
virtual const String& casa::SkyComponent::label | ( | ) | const [virtual] |
Implements casa::SkyCompBase.
Bool casa::SkyComponent::ok | ( | ) | const [virtual] |
See the corresponding functions in the SkyCompBase class for a description of this function.
Implements casa::SkyCompBase.
SkyComponent& casa::SkyComponent::operator= | ( | const SkyComponent & | other | ) |
The assignment operator uses reference semantics.
virtual Vector<Double>& casa::SkyComponent::optionalParameters | ( | ) | [virtual] |
See the corresponding functions in the SkyCompBase class for a description of these functions.
Implements casa::SkyCompBase.
virtual const Vector<Double>& casa::SkyComponent::optionalParameters | ( | ) | const [virtual] |
Implements casa::SkyCompBase.
String casa::SkyComponent::positionToString | ( | const CoordinateSystem *const & | coordinates = 0 | ) | const |
If the coordinates
parameter is specified, also return the corresponding world coordinates.
virtual Flux<Double> casa::SkyComponent::sample | ( | const MDirection & | direction, |
const MVAngle & | pixelLatSize, | ||
const MVAngle & | pixelLongSize, | ||
const MFrequency & | centerFrequency | ||
) | const [virtual] |
See the corresponding functions in the SkyCompBase class for a description of this function.
Implements casa::SkyCompBase.
virtual void casa::SkyComponent::sample | ( | Cube< Double > & | samples, |
const Unit & | reqUnit, | ||
const Vector< MVDirection > & | directions, | ||
const MeasRef< MDirection > & | dirRef, | ||
const MVAngle & | pixelLatSize, | ||
const MVAngle & | pixelLongSize, | ||
const Vector< MVFrequency > & | frequencies, | ||
const MeasRef< MFrequency > & | freqRef | ||
) | const [virtual] |
See the corresponding function in the SkyCompBase class for a description of this function.
Implements casa::SkyCompBase.
virtual void casa::SkyComponent::setShape | ( | const ComponentShape & | newShape | ) | [virtual] |
Implements casa::SkyCompBase.
virtual void casa::SkyComponent::setSpectrum | ( | const SpectralModel & | newSpectrum | ) | [virtual] |
Implements casa::SkyCompBase.
virtual const ComponentShape& casa::SkyComponent::shape | ( | ) | const [virtual] |
See the corresponding functions in the SkyCompBase class for a description of these functions.
Implements casa::SkyCompBase.
virtual ComponentShape& casa::SkyComponent::shape | ( | ) | [virtual] |
Implements casa::SkyCompBase.
virtual const SpectralModel& casa::SkyComponent::spectrum | ( | ) | const [virtual] |
See the corresponding functions in the SkyCompBase class for a description of these functions.
Implements casa::SkyCompBase.
virtual SpectralModel& casa::SkyComponent::spectrum | ( | ) | [virtual] |
Implements casa::SkyCompBase.
virtual String casa::SkyComponent::summarize | ( | const CoordinateSystem *const & | coordinates = 0 | ) | const [virtual] |
Get a nicely formatted string summarizing the component.
Vector<Double> casa::SkyComponent::toPixel | ( | const Unit & | brightnessUnitIn, |
const GaussianBeam & | restoringBeam, | ||
const CoordinateSystem & | cSys, | ||
Stokes::StokesTypes | stokes | ||
) | const |
Convert from and to pixel vectors.
See the SkyCompRep class for details.
virtual Bool casa::SkyComponent::toRecord | ( | String & | error, |
RecordInterface & | outRecord | ||
) | const [virtual] |
Convert the class to an Record representation.
The input record may already contain fields and these fields may be silently overridden. New fields may be added to the input Record. If the transformation succeeds then the error String is unchanged and the function returns True. Otherwise the function returns False and appends an error message to the supplied String giving the reason why the conversion failed.
Implements casa::SkyCompBase.
virtual Flux<Double> casa::SkyComponent::visibility | ( | const Vector< Double > & | uvw, |
const Double & | frequency | ||
) | const [virtual] |
See the corresponding function in the SkyCompBase class for a description of this function.
Implements casa::SkyCompBase.
virtual void casa::SkyComponent::visibility | ( | Cube< DComplex > & | visibilities, |
const Matrix< Double > & | uvws, | ||
const Vector< Double > & | frequencies | ||
) | const [virtual] |
See the corresponding function in the SkyCompBase class for a description of this function.
Implements casa::SkyCompBase.
CountedPtr<SkyCompRep> casa::SkyComponent::itsCompPtr [private] |
Definition at line 285 of file SkyComponent.h.