Skip to content

addBlock

Adds a new block of events to a Pulseq sequence. It offers three ways to add a block: 1) using a pre-defined block structure; 2) specifying individual events; 3) specifying a duration and then populating the block with events, up to that duration.

Syntax

function addBlock(varargin)

Calling Pattern

seq.addBlock(...)

Parameters

Optional Parameters

Name Type Default Description Example
blockStruct struct A pre-defined block structure struct('type', 'adc', 'duration', 0.001)
duration double Optional duration for the block. If provided as first argument, all subsequent events will be added to a block with this duration (Units: seconds) 0.01
events varargs One or more events (RF, gradient, ADC) to add to the block makeTrapezoid('x', 100, 0.001), makeAdc(0.005)
trajectory_delay double 0 Delay before starting the trajectory. Only applicable if the input block events include a gradient event (Units: seconds) 0.001

Returns

Output Type Description
none none This function modifies the Pulseq sequence object in place. It does not return any value.

Examples

% Add RF pulse with slice selection gradient
seq.addBlock(rf, gz);

% Add readout with prephasing gradients
seq.addBlock(gxPre, gyPre);
seq.addBlock(gx, adc);

% Add multiple events in a single block
seq.addBlock(gx, gy_blip, adc);

See Also

setBlock, makeAdc, makeTrapezoid, makeSincPulse