Skip to content

Commit 18e4571

Browse files
SoftwareDevice: Rename to FunctionRunner
1 parent 5f0ca19 commit 18e4571

File tree

7 files changed

+17
-17
lines changed

7 files changed

+17
-17
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#####################################################################
22
# #
3-
# /labscript_devices/SoftwareDevice/__init__.py #
3+
# /labscript_devices/FunctionRunner/__init__.py #
44
# #
55
# Copyright 2019, Monash University and contributors #
66
# #
@@ -15,4 +15,4 @@
1515

1616
import sys
1717
if sys.version_info < (3, 5):
18-
raise RuntimeError("SoftwareDevice requires Python 3.5+")
18+
raise RuntimeError("FunctionRunner requires Python 3.5+")
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#####################################################################
22
# #
3-
# /labscript_devices/SoftwareDevice/blacs_tabs.py #
3+
# /labscript_devices/FunctionRunner/blacs_tabs.py #
44
# #
55
# Copyright 2019, Monash University and contributors #
66
# #
@@ -14,7 +14,7 @@
1414
from blacs.device_base_class import DeviceTab
1515

1616

17-
class SoftwareDeviceTab(DeviceTab):
17+
class FunctionRunnerTab(DeviceTab):
1818
def restore_builtin_save_data(self, data):
1919
DeviceTab.restore_builtin_save_data(self, data)
2020
# Override restored settings and show and maximise the outputbox for this tab:
@@ -24,7 +24,7 @@ def restore_builtin_save_data(self, data):
2424
def initialise_workers(self):
2525
self.create_worker(
2626
'main_worker',
27-
'labscript_devices.SoftwareDevice.blacs_workers.SoftwareDeviceWorker',
27+
'labscript_devices.FunctionRunner.blacs_workers.FunctionRunnerWorker',
2828
{},
2929
)
3030
self.primary_worker = 'main_worker'
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#####################################################################
22
# #
3-
# /labscript_devices/SoftwareDevice/blacs_worker.py #
3+
# /labscript_devices/FunctionRunner/blacs_worker.py #
44
# #
55
# Copyright 2019, Monash University and contributors #
66
# #
@@ -36,7 +36,7 @@ def deserialise_function_table(function_table, device_name):
3636
# We deserialise the functions in a namespace with the given __name__ and
3737
# __file__ so that if the user instantiates a lyse.Run object, that the results
3838
# will automatically be saved to a results group with the name of this
39-
# SoftwareDevice, since lyse.Run inspects the filename to determine this.
39+
# FunctionRunner, since lyse.Run inspects the filename to determine this.
4040
function, args, kwargs = deserialise_function(
4141
name, source, args, kwargs, __name__=device_name, __file__=device_name
4242
)
@@ -51,7 +51,7 @@ def __init__(self, h5_file, device_name):
5151
self.globals = runmanager.get_shot_globals(h5_file)
5252

5353

54-
class SoftwareDeviceWorker(Worker):
54+
class FunctionRunnerWorker(Worker):
5555
def program_manual(self, values):
5656
return {}
5757

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
from .utils import serialise_function
66

77

8-
class SoftwareDevice(Device):
9-
"""A labscript device to run custom functions before, after, or during the
10-
experiment in software time"""
8+
class FunctionRunner(Device):
9+
"""A labscript device to run custom functions before, after, or during (not yet
10+
implemented) the experiment in software time"""
1111

1212
def __init__(self, name, **kwargs):
1313
Device.__init__(self, name=name, parent_device=None, connection=None, **kwargs)
@@ -44,7 +44,7 @@ def func(shot_context, t, ...):
4444
4545
- self.globals: the shot globals
4646
- self.h5_file: the filepath to the shot's HDF5 file
47-
- self.device_name: the name of this SoftwareDevice
47+
- self.device_name: the name of this FunctionRunner
4848
4949
If you want to save raw data to the HDF5 file at the end of a shot, the
5050
recommended place to do it is within the group 'data/<device_name>', for
@@ -64,7 +64,7 @@ def func(shot_context, t, ...):
6464
6565
The group that the results will be saved to, which is usually the filename of
6666
the lyse analysis routine, will instead be the device name of the
67-
SoftwareDevice.
67+
FunctionRunner.
6868
6969
The use case for which this device was implemented was to update runmanager's
7070
globals immediately after a shot, based on measurement data, such that
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#####################################################################
22
# #
3-
# /labscript_devices/SoftwareDevice/register_classes.py #
3+
# /labscript_devices/FunctionRunner/register_classes.py #
44
# #
55
# Copyright 2019, Monash University and contributors #
66
# #
@@ -13,7 +13,7 @@
1313
from labscript_devices import register_classes
1414

1515
register_classes(
16-
'SoftwareDevice',
17-
BLACS_tab='labscript_devices.SoftwareDevice.blacs_tabs.SoftwareDeviceTab',
16+
'FunctionRunner',
17+
BLACS_tab='labscript_devices.FunctionRunner.blacs_tabs.FunctionRunnerTab',
1818
runviewer_parser=None,
1919
)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#####################################################################
22
# #
3-
# /labscript_devices/SoftwareDevice/utils.py #
3+
# /labscript_devices/FunctionRunner/utils.py #
44
# #
55
# Copyright 2019, Monash University and contributors #
66
# #

0 commit comments

Comments
 (0)