KSFoundation  [October2024]
A platform for structured EPIC programming on GE MR systems
ksgre_tutorial: Tutorial GRE sequence (2D)

Data Structures

struct  KSGRE_SEQUENCE
 

Macros

#define KSGRE_DEFAULT_SSI_TIME   500
 
#define KSGRE_INIT_SEQUENCE   {KS_INIT_SEQ_CONTROL, KS_INIT_READTRAP, KS_INIT_TRAP, KS_INIT_PHASER, KS_INIT_TRAP, KS_INIT_SELRF};
 

Functions

STATUS cvinit (void)
 
STATUS cveval (void)
 
STATUS my_cveval (void)
 
STATUS cvcheck (void)
 
STATUS predownload (void)
 
STATUS pulsegen (void)
 
STATUS mps2 (void)
 
STATUS aps2 (void)
 
STATUS scan (void)
 
 abstract ("GRE Tutorial [KSFoundation]")
 
 psdname ("ksgre_tutorial")
 
int ksgre_scan_sliceloop_nargs (int slperpass, int nargs, void **args)
 
float ksgre_scan_acqloop (int passindx)
 
float ksgre_scan_scanloop ()
 
STATUS ksgre_scan_seqstate (SCAN_INFO slice_info, int kyview)
 
void ksgre_init_imagingoptions (void)
 
STATUS ksgre_init_UI (void)
 
STATUS ksgre_eval_UI ()
 
STATUS ksgre_eval_setupobjects ()
 
STATUS ksgre_eval_TErange ()
 
STATUS ksgre_gradheat_play (const INT max_encode_mode, int nargs, void **args)
 
STATUS ksgre_eval_tr (KS_SEQ_COLLECTION *seqcollection)
 
STATUS ksgre_check ()
 
STATUS ksgre_update_UI ()
 
STATUS ksgre_predownload_plot (KS_SEQ_COLLECTION *seqcollection)
 
STATUS ksgre_predownload_setrecon ()
 
STATUS ksgre_pg ()
 
int ksgre_scan_coreslice (const SCAN_INFO *slice_pos, int dabslice, int kyindx, int exc)
 
int ksgre_scan_sliceloop (int slperpass, int passindx, int kyindx, int exc)
 
STATUS ksgre_scan_init (void)
 
STATUS ksgre_scan_prescanloop (int nloops, int dda)
 

Variables

KS_SEQ_COLLECTION seqcollection
 
float ksgre_gscalerfexc = 0.9
 
float ksgre_spoilerarea = 2000.0 with {0.0, 10000.0, 2000.0, VIS, "ksgre spoiler gradient area",}
 
int ksgre_ssi_time = KSGRE_DEFAULT_SSI_TIME with {32, , KSGRE_DEFAULT_SSI_TIME, VIS, "time from eos to ssi in intern trig",}
 
int ksgre_dda = 2 with {0, 200, 2, VIS, "Number of dummy scans for steady state",}
 
KSGRE_SEQUENCE ksgre = KSGRE_INIT_SEQUENCE
 
int sequence_iopts []
 
int volindx
 
int passindx
 

Detailed Description

Macro Definition Documentation

◆ KSGRE_DEFAULT_SSI_TIME

#define KSGRE_DEFAULT_SSI_TIME   500

◆ KSGRE_INIT_SEQUENCE

Function Documentation

◆ cvinit()

STATUS cvinit ( void  )
62  {
63  STATUS status;
64 
65  status = GEReq_cvinit();
66  KS_RAISE(status);
67 
68  /* reset debug file ./ks_debug.txt (SIM) or /usr/g/mrraw/ks_debug.txt (HW) */
69  ks_dbg_reset();
70 
71  /* Imaging Options buttons */
73 
74  /* Setup UI buttons */
75  status = ksgre_init_UI();
76  KS_RAISE(status);
77 
78  return SUCCESS;
79 
80 } /* cvinit() */
#define KS_RAISE(status)
Definition: KSFoundation.h:190
STATUS ksgre_init_UI(void)
Initial setup of user interface (UI) with default values for menus and fields
Definition: ksgre_implementation.e:266
void ks_dbg_reset()
Clear debug file content
Definition: KSFoundation_common.c:140
STATUS GEReq_cvinit(void)
Helper function to be called at the beginning of cvinit()
Definition: GERequired.e:3194
void ksgre_init_imagingoptions(void)
Initial handling of imaging options buttons and top-level CVs at the PSD type-in page
Definition: ksgre_implementation.e:219

◆ cveval()

STATUS cveval ( void  )
89  {
90 
91  /*
92  cveval() is called 37+ times per UI button push on the MR system, while cvcheck() is only called once.
93  For a faster execution we have a my_cveval() function that is called in cvcheck() instead
94  */
95 
96  return SUCCESS;
97 
98 } /* cveval() */

◆ my_cveval()

STATUS my_cveval ( void  )
103  {
104  STATUS status;
105 
107 
108  status = GEReq_cveval();
109  KS_RAISE(status);
110 
111  /* User Interface updates & opuserCV sync */
112  status = ksgre_eval_UI();
113  KS_RAISE(status);
114 
115  /* Setup sequence objects */
116  status = ksgre_eval_setupobjects();
117  KS_RAISE(status);
118 
119  /* Calculate minimum (and maximum TE) */
120  status = ksgre_eval_TErange();
121  KS_RAISE(status);
122 
123  /* Run the sequence once (and only once after ksgre_eval_setupobjects()) in cveval() to
124  get the sequence duration and the number of object instances (for grad/rf limits) */
125  status = ksgre_pg();
126  KS_RAISE(status);
127 
129  KS_RAISE(status);
130 
131  /* Add the passpacket seqctrl to the seqcollection */
133  KS_RAISE(status);
134 
135  /*--------- Begin: Additional sequence modules -----------*/
136 
137 
138 
139  /*--------- End: Additional sequence modules -----------*/
140 
141 
142  /* Min TR, #slices per TR, RF/gradient heating & SAR */
143  status = ksgre_eval_tr(&seqcollection);
144  KS_RAISE(status);
145 
146  /* RF scaling across sequence modules */
148  KS_RAISE(status);
149 
150  /* scan time */
151  pitscan = ksgre_scan_scanloop();
152 
153  return SUCCESS;
154 
155 } /* my_cveval() */
STATUS ksgre_eval_UI()
Gets the current UI and checks for valid inputs
Definition: ksgre_implementation.e:562
KS_SEQ_COLLECTION seqcollection
Definition: ksgre_tutorial.e:56
STATUS ksgre_pg(int)
The ksgre (main) pulse sequence
Definition: ksgre_implementation.e:1520
STATUS ksgre_eval_TErange()
Sets the min/max TE based on the durations of the sequence objects in KSGRE_SEQUENCE (ksgre)...
Definition: ksgre_implementation.e:789
STATUS ksgre_eval_setupobjects()
Sets up all sequence objects for the main sequence module (KSGRE_SEQUENCE ksgre)
Definition: ksgre_implementation.e:597
STATUS ks_eval_addtoseqcollection(KS_SEQ_COLLECTION *seqcollection, KS_SEQ_CONTROL *seqctrl) WARN_UNUSED_RESULT
Adds a sequence module (KS_SEQ_CONTROL) to the KS_SEQ_COLLECTION struct for later RF scaling and SAR ...
Definition: KSFoundation_host.c:207
KS_SEQ_CONTROL seqctrl_passpack
Definition: GERequired.e:248
s64 ksgre_scan_scanloop()
Plays out all volumes and passes of a single or multi-pass scan
Definition: ksgre_implementation.e:2005
void ks_init_seqcollection(KS_SEQ_COLLECTION *seqcollection)
Resets KS_SEQ_COLLECTION to its default value (KS_INIT_SEQ_COLLECTION)
Definition: KSFoundation_host.c:156
#define KS_RAISE(status)
Definition: KSFoundation.h:190
STATUS ksgre_eval_tr(KS_SEQ_COLLECTION *seqcollection)
Evaluation of number of slices / TR, set up of slice plan, TR validation and SAR checks
Definition: ksgre_tutorial_implementation.e:449
KS_SEQ_CONTROL seqctrl
Definition: ksgre_implementation.e:54
KSGRE_SEQUENCE ksgre
Definition: ksgre_implementation.e:133
STATUS GEReq_cveval(void)
Helper function to be called at the beginning of cveval()
Definition: GERequired.e:3346
STATUS GEReq_eval_rfscaling(KS_SEQ_COLLECTION *seqcollection)
Performs RF scaling of all RF pulses in the KS_SEQ_COLLECTION and Prescan
Definition: GERequired.e:808

◆ cvcheck()

STATUS cvcheck ( void  )
164  {
165  STATUS status;
166 
167  status = my_cveval();
168  KS_RAISE(status);
169 
170  status = GEReq_cvcheck();
171  KS_RAISE(status);
172 
173  status = ksgre_check();
174  KS_RAISE(status);
175 
176  status = ksgre_update_UI();
177  KS_RAISE(status);
178 
179  return SUCCESS;
180 
181 } /* cvcheck() */
STATUS ksgre_check()
Returns error of various parameter combinations that are not allowed for ksgre
Definition: ksgre_tutorial_implementation.e:505
STATUS GEReq_cvcheck(void)
Helper function to be called at the beginning of cvcheck()
Definition: GERequired.e:3430
STATUS my_cveval(void)
Definition: ksgre_tutorial.e:103
#define KS_RAISE(status)
Definition: KSFoundation.h:190
STATUS ksgre_update_UI()
Returns error of various parameter combinations that are not allowed for ksgre
Definition: ksgre_implementation.e:1311

◆ predownload()

STATUS predownload ( void  )
189  {
190  STATUS status;
191 
192  status = GEReq_predownload();
193  KS_RAISE(status);
194 
195  status = GEReq_predownload_prescan_options((RG_CAL_MODE_E) RG_CAL_MODE_LOW_FIXED);
196  KS_RAISE(status);
197 
198  /* Set filter slot # for SCAN, APS2, MPS2 */
200 
201  /* slice ordering */
202  /* The following GE globals must be set appropriately:
203  data_acq_order[], rsp_info[], rsprot[], rsptrigger[]. This is a must for a main pulse sequence */
205  KS_RAISE(status);
206 
207  /* generic rh-vars setup */
208  GEReq_predownload_setrecon_readphase(&ksgre.read, &ksgre.phaseenc, NULL, KS_IMSIZE_MIN256, KS_GERECON * (rhrecon < 1000) /* online recon if rhrecon < 1000 */);
210  GEReq_predownload_setrecon_voldata(opfphases, ks_slice_plan); /* opfphases = number of volumes */
211 
212  /* further sequence specific recon settings that have not been set correctly at this point */
213  status = ksgre_predownload_setrecon();
214  KS_RAISE(status);
215 
216  /* plotting of sequence modules and slice timing to disk */
218 
219  return SUCCESS;
220 
221 } /* predownload() */
KS_SEQ_COLLECTION seqcollection
Definition: ksgre_tutorial.e:56
void GEReq_predownload_setrecon_readphase(const KS_READTRAP *const readtrap, const KS_PHASER *const phaser, const KS_PHASER *const zphaser, int imsize_policy, int datadestination)
Sets required global rh*** variables for Cartsian imaging
Definition: GERequired.e:2633
STATUS GEReq_predownload_setfilter(FILTER_INFO *filt)
Definition: GERequired.e:1382
STATUS GEReq_predownload_store_sliceplan(KS_SLICE_PLAN slice_plan)
Sets mandatory global GE arrays for data acquisition
Definition: GERequired.e:1072
Definition: KSFoundation.h:2335
#define KS_GERECON
Definition: KSFoundation.h:241
STATUS ksgre_predownload_setrecon()
Last-resort function to override certain recon variables not set up correctly already
Definition: ksgre_implementation.e:1471
void GEReq_predownload_setrecon_voldata(int numvols, const KS_SLICE_PLAN slice_plan)
Sets rh*** variables related to multi-volume imaging
Definition: GERequired.e:2940
#define KS_RAISE(status)
Definition: KSFoundation.h:190
KS_READTRAP read
Definition: ksgre_implementation.e:55
STATUS GEReq_predownload_prescan_options(RG_CAL_MODE_E rg_cal_mode)
Prescan options
Definition: GERequired.e:3124
KS_PHASER phaseenc
Definition: ksgre_implementation.e:58
KSGRE_SEQUENCE ksgre
Definition: ksgre_implementation.e:133
FILTER_INFO filt
Definition: KSFoundation.h:843
KS_SLICE_PLAN ks_slice_plan
Definition: GERequired.e:241
KS_READ acq
Definition: KSFoundation.h:1549
void GEReq_predownload_setrecon_annotations_readtrap(KS_READTRAP *readtrap, int echogap)
Sets ih*** variables for TE and rBW annotation based on a KS_READTRAP
Definition: GERequired.e:2865
STATUS GEReq_predownload(void)
Helper function to be called at the beginning of predownload()
Definition: GERequired.e:3473
STATUS ksgre_predownload_plot(KS_SEQ_COLLECTION *seqcollection)
Plotting of sequence modules and slice timing in HTML files
Definition: ksgre_implementation.e:1411

◆ pulsegen()

STATUS pulsegen ( void  )
230  {
231 
233 
234  /* Main Pulse Sequence */
235  ksgre_pg();
236  KS_SEQLENGTH(seqcore, ksgre.seqctrl);
237 
239 
240  buildinstr(); /* load the sequencer memory */
241 
242  return SUCCESS;
243 
244 } /* pulsegen() */
STATUS ksgre_pg(int)
The ksgre (main) pulse sequence
Definition: ksgre_implementation.e:1520
KS_SEQLENGTH(seq_name, seq_struct)
Creates a hardware sequence for the current sequence module
Definition: GERequired.e:65
void GEReq_pulsegenEnd(void)
Helper function to be called at the end of pulsegen()
Definition: GERequired.e:3598
KS_SEQ_CONTROL seqctrl
Definition: ksgre_implementation.e:54
KSGRE_SEQUENCE ksgre
Definition: ksgre_implementation.e:133
void GEReq_pulsegenBegin(void)
Helper function to be called at the beginning of pulsegen()
Definition: GERequired.e:3571

◆ mps2()

STATUS mps2 ( void  )
267  {
268  rspent = L_MPS2;
269  strcpy(psdexitarg.text_arg, "mps2");
270 
271  if (ksgre_scan_init() == FAILURE)
272  return rspexit();
273 
274  if (ksgre_scan_prescanloop(30000, ksgre_dda) == FAILURE)
275  return rspexit();
276 
277  rspexit();
278 
279  return SUCCESS;
280 
281 } /* mps2() */
int ksgre_dda
Definition: ksgre_implementation.e:111
void ksgre_scan_prescanloop(int nloops, int dda)
Prescan loop called from both APS2 and MPS2 entry points
Definition: ksgre_implementation.e:2074
STATUS ksgre_scan_init(void)
Common initialization for prescan entry points MPS2 and APS2 as well as the SCAN entry point...
Definition: ksgre_implementation.e:2045
int rspent
Definition: GERequired.e:3712
PSD_EXIT_ARG psdexitarg

◆ aps2()

STATUS aps2 ( void  )
291  {
292 
293  rspent = L_APS2;
294  strcpy(psdexitarg.text_arg, "aps2");
295 
296  if (ksgre_scan_init() == FAILURE)
297  return rspexit();
298 
299  if (ksgre_scan_prescanloop(100, ksgre_dda) == FAILURE)
300  return rspexit();
301 
302  rspexit();
303 
304  return SUCCESS;
305 
306 } /* aps2() */
int ksgre_dda
Definition: ksgre_implementation.e:111
void ksgre_scan_prescanloop(int nloops, int dda)
Prescan loop called from both APS2 and MPS2 entry points
Definition: ksgre_implementation.e:2074
STATUS ksgre_scan_init(void)
Common initialization for prescan entry points MPS2 and APS2 as well as the SCAN entry point...
Definition: ksgre_implementation.e:2045
int rspent
Definition: GERequired.e:3712
PSD_EXIT_ARG psdexitarg

◆ scan()

STATUS scan ( void  )
317  {
318 
319  rspent = L_SCAN;
320  strcpy(psdexitarg.text_arg, "scan");
321 
322  if (ksgre_scan_init() == FAILURE)
323  return rspexit();
324 
325  /* Scan hierarchy:
326 
327  ksgre_scan_scanloop() - Data for the entire scan
328  ksgre_scan_acqloop() - All data for one set of slices that fit within one TR (one acquisition)
329  ksgre_scan_sliceloop() - One set of slices that fit within one TR played out for one shot
330  ksgre_scan_coreslice() - One slice playout, with optional other sequence modules
331  */
333 
334  GEReq_endofscan();
335 
336  /* So we can see the sequence in plotter after scan completes */
338 
339  rspexit();
340 
341  return SUCCESS;
342 
343 } /* scan() */
void ks_scan_switch_to_sequence(KS_SEQ_CONTROL *ctrl)
Definition: KSFoundation_tgt.c:1625
int GEReq_endofscan()
Sets SSP word in sequence off_GEpass() to tell system that scan is done
Definition: GERequired.e:3647
s64 ksgre_scan_scanloop()
Plays out all volumes and passes of a single or multi-pass scan
Definition: ksgre_implementation.e:2005
STATUS ksgre_scan_init(void)
Common initialization for prescan entry points MPS2 and APS2 as well as the SCAN entry point...
Definition: ksgre_implementation.e:2045
KS_SEQ_CONTROL seqctrl
Definition: ksgre_implementation.e:54
KSGRE_SEQUENCE ksgre
Definition: ksgre_implementation.e:133
int rspent
Definition: GERequired.e:3712
PSD_EXIT_ARG psdexitarg

◆ abstract()

abstract ( "GRE Tutorial "  [KSFoundation])

◆ psdname()

psdname ( "ksgre_tutorial"  )

◆ ksgre_scan_sliceloop_nargs()

int ksgre_scan_sliceloop_nargs ( int  slperpass,
int  nargs,
void **  args 
)

Wrapper function to ksgre_scan_sliceloop() with standardized input arguments

For TR timing heat/SAR calculations of regular 2D multislice sequences, GEReq_eval_TR(), ks_eval_mintr() and GEReq_eval_checkTR_SAR() use a standardized function pointer with a fixed set of input arguments to call the sliceloop of the main sequence with different number of slices to check current slice loop duration. As different pulse sequences may need different number of input arguments (with different meaning) this ksgre_scan_sliceloop_nargs() wrapper function provides the argument translation for ksgre_scan_sliceloop().

The function pointer must have an integer corresponding to the number of slices to use as its first argument while the remaining input arguments (to ksgre_scan_sliceloop()) are stored in the generic void pointer array with nargs elements, which is then unpacked before calling ksgre_scan_sliceloop().

