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

Delay.channel

Return the Channel that this instruction is scheduled on.

Delay.channels

Returns channels that this schedule uses.

Delay.command

The associated command.

Delay.duration

Duration of this instruction.

Delay.id

Unique identifier for this instruction.

Delay.instructions

Iterable for getting instructions from Schedule tree.

Delay.name

Name of this instruction.

Delay.operands

Return instruction operands.

Delay.start_time

Relative begin time of this instruction.

Delay.stop_time

Relative end time of this instruction.

Delay.timeslots

Occupied time slots by this instruction.

Methods

Delay.__call__(channel)

Return new Delay that is fully instantiated with both duration and a channel.

Delay.append(schedule[, name])

Return a new Schedule with schedule inserted at the maximum time over all channels shared between self and schedule.

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.

Delay.flatten()

Return itself as already single instruction.

Delay.insert(start_time, schedule[, name])

Return a new Schedule with schedule inserted within self at start_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.