Closed tonggehua closed 2 years ago
Hi @tonggehua ! Thanks for being (super) patient! Commit 505889cdacc030071a5b0325d50fa180ce83fc90 addresses this - add_gradients.py
. Take a look - https://github.com/imr-framework/pypulseq/blob/505889cdacc030071a5b0325d50fa180ce83fc90/pypulseq/add_gradients.py
Is your feature request related to a problem? Please describe. When I am coding oblique gradients, and with multiple types of gradients being played together, there is a need to add gradients together, scale gradients, or change the channels of an already made gradient object.
add_block
function, however, only accepts one gradient per channel (it overwrites the previous one if more than one is used).Describe the solution you'd like Include these utility functions:
gx
,gy
, andgz
. Preserve trapezoidal gradients if timings match. Otherwise, return general gradients.add_block
: don't include them to reduce storage wasteDescribe alternatives you've considered The alternative is for each user to perform these actions in their custom code, individually. I believe they are generally useful enough to be part of Pypulseq.