File tree Expand file tree Collapse file tree 5 files changed +19
-15
lines changed Expand file tree Collapse file tree 5 files changed +19
-15
lines changed Original file line number Diff line number Diff line change 11
11
# #
12
12
#####################################################################
13
13
14
- """The labscript compiler interface. This is only relevant to developers and those
14
+ """The labscript compiler interface - this is only relevant to developers and those
15
15
interested in the labscript interface to runmanager."""
16
16
17
17
import builtins
Original file line number Diff line number Diff line change 11
11
# #
12
12
#####################################################################
13
13
14
- """Core classes containing common device functionality. These are used in
14
+ """Core classes containing common device functionality - these are used in
15
15
labscript-devices when adding support for a hardware device."""
16
16
17
17
import sys
Original file line number Diff line number Diff line change 11
11
# #
12
12
#####################################################################
13
13
14
- """Contains the functional forms of analog output ramps. These are not used directly,
14
+ """Contains the functional forms of analog output ramps - these are not used directly,
15
15
instead see the interfaces in `AnalogQuantity`/`AnalogOut`."""
16
16
17
17
from pylab import *
18
18
import numpy as np
19
19
20
- def print_time (t , description ):
21
- """Print time with a descriptive string.
20
+ from .utils import print_time
22
21
23
- Useful debug tool to print time at a specific point
24
- in the shot, during shot compilation. Helpful when
25
- the time is calculated.
26
-
27
- Args:
28
- t (float): Time to print
29
- description (str): Descriptive label to print with it
30
- """
31
- print ('t = {0:.9f} s:' .format (t ),description )
32
22
33
23
def ramp (duration , initial , final ):
34
24
"""Defines a linear ramp.
Original file line number Diff line number Diff line change 11
11
# #
12
12
#####################################################################
13
13
14
- """Everything else including the `start()`, `stop()`, and `wait()` functions. All other
14
+ """Everything else including the `start()`, `stop()`, and `wait()` functions - all other
15
15
classes are also imported here for backwards compatibility"""
16
16
17
17
import builtins
Original file line number Diff line number Diff line change 26
26
cached_PseudoclockDevice = None
27
27
28
28
29
+ def print_time (t , description ):
30
+ """Print time with a descriptive string.
31
+
32
+ Useful debug tool to print time at a specific point
33
+ in the shot, during shot compilation. Helpful when
34
+ the time is calculated.
35
+
36
+ Args:
37
+ t (float): Time to print
38
+ description (str): Descriptive label to print with it
39
+ """
40
+ print (f"t={ t :.9f} s: { description } " )
41
+
42
+
29
43
def is_remote_connection (connection ):
30
44
"""Returns whether the connection is an instance of ``_RemoteConnection``
31
45
You can’t perform that action at this time.
0 commit comments