Parameters
[in]slperpassNumber of slices to play in the slice loop
[in]nargsNumber of extra input arguments to ksgre_scan_sliceloop() in range [0,4]
[in]argsVoid pointer array pointing to the variables containing the actual values needed for ksgre_scan_sliceloop()
Return values
slicelooptimeTime taken in [us] to play out slperpass slices
922  {
923  int passindx = 0;
924  int kyindx = KS_NOTSET; /* off */
925  int exc = 0;
926 
927  if (nargs < 0 || nargs > 3) {
928  ks_error("%s: 3rd arg (void **) must contain up to 4 elements: passindx, kyindx, exc", __FUNCTION__);
929  return -1;
930  } else if (nargs > 0 && args == NULL) {
931  ks_error("%s: 3rd arg (void **) cannot be NULL if nargs (2nd arg) != 0", __FUNCTION__);
932  return -1;
933  }
934 
935  if (nargs >= 1 && args[0] != NULL) {
936  passindx = *((int *) args[0]);
937  }
938  if (nargs >= 2 && args[1] != NULL) {
939  kyindx = *((int *) args[1]);
940  }
941  if (nargs >= 3 && args[2] != NULL) {
942  exc = *((int *) args[2]);
943  }
944 
945  return ksgre_scan_sliceloop(slperpass, passindx, kyindx, exc); /* in [us] */
946 
947 } /* ksgre_scan_sliceloop_nargs() */
#define KS_NOTSET
Definition: KSFoundation.h:115
STATUS ks_error(const char *format,...) __attribute__((format(printf
Common error message function for HOST and TGT
int ksgre_scan_sliceloop(int slperpass, int passindx, int kyindx, int exc)
Plays out slperpass slices corresponding to one TR
Definition: ksgre_tutorial_implementation.e:881
int passindx
Definition: ksgre_tutorial_implementation.e:1046

◆ ksgre_scan_acqloop()

float ksgre_scan_acqloop ( int  passindx)

Plays out all phase encodes for all slices belonging to one pass

This function traverses through all phase encodes to be played out and runs the ksgre_scan_sliceloop() for each set of kyindx, and excitation. If ksgre_dda > 0, dummy scans will be played out before the phase encoding begins.

Parameters
[in]passindx0-based pass index in range [0, ks_slice_plan.npasses - 1]
Return values
passlooptimeTime taken in [us] to play out all phase encodes and excitations for slperpass slices. Note that the value is a float instead of int to avoid int overrange at 38 mins of scanning
965  {
966  float time = 0.0;
967  int dda, kyindx, exc;
968 
969  /* dummy scans for steady state */
970  for (dda = 0; dda < ksgre_dda; dda++) {
972  ks_plot_slicetime_endofslicegroup("ksgre dummy TR");
973  }
974  if (ksgre_dda > 0) {
976  }
977 
978  for (kyindx = 0; kyindx < ksgre.phaseenc.numlinestoacq; kyindx++) {
979  for (exc = 0; exc < (int) ceil(opnex); exc++) { /* ceil rounds up opnex < 1 (used for partial Fourier) to 1 */
980 
981  time += (float) ksgre_scan_sliceloop(ks_slice_plan.nslices_per_pass, passindx, kyindx, exc);
982 
983  } /* for exc */
984 
985 
986  ks_plot_slicetime_endofslicegroup("ksgre line");
987 
988  /* save a frame of the main sequence */
990 
991  } /* for kyindx */
992 
994 
995  return time; /* in [us] */
996 
997 } /* ksgre_scan_acqloop() */
#define KS_NOTSET
Definition: KSFoundation.h:115
int numlinestoacq
Definition: KSFoundation.h:1727
void ks_plot_tgt_addframe(KS_SEQ_CONTROL *ctrl)
Definition: KSFoundation_common.c:4370
void ks_plot_slicetime_endofslicegroup(const char *desc)
ADDTITLEHERE
Definition: KSFoundation_common.c:4306
int ksgre_scan_sliceloop(int slperpass, int passindx, int kyindx, int exc)
Plays out slperpass slices corresponding to one TR
Definition: ksgre_tutorial_implementation.e:881
int nslices_per_pass
Definition: KSFoundation.h:1320
Definition: KSFoundation.h:407
KSGRE_SEQUENCE ksgre
Definition: ksgre_tutorial_implementation.e:86
int passindx
Definition: ksgre_tutorial_implementation.e:1046
int ksgre_dda
Definition: ksgre_tutorial_implementation.e:72
KS_PHASER phaseenc
Definition: ksgre_implementation.e:58
KS_SEQ_CONTROL seqctrl
Definition: ksgre_implementation.e:54
void ks_plot_slicetime_endofpass(KS_PLOT_PASS_MODE pass_mode)
ADDTITLEHERE
Definition: KSFoundation_common.c:4286
KS_SLICE_PLAN ks_slice_plan
Definition: GERequired.e:241
Definition: KSFoundation.h:409

◆ ksgre_scan_scanloop()

float ksgre_scan_scanloop ( )

Plays out all passes of a single or multi-pass scan

This function traverses through all phase encodes to be played out, and runs the ksgre_scan_sliceloop() for each set of kyindx and excitation. If ksgre_dda > 0, dummy scans will be played out before the phase encoding begins.

Return values
scantimeTotal scan time in [us] (float to avoid int overrange after 38 mins)
1012  {
1013  float time = 0.0;
1014 
1015  for (volindx = 0; volindx < opfphases; volindx++) { /* opfphases is # volumes */
1016 
1017  for (passindx = 0; passindx < ks_slice_plan.npasses; passindx++) {
1018 
1019  time += ksgre_scan_acqloop(passindx);
1020 
1021 #ifdef IPG
1022  GEReq_endofpass();
1023 #endif
1024 
1025  } /* end: acqs (pass) loop */
1026 
1027  } /* end: volume loop */
1028 
1029  return time;
1030 
1031 } /* ksgre_scan_scanloop() */
float ksgre_scan_acqloop(int passindx)
Plays out all phase encodes for all slices belonging to one pass
Definition: ksgre_tutorial_implementation.e:965
int npasses
Definition: KSFoundation.h:1319
int volindx
Definition: ksgre_tutorial_implementation.e:1046
int passindx
Definition: ksgre_tutorial_implementation.e:1046
int GEReq_endofpass()
Sets SSP word in sequence off_GEpass() to trigger data (Pfile) writing and reconstruction
Definition: GERequired.e:3621
KS_SLICE_PLAN ks_slice_plan
Definition: GERequired.e:241

◆ ksgre_scan_seqstate()

STATUS ksgre_scan_seqstate ( SCAN_INFO  slice_info,
int  kyview 
)

Sets the current state of all ksgre sequence objects being part of KSGRE_SEQUENCE

This function sets the current state of all ksgre sequence objects being part of KSGRE_SEQUENCE, incl. gradient amplitude changes, RF freq/phases and receive freq/phase based on current slice position and phase encoding indices.

The idea of having a 'seqstate' function is to be able to come back to a certain sequence state at any time and possibly play it out once more. This could for example be useful when certain lines or slices need to be rescanned due to image artifacts detected during scanning.

Parameters
[in]slice_infoPosition of the slice to be played out (one element in the ks_scan_info[] array)
[in]kyviewPhase encoding index related to ksgre.phaseenc. A value outside of [0, ksgre.phaseenc.res-1] will set the phase encoding gradient amplitude to 0.
Return values
STATUSSUCCESS or FAILURE
766  {
767  float rfphase = 0;
768 
769  /* rotate the slice plane */
770  ks_scan_rotate(slice_info);
771 
772  /* RF frequency & phase */
773  ks_scan_rf_on(&ksgre.selrfexc.rf, INSTRALL);
774  ks_scan_selrf_setfreqphase(&ksgre.selrfexc, 0 /* instance */, slice_info, rfphase);
775 
776  /* FOV offsets (by changing freq/phase of ksgre.read) */
777  ks_scan_offsetfov(&ksgre.read, INSTRALL, slice_info, kyview, opphasefov, rfphase);
778 
779  /* phase enc amp */
780  ks_scan_phaser_toline(&ksgre.phaseenc, 0, kyview);
781 
782  return SUCCESS;
783 
784 } /* ksgre_scan_seqstate() */
void ks_scan_rf_on(KS_RF *rf, int instanceno)
Resets the amplitude of one or all instances of an RF pulse (KS_RF)
Definition: KSFoundation_tgt.c:566
KS_SELRF selrfexc
Definition: ksgre_implementation.e:61
void ks_scan_selrf_setfreqphase(KS_SELRF *selrf, int instanceno, SCAN_INFO sliceinfo, float rfphase)
Updates the frequency and phase of one or all instances of a slice selective RF pulse (KS_SELRF)...
Definition: KSFoundation_tgt.c:683
KS_RF rf
Definition: KSFoundation.h:1454
KSGRE_SEQUENCE ksgre
Definition: ksgre_tutorial_implementation.e:86
KS_READTRAP read
Definition: ksgre_implementation.e:55
void ks_scan_phaser_toline(KS_PHASER *phaser, int instanceno, int view)
Updates the amplitude of a KS_PHASER sequence object to move from the k-space center to a desired k-s...
Definition: KSFoundation_tgt.c:460
KS_PHASER phaseenc
Definition: ksgre_implementation.e:58
void ks_scan_rotate(SCAN_INFO slice_pos)
Performs a rotation of the logical system on hardware (WARP)
Definition: KSFoundation_tgt.c:1179
void ks_scan_offsetfov(KS_READTRAP *readtrap, int instanceno, SCAN_INFO sliceinfo, float view, float phasefovratio, float rcvphase)
Updates the frequency and phase of one or all instances of a KS_READTRAP to create a FOV shift...
Definition: KSFoundation_tgt.c:1126

◆ ksgre_init_imagingoptions()

void ksgre_init_imagingoptions ( void  )

Initial handling of imaging options buttons and top-level CVs at the PSD type-in page

Returns
void
147  {
148  int numopts = sizeof(sequence_iopts) / sizeof(int);
149 
150  psd_init_iopt_activity();
151  activate_iopt_list(numopts, sequence_iopts);
152  enable_iopt_list(numopts, sequence_iopts);
153 
154  /* Imaging option control functions (using PSD_IOPT_ZIP_512 as example):
155  - Make an option unchecked and not selectable: disable_ioption(PSD_IOPT_ZIP_512)
156  - Make an option checked and not selectable: set_required_disabled_option(PSD_IOPT_ZIP_512)
157  - Remove the imaging option: deactivate_ioption(PSD_IOPT_ZIP_512)
158  */
159 
160  /* default slice order is interleaved */
161  cvdef(opirmode, 0); opirmode = 0;
162 
163  set_required_disabled_option(PSD_IOPT_EDR);
164 
165 
166 } /* ksgre_init_imagingoptions() */
int sequence_iopts[]
Definition: ksgre_tutorial_implementation.e:120

◆ ksgre_init_UI()

STATUS ksgre_init_UI ( void  )

Initial setup of user interface (UI) with default values for menus and fields

Return values
STATUSSUCCESS or FAILURE
176  {
177 
178  /* Menus and button content
179  See epic.h or ksgre.e for more pi*** CVs to use to set up the user menus and buttons */
180 
181  /* Note KSF C-macro: cvset(CV, min, max, default, descr). If desc="", then no update of desc */
182 
183  /* Gradient Echo Type of sequence */
184  acq_type = TYPGRAD; /* loadrheader.e rheaderinit: sets eeff = 1 */
185 
186  /* slice spacing menu, make 0 gap the first menu choice */
187  piisval2 = 0;
188 
189  /* show "Minimum" as 1st option in TR menu */
190  pitrval2 = PSD_MINIMUMTR;
191 
192  /* show "MinimumFull" as 1st option in TE menu */
193  pite1val2 = PSD_MINFULLTE;
194 
195  /* flip angle menu */
196  pifanub = 6; /* 5 option + type-in */
197  pifaval2 = 10;
198  pifaval3 = 20;
199  pifaval4 = 30;
200  pifaval5 = 60;
201  pifaval6 = 90;
202  cvset(opflip, 1, 90, pifaval2, ""); /* allow opflip 1-90, with pifaval2 as default */
203 
204  /* receiver bandwidth menu */
205  pircbnub = 31; /* bitmask: 2^5 - 1. Makes 5 rows */
206  pircbval2 = 31.25;
207  pircbval3 = 41.67;
208  pircbval4 = 50.0;
209  pircbval5 = 62.50;
210  pircbval6 = 125.0;
211  cvset(oprbw, 4, 250, pircbval3, "");
212  pidefrbw = pircbval3; /* Default menu choice (also makes oprbw to be initialized to this) */
213 
214  /* hide second bandwidth option */
215  pircb2nub = 0;
216 
217  /* default low FA. cvset(CV, min, max, default, descr). If desc="", then no update of desc */
218  cvset(opflip, 1, 90, 5, "");
219 
220  /* xres (freq) menu and opxres range (default value in UI not controllable from PSD) */
221  pixresnub = 63;
222  pixresval2 = 64;
223  pixresval3 = 128;
224  pixresval4 = 256;
225  pixresval5 = 320;
226  pixresval6 = 512;
227  cvset(opxres, 32, 512, pixresval3, "");
228 
229  /* yres (phase) menu and opyres range (default value in UI not controllable from PSD) */
230  piyresnub = 63;
231  piyresval2 = 64;
232  piyresval3 = 128;
233  piyresval4 = 256;
234  piyresval5 = 320;
235  piyresval6 = 512;
236  cvset(opyres, 32, 512, piyresval3, "");
237 
238 
239  return SUCCESS;
240 
241 } /* ksgre_init_UI() */
int opxres
int opyres
#define cvset(cv, min, max, def, desc)
Definition: KSFoundation.h:2380

◆ ksgre_eval_UI()

STATUS ksgre_eval_UI ( )

Gets the current UI and checks for valid inputs

Return values
STATUSSUCCESS or FAILURE
260  {
261 
262  if (ksgre_init_UI() == FAILURE)
263  return FAILURE;
264 
265  /* add code here that is related to the user interface (i.e. scan parameter) changes */
266 
267  return SUCCESS;
268 
269 } /* ksgre_eval_UI() */
STATUS ksgre_init_UI(void)
Initial setup of user interface (UI) with default values for menus and fields
Definition: ksgre_tutorial_implementation.e:176

◆ ksgre_eval_setupobjects()

STATUS ksgre_eval_setupobjects ( )

Sets up all sequence objects for the main sequence module (KSGRE_SEQUENCE ksgre)

Return values
STATUSSUCCESS or FAILURE
279  {
280  STATUS status;
281 
282  /*******************************************************************************************************
283  * RF Excitation
284  *******************************************************************************************************/
285 
286  /* RF pulse choice (KSFoundation_GERF.h) */
288 
289  ksgre.selrfexc.rf.flip = opflip;
291 
292  /* selective RF excitation */
293  if (ks_eval_selrf(&ksgre.selrfexc, "rfexc") == FAILURE)
294  return FAILURE;
295 
296  /*******************************************************************************************************
297  * Readout
298  *******************************************************************************************************/
299 
300  ksgre.read.fov = opfov;
301  ksgre.read.res = RUP_FACTOR(opxres, 2); /* round up (RUP) to nearest multiple of 2 */
302  ksgre.read.acq.rbw = oprbw;
303  status = ks_eval_readtrap(&ksgre.read, "read");
304  KS_RAISE(status);
305 
306  /*******************************************************************************************************
307  * Readout dephaser
308  *******************************************************************************************************/
309 
311  status = ks_eval_trap(&ksgre.readdephaser, "readdephaser");
312  KS_RAISE(status);
313 
314  /*******************************************************************************************************
315  * Phase encoding
316  *******************************************************************************************************/
317 
318  ksgre.phaseenc.fov = opfov * opphasefov;
319  ksgre.phaseenc.res = RUP_FACTOR((int) (opyres * opphasefov), 2); /* round up (RUP) to nearest multiple of 2 */
320 
321  if (ks_eval_phaser(&ksgre.phaseenc, "phaseenc") == FAILURE)
322  return FAILURE;
323 
324  /*******************************************************************************************************
325  * Spoiler
326  *******************************************************************************************************/
327 
329  if (ks_eval_trap(&ksgre.spoiler, "spoiler") == FAILURE)
330  return FAILURE;
331 
332  /*******************************************************************************************************
333  * Init (reset) sequence control and set the SSI time
334  *******************************************************************************************************/
336  strcpy(ksgre.seqctrl.description, "ksgremain");
337  /* Copy SSI CV to seqctrl field used by setssitime() */
339 
340  return SUCCESS;
341 
342 } /* ksgre_eval_setupobjects() */
int res
Definition: KSFoundation.h:1721
int opxres
float ksgre_spoilerarea
Definition: ksgre_tutorial_implementation.e:70
int opyres
STATUS ks_eval_phaser(KS_PHASER *phaser, const char *const desc) WARN_UNUSED_RESULT
Sets up an acquisition window with a trapezoid with preset gradient constraints
Definition: KSFoundation_host.c:1993
STATUS ks_eval_selrf(KS_SELRF *selrf, const char *const desc) WARN_UNUSED_RESULT
Sets up a KS_SELRF object for RF slice selection with preset gradient constraints
Definition: KSFoundation_host.c:3312
float fov
Definition: KSFoundation.h:1551
KS_SELRF selrfexc
Definition: ksgre_implementation.e:61
float rbw
Definition: KSFoundation.h:842
float flip
Definition: KSFoundation.h:1028
void ks_init_seqcontrol(KS_SEQ_CONTROL *seqcontrol)
Resets KS_SEQ_CONTROL to its default value (KS_INIT_SEQ_CONTROL)
Definition: KSFoundation_host.c:148
KS_RF rf
Definition: KSFoundation.h:1454
float ksgre_gscalerfexc
Definition: ksgre_tutorial_implementation.e:69
int res
Definition: KSFoundation.h:1552
float opfov
DECL_TYPE KS_RF exc_3dfgre
Definition: KSFoundation_GERF.c:587
STATUS ks_eval_trap(KS_TRAP *trap, const char *const desc) WARN_UNUSED_RESULT
Sets up a trapezoid using a KS_TRAP sequence object with preset gradient constraints
Definition: KSFoundation_host.c:497
KSGRE_SEQUENCE ksgre
Definition: ksgre_tutorial_implementation.e:86
float area
Definition: KSFoundation.h:670
#define KS_RAISE(status)
Definition: KSFoundation.h:190
KS_TRAP readdephaser
Definition: ksgre_implementation.e:56
KS_TRAP spoiler
Definition: ksgre_implementation.e:60
KS_READTRAP read
Definition: ksgre_implementation.e:55
int ssi_time
Definition: KSFoundation.h:1226
KS_PHASER phaseenc
Definition: ksgre_implementation.e:58
KS_SEQ_CONTROL seqctrl
Definition: ksgre_implementation.e:54
STATUS ks_eval_readtrap(KS_READTRAP *readtrap, const char *const desc) WARN_UNUSED_RESULT
Sets up an acquisition window with a trapezoid with preset gradient constraints
Definition: KSFoundation_host.c:1230
KS_DESCRIPTION description
Definition: KSFoundation.h:1234
KS_READ acq
Definition: KSFoundation.h:1549
float opslthick
float area2center
Definition: KSFoundation.h:1559
float fov
Definition: KSFoundation.h:1720
int ksgre_ssi_time
Definition: ksgre_tutorial_implementation.e:71
float slthick
Definition: KSFoundation.h:1456

◆ ksgre_eval_TErange()

STATUS ksgre_eval_TErange ( )

Sets the min TE based on the durations of the sequence objects in KSGRE_SEQUENCE (ksgre)

Return values
STATUSSUCCESS or FAILURE
353  {
354 
355  /* Minimum TE */
356  avminte = ksgre.selrfexc.rf.iso2end;
357  avminte += IMax(3, \
361  avminte += ksgre.read.time2center - ksgre.read.acqdelay; /* from start of acq win to k-space center */
362  avminte = RUP_FACTOR(avminte + 8us, 8); /* add 8us margin and round up to make time divisible by 8us */
363 
364  if (opautote) {
365  setpopup(opte, PSD_OFF);
366  cvoverride(opte, avminte, PSD_FIX_ON, PSD_EXIST_ON); /* AutoTE: force TE to minimum */
367  } else {
368  setpopup(opte, PSD_ON);
369  if (opte < avminte)
370  opte = avminte;
371  }
372 
373  return SUCCESS;
374 
375 } /* ksgre_eval_TErange() */
KS_TRAP grad
Definition: KSFoundation.h:1463
KS_TRAP grad
Definition: KSFoundation.h:1719
KS_SELRF selrfexc
Definition: ksgre_implementation.e:61
KS_RF rf
Definition: KSFoundation.h:1454
KSGRE_SEQUENCE ksgre
Definition: ksgre_tutorial_implementation.e:86
KS_TRAP readdephaser
Definition: ksgre_implementation.e:56
KS_READTRAP read
Definition: ksgre_implementation.e:55
KS_TRAP postgrad
Definition: KSFoundation.h:1464
int iso2end
Definition: KSFoundation.h:1033
KS_PHASER phaseenc
Definition: ksgre_implementation.e:58
int duration
Definition: KSFoundation.h:673
int time2center
Definition: KSFoundation.h:1560
int acqdelay
Definition: KSFoundation.h:1555
int ramptime
Definition: KSFoundation.h:671

◆ ksgre_gradheat_play()

STATUS ksgre_gradheat_play ( const INT  max_encode_mode,
int  nargs,
void **  args 
)

Play function of a test sequence used for gradient heating calculations

This function

  • plays one or more (currently one) sequence modules that collective makes a test sequence that attempts to be a good approximation of the average and maxmimum power dissipation of the gradient system.
  • is not used for any data collection.
  • plays the main sequence based on the max_encode_mode (AVERAGE_POWER or MAXIMUM_POWER).
  • is passed as an argument to ks_eval_getduration() to get the playout time and to ks_eval_hwlimits() to get the new minimum time due to hardware heating and SAR calculations.

It should be noted that the content of this function is manual work and needs to be updated if the content of ksgre_pg() or used sequence modules are changed for the gradient heating to be accurate. So if, for example, major dynamic changes of gradient amplitudes or which sequence modules that are used, this function should be updated accordingly.

As ks_eval_getduration() and ks_eval_hwlimits() are common for all sequences, this function has to have nargs and args as input arguments, but they are not used for this psd. See ksgre_eval_tr() for more details.

Parameters
[in]max_encode_modeThe maximum encoding mode, which can be either AVERAGE_POWER or MAXIMUM_POWER.
[in]nargs(not used) Number of extra input arguments (# elements of void pointer array **args)
[in]args(not used) Void pointer array with nargs elements (may be NULL)
Return values
STATUSSUCCESS or FAILURE
409  {
410  (void) nargs;
411  (void) args;
412 
413  /* set seqstate... */
414 
415  if (max_encode_mode == AVERAGE_POWER) {
417  } else {
418  ks_scan_phaser_max(&ksgre.phaseenc, INSTRALL);
419  }
420 
422 
423  return SUCCESS;
424 
425 } /* ksgre_gradheat_play() */
void ks_scan_phaser_max(KS_PHASER *phaser, int instanceno)
ADDTITLEHERE
Definition: KSFoundation_tgt.c:497
int ks_scan_playsequence(KS_SEQ_CONTROL *ctrl)
Definition: KSFoundation_tgt.c:1644
KSGRE_SEQUENCE ksgre
Definition: ksgre_tutorial_implementation.e:86
KS_PHASER phaseenc
Definition: ksgre_implementation.e:58
KS_SEQ_CONTROL seqctrl
Definition: ksgre_implementation.e:54
void ks_scan_phaser_average(KS_PHASER *phaser, int instanceno)
ADDTITLEHERE
Definition: KSFoundation_tgt.c:490

◆ ksgre_eval_tr()

STATUS ksgre_eval_tr ( KS_SEQ_COLLECTION seqcollection)

Evaluation of number of slices / TR, set up of slice plan, TR validation and SAR checks

With the current sequence collection (see my_cveval()), and a function pointer to an argument-standardized wrapper function (ksgre_scan_sliceloop_nargs()) to the slice loop function (ksgre_scan_sliceloop(), this function calls GEReq_eval_TR(), where number of slices that can fit within one TR is determined by adding more slices as input argument to the slice loop function. For more details see GEReq_eval_TR().

With the number of slices/TR now known, a standard 2D slice plan is set up using ks_calc_sliceplan() and the duration of the main sequence is increased based on timetoadd_perTR, which was returned by GEReq_eval_TR(). timetoadd_perTR > 0 when optr > avmintr and when heat or SAR restrictions requires avmintr to be larger than the net sum of sequence modules in the slice loop.

At the end of this function, TR validation and heat/SAR checks are done using GEReq_eval_checkTR_SAR().

Parameters
[in]seqcollectionPointer to the KS_SEQ_COLLECTION struct holding all sequence modules
Return values
STATUSSUCCESS or FAILURE
449  {
450  int timetoadd_perTR;
451  STATUS status;
452  int slperpass, min_npasses;
453 
454  /* SAR and gradient heating */
455  int newtime = 0;
456  const int time = ks_eval_getduration(seqcollection, ksgre_gradheat_play, 0, NULL);
457  status = ks_eval_hwlimits(&newtime, seqcollection, &loggrd, ksgre_gradheat_play, 0, NULL);
458  KS_RAISE(status);
459 
460  if (newtime > time) {
462  }
463 
464  /* interleaved slices in slice gap menu, force 2+ acqs */
465  if (opileave)
466  min_npasses = 2;
467  else
468  min_npasses = 1;
469 
470  /* Calculate # slices per TR, # acquisitions and how much spare time we have within the current TR by running the slice loop, honoring heating and SAR limits */
471  status = GEReq_eval_TR(&slperpass, &timetoadd_perTR, min_npasses, seqcollection, ksgre_scan_sliceloop_nargs, 0, NULL);
472  KS_RAISE(status);
473 
474  /* Calculate the slice plan (ordering) and passes (acqs). ks_slice_plan is passed to GEReq_predownload_store_sliceplan() in predownload() */
475  ks_calc_sliceplan(&ks_slice_plan, exist(opslquant), slperpass);
476 
477  /* We spread the available timetoadd_perTR evenly, by increasing the .duration of each slice by timetoadd_perTR/slperpass */
478  ksgre.seqctrl.duration = RUP_GRD(ksgre.seqctrl.duration + CEIL_DIV(timetoadd_perTR, ks_slice_plan.nslices_per_pass));
479 
480  /* Update SAR values in the UI (error will occur if the sum of sequence durations differs from optr) */
482  KS_RAISE(status);
483 
484  return SUCCESS;
485 
486 } /* ksgre_eval_tr() */
STATUS GEReq_eval_checkTR_SAR(KS_SEQ_COLLECTION *seqcollection, int nslices, int(*play_loop)(int, int, void **), int nargs, void **args)
Runs the slice loop and validates TR and SAR/hardware limits
Definition: GERequired.e:1034
int ksgre_scan_sliceloop_nargs(int slperpass, int nargs, void **args)
Wrapper function to ksgre_scan_sliceloop() with standardized input arguments
Definition: ksgre_tutorial_implementation.e:922
STATUS GEReq_eval_TR(int *slperpass, int *timetoadd_perTR, int requested_minacqs, KS_SEQ_COLLECTION *seqcollection, int(*play_loop)(int, int, void **), int nargs, void **args)
Calculate the number of slices per TR and TR padding time (2D imaging)
Definition: GERequired.e:770
int duration
Definition: KSFoundation.h:1227
int nslices_per_pass
Definition: KSFoundation.h:1320
STATUS ks_eval_hwlimits(int *newtime, KS_SEQ_COLLECTION *seqcollection, const LOG_GRAD *log_grad, STATUS(*play)(const INT max_encode_mode, int nargs, void **args), int nargs, void **args)
Definition: KSFoundation_host.c:5848
LOG_GRAD loggrd
STATUS ks_eval_seqctrl_setduration(KS_SEQ_CONTROL *seqctrl, int dur)
Sets the .duration field of the sequence module (KS_SEQ_CONTROL), while checking that the input value...
Definition: KSFoundation_host.c:4952
KSGRE_SEQUENCE ksgre
Definition: ksgre_tutorial_implementation.e:86
#define KS_RAISE(status)
Definition: KSFoundation.h:190
KS_SEQ_CONTROL seqctrl
Definition: ksgre_implementation.e:54
STATUS ks_calc_sliceplan(KS_SLICE_PLAN *slice_plan, int nslices, int slperpass)
Calculates the data acquisition order for a standard interleaved 2D scans using one or more passes...
Definition: KSFoundation_host.c:6295
KS_SEQ_COLLECTION seqcollection
Definition: ksepi.e:82
KS_SLICE_PLAN ks_slice_plan
Definition: GERequired.e:241
STATUS ksgre_gradheat_play(const INT max_encode_mode, int nargs, void **args)
Play function of a test sequence used for gradient heating calculations
Definition: ksgre_tutorial_implementation.e:409
s64 ks_eval_getduration(KS_SEQ_COLLECTION *seqcollection, STATUS(*play)(const INT max_encode_mode, int nargs, void **args), int nargs, void **args)
Definition: KSFoundation_host.c:5879

◆ ksgre_check()

STATUS ksgre_check ( )

Returns error of various parameter combinations that are not allowed for ksgre

Return values
STATUSSUCCESS or FAILURE
505  {
506 
507 
508  return SUCCESS;
509 
510 } /* ksgre_check() */

◆ ksgre_update_UI()

STATUS ksgre_update_UI ( )

Update UI variables after evaluation

Return values
STATUSSUCCESS or FAILURE
520  {
521 
522  /* Show resolution & BW per pixel in the UI */
523  piinplaneres = 1;
524  pirbwperpix = 1;
525  ihinplanexres = ksgre.read.fov/ksgre.read.res;
526  ihinplaneyres = ksgre.phaseenc.fov/ksgre.phaseenc.res;
527  ihrbwperpix = (1000.0 * ksgre.read.acq.rbw * 2.0)/ksgre.read.res;
528 
529  return SUCCESS;
530 
531 } /* ksgre_update_UI() */
int res
Definition: KSFoundation.h:1721
float fov
Definition: KSFoundation.h:1551
float rbw
Definition: KSFoundation.h:842
int res
Definition: KSFoundation.h:1552
KSGRE_SEQUENCE ksgre
Definition: ksgre_tutorial_implementation.e:86
KS_READTRAP read
Definition: ksgre_implementation.e:55
KS_PHASER phaseenc
Definition: ksgre_implementation.e:58
KS_READ acq
Definition: KSFoundation.h:1549
float fov
Definition: KSFoundation.h:1720

◆ ksgre_predownload_plot()

STATUS ksgre_predownload_plot ( KS_SEQ_COLLECTION seqcollection)

Plotting of sequence modules and slice timing in HTML files

Otherwise the function first prints out the textfile: <ks_psdname>_objects.txt, which contains the specs of most sequence components in the sequence.

The rest of the function is the plotting the main sequence diagram as HTML file, and lastly the sequence timing plot, showing slice location on the y-axis and time on the x-axis for all sequence modules (here only 1) at the same time.

For the slicetiming plot, the three functions ks_plot_slicetime_begin();ksgre_scan_scanloop();ks_plot_slicetime_end(); creates a corresponding JSON file, followed by a system call to the python script psdplot/psdplot_slicetime.py to create the HTML plot.

Return values
STATUSSUCCESS or FAILURE
562  {
563  char tmpstr[1000];
564 
565 #ifdef PSD_HW
566  sprintf(tmpstr, "/usr/g/mrraw/%s_objects.txt", ks_psdname);
567 #else
568  sprintf(tmpstr, "./%s_objects.txt", ks_psdname);
569 #endif
570  FILE *fp = fopen(tmpstr, "w");
571 
572  /* Note: 'fp' can be replaced with 'stdout' or 'stderr' to get these
573  values printed out in the WTools window in simulation. However,
574  heavy printing may result in that the WTools window closes,
575  why we here write to a file ksgre_objects.txt instead */
581  fclose(fp);
582 
583 
584  /* ks_plot_host():
585  Plot each sequence module as a separate file (PNG/SVG/PDF depending on ks_plot_filefmt (GERequired.e))
586  See KS_PLOT_FILEFORMATS in KSFoundation.h for options.
587  Note that the phase encoding amplitudes corresponds to the first shot, as set by the call to ksgre_scan_seqstate below */
590 
591  /* Sequence timing plot */
595 
596  return SUCCESS;
597 
598 } /* ksgre_predownload_plot() */
STATUS ksgre_scan_seqstate(SCAN_INFO slice_info, int kyview)
Sets the current state of all ksgre sequence objects being part of KSGRE_SEQUENCE
Definition: ksgre_tutorial_implementation.e:766
KS_SELRF selrfexc
Definition: ksgre_implementation.e:61
char ks_psdname[256]
Definition: GERequired.e:245
void ks_plot_slicetime_begin()
ADDTITLEHERE
Definition: KSFoundation_common.c:4266
void ks_plot_slicetime_end()
ADDTITLEHERE
Definition: KSFoundation_common.c:4316
KSGRE_SEQUENCE ksgre
Definition: ksgre_tutorial_implementation.e:86
KS_TRAP readdephaser
Definition: ksgre_implementation.e:56
float ksgre_scan_scanloop()
Plays out all passes of a single or multi-pass scan
Definition: ksgre_tutorial_implementation.e:1012
void ks_print_phaser(KS_PHASER phaser, FILE *fp)
Writes out the contents of a KS_PHASER sequence object for debugging
Definition: KSFoundation_host.c:6822
KS_TRAP spoiler
Definition: ksgre_implementation.e:60
KS_READTRAP read
Definition: ksgre_implementation.e:55
void ks_print_trap(KS_TRAP trap, FILE *fp)
Writes out the contents of a KS_TRAP sequence object for debugging
Definition: KSFoundation_host.c:6780
KS_PHASER phaseenc
Definition: ksgre_implementation.e:58
KS_SEQ_COLLECTION seqcollection
Definition: ksepi.e:82
void ks_plot_host(const KS_SEQ_COLLECTION *seqcollection, const KS_PHASEENCODING_PLAN *plan)
ADDTITLEHERE
Definition: KSFoundation_host.c:7585
void ks_print_selrf(KS_SELRF selrf, FILE *fp)
Writes out the contents of a KS_SELRF sequence object for debugging
Definition: KSFoundation_host.c:6945
endif SCAN_INFO ks_scan_info[SLTAB_MAX]
Definition: GERequired.e:240
void ks_print_readtrap(KS_READTRAP readtrap, FILE *fp)
Writes out the contents of a KS_READTRAP sequence object for debugging
Definition: KSFoundation_host.c:6794

◆ ksgre_predownload_setrecon()

STATUS ksgre_predownload_setrecon ( )

Last-resort function to override certain recon variables not set up correctly already

For most cases, the GEReq_predownload_*** functions in predownload() in ksgre.e set up the necessary rh*** variables for the reconstruction to work properly. However, if this sequence is customized, certain rh*** variables may need to be changed. Doing this here instead of in predownload() directly separates these changes from the standard behavior.

Return values
STATUSSUCCESS or FAILURE
614  {
615 
616  return SUCCESS;
617 
618 } /* ksgre_predownload_setrecon() */

◆ ksgre_pg()

STATUS ksgre_pg ( )

The ksgre (main) pulse sequence

This is the main pulse sequence in ksgre.e using the sequence objects in KSGRE_SEQUENCE with the sequence module name "ksgremain" (= ksgre.seqctrl.description)

Return values
STATUSSUCCESS or FAILURE
646  {
647  KS_SEQLOC tmploc = KS_INIT_SEQLOC;
648  int readstart_pos;
649  STATUS status;
650 
651 
652  /*******************************************************************************************************
653  * RF Excitation
654  *******************************************************************************************************/
655  tmploc.pos = RUP_GRD(KS_RFSSP_PRETIME);
656  tmploc.board = ZGRAD;
657 
658  /* N.B.: ks_pg_selrf()->ks_pg_rf() detects that ksgre.selrfexc is an excitation pulse
659  (ksgre.selrfexc.rf.role = KS_RF_ROLE_EXC) and will also set ksgre.seqctrl.momentstart
660  to the absolute position in [us] of the isocenter of the RF excitation pulse */
661  status = ks_pg_selrf(&ksgre.selrfexc, tmploc, &ksgre.seqctrl);
662  KS_RAISE(status);
663 
664  /*******************************************************************************************************
665  * Readout timing
666  *******************************************************************************************************/
667 
668  /* With ksgre.seqctrl.momentstart set by ks_pg_selrf(&ksgre.selrfexc, ...), the absolute readout position
669  can be determined (for both full Fourier and partial Fourier readouts using ksgre.read.time2center) */
670  readstart_pos = ksgre.seqctrl.momentstart + opte - ksgre.read.time2center;
671 
672  /*******************************************************************************************************
673  * Phase encoding
674  *******************************************************************************************************/
675 
676  tmploc.pos = readstart_pos + RUP_GRD(ksgre.read.acqdelay) - ksgre.phaseenc.grad.duration;
677  tmploc.board = YGRAD;
678 
679  status = ks_pg_phaser(&ksgre.phaseenc, tmploc, &ksgre.seqctrl);
680  KS_RAISE(status);
681 
682  /* set phase encode amps to first ky view (for plotting & moment calcs in WTools) */
684 
685  /*******************************************************************************************************
686  * Readout dephaser
687  *******************************************************************************************************/
688 
689  tmploc.pos = readstart_pos - ksgre.readdephaser.duration;
690  tmploc.board = XGRAD;
691 
692  status = ks_pg_trap(&ksgre.readdephaser, tmploc, &ksgre.seqctrl);
693  KS_RAISE(status);
694 
695  /*******************************************************************************************************
696  * Readout
697  *******************************************************************************************************/
698 
699  tmploc.pos = readstart_pos;
700  tmploc.board = XGRAD;
701 
702  status = ks_pg_readtrap(&ksgre.read, tmploc, &ksgre.seqctrl);
703  KS_RAISE(status);
704 
705  /*******************************************************************************************************
706  * Spoiler
707  *******************************************************************************************************/
708 
709  tmploc.pos = readstart_pos + ksgre.read.grad.duration;
710  tmploc.board = XGRAD;
711 
712  status = ks_pg_trap(&ksgre.spoiler, tmploc, &ksgre.seqctrl);
713  KS_RAISE(status);
714 
715  /*******************************************************************************************************
716  * Set the minimal sequence duration (ksgre.seqctrl.min_duration) by calling
717  * ks_eval_seqctrl_setminduration()
718  *******************************************************************************************************/
719 
720  tmploc.pos = RUP_GRD(tmploc.pos + ksgre.spoiler.duration);
721 
722 #ifdef HOST_TGT
723  /* On HOST only: Sequence duration (ksgre.seqctrl.ssi_time must be > 0 and is added to ksgre.seqctrl.min_duration in ks_eval_seqctrl_setminduration() */
724  ks_eval_seqctrl_setminduration(&ksgre.seqctrl, tmploc.pos); /* tmploc.pos now corresponds to the end of last gradient in the sequence */
725 #endif
726 
727  return SUCCESS;
728 
729 } /* ksgre_pg() */
KS_TRAP grad
Definition: KSFoundation.h:1719
int pos
Definition: KSFoundation.h:463
STATUS ks_pg_readtrap(KS_READTRAP *readtrap, KS_SEQLOC loc, KS_SEQ_CONTROL *ctrl) WARN_UNUSED_RESULT
Places a KS_READTRAP sequence object on a board at some position in the pulse sequence
Definition: KSFoundation_common.c:2161
STATUS ks_pg_phaser(KS_PHASER *phaser, KS_SEQLOC loc, KS_SEQ_CONTROL *ctrl) WARN_UNUSED_RESULT
Places a KS_PHASER sequence object on a board at some position in the pulse sequence
Definition: KSFoundation_common.c:2031
KS_SELRF selrfexc
Definition: ksgre_implementation.e:61
STATUS ks_pg_selrf(KS_SELRF *selrf, KS_SEQLOC loc, KS_SEQ_CONTROL *ctrl) WARN_UNUSED_RESULT
Places a KS_SELRF sequence object on a gradient (and RF) board at some position in the pulse sequence...
Definition: KSFoundation_common.c:2817
int momentstart
Definition: KSFoundation.h:1228
int board
Definition: KSFoundation.h:462
KS_TRAP grad
Definition: KSFoundation.h:1561
STATUS ks_pg_trap(KS_TRAP *trap, KS_SEQLOC loc, KS_SEQ_CONTROL *ctrl) WARN_UNUSED_RESULT
Places a KS_TRAP sequence object on a board at some position in the pulse sequence
Definition: KSFoundation_common.c:1802
KSGRE_SEQUENCE ksgre
Definition: ksgre_tutorial_implementation.e:86
#define KS_RAISE(status)
Definition: KSFoundation.h:190
KS_TRAP readdephaser
Definition: ksgre_implementation.e:56
KS_TRAP spoiler
Definition: ksgre_implementation.e:60
typedef struct used as argument to ks_pg_*** functions to control where and when to place a sequence ...
Definition: KSFoundation.h:461
KS_READTRAP read
Definition: ksgre_implementation.e:55
void ks_scan_phaser_toline(KS_PHASER *phaser, int instanceno, int view)
Updates the amplitude of a KS_PHASER sequence object to move from the k-space center to a desired k-s...
Definition: KSFoundation_tgt.c:460
KS_PHASER phaseenc
Definition: ksgre_implementation.e:58
STATUS ks_eval_seqctrl_setminduration(KS_SEQ_CONTROL *seqctrl, int mindur)
Sets the minimum duration and duration fields of a KS_SEQ_CONTROL struct based on some minimum time (...
Definition: KSFoundation_host.c:4921
KS_SEQ_CONTROL seqctrl
Definition: ksgre_implementation.e:54
#define KS_INIT_SEQLOC
Definition: KSFoundation.h:287
int duration
Definition: KSFoundation.h:673
int time2center
Definition: KSFoundation.h:1560
int acqdelay
Definition: KSFoundation.h:1555
#define KS_RFSSP_PRETIME
Definition: KSFoundation.h:217

◆ ksgre_scan_coreslice()

int ksgre_scan_coreslice ( const SCAN_INFO *  slice_pos,
int  dabslice,
int  kyindx,
int  exc 
)

Plays out one slice in real time during scanning together with other active sequence modules

On TGT on the MR system (PSD_HW), this function sets up (ksgre_scan_seqstate()) and plays out the core ksgre sequence with optional sequence modules also called in this function. The low-level function call startseq(), which actually starts the realtime sequence playout is called from within ks_scan_playsequence(), which in addition also returns the time to play out that sequence module (see time += ...).

On HOST (in ksgre_eval_tr()) we call ksgre_scan_sliceloop_nargs(), which in turn calls this function that returns the total time in [us] taken to play out this core slice. These times are increasing in each parent function until ultimately ksgre_scan_scantime(), which returns the total time of the entire scan.

After each call to ks_scan_playsequence(), ks_plot_slicetime() is called to add slice-timing information on file for later PDF-generation of the sequence. As scanning is performed in real-time and may fail if interrupted, ks_plot_slicetime() will return quietly if it detects both IPG (TGT) and PSD_HW (on the MR scanner). See predownload() for the PNG/PDF generation.

Parameters
[in]slice_posPosition of the slice to be played out (one element in the global ks_scan_info[] array)
[in]dabslice0-based slice index for data storage
[in]kyindxPhase encoding index related to ksgre.phaseenc. A value outside of [0, ksgre.phaseenc.res-1] will set the phase encoding gradient amplitude to 0.
[in]excExcitation index in range [0, NEX-1], where NEX = number of excitations (opnex)
Return values
coreslicetimeTime taken in [us] to play out one slice with potentially other sequence modules
817  {
818  int echoindx;
819  int dabop, dabview;
820  TYPDAB_PACKETS acqflag;
821  int time = 0;
822  float tloc = 0.0;
823  SCAN_INFO slice_pos_updated;
824  KS_MAT4x4 Mphysical = KS_MAT4x4_IDENTITY;
825  KS_MAT4x4 Mlogical = KS_MAT4x4_IDENTITY;
826 
827  if (slice_pos != NULL) {
828  /* uncomment to make transformations in the logical read-phase-slice coordinate system, using your own
829  logic (e.g. radial or propeller applications), here just rotating by 30 degrees in-plane
830  float rotz = 30.0;
831  ks_mat4_setgeometry(Mlogical, 0, 0, 0, 0, 0, rotz);
832  Mphysical is useful for prospective motion correction implementations as it operates in X-Y-Z coords
833  but should be left as the identity matrix otherwise
834  */
835  ks_scan_update_slice_location(&slice_pos_updated, *slice_pos, Mphysical, Mlogical);
836 
837  /* modify sequence for next playout */
838  ksgre_scan_seqstate(slice_pos_updated, ksgre.phaseenc.linetoacq[kyindx]);
839  tloc = slice_pos->optloc;
840  } else {
841  /* false slice, shut off RF */
842  ks_scan_rf_off(&ksgre.selrfexc.rf, INSTRALL);
843  }
844 
845  /* data acquisition control */
846  acqflag = (kyindx >= 0 && slice_pos != NULL && dabslice >= 0) ? DABON : DABOFF; /* open or close data receiver */
847  dabop = (exc <= 0) ? DABSTORE : DABADD; /* replace or add to data */
848  dabview = (kyindx >= 0) ? ksgre.phaseenc.linetoacq[kyindx] : KS_NOTSET;
849 
850  for (echoindx = 0; echoindx < ksgre.read.acq.base.ngenerated; echoindx++) {
851  loaddab(&ksgre.read.acq.echo[echoindx], dabslice, echoindx, dabop, dabview + 1, acqflag, PSD_LOAD_DAB_ALL);
852  }
853 
855 
856  KS_PLOT_EXCITATION_MODE plottag = (slice_pos == NULL) ? KS_PLOT_NO_EXCITATION : KS_PLOT_STANDARD;
857  ks_plot_slicetime(&ksgre.seqctrl, 1, &tloc, opslthick, plottag);
858 
859  return time; /* in [us] */
860 
861 } /* ksgre_scan_coreslice() */
WF_PULSE * echo
Definition: KSFoundation.h:846
STATUS ksgre_scan_seqstate(SCAN_INFO slice_info, int kyview)
Sets the current state of all ksgre sequence objects being part of KSGRE_SEQUENCE
Definition: ksgre_tutorial_implementation.e:766
#define KS_NOTSET
Definition: KSFoundation.h:115
KS_PLOT_EXCITATION_MODE
Definition: KSFoundation.h:402
double KS_MAT4x4[16]
Definition: KSFoundation.h:356
KS_SELRF selrfexc
Definition: ksgre_implementation.e:61
int linetoacq[KS_MAX_PHASEDYN]
Definition: KSFoundation.h:1728
void ks_scan_rf_off(KS_RF *rf, int instanceno)
Sets the amplitude of one or all instances of an RF pulse (KS_RF) to zero
Definition: KSFoundation_tgt.c:597
KS_BASE base
Definition: KSFoundation.h:839
#define KS_MAT4x4_IDENTITY
Definition: KSFoundation.h:340
KS_RF rf
Definition: KSFoundation.h:1454
int ks_scan_playsequence(KS_SEQ_CONTROL *ctrl)
Definition: KSFoundation_tgt.c:1644
Definition: KSFoundation.h:404
KSGRE_SEQUENCE ksgre
Definition: ksgre_tutorial_implementation.e:86
Definition: KSFoundation.h:403
KS_READTRAP read
Definition: ksgre_implementation.e:55
KS_PHASER phaseenc
Definition: ksgre_implementation.e:58
KS_SEQ_CONTROL seqctrl
Definition: ksgre_implementation.e:54
void ks_scan_update_slice_location(SCAN_INFO *new_loc, const SCAN_INFO orig_loc, const KS_MAT4x4 M_physical, const KS_MAT4x4 M_logical)
Updates a SCAN_INFO struct using physical and logical 4x4 transformation matrices
Definition: KSFoundation_common.c:4015
void ks_plot_slicetime(const KS_SEQ_CONTROL *ctrl, int nslices, float *slicepos_mm, float slthick_mm, KS_PLOT_EXCITATION_MODE exctype)
ADDTITLEHERE
Definition: KSFoundation_common.c:4276
int ngenerated
Definition: KSFoundation.h:496
KS_READ acq
Definition: KSFoundation.h:1549
float opslthick

◆ ksgre_scan_sliceloop()

int ksgre_scan_sliceloop ( int  slperpass,
int  passindx,
int  kyindx,
int  exc 
)

Plays out slperpass slices corresponding to one TR

This function gets a spatial slice location index based on the pass index and temporal position within current pass. It then calls ksgre_scan_coreslice() to play out one coreslice (i.e. the main ksgre main sequence + optional sequence modules, excluding inversion modules).

Parameters
[in]slperpassNumber of slices to play in the slice loop
[in]passindx0-based pass index in range [0, ks_slice_plan.npasses - 1]
[in]kyindxPhase encoding index related to ksgre.phaseenc. A value outside of [0, ksgre.phaseenc.res-1] will set the phase encoding gradient amplitude to 0.
[in]excExcitation index in range [0, NEX-1], where NEX = number of excitations (opnex)
Return values
slicelooptimeTime taken in [us] to play out slperpass slices
881  {
882  int time = 0;
883  int slloc, sltimeinpass;
884 
885  for (sltimeinpass = 0; sltimeinpass < slperpass; sltimeinpass++) {
886 
887  /* slice location from slice plan (KS_NOTSET (= -1) means dummy slice) */
888  slloc = ks_scan_getsliceloc(&ks_slice_plan, passindx, sltimeinpass);
889 
890  time += ksgre_scan_coreslice((slloc != KS_NOTSET) ? &ks_scan_info[slloc] : NULL, sltimeinpass, kyindx, exc);
891 
892  }
893 
894  return time; /* in [us] */
895 
896 } /* ksgre_scan_sliceloop() */
#define KS_NOTSET
Definition: KSFoundation.h:115
int passindx
Definition: ksgre_tutorial_implementation.e:1046
int ksgre_scan_coreslice(const SCAN_INFO *slice_pos, int dabslice, int kyindx, int exc)
Plays out one slice in real time during scanning together with other active sequence modules...
Definition: ksgre_tutorial_implementation.e:817
KS_SLICE_PLAN ks_slice_plan
Definition: GERequired.e:241
int ks_scan_getsliceloc(const KS_SLICE_PLAN *slice_plan, int passindx, int sltimeinpass)
Returns the spatially sorted slice index from a DATA_ACQ_ORDER struct array
Definition: KSFoundation_tgt.c:1214
endif SCAN_INFO ks_scan_info[SLTAB_MAX]
Definition: GERequired.e:240

◆ ksgre_scan_init()

STATUS ksgre_scan_init ( void  )

Common initialization for prescan entry points MPS2 and APS2 as well as the SCAN entry point

Return values
STATUSSUCCESS or FAILURE
1064  {
1065 
1066  GEReq_initRSP();
1067 
1068  /* Here goes code common for APS2, MPS2 and SCAN */
1069 
1070  ks_scan_switch_to_sequence(&ksgre.seqctrl); /* switch to main sequence */
1071  scopeon(&seqcore); /* Activate scope for core */
1072  syncon(&seqcore); /* Activate sync for core */
1073  setssitime(ksgre.seqctrl.ssi_time/HW_GRAD_UPDATE_TIME);
1074 
1075  /* can we make these independent on global rsptrigger and rsprot in orderslice? */
1076  settriggerarray( (short) ks_slice_plan.nslices_per_pass, rsptrigger);
1077 
1078  return SUCCESS;
1079 
1080 } /* ksgre_scan_init() */
void ks_scan_switch_to_sequence(KS_SEQ_CONTROL *ctrl)
Definition: KSFoundation_tgt.c:1625
STATUS setssitime(long)
int nslices_per_pass
Definition: KSFoundation.h:1320
void GEReq_initRSP(void)
RSP Init. To be inserted in the psdinit() function (or scan()) in the main sequence
Definition: GERequired.e:3773
KSGRE_SEQUENCE ksgre
Definition: ksgre_tutorial_implementation.e:86
int ssi_time
Definition: KSFoundation.h:1226
KS_SEQ_CONTROL seqctrl
Definition: ksgre_implementation.e:54
KS_SLICE_PLAN ks_slice_plan
Definition: GERequired.e:241

◆ ksgre_scan_prescanloop()

STATUS ksgre_scan_prescanloop ( int  nloops,
int  dda 
)

Prescan loop called from both APS2 and MPS2 entry points

Return values
STATUSSUCCESS or FAILURE
1090  {
1091  int i, echoindx, sltimeinpass, slloc;
1092 
1093  /* turn off receivers for all echoes */
1094  for (echoindx = 0; echoindx < ksgre.read.acq.base.ngenerated; echoindx++) {
1095  loaddab(&ksgre.read.acq.echo[echoindx], 0, 0, DABSTORE, 0, DABOFF, PSD_LOAD_DAB_ALL);
1096  }
1097 
1098  /* play first 'dda' dummy scans to get into steady state before start acquiring data */
1099  for (i = -dda; i < nloops; i++) {
1100 
1101  /* loop over slices */
1102  for (sltimeinpass = 0; sltimeinpass < ks_slice_plan.nslices_per_pass; sltimeinpass++) {
1103 
1104  slloc = ks_scan_getsliceloc(&ks_slice_plan, 0, sltimeinpass);
1105 
1106  /* modify sequence for next playout */
1107  ksgre_scan_seqstate(ks_scan_info[slloc], KS_NOTSET); /* KS_NOTSET => no phase encoding */
1108 
1109  /* data routing control */
1110  if (i >= 0) {
1111  /* turn on receiver for 1st echo */
1112  if (ksgre.read.acq.base.ngenerated > 0)
1113  loaddab(&ksgre.read.acq.echo[0], 0, 0, DABSTORE, 0, DABON, PSD_LOAD_DAB_ALL);
1114  }
1115 
1117 
1118  } /* for slices */
1119 
1120  } /* for nloops */
1121 
1122  return SUCCESS;
1123 
1124 } /* ksgre_scan_prescanloop() */
WF_PULSE * echo
Definition: KSFoundation.h:846
STATUS ksgre_scan_seqstate(SCAN_INFO slice_info, int kyview)
Sets the current state of all ksgre sequence objects being part of KSGRE_SEQUENCE
Definition: ksgre_tutorial_implementation.e:766
#define KS_NOTSET
Definition: KSFoundation.h:115
KS_BASE base
Definition: KSFoundation.h:839
int nslices_per_pass
Definition: KSFoundation.h:1320
int ks_scan_playsequence(KS_SEQ_CONTROL *ctrl)
Definition: KSFoundation_tgt.c:1644
KSGRE_SEQUENCE ksgre
Definition: ksgre_tutorial_implementation.e:86
KS_READTRAP read
Definition: ksgre_implementation.e:55
KS_SEQ_CONTROL seqctrl
Definition: ksgre_implementation.e:54
KS_SLICE_PLAN ks_slice_plan
Definition: GERequired.e:241
int ks_scan_getsliceloc(const KS_SLICE_PLAN *slice_plan, int passindx, int sltimeinpass)
Returns the spatially sorted slice index from a DATA_ACQ_ORDER struct array
Definition: KSFoundation_tgt.c:1214
int ngenerated
Definition: KSFoundation.h:496
KS_READ acq
Definition: KSFoundation.h:1549
endif SCAN_INFO ks_scan_info[SLTAB_MAX]
Definition: GERequired.e:240

Variable Documentation

◆ seqcollection

KS_SEQ_COLLECTION seqcollection

◆ ksgre_gscalerfexc

float ksgre_gscalerfexc = 0.9

◆ ksgre_spoilerarea

float ksgre_spoilerarea = 2000.0 with {0.0, 10000.0, 2000.0, VIS, "ksgre spoiler gradient area",}

◆ ksgre_ssi_time

int ksgre_ssi_time = KSGRE_DEFAULT_SSI_TIME with {32, , KSGRE_DEFAULT_SSI_TIME, VIS, "time from eos to ssi in intern trig",}

◆ ksgre_dda

int ksgre_dda = 2 with {0, 200, 2, VIS, "Number of dummy scans for steady state",}

◆ ksgre

◆ sequence_iopts

int sequence_iopts[]
Initial value:
= {
PSD_IOPT_EDR,
PSD_IOPT_SEQUENTIAL
}

◆ volindx

int volindx

◆ passindx

int passindx