Delay¶
- class Delay(duration, channel=None, name=None)[source]¶
A blocking instruction with no other effect. The delay is used for aligning and scheduling other instructions.
Example
To schedule an instruction at time = 10, on a channel assigned to the variable
channel
, the following could be used:sched = Schedule(name="Delay instruction example") sched += Delay(10, channel) sched += Gaussian(duration, amp, sigma, channel)
The
channel
will output no signal from time=0 up until time=10.Create a new delay instruction.
No other instruction may be scheduled within a
Delay
.- Parameters
duration (
int
) – Length of time of the delay in terms of dt.channel (
Optional
[Channel
]) – The channel that will have the delay.name (
Optional
[str
]) – Name of the delay for display purposes.
Attributes
Return the
Channel
that this instruction is scheduled on.Returns channels that this schedule uses.
The associated command.
Duration of this instruction.
Unique identifier for this instruction.
Iterable for getting instructions from Schedule tree.
Name of this instruction.
Return instruction operands.
Relative begin time of this instruction.
Relative end time of this instruction.
Occupied time slots by this instruction.
Methods
Delay.__call__
(channel)Return new
Delay
that is fully instantiated with bothduration
and achannel
.Delay.append
(schedule[, name])Return a new
Schedule
withschedule
inserted at the maximum time over all channels shared betweenself
andschedule
.Delay.ch_duration
(*channels)Return duration of the supplied channels in this Instruction.
Delay.ch_start_time
(*channels)Return minimum start time for supplied channels.
Delay.ch_stop_time
(*channels)Return maximum start time for supplied channels.
Delay.draw
([dt, style, filename, …])Plot the instruction.
Return itself as already single instruction.
Delay.insert
(start_time, schedule[, name])Return a new
Schedule
withschedule
inserted withinself
atstart_time
.Delay.shift
(time[, name])Return a new schedule shifted forward by time.
Delay.union
(*schedules[, name])Return a new schedule which is the union of self and schedule.