Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

43 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pypulseq-issues

Draft issue reports for pypulseq, each with a minimal example and a tested fix, and notes for MATLAB Pulseq (pulseq/pulseq) on questions, and on bugs to fix there first. A draft is submitted by hand; the table records where it went. A fix branch, in the fork mdtisdall/pypulseq (for 10a, mdtisdall/pulseq), holds the fix and a regression test for the PR that follows the issue.

# Issue Status Fix branch Upstream
01 make_arbitrary_grad(oversampling=True) checks the slew rate 4× too leniently PR open fix-oversampled-slew-check issue #421, PR #422
02 get_block returns oversampled arbitrary gradients with twice their shape_dur PR open fix-oversampled-get-block issue #423, PR #424
03 waveforms() leaves out the first and last points of oversampled arbitrary gradients draft — —
04 write() and read() fail with KeyError: -1 for oversampled arbitrary gradients draft — —
05 Note for pulseq/pulseq: area of an oversampled arbitrary gradient counts only the raster-centre samples draft — —
06 Reduce the time and memory of calculate_pns for long sequences draft pns-chunked —
07 Compute the SAFE model of calculate_pns in chunks (plan) merged into 06 — —
08 add_block stores an RF event with use='other' as undefined draft — —
09a For pulseq/pulseq: read stores the [SIGNATURE] hash as a double when the hex digest is a finite number draft — —
09b read() stores the [SIGNATURE] hash as a float when the hex digest looks like a number (plan) draft, after 09a fix-signature-hash-as-number —
10a For pulseq/pulseq: signatureFile is 'Text' after read, but 'text' after write PR open fix-signature-file-case issue pulseq/pulseq#295, PR pulseq/pulseq#296
10b read sets signature_file to 'Text', but write sets 'text' PR open fix-signature-file-case issue #427, PR #428
11a For pulseq/pulseq: signatureValue is kept after addBlock, and after read of a file with no [SIGNATURE] draft — —
11b Sequence keeps the [SIGNATURE] hash of a file after add_block and after read of an unsigned file draft, after 11a — —
12 waveforms() draws a line across a gap between two gradient events, where MATLAB Pulseq ramps to 0 draft — —
13 Note for pulseq/pulseq: the prose of five sections of the specification disagrees with their tables and examples draft — —
14 Note for pulseq/pulseq: for a file with CRLF line ends, the scanner's reader hashes other bytes for the signature than the specification says draft — —
15 write() fails with KeyError after read() of a file older than 1.5 with RF events draft — —

Layout

Each issue has its own folder:

  • issue.md: the report, ready to paste into a GitHub issue. After submission, the text as submitted.
  • repro.py: the minimal example of the report.
  • fix.diff: the suggested fix, against pypulseq master. Apply it in a pypulseq checkout with git apply <path>/fix.diff.
  • pr.md, where there is one: the PR description, ready to paste, with its title in the first line.
  • plan.md, where there is one: the plan of the implementation of the fix.

07 is merged into 06. Its folder keeps plan.md, the plan of the implementation, and chunk_tradeoff.py, which measures the time and the memory of calculate_pns for chunk sizes on one computer. chunk_tradeoff_m1max.txt is its output on an Apple M1 Max. A note for pulseq/pulseq has repro.m (MATLAB) as its example. 05 also has repro.py, the same example in pypulseq, and no fix.diff. 12 has repro.m too, the same sequences in MATLAB Pulseq, for comparison. 13 has only issue.md: it is about the text of the specification, so it has no example. 14 has only issue.md too: its example is the table of hashes in the report. 09a and 09b, 10a and 10b, and 11a and 11b, are each the same bug in MATLAB Pulseq and in pypulseq: the "a" issue is submitted first, and the "b" issue refers to it. The fix.diff of 10a, with a test, is against pulseq/pulseq at c746912 and applies in a pulseq/pulseq checkout.

Running an example

With uv, from this folder. The released version:

uv run --no-project --with pypulseq==1.5.0.post1 python 01-oversampled-slew-check/repro.py

pypulseq master at the commit that the reports name:

uv run --no-project --with "pypulseq @ git+https://github.com/pulseq/pypulseq@f2c582bae13145b8ac71958726bc8b5a14bd1cfd" python 01-oversampled-slew-check/repro.py

A pypulseq checkout with a fix.diff applied:

uv run --no-project --with-editable <pypulseq checkout> python 01-oversampled-slew-check/repro.py

04-oversampled-remove-duplicates/repro.py writes oversampled.seq in the current folder (ignored by git).

Versions used

  • pypulseq 1.5.0.post1, and master at f2c582b (2026-08-28).
  • For comparison with MATLAB Pulseq: pulseq/pulseq at c746912 (2026-09-17), run in GNU Octave 11.3.0.
  • For comparison with the MATLAB SAFE model (06): filip-szczepankiewicz/safe_pns_prediction at 0774e80.

Reports 01 to 05 come from a comparison of the gradient slew computations in pypulseq and MATLAB Pulseq (September 2026). Reports 06 and 07 come from the work on the PNS card of pulseq-reports for long sequences (September 2026). Report 09 comes from the work on the sequence signature in the result matrix of pulseq-checks (October 2026). Report 11 comes from the work on pulseq-analysis, which refuses a sequence with no [SIGNATURE] hash (October 2026). Report 12 comes from a code review of pulseq-analysis, which found that its measurements used different gradients between two events (October 2026). Report 13 comes from the study of a strict parser of Pulseq files for pulseq-analysis (October 2026). Report 15 comes from batch 4 of pulseq-discrepancies (record DIS-0062), and was checked on pypulseq master at c977214 (October 2026).

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages