DynExp
Highly flexible laboratory automation for dynamically changing experiments.
Loading...
Searching...
No Matches
ODMRWidget.h
Go to the documentation of this file.
1// This file is part of DynExp.
2
8#pragma once
9
10#include "stdafx.h"
11#include "DynExpCore.h"
13
14namespace Ui
15{
16 class ODMR;
17}
18
19namespace DynExpModule::ODMR
20{
21 class ODMR;
22 class ODMRData;
23
36
38
40 {
41 // x is frequency in GHz, y is ODMR signal in units of SignalDetector.
42 QList<QPointF> DataPoints;
43 QList<QPointF> FitPoints;
44 std::tuple<double, double> FitParams; // tuple<c0, c1> with fit model ODMRSignal = c0 + c1 * frequency
45 bool HasChanged = false;
47 };
48
50 {
51 // x is frequency in Hz, y is sensitivity in T/sqrt(Hz).
52 QList<QPointF> DataPoints;
53 bool HasChanged = false;
55 };
56
58 {
59 Q_OBJECT
60
61 private:
74
75 public:
76 ODMRWidget(ODMR& Owner, QModuleWidget* parent = nullptr);
77 ~ODMRWidget() = default;
78
79 bool AllowResize() const noexcept override final { return true; }
80
84 void UpdateODMRPlot(ODMRPlotType& ODMRPlot);
85 void UpdateSensitivityPlot(SensitivityPlotType& SensitivityPlot);
86
87 const auto GetUI() const noexcept { return ui.get(); }
88 bool GetUIInitialized() const noexcept { return UIInitialized; }
89 const auto* GetODMRGraph() const noexcept { return ODMRGraph; }
90
91 private:
92 std::unique_ptr<Ui::ODMR> ui;
94
97
101
102 bool UIInitialized = false;
103
104 private slots:
106 void OnSweepSeriesParamChanged(int Index);
107 };
108}
Defines DynExp's core module as an interface between the UI and DynExp objects.
C++ backend of the QDynExpLineGraph QML component.
double ValueType
Data type to represent hardware limits on the sample values to write to the hardware adapter assigned...
DynExpQuick::DynExpLineGraphBackend * SensitivityGraph
Definition ODMRWidget.h:96
void OnSweepSeriesParamChanged(int Index)
void UpdateODMRPlot(ODMRPlotType &ODMRPlot)
void UpdateUIData(Util::SynchronizedPointer< ODMRData > &ModuleData)
void InitializeUI(Util::SynchronizedPointer< ODMRData > &ModuleData)
const auto GetUI() const noexcept
Definition ODMRWidget.h:87
void SetUIState(const StateMachineStateType *State, Util::SynchronizedPointer< ODMRData > &ModuleData)
std::unique_ptr< Ui::ODMR > ui
Definition ODMRWidget.h:92
bool AllowResize() const noexcept override final
Indicates the resizing behavior of the user interface window. Override to adjust.
Definition ODMRWidget.h:79
DynExpInstr::DataStreamInstrumentData::ValueType AuxAnalogOutMinValue
Definition ODMRWidget.h:99
void UpdateSensitivityPlot(SensitivityPlotType &SensitivityPlot)
DynExpInstr::DataStreamInstrumentData::ValueType AuxAnalogOutMaxValue
Definition ODMRWidget.h:100
const auto * GetODMRGraph() const noexcept
Definition ODMRWidget.h:89
DynExp::Units::UnitType AuxAnalogOutValueUnit
Definition ODMRWidget.h:98
bool GetUIInitialized() const noexcept
Definition ODMRWidget.h:88
DynExpQuick::DynExpLineGraphBackend * ODMRGraph
Definition ODMRWidget.h:95
Window class for Qt-based user interfaces belonging to DynExp modules. User interface Qt window class...
Definition Module.h:1396
QModuleBase & Owner
Module owning this user interface window (reference, because it should never change nor be nullptr).
Definition Module.h:1486
QModuleWidget(QModuleBase &Owner, QWidget *Parent=nullptr)
Constructs a QModuleWidget instance.
Definition Module.cpp:451
State machine state as used by class StateMachine. A state mainly wraps a state function of the membe...
Definition Util.h:1363
Pointer to lock a class derived from ISynchronizedPointerLockable for synchronizing between threads....
Definition Util.h:171
std::tuple< double, double > FitParams
Definition ODMRWidget.h:44
Graph::LineGraphPlotInfo PlotInfo
Definition ODMRWidget.h:46
Graph::LineGraphPlotInfo PlotInfo
Definition ODMRWidget.h:54
UnitType
Units which can be used with DynExp instruments.
Definition Units.h:28
@ Arbitrary
Arbitrary units (a.u.)
DynExp's main namespace contains the implementation of DynExp including classes to manage resources (...
Accumulates include statements to provide a precompiled header.
const StateMachineStateType * CurrentState
Definition ODMRWidget.h:68