iOptions.getValue("attributeName",
mAttributeName)
in the constructor. 1 CorrectorNew::CorrectorNew(const Options& iOptions, const Data& iData) const :
2 mDoLogTransform(false) // Set the default value here
3 {
4 // Retrive the log transform option (if specified)
5 iOptions.getValue("doLogTransform", mDoLogTransform);
6 }
7 void CorrectorNew::correctCore(const Parameters& iParameters, Ensemble& iEnsemble) const {
8 // Correct each ensemble member
9 for(int i = 0; i < iEnsemble.size(); i++) {
10 ...
11 float correction = ...
12 // Add correction to ensemble members
13 if(mDoLogTransform) {
14 // This is the new code for the log transform option
15 float log = log(iEnsemble[i]);
16 log = log + correction;
17 iEnsemble[i] = exp(log);
18 }
19 else {
20 iEnsemble[i] = iEnsemble[i] + correction;
21 }
22 }
23 }
bool mDoLogTransform;
be added as a protected variable to the header file for this correction
scheme.