casa
5.7.0-16
|
A model component of the sky brightness. More...
#include <SkyCompRep.h>
Public Member Functions | |
SkyCompRep () | |
The default SkyCompRep is a point source with a constant spectrum. More... | |
SkyCompRep (const ComponentType::Shape &shape) | |
Construct a SkyCompRep of the specified shape. More... | |
SkyCompRep (const ComponentType::Shape &shape, const ComponentType::SpectralShape &spectrum) | |
Construct a SkyCompRep with the user specified model for the shape and spectrum. More... | |
SkyCompRep (const Flux< casacore::Double > &flux, const ComponentShape &shape, const SpectralModel &spectrum) | |
Construct a SkyCompRep with a fully specified model for the shape, spectrum and flux. More... | |
SkyCompRep (const SkyCompRep &other) | |
The copy constructor uses copy semantics. More... | |
virtual | ~SkyCompRep () |
The destructor does not appear to do much. More... | |
SkyCompRep & | operator= (const SkyCompRep &other) |
The assignment operator uses copy semantics. More... | |
virtual const Flux < casacore::Double > & | flux () const |
See the corresponding functions in the SkyCompBase class for a description of these functions. More... | |
virtual Flux< casacore::Double > & | flux () |
virtual const ComponentShape & | shape () const |
See the corresponding functions in the SkyCompBase class for a description of these functions. More... | |
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. More... | |
virtual SpectralModel & | spectrum () |
virtual void | setSpectrum (const SpectralModel &newSpectrum) |
virtual casacore::String & | label () |
See the corresponding functions in the SkyCompBase class for a description of these functions. More... | |
virtual const casacore::String & | label () const |
virtual casacore::Vector < casacore::Double > & | optionalParameters () |
See the corresponding functions in the SkyCompBase class for a description of these functions. More... | |
virtual const casacore::Vector < casacore::Double > & | optionalParameters () const |
virtual casacore::Bool | isPhysical () const |
See the corresponding function in the SkyCompBase class for a description of this function. More... | |
virtual Flux< casacore::Double > | sample (const casacore::MDirection &direction, const casacore::MVAngle &pixelLatSize, const casacore::MVAngle &pixelLongSize, const casacore::MFrequency ¢erFrequency) const |
See the corresponding function in the SkyCompBase class for a description of this function. More... | |
virtual void | sample (casacore::Cube< casacore::Double > &samples, const casacore::Unit &reqUnit, const casacore::Vector< casacore::MVDirection > &directions, const casacore::MeasRef< casacore::MDirection > &dirRef, const casacore::MVAngle &pixelLatSize, const casacore::MVAngle &pixelLongSize, const casacore::Vector< casacore::MVFrequency > &frequencies, const casacore::MeasRef< casacore::MFrequency > &freqRef) const |
See the corresponding function in the SkyCompBase class for a description of this function. More... | |
virtual Flux< casacore::Double > | visibility (const casacore::Vector< casacore::Double > &uvw, const casacore::Double &frequency) const |
See the corresponding function in the SkyCompBase class for a description of this function. More... | |
virtual void | visibility (casacore::Cube< casacore::DComplex > &visibilities, const casacore::Matrix< casacore::Double > &uvws, const casacore::Vector< casacore::Double > &frequencies) const |
See the corresponding function in the SkyCompBase class for a description of this function. More... | |
virtual casacore::Bool | fromRecord (casacore::String &errorMessage, const casacore::RecordInterface &record) |
See the corresponding functions in the SkyCompBase class for a description of these functions. More... | |
virtual casacore::Bool | toRecord (casacore::String &errorMessage, casacore::RecordInterface &record) const |
Convert the class to an Record representation. More... | |
casacore::Vector < casacore::Double > | toPixel (const casacore::Unit &brightnessUnitOut, const casacore::GaussianBeam &restoringBeam, const casacore::CoordinateSystem &cSys, casacore::Stokes::StokesTypes stokes) const |
Convert the SkyComponent to a vector of Doubles for the specified casacore::Stokes type (others are lost). More... | |
void | fromPixel (casacore::Double &fluxRatio, const casacore::Vector< casacore::Double > ¶meters, const casacore::Unit &brightnessUnitIn, const casacore::GaussianBeam &restoringBeam, const casacore::CoordinateSystem &cSys, ComponentType::Shape componentShape, casacore::Stokes::StokesTypes stokes) |
Take a vector Doubles and fill the SkyComponent from the values. More... | |
virtual casacore::Bool | ok () const |
See the corresponding function in the SkyCompBase class for a description of this function. More... | |
Public Member Functions inherited from casa::SkyCompBase | |
virtual | ~SkyCompBase () |
The destructor does not anything. More... | |
Public Member Functions inherited from casacore::RecordTransformable | |
virtual | ~RecordTransformable () |
The destructor must be virtual so that the destructor of derived classes is actually used. More... | |
virtual Bool | fromString (String &error, const String &inString) |
Initialise the class from a String representation. More... | |
virtual const String & | ident () const |
Specify the identification of the record (e.g. More... | |
Static Public Member Functions | |
static casacore::Double | convertToJy (const casacore::Unit &brightnessUnit) |
Find the factor that converts whatever per whatevers (e.g. More... | |
static casacore::Quantity | peakToIntegralFlux (const casacore::DirectionCoordinate &dirCoord, const ComponentType::Shape componentShape, const casacore::Quantum< casacore::Double > &peakFlux, const casacore::Quantum< casacore::Double > &majorAxis, const casacore::Quantum< casacore::Double > &minorAxis, const casacore::GaussianBeam &restoringBeam) |
Convert a peak flux density to integral flux density. More... | |
static casacore::Quantity | integralToPeakFlux (const casacore::DirectionCoordinate &dirCoord, const ComponentType::Shape componentShape, const casacore::Quantity &integralFlux, const casacore::Unit &brightnessUnit, const casacore::Quantity &majorAxis, const casacore::Quantity &minorAxis, const casacore::GaussianBeam &restoringBeam) |
Convert an integral flux density to peak flux density. More... | |
Static Private Member Functions | |
static casacore::Unit | defineBrightnessUnits (casacore::LogIO &os, const casacore::Unit &brightnessUnitIn, const casacore::DirectionCoordinate &dirCoord, const casacore::GaussianBeam &restoringBeam, const casacore::Bool integralIsJy) |
Make definitions to handle "/beam" and "/pixel" units. More... | |
static void | undefineBrightnessUnits () |
Remove the user defined "/beam" and "/pixel" definitions. More... | |
Private Attributes | |
casacore::CountedPtr < ComponentShape > | itsShapePtr |
casacore::CountedPtr < SpectralModel > | itsSpectrumPtr |
Flux< casacore::Double > | itsFlux |
casacore::String | itsLabel |
casacore::Vector < casacore::Double > | itsOptParms |
A model component of the sky brightness.
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 SkyCompRep 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 copy semantics for both the copy constructor and the assignment operator.
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 133 of file SkyCompRep.h.
casa::SkyCompRep::SkyCompRep | ( | ) |
The default SkyCompRep 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::SkyCompRep::SkyCompRep | ( | 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::SkyCompRep::SkyCompRep | ( | const ComponentType::Shape & | shape, |
const ComponentType::SpectralShape & | spectrum | ||
) |
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::SkyCompRep::SkyCompRep | ( | const Flux< casacore::Double > & | flux, |
const ComponentShape & | shape, | ||
const SpectralModel & | spectrum | ||
) |
Construct a SkyCompRep with a fully specified model for the shape, spectrum and flux.
casa::SkyCompRep::SkyCompRep | ( | const SkyCompRep & | other | ) |
The copy constructor uses copy semantics.
|
virtual |
The destructor does not appear to do much.
|
static |
Find the factor that converts whatever per whatevers (e.g.
mJy per beam) to Jy per whatevers (e.g. Jy per beam)
|
staticprivate |
Make definitions to handle "/beam" and "/pixel" units.
The restoring beam is provided in a vector of quanta (major, minor, position angle). Should be length 0 or 3. It can be obtained from class ImageInfo
|
virtual |
See the corresponding functions in the SkyCompBase class for a description of these functions.
Implements casa::SkyCompBase.
|
virtual |
Implements casa::SkyCompBase.
void casa::SkyCompRep::fromPixel | ( | casacore::Double & | fluxRatio, |
const casacore::Vector< casacore::Double > & | parameters, | ||
const casacore::Unit & | brightnessUnitIn, | ||
const casacore::GaussianBeam & | restoringBeam, | ||
const casacore::CoordinateSystem & | cSys, | ||
ComponentType::Shape | componentShape, | ||
casacore::Stokes::StokesTypes | stokes | ||
) |
Take a vector Doubles and fill the SkyComponent from the values.
The first three elements of the given vector are : flux for given casacore::Stokes (in the units you specify), longitude location (absolute pixels), and latitude location (absolute pixels). For DISK and GAUSSIAN shapes, the next three elements are major axis (absolute pixels) minor axis (absolute pixels), and position angle (N->E; radians). You must specify the brightness units in which the flux is stored in the vector. It will be converted to an integral reprentation internally for the SkyComponent. So as to be able to handle /beam units, the restoring beam must also be supplied. It can be obtained from the casacore::ImageInfo class. It should be of length 3 or 0 (no beam). Multiplying by fluxRatio converts the brightness units to Jy/whatever (e.g. mJy/beam to Jy/beam). You must specify the type of shape to convert to. The SkyComponent is given a constant spectrum.
|
virtual |
See the corresponding functions in the SkyCompBase class for a description of these functions.
Implements casa::SkyCompBase.
|
static |
Convert an integral flux density to peak flux density.
The brightness unit of the output quantum (e.g. mJy/beam) is specified by brightnessUnit
Throws an exception if the units of integralFlux
do not conform to Jy.
|
virtual |
See the corresponding function in the SkyCompBase class for a description of this function.
Implements casa::SkyCompBase.
|
virtual |
See the corresponding functions in the SkyCompBase class for a description of these functions.
Implements casa::SkyCompBase.
|
virtual |
Implements casa::SkyCompBase.
|
virtual |
See the corresponding function in the SkyCompBase class for a description of this function.
Implements casa::SkyCompBase.
SkyCompRep& casa::SkyCompRep::operator= | ( | const SkyCompRep & | other | ) |
The assignment operator uses copy semantics.
|
virtual |
See the corresponding functions in the SkyCompBase class for a description of these functions.
Implements casa::SkyCompBase.
|
virtual |
Implements casa::SkyCompBase.
|
static |
Convert a peak flux density to integral flux density.
|
virtual |
See the corresponding function in the SkyCompBase class for a description of this function.
Implements casa::SkyCompBase.
|
virtual |
See the corresponding function in the SkyCompBase class for a description of this function.
Implements casa::SkyCompBase.
|
virtual |
Implements casa::SkyCompBase.
|
virtual |
Implements casa::SkyCompBase.
|
virtual |
See the corresponding functions in the SkyCompBase class for a description of these functions.
Implements casa::SkyCompBase.
|
virtual |
Implements casa::SkyCompBase.
|
virtual |
See the corresponding functions in the SkyCompBase class for a description of these functions.
Implements casa::SkyCompBase.
|
virtual |
Implements casa::SkyCompBase.
casacore::Vector<casacore::Double> casa::SkyCompRep::toPixel | ( | const casacore::Unit & | brightnessUnitOut, |
const casacore::GaussianBeam & | restoringBeam, | ||
const casacore::CoordinateSystem & | cSys, | ||
casacore::Stokes::StokesTypes | stokes | ||
) | const |
Convert the SkyComponent to a vector of Doubles for the specified casacore::Stokes type (others are lost).
The first three elements of the returned vector are : flux for given casacore::Stokes (in the units you specify), longitude location (absolute pixels), and latitude location (absolute pixels). For DISK and GAUSSIAN shapes, the next three elements are major axis (absolute pixels) minor axis (absolute pixels), and position angle (N->E; radians). You must specify the brightness units to which the integral flux stored in the SkyComponent should be converted. So as to be able to handle /beam units, the restoring beam must also be suppluied. It can be obtained from the casacore::ImageInfo class. It should be of length 3 or 0 (no beam). A constant spectrum is used so any spectral index information in the component is lost.
|
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.
|
staticprivate |
Remove the user defined "/beam" and "/pixel" definitions.
|
virtual |
See the corresponding function in the SkyCompBase class for a description of this function.
Implements casa::SkyCompBase.
|
virtual |
See the corresponding function in the SkyCompBase class for a description of this function.
Implements casa::SkyCompBase.
|
private |
Definition at line 343 of file SkyCompRep.h.
|
private |
Definition at line 344 of file SkyCompRep.h.
|
private |
Definition at line 345 of file SkyCompRep.h.
|
private |
Definition at line 341 of file SkyCompRep.h.
|
private |
Definition at line 342 of file SkyCompRep.h.