MCPcopy Create free account
hub / github.com/LabPy/lantz / scan_frequency

Function scan_frequency

examples/scanfrequency.py:16–34  ·  view source on GitHub ↗

Scan frequency in an instrument. :param start: Start frequency. :type start: Quantity :param stop: Stop frequency. :type stop: Quantity :param step: Step frequency. :type step: Quantity :param wait: Waiting time. :type wait: Quantity

(inst, start, stop, step, wait)

Source from the content-addressed store, hash-verified

14
15
16def scan_frequency(inst, start, stop, step, wait):
17 """Scan frequency in an instrument.
18
19 :param start: Start frequency.
20 :type start: Quantity
21 :param stop: Stop frequency.
22 :type stop: Quantity
23 :param step: Step frequency.
24 :type step: Quantity
25 :param wait: Waiting time.
26 :type wait: Quantity
27
28 """
29 in_secs = wait.to('seconds').magnitude
30 current = start
31 while current < stop:
32 inst.frequency = current
33 time.sleep(in_secs)
34 current += step
35
36
37if __name__ == '__main__':

Callers 2

scanMethod · 0.90
scanfrequency.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected