1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2025-06-23 17:22:02 +01:00

minor fixes in new physics classes

This commit is contained in:
2020-01-28 17:34:37 +00:00
parent 1bde8822b1
commit 685d433032
4 changed files with 40 additions and 6 deletions

View File

@ -128,17 +128,17 @@ CorrelatorModels::ModelPar CorrelatorModels::parseModel(const string s)
if (regex_match(s, sm, regex("exp([0-9]+)")))
{
par.type = CorrelatorType::exp;
par.nState = strTo<Index>(sm[0].str());
par.nState = strTo<Index>(sm[1].str());
}
else if (regex_match(s, sm, regex("cosh([0-9]+)")))
{
par.type = CorrelatorType::cosh;
par.nState = strTo<Index>(sm[0].str());
par.nState = strTo<Index>(sm[1].str());
}
else if (regex_match(s, sm, regex("sinh([0-9]+)")))
{
par.type = CorrelatorType::sinh;
par.nState = strTo<Index>(sm[0].str());
par.nState = strTo<Index>(sm[1].str());
}
else if (s == "linear")
{
@ -189,7 +189,7 @@ DVec CorrelatorModels::parameterGuess(const DMatSample &corr,
const ModelPar par)
{
DVec init;
Index nt = corr.size();
Index nt = corr[central].size();
switch (par.type)
{
@ -234,6 +234,11 @@ CorrelatorFitter::CorrelatorFitter(const std::vector<DMatSample> &corr)
setCorrelators(corr);
}
XYSampleData & CorrelatorFitter::data(void)
{
return *data_;
}
void CorrelatorFitter::setCorrelator(const DMatSample &corr)
{
std::vector<DMatSample> vec;