|
DP3
|
A class containing the values of a parameter. More...
#include <ParmValue.h>
Public Types | |
| enum | FunkletType { Scalar = 0 , Polc = 1 , PolcLog = 2 } |
| Define the possible funklet types. More... | |
| typedef std::shared_ptr< ParmValue > | ShPtr |
| Define a shared pointer for this type. More... | |
Public Member Functions | |
| ParmValue (const ParmValue &) | |
| Copy constructor makes a deep copy. More... | |
| ParmValue (double value=0.) | |
| Construct with the given scalar value. More... | |
| ~ParmValue () | |
| const Grid & | getGrid () const |
| Get the grid. More... | |
| bool | hasErrors () const |
| Are there errors? If false, the result of getErrors is undefined. More... | |
| ParmValue & | operator= (const ParmValue &) |
| Assignment makes a deep copy. More... | |
| bool | rescale (double sx, double ex, double sy, double ey, const Box &oldDomain) |
| void | setCoeff (const casacore::Array< double > &) |
| Set as an array of coefficients. More... | |
| void | setErrors (const casacore::Array< double > &) |
| void | setScalar (double value) |
| Set as a single scalar value. More... | |
| void | setScalars (const Grid &, const casacore::Array< double > &) |
| unsigned int | nx () const |
| unsigned int | ny () const |
| const casacore::Array< double > & | getValues () const |
| casacore::Array< double > & | getValues () |
| const casacore::Array< double > & | getErrors () const |
| casacore::Array< double > & | getErrors () |
| int | getRowId () const |
| void | setRowId (int rowId) |
| void | clearRowId () |
Static Public Member Functions | |
| static casacore::Matrix< double > | scale2 (const casacore::Matrix< double > &coeff, double offx, double offy, double scalex, double scaley) |
A class containing the values of a parameter.
ParmValue holds the values of a given parameter and domain. The object does not hold the name and domain info itself. Instead its parent object ParmValueSet holds this information. The value is a 2-dim array holding scalar values or the coefficients of a 2-dim funklet. Thus if the parm is a scalar, a ParmValue object can hold the values of multiple domains. If it's a funklet, only one domain is held.
| typedef std::shared_ptr<ParmValue> dp3::parmdb::ParmValue::ShPtr |
Define a shared pointer for this type.
|
explicit |
Construct with the given scalar value.
| dp3::parmdb::ParmValue::ParmValue | ( | const ParmValue & | ) |
Copy constructor makes a deep copy.
| dp3::parmdb::ParmValue::~ParmValue | ( | ) |
|
inline |
|
inline |
|
inline |
Get the arrays with errors. Undefined if getErrors()==false.
|
inline |
Get the grid.
|
inline |
Get/set the rowid to remember where the value is stored in the ParmDB.
|
inline |
|
inline |
Get the values.
|
inline |
Are there errors? If false, the result of getErrors is undefined.
|
inline |
Get the value shape.
|
inline |
| bool dp3::parmdb::ParmValue::rescale | ( | double | sx, |
| double | ex, | ||
| double | sy, | ||
| double | ey, | ||
| const Box & | oldDomain | ||
| ) |
If needed rescale polynomial coefficients from the old domain to the new domain given by the start and end values. It returns true if rescaling was actually done.
|
static |
Return the scaled coefficients of a 2D polynomial using the given offset and scale factor.
| void dp3::parmdb::ParmValue::setCoeff | ( | const casacore::Array< double > & | ) |
Set as an array of coefficients.
| void dp3::parmdb::ParmValue::setErrors | ( | const casacore::Array< double > & | ) |
Set the errors. They must have the same shape as the values, so the values must have been set before.
|
inline |
| void dp3::parmdb::ParmValue::setScalar | ( | double | value | ) |
Set as a single scalar value.
| void dp3::parmdb::ParmValue::setScalars | ( | const Grid & | , |
| const casacore::Array< double > & | |||
| ) |
Set as an array of scalar values with the grid. The shape of grid and values must match.