Scope
Runstates.h
1 #pragma once
2 
3 #include "ScopeDefines.h"
4 #include "ScopeDatatypes.h"
5 #include "helpers/ScopeNumber.h"
6 #include "helpers/ScopeString.h"
7 #include "helpers/helpers.h"
8 #include "Base.h"
9 #include "Plane.h"
10 
11 namespace scope {
12 
14 namespace parameters {
15 
16 using boost::property_tree::wptree;
17 
20 class Stack
21  : public Base {
22 public:
23  Stack();
24 
26  std::array<PlaneProperties, SCOPE_NAREAS> startat;
27 
29  std::array<PlaneProperties, SCOPE_NAREAS> stopat;
30 
33 
35  std::vector<std::array<PlaneProperties, SCOPE_NAREAS>> planes___;
36 
39 
42 
44  virtual double Range(const uint32_t& _area);
45 
47  virtual double Increment(const uint32_t& _area);
48 
50  virtual double Lambda(const uint32_t& _area);
51 
52  void Load(const wptree& pt) override;
53  void Save(wptree& pt) const override;
54  void SetReadOnlyWhileScanning(const RunState& _runstate) override;
55 
56 protected:
58  virtual void UpdatePlanes();
59 
61  virtual void ResetPlanes();
62 };
63 
67  : public Base {
68 public:
69  Timeseries();
70 
72  std::array<ScopeNumber<uint32_t>, SCOPE_NAREAS> frames;
73 
75  std::array<ScopeNumber<double>, SCOPE_NAREAS> totaltimes;
76 
79 
82 
85 
88 
91 
94 
96  std::vector<std::array<PlaneProperties, SCOPE_NAREAS>> planes;
97 
98  void Load(const wptree& pt) override;
99  void Save(wptree& pt) const override;
100  void SetReadOnlyWhileScanning(const RunState& _runstate) override;
101 
102 protected:
104  void CheckTimes();
105 };
106 
109 class Behavior
110  : public Base {
111 public:
112  Behavior();
113 
116 
119 
122 
124  std::vector<std::array<PlaneProperties, SCOPE_NAREAS>> planes;
125 
128 
129  void Load(const wptree& pt) override;
130  void Save(wptree& pt) const override;
131  void SetReadOnlyWhileScanning(const RunState& _runstate) override;
132 };
133 
134 
135 }
136 
137 }
Parameters for timeseries acquisition.
Definition: Runstates.h:66
void Load(const wptree &pt) override
load parameters from a boost::property_tree
Definition: Runstates.cpp:226
ScopeNumber< bool > unlimited_repeats
Should acquisition go on until Stop pressed (true) or until repeats done (false)? ...
Definition: Runstates.h:118
ScopeValue< ZDevice > zdevicetype
type of z device to use
Definition: Runstates.h:38
void SetReadOnlyWhileScanning(const RunState &_runstate) override
set values that must not be changed to read-only during scanning.
Definition: Runstates.cpp:117
std::array< PlaneProperties, SCOPE_NAREAS > startat
Start plane, measured with the zdevicetype.
Definition: Runstates.h:26
ScopeNumber< uint32_t > repeats
How often should the timeseries be repeated.
Definition: Runstates.h:87
void CheckTimes()
Check and correct times (e.g.
All parameter classes derive from this.
Definition: Base.h:21
ScopeString triggerchannel
channel name for trigger input
Definition: Runstates.h:78
std::array< ScopeNumber< uint32_t >, SCOPE_NAREAS > frames
number of frames in timeseries for each area
Definition: Runstates.h:72
Base class for all Scope datatypes here, provides a uniform interface (and saves typing...).
ScopeNumber< double > overalltime
time in seconds for all timeseries
Definition: Runstates.h:41
virtual void ResetPlanes()
Resets start/stop and all planes.
Definition: Runstates.cpp:61
std::vector< std::array< PlaneProperties, SCOPE_NAREAS > > planes___
Vector with properties for every plane.
Definition: Runstates.h:35
virtual double Increment(const uint32_t &_area)
distance between planes
Definition: Runstates.cpp:77
ScopeNumber< double > spacing
Spacing between planes in microns.
Definition: Runstates.h:32
ScopeNumber< uint32_t > repeats
How many repeats should be acquired if not unlimited_repeats?
Definition: Runstates.h:121
void Save(wptree &pt) const override
save parameters into a boost:property_tree
Definition: Runstates.cpp:178
virtual double Range(const uint32_t &_area)
total span of z stack
Definition: Runstates.cpp:73
ScopeNumber< bool > triggered
the current/first repeat is triggered on triggerchannel
Definition: Runstates.h:81
void Save(wptree &pt) const override
save parameters into a boost:property_tree
Definition: Runstates.cpp:103
In here all declarations for all kinds of datatypes Scope needs.
virtual void UpdatePlanes()
Updates planes with positions and pockels adjustment etc.
Definition: Runstates.cpp:28
void Load(const wptree &pt) override
load parameters from a boost::property_tree
Definition: Runstates.cpp:89
void SetReadOnlyWhileScanning(const RunState &_runstate) override
set values that must not be changed to read-only during scanning.
Definition: Runstates.cpp:269
ScopeNumber< double > overalltime
time in seconds for all timeseries
Definition: Runstates.h:93
void Save(wptree &pt) const override
save parameters into a boost:property_tree
Definition: Runstates.cpp:249
A templated class for a thread-safe value, with signals to GUI or other stuff that are called on valu...
Definition: ScopeValue.h:11
void SetReadOnlyWhileScanning(const RunState &_runstate) override
set values that must not be changed to read-only during scanning.
Definition: Runstates.cpp:205
std::array< ScopeNumber< double >, SCOPE_NAREAS > totaltimes
total acquisition time for each area
Definition: Runstates.h:75
A templated class for a thread-safe std::wstring, with signals that are called on value changes...
Definition: ScopeString.h:8
std::vector< std::array< PlaneProperties, SCOPE_NAREAS > > planes
vector with properties for all planes, for alternating planes on alternating repeats, one for each area
Definition: Runstates.h:124
std::array< PlaneProperties, SCOPE_NAREAS > stopat
Stop plane, measured with the zdevicetype.
Definition: Runstates.h:29
std::vector< std::array< PlaneProperties, SCOPE_NAREAS > > planes
vector with properties for all planes, for alternating planes on repeating timeseries, one for each area
Definition: Runstates.h:96
ScopeNumber< double > betweenrepeats
Time in seconds between the beginning of one and beginning of the next timeseries.
Definition: Runstates.h:90
Various helper functions and classes for Scope.
virtual double Lambda(const uint32_t &_area)
space constant for exponential pockels interpolation
Definition: Runstates.cpp:81
Parameters for behavior triggered acquisition.
Definition: Runstates.h:109
ScopeNumber< bool > alltriggered
every repeat is triggered
Definition: Runstates.h:84
Parameters for stack acquisition.
Definition: Runstates.h:20
ScopeString gateline
The DAQmx digital line for gating.
Definition: Runstates.h:127
ScopeValue< BehaviorMode > mode
Which mode to use.
Definition: Runstates.h:115
void Load(const wptree &pt) override
load parameters from a boost::property_tree
Definition: Runstates.cpp:149