4#ifndef _d6067f26_790d_47d2_9843_9ffef6843fbb
5#define _d6067f26_790d_47d2_9843_9ffef6843fbb
9#include <MrImagingFW/libMath/MrException.h>
10#include <MrImagingFW/libSeqSysProp/SysProperties.h>
12#include <MrMeasSrv/SeqIF/libRT/libRTDefines.h>
37 Vector3d const & k,
double maxAmplitude,
double minRiseTime);
57 Vector3d const & kPlateau,
long plateauDuration,
58 double maxAmplitude,
double minRiseTime);
69 Vector3d const & kPlateau,
long plateauDuration,
82 Vector3d const & k,
long rampDuration,
long plateauDuration,
83 double maxAmplitude,
double minRiseTime);
95 double maxAmplitude,
double minRiseTime);
106 Vector3d const & k,
long rampDuration,
long plateauDuration,
129 auto const amplitude =
130 pulse.getBandwidth() / (pulse.getLarmorConst() * pulse.getThickness());
131 if(amplitude > maxAmplitude)
133 throw MrException(
"Maximum amplitude exceeded");
136 auto rampDuration = std::lround(
roundUp(
138 minRiseTime * amplitude,
double(SysProperties::getCoilCtrlLead())),
140 auto plateauDuration = std::lround(
141 roundUp(pulse.getDuration(), GRAD_RASTER_TIME));
142 return {{0., 0., amplitude}, rampDuration, plateauDuration};
Trapezoidal gradient pulse on three axes, with matching ramp and plateau durations on all axes and eq...
Definition GradientPulse.h:19
Functions generating gradient pulses based on user and system constraints.
Definition gradient_pulses.h:27
GradientPulse sliceSelection(T &&pulse, double maxAmplitude, double minRiseTime)
Compute a slice selection gradient.
Definition gradient_pulses.h:127
GradientPulse quickest(Vector3d const &k, double maxAmplitude, double minRiseTime)
Compute the quickest gradient pulse to achieve the given k-space vector.
GradientPulse fixedDuration(Vector3d const &k, long rampDuration, long plateauDuration, double maxAmplitude, double minRiseTime)
Compute a gradient pulse with the requested ramp and plateau durations.
GradientPulse plateau(Vector3d const &kPlateau, long plateauDuration, double maxAmplitude, double minRiseTime)
Compute a gradient pulse with the requested plateau vector and duration.
Definition acceleration.h:17
double roundUp(double value, double base)
Round up the value to the nearest multiple of base.
Vector< 3, double > Vector3d
3D vector of doubles
Definition Vector.h:110
Specifications of the gradient system.
Definition GradientSpecs.h:12
double minRiseTime
Minimum rise time (i.e. inverse of slew rate) in µs/(mT/m)
Definition GradientSpecs.h:17
double maxAmplitude
Maximum gradient amplitude in mT/m.
Definition GradientSpecs.h:14