28 #ifndef COMPONENTS_SPECTRALMODEL_H
29 #define COMPONENTS_SPECTRALMODEL_H
40 class RecordInterface;
42 template <
class T>
class Vector;
virtual casacore::Bool convertUnit(casacore::String &errorMessage, const casacore::RecordInterface &record)=0
Convert the parameters of the spectral model to the specified units.
virtual casacore::Vector< casacore::Double > parameters() const =0
virtual casacore::Double sample(const casacore::MFrequency ¢erFrequency) const =0
Return the scaling factor that indicates what proportion of the flux is at the specified frequency...
std::vector< double > Vector
static casacore::Bool badError(const casacore::Quantum< casacore::Double > &quantum)
returns true if the quantum is not a non-negative quantity with units dimensionally identical to the ...
casacore::Double refFreqInFrame(const casacore::MFrequency::Ref &frame) const
Return the value refFrequency in the requested frame...
virtual void setErrors(const casacore::Vector< casacore::Double > &newErrors)=0
void convertFrequencyUnit(const casacore::Unit &freqUnit)
virtual void sampleStokes(const casacore::MFrequency ¢erFrequency, casacore::Vector< casacore::Double > &stokesval) const =0
return full casacore::Stokes version especially for models which have different frequency dependence ...
A Measure: wave characteristics.
virtual void setRefFrequency(const casacore::MFrequency &newRefFreq)
set/get the reference frequency
virtual const casacore::String & ident() const
Specify the identification of the record (e.g.
virtual SpectralModel * clone() const =0
Return a pointer to a copy of the derived object upcast to a SpectralModel object.
const casacore::MFrequency & refFrequency() const
casacore::Quantity itsFreqErr
virtual casacore::uInt nParameters() const =0
return the number of parameters in this spectral shape and set/get them.
bool Bool
Define the standard types used by Casacore.
static ComponentType::SpectralShape getType(casacore::String &errorMessage, const casacore::RecordInterface &record)
Return the spectral shape that the supplied record represents.
Base class for spectral models.
virtual casacore::Bool fromRecord(casacore::String &errorMessage, const casacore::RecordInterface &record)=0
These functions convert between a record and a SpectralModel.
SpectralShape
The different functional forms for the spectral variation.
virtual casacore::Bool toRecord(casacore::String &errorMessage, casacore::RecordInterface &record) const =0
Convert the class to an Record representation.
virtual void setParameters(const casacore::Vector< casacore::Double > &newParms)=0
casacore::Unit itsFreqUnit
virtual ComponentType::SpectralShape type() const =0
return the actual spectral type.
virtual casacore::Bool ok() const
casacore::Function which checks the internal data of this class for correct dimensionality and consis...
SpectralModel & operator=(const SpectralModel &other)
virtual casacore::Vector< casacore::Double > errors() const =0
String: the storage and methods of handling collections of characters.
Abstract base class for Record classes.
virtual ~SpectralModel()
a virtual destructor is needed so that the actual destructor in the derived class will be used...
SpectralModel()
The constructors and assignment operator are protected as only derived classes should use them...
void setRefFrequencyError(const casacore::Quantum< casacore::Double > &newRefFreqErr)
set/get the error in the reference frequency.
casacore::MFrequency itsRefFreq
const casacore::Unit & frequencyUnit() const
get the frequency unit, and change the default frequency unit to the specified one.
const casacore::Quantum< casacore::Double > & refFrequencyError() const
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.