Skip to content

Moved plot of unrolled sequence to utilities#147

Open
schote wants to merge 12 commits intomainfrom
plot-unrolled-sequence
Open

Moved plot of unrolled sequence to utilities#147
schote wants to merge 12 commits intomainfrom
plot-unrolled-sequence

Conversation

@schote
Copy link
Owner

@schote schote commented Feb 3, 2026

To plot an unrolled/calculated sequence, the SequenceProvider implemented a class method which used the cached sequence for plotting. Thus, the access to a plot of an unrolled sequence is granted only via the SequenceProvider.

The method to plot a sequence was now moved to utilities/plot.py. It utilizes the UnrolledSequence interface which was therefor extend by the output limit for each channel and the impedance scaling factor for each channel.
Having a separate function allows to plot the sequence which is cached in the AcquisitionControl class or returned by the unrolling algorithm and improves the flexibility. Additionally the sequence no longer needs to be cached within the SequenceProvider instance what reduces the memory consumption.

@github-actions
Copy link

github-actions bot commented Feb 3, 2026

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/console
   __init__.py10190%11
src/console/interfaces
   acquisition_data.py1232580%96–99, 110–111, 129–130, 145–148, 158–159, 188–189, 193–199, 215–216, 227, 231, 249
   acquisition_parameter.py107496%126, 163, 178, 213
   device_configuration.py50296%59, 65
   dimensions.py962277%45–46, 67–68, 71, 79, 89, 95, 101, 107, 113–115, 125–127, 137–139, 149–151
   rx_data.py791482%66–70, 78, 90, 94, 96, 104, 115, 123, 126, 129
src/console/pulseq_interpreter
   sequence_provider.py2491893%166, 171, 185–187, 321–322, 415–416, 512, 562–563, 632, 658–659, 675, 684, 688
src/console/spcm_control
   abstract_device.py79790%2–149
   acquisition_control.py1531530%3–362
   rx_device.py2052050%2–484
   tx_device.py1751750%2–465
src/console/spcm_control/spcm
   pyspcm.py1611610%3–295
   tools.py54540%3–128
src/console/utilities
   json_encoder.py8362%22–24
   load_configuration.py20670%18–20, 28–30
   plot.py531670%31–32, 80–98
src/console/utilities/data
   mrd_helper.py43881%37, 43, 49, 52, 60, 63, 68, 71
   write_acquisition_to_mrd.py47589%43–44, 63, 81, 86
src/console/utilities/sequences/calibration
   fid_tx_adjust.py22195%66
   se_tx_adjust.py29293%62–64
src/console/utilities/sequences/spectrometry
   fid.py15150%2–75
   se_spectrum.py25292%51, 85
src/console/utilities/sequences/tse
   tse_3d.py2417569%108–109, 111–112, 114–115, 122–123, 125–127, 129–132, 143–146, 151–154, 161–172, 189, 211–218, 224, 255, 318–335, 342–343, 410, 413–425, 533–544
TOTAL5300104680% 

Tests Skipped Failures Errors Time
191 0 💤 0 ❌ 0 🔥 15.386s ⏱️

@schote schote requested a review from ckolbPTB February 4, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants