30 const bool use_fit_objective =
true;
38 , m_fitlog(new
FitLog(this))
39 , m_block_progress_update(false)
57 throw Error(
"FitSuiteManager::setItem() -> Item was already set.");
67 [
this](
const QString&
name) {
85 }
catch (std::exception& e) {
104 auto progressInfo =
m_observer->progressInfo();
109 if (!use_fit_objective)
114 if (!progressInfo.logInfo().empty())
148 message.append(
"Current settings cause fitting failure.\n\n");
149 message.append(text);
167 QVector<double> values = QVector<double>::fromStdVector(info.
parValues());
174 QString message = QString(
"NCalls:%1 chi2:%2 \n").arg(info.
iterationCount()).arg(info.
chi2());
177 QVector<double> values = QVector<double>::fromStdVector(info.
parValues());
179 if (item->linkItems().empty())
181 QString parinfo = QString(
" %1 %2\n").arg(item->displayName()).arg(values[index++]);
182 message.append(parinfo);
Defines class FitObjectiveBuilder.
Defines class FitParameterContainerItem.
Defines class FitParameterItem.
Defines class FitSessionController.
Defines class FitSuiteItem.
Implements class FitWorkerLauncher.
Implements class GUIFitObserver.
Defines class IntensityDataItem.
@ Completed
the job was successfully completed
@ Failed
the job aborted because it hit an error
@ Fitting
the job is busy fitting
Defines class Helpers functions.
void setRawDataVector(const std::vector< double > &data)
Sets the raw data vector from external source. Checks only the equality of data size; no dimension ch...
the collected messages of a fitting session
The FitParameterContainerItem class is a collection of all defined fit parameters in JobItem.
void setValuesInParameterContainer(const QVector< double > &values, class ParameterContainerItem *parameterContainer)
Propagate values to the corresponding parameter tree items of parameterContainer.
QVector< FitParameterItem * > fitParameterItems() const
FitParameterItems is a collection of items to define fit parameters in GUI.
The FitProgressInfo class contains all essential information about fit progress. It is send from GUIF...
std::vector< double > parValues() const
int iterationCount() const
void onStopFittingRequest()
void onStartFittingRequest()
void onFittingError(const QString &text)
std::shared_ptr< GUIFitObserver > m_observer
std::unique_ptr< FitLog > m_fitlog
~FitSessionController() override
void fittingError(const QString &message)
void updateIterationCount(const FitProgressInfo &info)
FitWorkerLauncher * m_runFitManager
void updateFitParameterValues(const FitProgressInfo &info)
void updateLog(const FitProgressInfo &info)
FitSessionController(QObject *parent=nullptr)
std::shared_ptr< FitObjectiveBuilder > m_objectiveBuilder
void setItem(JobItem *item)
void setChi2(double chi2)
int updateInterval() const
void setIterationCount(int count)
static bool isUpdateIntervalPropertyName(const QString &name)
const QDateTime & fitEnd() const
void runFitting(std::shared_ptr< FitObjectiveBuilder > suite)
void fittingError(const QString &message)
const QDateTime & fitStart() const
Serves as observer for FitObjective and saves fit iteration data for later display in GUI widgets.
void setEndTime(const QDateTime &end_time)
void setStatus(JobStatus status)
void setProgress(int progress)
FitParameterContainerItem * fitParameterContainerItem()
FitSuiteItem * fitSuiteItem()
ParameterContainerItem * parameterContainerItem()
JobStatus getStatus() const
void setBeginTime(const QDateTime &begin_time)
void setOnPropertyChange(std::function< void(QString)> f, const void *caller=nullptr)
ModelMapper * mapper()
Returns the current model mapper of this item. Creates new one if necessary.
QString const & name(EShape k)