checkTiming
This function checks the timing and other parameters of all blocks and objects within a Pulseq sequence. It verifies consistency between stored block durations and calculated durations, ensures alignment with the blockDurationRaster, and checks for dead times in RF and ADC events. The function modifies the sequence object by adding a 'TotalDuration' field and returns a boolean indicating whether all checks passed, along with a detailed error report if any checks failed.
Syntax
function [is_ok, errorReport]=checkTiming()
Calling Pattern
Parameters
Optional Parameters
| Name |
Type |
Default |
Description |
Example |
trajectory_delay |
double |
0 |
Valid values: >= 0 (Units: seconds) |
0.001 |
Returns
| Output |
Type |
Description |
is_ok |
logical |
A boolean value indicating whether all timing checks passed (true) or not (false). |
errorReport |
cell |
A cell array of strings containing detailed error messages if any timing checks failed. If all checks pass, this will be an empty cell array. |
Examples
% Check timing after sequence construction
[ok, error_report] = seq.checkTiming;
if (ok)
fprintf('Timing check passed successfully\n');
else
fprintf('Timing check failed! Error listing follows:\n');
error_report
end
% Validate timing before writing sequence file
[is_ok, errorReport] = seq.checkTiming();
% Timing check with error handling for complex sequences
[ok, error_report] = seq.checkTiming;
if ~ok
error('Sequence timing validation failed');
end
See Also
mr.checkTiming, Sequence.getBlock