Skip to content

Conversation

Stockless
Copy link
Collaborator

This PR addresses issue #555 by adding support for reading Pulseq files in version 1.5.0.

@Stockless Stockless self-assigned this Sep 17, 2025
@Stockless Stockless marked this pull request as draft September 17, 2025 15:40
Copy link
Member

@cncastillo cncastillo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use three correct logic so pulseq 1.4 still works. No need to pass the version into the get_X functions, you can just check the input length of the library.

phase_ppm = r[8]
freq = r[9]
phase = r[10]
use = r[11]
Copy link
Member

@cncastillo cncastillo Sep 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are not using use, there's an issue that could be solved by incorporating this information into the RF #613.

Copy link

codecov bot commented Sep 23, 2025

Codecov Report

❌ Patch coverage is 54.92958% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.08%. Comparing base (8b62195) to head (c53c044).

Files with missing lines Patch % Lines
KomaMRIFiles/src/Sequence/Pulseq.jl 54.92% 32 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #614      +/-   ##
==========================================
- Coverage   90.08%   90.08%   -0.01%     
==========================================
  Files          56       56              
  Lines        3118     3136      +18     
==========================================
+ Hits         2809     2825      +16     
- Misses        309      311       +2     
Flag Coverage Δ
base 89.19% <ø> (ø)
core 89.66% <ø> (ø)
files 88.47% <54.92%> (-5.13%) ⬇️
komamri 94.15% <ø> (+5.94%) ⬆️
plots 91.12% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
KomaMRIFiles/src/Sequence/Pulseq.jl 85.96% <54.92%> (-7.20%) ⬇️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cncastillo
Copy link
Member

cncastillo commented Oct 6, 2025

(1) Update get_events to add compat_helper copy: https://github.com/pulseq/pulseq/blob/master/matlab/%2Bmr/%40Sequence/read.m#L520. get_events cannot be hardcoded for the RF case

(2) Test with reader with (take inspiration from https://juliahealth.org/KomaMRI.jl/dev/explanation/5-seq-events/):

  • arbitrary gradients
  • time shaped gradients
  • trapezoidal gradients
  • arbitrary rfs
  • time shaped rfs
  • block rfs

@Stockless can you give use the MATLAB files you were using for the tests?

(3) Modify to consider new RF uses, to calculate k-space correctly (not guess RF use by > 90.0):

  • get_RF_types() → 1st
  • get_RF_center() → 2nd
  • get_Mk() → 3rd

If use is Undefined(), keep using the current method; otherwise, use the provided value.

If center is not defined (i.e., == 0.0), keep the current method; otherwise, use the provided value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants