Save clock instructions and add runviewer parser for DummyPseudoclock#54
Merged
philipstarkey merged 2 commits intolabscript-suite:masterfrom Jun 24, 2020
Merged
Conversation
1 task
Member
Author
|
These changes can be tested in conjunction with #53 using the following experiment script, which is a slightly extended version of that in labscript-suite/labscript-utils#54. Load this into runmanager and submit it to blacs (check 'Run shot(s)') and/or runviewer (check 'View shot(s)'). from labscript import start, stop, add_time_marker, AnalogOut, DigitalOut
from labscript_devices.DummyPseudoclock.labscript_devices import DummyPseudoclock
from labscript_devices.DummyIntermediateDevice import DummyIntermediateDevice
# Use a virtual, or 'dummy', device for the psuedoclock
DummyPseudoclock(name='pseudoclock')
# An output of this DummyPseudoclock is its 'clockline' attribute, which we use
# to trigger children devices
DummyIntermediateDevice(name='intermediate_device', parent_device=pseudoclock.clockline)
# Create an AnalogOut child of the DummyIntermediateDevice
AnalogOut(name='analog_out', parent_device=intermediate_device, connection='ao0')
# Create a DigitalOut child of the DummyIntermediateDevice
DigitalOut(
name='digital_out', parent_device=intermediate_device, connection='port0/line0'
)
# Begin issuing labscript primitives
# A timing variable t is used for convenience
# start() elicits the commencement of the shot
t = 0
add_time_marker(t, "Start", verbose=True)
start()
# Wait for 1 second with all devices in their default state
t += 1
# Change the state of digital_out, and denote this using a time marker
add_time_marker(t, "Toggle digital_out (high)", verbose=True)
digital_out.go_high(t)
# Wait for 0.5 seconds
t += 0.5
# Ramp analog_out from 0.0 V to 1.0 V over 0.25 s with a 1 kS/s sample rate
t += analog_out.ramp(t=t, initial=0.0, final=1.0, duration=0.25, samplerate=1e3)
# Change the state of digital_out, and denote this using a time marker
add_time_marker(t, "Toggle digital_out (low)", verbose=True)
digital_out.go_low(t)
# Wait for 0.5 seconds
t += 0.5
# Stop the experiment shot with stop()
stop(t) |
rpanderson
commented
Jun 12, 2020
rpanderson
commented
Jun 12, 2020
|
|
||
|
|
||
| class DummyPseudoclockParser(object): | ||
| clock_resolution = 25e-9 |
Member
Author
There was a problem hiding this comment.
This mimics the structure of labscript_devices.PineBlaster but could/should probably be extracted from connection table properties.
Member
|
@rpanderson I've implemented the changes I suggested. Happy to merge this one before 3.0.0 release |
dd195a5 to
cdd34f8
Compare
Member
Author
|
Great! Thanks, @philipstarkey. |
philipstarkey
added a commit
that referenced
this pull request
Jun 25, 2020
commit c9de425 Author: Phil Starkey <philipstarkey@users.noreply.github.com> Date: Thu Jun 25 19:12:29 2020 +1000 Update dependencies in setup.cfg Bumped blacs, labscript and labscript_utils versions to `>=3.0.0` commit d43ced1 Merge: 3863607 1988032 Author: Chris Billington <chrisjbillington@gmail.com> Date: Wed Jun 24 22:48:26 2020 -0400 Merge pull request #58 from philipstarkey/fix-h5py-file-mode Fix h5py deprecation warnings commit 1988032 Author: philipstarkey <philipstarkey@users.noreply.github.com> Date: Thu Jun 25 10:48:10 2020 +1000 Fix h5py deprecation warnings Addresses labscript-suite/labscript-utils#47 for this module commit 3863607 Merge: 88eeefe cdd34f8 Author: Phil Starkey <philipstarkey@users.noreply.github.com> Date: Wed Jun 24 10:51:04 2020 +1000 Merge pull request #54 from rpanderson/dummy_pseudoclock_updates Save clock instructions and add runviewer parser for DummyPseudoclock commit 88eeefe Merge: 55b1bd8 84eb889 Author: Phil Starkey <philipstarkey@users.noreply.github.com> Date: Wed Jun 24 10:50:09 2020 +1000 Merge pull request #42 from JQIamo/SpinnakerCamera Added SpinnakerCamera commit cdd34f8 Author: philipstarkey <philipstarkey@users.noreply.github.com> Date: Tue Jun 23 18:34:28 2020 +1000 Implemented review changes commit d2e5679 Author: Russell Anderson <5637107+rpanderson@users.noreply.github.com> Date: Fri Jun 12 18:47:25 2020 +1000 Save clock instructions (mock PineBlaster) and add runviewer_parser commit 84eb889 Author: philipstarkey <philipstarkey@users.noreply.github.com> Date: Tue Jun 23 12:49:00 2020 +1000 Implemented review changes commit 55b1bd8 Merge: bb9f6f5 d5fca30 Author: Russell Anderson <5637107+rpanderson@users.noreply.github.com> Date: Mon Jun 22 18:07:08 2020 +1000 Merge pull request #57 from philipstarkey/master fix docs conf bugs identified in labscript-suite/labscript-utils#57 commit d5fca30 Author: philipstarkey <philipstarkey@users.noreply.github.com> Date: Sat Jun 20 18:33:55 2020 +1000 fix docs conf bugs identified in labscript-suite/labscript-utils#57 commit bb9f6f5 Merge: 0f1cacd 091110b Author: Russell Anderson <5637107+rpanderson@users.noreply.github.com> Date: Fri Jun 19 17:57:15 2020 +1000 Merge pull request #56 from philipstarkey/master Empty sphinx project following our template commit 091110b Author: philipstarkey <philipstarkey@users.noreply.github.com> Date: Fri Jun 19 17:42:46 2020 +1000 Empty sphinx project following our template commit 0f1cacd Author: Russell Anderson <5637107+rpanderson@users.noreply.github.com> Date: Wed Jun 17 16:39:08 2020 +1000 Added missing devices to README.md commit 5347098 Author: Russell Anderson <5637107+rpanderson@users.noreply.github.com> Date: Wed Jun 17 11:38:03 2020 +1000 Populated README.md with styling, iconogrpahy, prose, and badges commit bd2505e Author: DSB <dsbark7@gmail.com> Date: Mon May 4 14:27:03 2020 -0400 SpinnakerCamera Adding a camera interface that uses FLIR's newer PySpin/Spinnaker API. DSB Co-authored-by: chrisjbillington <chrisjbillington@gmail.com> Co-authored-by: Russell Anderson <5637107+rpanderson@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR permits whole-suite works-out-of-the-box changes by adding a runviewer parser to DummyPseudoclock (resolves #52).
The additions to the
generate_codemethod ofDummyPseudoclockand theget_tracesmethod ofDummyPseudoclockParsermocklabscript_devices.PineBlaster, which appeared to be the simplest non-dummy pseudoclock device to mimic the instruction set and runviewer parser of.