Defining a Range with Settings
Use settings to define a range of values in your application.
from ScopeFoundry.measurement import Measurement
class CurrentSweep(Measurement):
name = "current_sweep"
def setup(self):
# Define a range of currents with start, stop, and step values
self.current_range = self.settings.New_Range("currents", initials=(1, 2, 2))
def run(self):
# Access the array of current values
currents = self.current_range.array
for cur in currents:
...
The example above will create 5 settings.
The user can use:
_start
_stop
_step
to define a range. Alternatively, instead of using start
/stop
, the user can use:
range
center
The 5 settings are interconnected to ensure they remain self-consistent.