mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2025-04-10 19:20:44 +01:00
more deactivation of the old fit interface
This commit is contained in:
parent
016a29e3df
commit
352caf30b6
28
lib/Plot.cpp
28
lib/Plot.cpp
@ -167,20 +167,20 @@ PlotData::PlotData(const DMatSample &x, const DVec &y)
|
|||||||
setCommand("'" + tmpFileName + "' u 1:3:2 w xerr");
|
setCommand("'" + tmpFileName + "' u 1:3:2 w xerr");
|
||||||
}
|
}
|
||||||
|
|
||||||
PlotData::PlotData(const XYStatData &data, const Index i, const Index j)
|
//PlotData::PlotData(const XYStatData &data, const Index i, const Index j)
|
||||||
{
|
//{
|
||||||
DMat d(data.getNData(), 4);
|
// DMat d(data.getNData(), 4);
|
||||||
string usingCmd, tmpFileName;
|
// string usingCmd, tmpFileName;
|
||||||
|
//
|
||||||
d.col(0) = data.x(i);
|
// d.col(0) = data.x(i);
|
||||||
d.col(2) = data.y(j);
|
// d.col(2) = data.y(j);
|
||||||
d.col(1) = data.xxVar(i, i).diagonal().array().sqrt();
|
// d.col(1) = data.xxVar(i, i).diagonal().array().sqrt();
|
||||||
d.col(3) = data.yyVar(j, j).diagonal().array().sqrt();
|
// d.col(3) = data.yyVar(j, j).diagonal().array().sqrt();
|
||||||
usingCmd = (data.isXExact(i)) ? "u 1:3:4 w yerr" : "u 1:3:2:4 w xyerr";
|
// usingCmd = (data.isXExact(i)) ? "u 1:3:4 w yerr" : "u 1:3:2:4 w xyerr";
|
||||||
tmpFileName = dumpToTmpFile(d);
|
// tmpFileName = dumpToTmpFile(d);
|
||||||
pushTmpFile(tmpFileName);
|
// pushTmpFile(tmpFileName);
|
||||||
setCommand("'" + tmpFileName + "' " + usingCmd);
|
// setCommand("'" + tmpFileName + "' " + usingCmd);
|
||||||
}
|
//}
|
||||||
|
|
||||||
// PlotHLine constructor ///////////////////////////////////////////////////////
|
// PlotHLine constructor ///////////////////////////////////////////////////////
|
||||||
PlotHLine::PlotHLine(const double y)
|
PlotHLine::PlotHLine(const double y)
|
||||||
|
@ -21,9 +21,11 @@
|
|||||||
#define Latan_Plot_hpp_
|
#define Latan_Plot_hpp_
|
||||||
|
|
||||||
#include <LatAnalyze/Global.hpp>
|
#include <LatAnalyze/Global.hpp>
|
||||||
|
#include <LatAnalyze/Function.hpp>
|
||||||
#include <LatAnalyze/Mat.hpp>
|
#include <LatAnalyze/Mat.hpp>
|
||||||
|
#include <LatAnalyze/MatSample.hpp>
|
||||||
#include <LatAnalyze/Histogram.hpp>
|
#include <LatAnalyze/Histogram.hpp>
|
||||||
#include <LatAnalyze/XYStatData.hpp>
|
//#include <LatAnalyze/XYStatData.hpp>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
@ -92,7 +94,7 @@ public:
|
|||||||
PlotData(const DMatSample &x, const DMatSample &y);
|
PlotData(const DMatSample &x, const DMatSample &y);
|
||||||
PlotData(const DVec &x, const DMatSample &y);
|
PlotData(const DVec &x, const DMatSample &y);
|
||||||
PlotData(const DMatSample &x, const DVec &y);
|
PlotData(const DMatSample &x, const DVec &y);
|
||||||
PlotData(const XYStatData &data, const Index i = 0, const Index j = 0);
|
//PlotData(const XYStatData &data, const Index i = 0, const Index j = 0);
|
||||||
// destructor
|
// destructor
|
||||||
virtual ~PlotData(void) = default;
|
virtual ~PlotData(void) = default;
|
||||||
};
|
};
|
||||||
|
@ -34,12 +34,12 @@ TabFunction::TabFunction(const DVec &x, const DVec &y,
|
|||||||
setData(x, y);
|
setData(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
TabFunction::TabFunction(const XYStatData &data, const Index i, const Index j,
|
//TabFunction::TabFunction(const XYStatData &data, const Index i, const Index j,
|
||||||
const InterpType interpType)
|
// const InterpType interpType)
|
||||||
: interpType_(interpType)
|
//: interpType_(interpType)
|
||||||
{
|
//{
|
||||||
setData(data, i, j);
|
// setData(data, i, j);
|
||||||
}
|
//}
|
||||||
|
|
||||||
// access //////////////////////////////////////////////////////////////////////
|
// access //////////////////////////////////////////////////////////////////////
|
||||||
void TabFunction::setData(const DVec &x, const DVec &y)
|
void TabFunction::setData(const DVec &x, const DVec &y)
|
||||||
@ -54,10 +54,10 @@ void TabFunction::setData(const DVec &x, const DVec &y)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TabFunction::setData(const XYStatData &data, const Index i, const Index j)
|
//void TabFunction::setData(const XYStatData &data, const Index i, const Index j)
|
||||||
{
|
//{
|
||||||
setData(data.x(i), data.y(j));
|
// setData(data.x(i), data.y(j));
|
||||||
}
|
//}
|
||||||
|
|
||||||
// function call ///////////////////////////////////////////////////////////////
|
// function call ///////////////////////////////////////////////////////////////
|
||||||
double TabFunction::operator()(const double *arg) const
|
double TabFunction::operator()(const double *arg) const
|
||||||
@ -154,11 +154,11 @@ DoubleFunction Latan::interpolate(const DVec &x, const DVec &y,
|
|||||||
return TabFunction(x, y, interpType).makeFunction();
|
return TabFunction(x, y, interpType).makeFunction();
|
||||||
}
|
}
|
||||||
|
|
||||||
DoubleFunction Latan::interpolate(const XYStatData &data, const Index i,
|
//DoubleFunction Latan::interpolate(const XYStatData &data, const Index i,
|
||||||
const Index j, const InterpType interpType)
|
// const Index j, const InterpType interpType)
|
||||||
{
|
//{
|
||||||
return TabFunction(data, i, j, interpType).makeFunction();
|
// return TabFunction(data, i, j, interpType).makeFunction();
|
||||||
}
|
//}
|
||||||
|
|
||||||
map<double, double>::const_iterator TabFunction::nearest(const double x) const
|
map<double, double>::const_iterator TabFunction::nearest(const double x) const
|
||||||
{
|
{
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#include <LatAnalyze/Global.hpp>
|
#include <LatAnalyze/Global.hpp>
|
||||||
#include <LatAnalyze/Function.hpp>
|
#include <LatAnalyze/Function.hpp>
|
||||||
#include <LatAnalyze/Math.hpp>
|
#include <LatAnalyze/Math.hpp>
|
||||||
#include <LatAnalyze/XYStatData.hpp>
|
//#include <LatAnalyze/XYStatData.hpp>
|
||||||
|
|
||||||
BEGIN_LATAN_NAMESPACE
|
BEGIN_LATAN_NAMESPACE
|
||||||
|
|
||||||
@ -47,13 +47,13 @@ public:
|
|||||||
TabFunction(void) = default;
|
TabFunction(void) = default;
|
||||||
TabFunction(const DVec &x, const DVec &y,
|
TabFunction(const DVec &x, const DVec &y,
|
||||||
const InterpType interpType = InterpType::LINEAR);
|
const InterpType interpType = InterpType::LINEAR);
|
||||||
TabFunction(const XYStatData &data, const Index i = 0, const Index j = 0,
|
//TabFunction(const XYStatData &data, const Index i = 0, const Index j = 0,
|
||||||
const InterpType interpType = InterpType::LINEAR);
|
// const InterpType interpType = InterpType::LINEAR);
|
||||||
// destructor
|
// destructor
|
||||||
virtual ~TabFunction(void) = default;
|
virtual ~TabFunction(void) = default;
|
||||||
// access
|
// access
|
||||||
void setData(const DVec &x, const DVec &y);
|
void setData(const DVec &x, const DVec &y);
|
||||||
void setData(const XYStatData &data, const Index i = 0, const Index j = 0);
|
// void setData(const XYStatData &data, const Index i = 0, const Index j = 0);
|
||||||
// function call
|
// function call
|
||||||
double operator()(const double *arg) const;
|
double operator()(const double *arg) const;
|
||||||
// factory
|
// factory
|
||||||
@ -67,9 +67,9 @@ private:
|
|||||||
|
|
||||||
DoubleFunction interpolate(const DVec &x, const DVec &y,
|
DoubleFunction interpolate(const DVec &x, const DVec &y,
|
||||||
const InterpType interpType = InterpType::LINEAR);
|
const InterpType interpType = InterpType::LINEAR);
|
||||||
DoubleFunction interpolate(const XYStatData &data, const Index i = 0,
|
//DoubleFunction interpolate(const XYStatData &data, const Index i = 0,
|
||||||
const Index j = 0,
|
// const Index j = 0,
|
||||||
const InterpType interpType = InterpType::LINEAR);
|
// const InterpType interpType = InterpType::LINEAR);
|
||||||
|
|
||||||
END_LATAN_NAMESPACE
|
END_LATAN_NAMESPACE
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user