Skip to content

Commit

Permalink
Add documentation for MarkerFactory and TRIG pulse.
Browse files Browse the repository at this point in the history
  • Loading branch information
gribeill committed Aug 15, 2017
1 parent d10eb66 commit f261ed2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions QGL/ChannelLibrary.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,9 @@ def on_awg_change(self, oldName, newName):
self.physicalChannelManager.name_changed(chName, newLabel)

def MarkerFactory(label, **kwargs):
'''Return a marker channel by name. Must be defined under top-level `markers`
keyword in measurement configuration YAML.
'''
if channelLib and label in channelLib and isinstance(channelLib[label],
Channels.LogicalMarkerChannel):
return channelLib[label]
Expand Down
5 changes: 5 additions & 0 deletions QGL/PulsePrimitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,4 +779,9 @@ def BLANK(chan, length):
return TAPulse("BLANK", chan.gate_chan, length, 1, 0, 0)

def TRIG(marker_chan, length):
'''TRIG(marker_chan, length) generates a trigger output of amplitude 1 on
a LogicalMarkerChannel.
'''
if not isinstance(marker_chan, Channels.LogicalMarkerChannel):
raise ValueError("TRIG pulses can only be generated on LogicalMarkerChannels.")
return TAPulse("TRIG", marker_chan, length, 1.0, 0., 0.)

0 comments on commit f261ed2

Please sign in to comment.