10 #ifndef LOFAR_PARMDB_PARM_H
11 #define LOFAR_PARMDB_PARM_H
16 #include <casacore/casa/Arrays/Array.h>
24 class AxisMappingCache;
77 unsigned int nvalues,
const double* errors =
nullptr,
88 return itsPerturbations;
93 return itsPerturbations.at(index);
111 bool emptyResult =
false);
120 void getResult(std::vector<casacore::Array<double>>& result,
121 const Grid& predictGrid,
bool perturb);
124 static std::vector<double>
copyValues(
const casacore::Array<double>& values,
125 const casacore::Array<bool>& mask,
131 const std::vector<double>& perturbations,
142 casacore::Array<double>* errors,
143 const Grid& predictGrid,
148 static void fillArrayPV(
double* resData,
int nrx,
int stx,
int sty,
int endx,
149 int endy,
const double* data,
const ParmValue& pval,
150 const Grid& predictGrid);
159 std::vector<double> itsPerturbations;
Class representing a regular or irregular 2-D grid.
Set of parameters to be used.
This class caches axis mappings. It uses the unique id of the from-axis and to-axis as the key in the...
Definition: AxisMapping.h:102
The envelope class for a 2-D grid with regular or irregular axes. -.
Definition: Grid.h:83
std::pair< size_t, size_t > Location
Define Location: A location on a 2-D grid.
Definition: Grid.h:86
A class dealing with caching and handling ParmDB entries.
Definition: ParmCache.h:28
A class holding information of multiple domains of a parameter. ParmValueSet holds the information of...
Definition: ParmValue.h:146
A class containing the values of a parameter.
Definition: ParmValue.h:39
Class giving access to a parameter.
Definition: Parm.h:46
static void getResultScalar(casacore::Array< double > &result, const Grid &predictGrid, const ParmValue &pval, AxisMappingCache &axisMappingCache)
Get the result for a single ParmValue with an array of scalars.
double getPerturbation(unsigned int index)
Get a particular perturbation.
Definition: Parm.h:92
static void getResultCoeff(casacore::Array< double > *resultVec, const Grid &predictGrid, const ParmValueSet &pvset, const std::vector< double > &perturbations, AxisMappingCache &axisMappingCache)
Evaluate the result for funklet coefficients.
Parm(ParmCache &, ParmId parmid)
Construct the object for the given parmid.
std::vector< double > getErrors(const Grid::Location &, bool useMask=true)
static std::vector< double > copyValues(const casacore::Array< double > &values, const casacore::Array< bool > &mask, bool useMask)
Form the vector from values and mask.
unsigned int getCoeffSize(bool useMask=true)
Get the nr of coefficients.
std::vector< double > getCoeff(const Grid::Location &, bool useMask=true)
void setCoeff(const Grid::Location &, const double *values, unsigned int nvalues, const double *errors=nullptr, bool useMask=true)
void setSolveGrid(const Grid &solveGrid)
static void getResultScalar(casacore::Array< double > &result, casacore::Array< double > *errors, const Grid &predictGrid, const ParmValueSet &pvset, AxisMappingCache &axisMappingCache)
Parm(ParmCache &, const std::string &name)
void calcPerturbations()
Calculate the perturbations.
void getResult(casacore::Array< double > &result, const Grid &predictGrid, bool emptyResult=false)
void getResult(std::vector< casacore::Array< double >> &result, const Grid &predictGrid, bool perturb)
static void fillArrayPV(double *resData, int nrx, int stx, int sty, int endx, int endy, const double *data, const ParmValue &pval, const Grid &predictGrid)
Fill the result array partially for a single ParmValue.
const std::vector< double > & getPerturbations() const
Definition: Parm.h:87
unsigned int ParmId
Define the type of a parmId.
Definition: ParmSet.h:22
This file has generic helper routines for testing steps.
Definition: AntennaConfig.h:53