Parametric Definitions¶
Excitation¶
excitation ¶
This module contains functions defining compositions of building blocks commonly used for excitation in MRI
sms_pulse ¶
sms_pulse(
system_specs: SystemSpec,
single_pulse: RFPulse,
n_slices: int,
band_gap: Quantity,
slice_thickness: Quantity,
modulation_type: str = "quadrature",
) -> cmrseq.bausteine.RFPulse
Modulates the waveform of a given slice selective excitation pulse using the sigpy.mri.rf.dzrf_mb implementation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
|
required |
single_pulse
|
RFPulse
|
Instance of a cmrseq RFPulse or subclass |
required |
n_slices
|
int
|
Number of slices to simultaneously excite |
required |
band_gap
|
Quantity
|
Distance between the excited slices |
required |
slice_thickness
|
Quantity
|
Thickness of the exited slices |
required |
modulation_type
|
str
|
from [amplitude, phase, quadrature] |
'quadrature'
|
Returns:
| Type | Description |
|---|---|
New pulse object with multi-banded waveform
|
|
Source code in cmrseq/parametric_definitions/excitation.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |
slice_selective_sinc_pulse ¶
slice_selective_sinc_pulse(
system_specs: SystemSpec,
slice_thickness: Quantity,
flip_angle: Quantity,
time_bandwidth_product: float = 4,
pulse_duration: Quantity = None,
delay: Quantity = Quantity(0.0, "ms"),
slice_position_offset: Quantity = Quantity(0.0, "m"),
slice_normal: ndarray = np.array([0.0, 0.0, 1.0]),
phase_offset: Quantity = Quantity(0.0, "rad"),
) -> cmrseq.Sequence
Define slice-selective excitation using a sinc RF pulse and gradient.
Longer diagrams live in the excitation definitions guide.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
System limits used for validation. |
required |
slice_thickness
|
Quantity
|
Required slice thickness. |
required |
flip_angle
|
Quantity
|
Required flip angle. |
required |
time_bandwidth_product
|
float
|
Time-bandwidth product used to calculate RF bandwidth from duration. |
4
|
pulse_duration
|
Quantity
|
Total pulse duration. If omitted, the shortest possible duration within system limits is calculated. |
None
|
delay
|
Quantity
|
Added time offset. |
Quantity(0.0, 'ms')
|
slice_position_offset
|
Quantity
|
Positional offset in the slice-normal direction, defining the RF frequency offset. |
Quantity(0.0, 'm')
|
slice_normal
|
ndarray
|
Slice-normal direction with shape |
array([0.0, 0.0, 1.0])
|
phase_offset
|
Quantity
|
RF phase offset. |
Quantity(0.0, 'rad')
|
Returns:
| Type | Description |
|---|---|
Sequence
|
Sequence containing the RF pulse, slice-selection gradient, and rewinder. |
Source code in cmrseq/parametric_definitions/excitation.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | |
optimize_slice_selection ¶
optimize_slice_selection(
system_specs: SystemSpec,
slice_thickness: Quantity,
time_bandwidth_product: float,
min_duration: Quantity = None,
) -> (Quantity, Quantity)
Computes the shortest possible combination of RF-pulse and trapezoidal slice-selection gradient for the given time-bandwidth-product, flip angle and slice thickness.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
SystemSpecifications |
required |
slice_thickness
|
Quantity
|
Defines the necessary gradient amplitude |
required |
time_bandwidth_product
|
float
|
Used to calculate the RF bandwidth from duration |
required |
min_duration
|
Quantity
|
Manually set minimal duration (gradient flat duration) (e.g. shortest pulse duration according to peak RF power) |
None
|
Returns:
| Type | Description |
|---|---|
pulse_duration, gradient amplitude
|
|
Source code in cmrseq/parametric_definitions/excitation.py
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | |
slice_selective_se_pulses ¶
slice_selective_se_pulses(
system_specs: SystemSpec,
echo_time: Quantity,
slice_thickness: Quantity,
pulse_duration: Quantity,
slice_orientation: ndarray,
time_bandwidth_product: float = 4.0,
) -> cmrseq.Sequence
Define 90 and 180 degree sinc pulses with slice-selective gradients.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
System limits used for validation. |
required |
echo_time
|
Quantity
|
Echo time of the center of the echo. |
required |
slice_thickness
|
Quantity
|
Required slice thickness. |
required |
pulse_duration
|
Quantity
|
Total pulse duration. |
required |
slice_orientation
|
ndarray
|
Slice-normal direction with shape |
required |
time_bandwidth_product
|
float
|
Time-bandwidth product used to calculate RF bandwidth from duration. |
4.0
|
Returns:
| Type | Description |
|---|---|
Sequence
|
Sequence containing the excitation and refocusing pulses. |
Source code in cmrseq/parametric_definitions/excitation.py
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 | |
spectral_spatial_excitation ¶
spectral_spatial_excitation(
system_specs: SystemSpec,
binomial_degree: int,
total_flip_angle: Quantity,
slice_thickness: Quantity,
chemical_shift: float = 3.4,
time_bandwidth_product=4.5,
) -> cmrseq.Sequence
Construct a spectral-spatial excitation sequence.
The sequence contains binomial sinc sub-pulses and trapezoidal slice-selection gradients. Legacy derivation notes and plots live in the excitation definitions guide.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
System limits used for validation. |
required |
binomial_degree
|
int
|
Number of sub-pulses. Degree 1 corresponds to 1-1, degree 2 to 1-2-1, and so on. |
required |
total_flip_angle
|
Quantity
|
Total effective flip angle for on-resonant spins over all sub-pulses. |
required |
slice_thickness
|
Quantity
|
Thickness of the spatial excitation slab. |
required |
chemical_shift
|
float
|
Suppressed frequency as chemical shift in parts per million. |
3.4
|
time_bandwidth_product
|
Time-bandwidth product used for all sinc sub-pulses. |
4.5
|
Returns:
| Type | Description |
|---|---|
Sequence
|
Sequence containing the spectral-spatial excitation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the pulse composition is infeasible for the system limits and slice thickness. |
Source code in cmrseq/parametric_definitions/excitation.py
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 | |
Diffusion¶
diffusion ¶
This module contains functions defining compositions of building blocks commonly used in diffusion MRI
bipolar ¶
bipolar(
system_specs: SystemSpec,
dt: Quantity,
Dt: Quantity,
amplitude: Quantity,
direction: ndarray,
start_time: Quantity = Quantity(0.0, "ms"),
rise_time: Quantity = None,
flip_decoding: bool = False,
) -> Sequence
Define a bipolar M0-compensated diffusion gradient waveform.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
System limits used for validation. |
required |
dt
|
Quantity
|
Flat duration of the lobes. |
required |
Dt
|
Quantity
|
Flat duration between lobes. |
required |
amplitude
|
Quantity
|
Lobe amplitude. |
required |
direction
|
ndarray
|
Gradient direction with shape |
required |
start_time
|
Quantity
|
Time offset before the first lobe. |
Quantity(0.0, 'ms')
|
rise_time
|
Quantity
|
Rise and fall time. If omitted, the shortest valid system rise time is used. |
None
|
flip_decoding
|
bool
|
If |
False
|
Returns:
| Type | Description |
|---|---|
Sequence
|
Sequence containing the bipolar gradient waveform. |
Source code in cmrseq/parametric_definitions/diffusion.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
m012 ¶
m012(
system_specs: SystemSpec,
zeta: Quantity,
lambda_: Quantity,
direction: ndarray,
amplitude: Quantity = None,
bvalue: Quantity = None,
start_time: Quantity = Quantity(0.0, "ms"),
flip_decoding: bool = False,
) -> Union[Sequence, List[Sequence]]
Define an M012-compensated diffusion gradient waveform.
Implements the waveform described by Stoeck et al. (DOI: 10.1002/mrm.25784). Diagrams and legacy b-value plots live in the diffusion definitions guide.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
System limits used for validation. |
required |
zeta
|
Quantity
|
Rise time of ramps using the maximum slew rate. |
required |
lambda_
|
Quantity
|
Flat duration of the first trapezoidal lobe. |
required |
direction
|
ndarray
|
Gradient direction with shape |
required |
amplitude
|
Quantity
|
Gradient amplitude. Specify exactly one of |
None
|
bvalue
|
Quantity
|
Target b-value. Specify exactly one of |
None
|
start_time
|
Quantity
|
Time offset before the first lobe. |
Quantity(0.0, 'ms')
|
flip_decoding
|
bool
|
If |
False
|
Returns:
| Type | Description |
|---|---|
Sequence or list[Sequence]
|
Waveform sequence for each specified amplitude or b-value. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If amplitude/b-value arguments are invalid, infeasible, or not broadcastable. |
Source code in cmrseq/parametric_definitions/diffusion.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | |
shortest_m012 ¶
shortest_m012(
system_specs: SystemSpec,
direction: ndarray,
bvalues: Quantity,
start_time: Quantity = Quantity(0.0, "ms"),
flip_decoding: bool = False,
) -> cmrseq.Sequence
Finds the shortest possible second order motion compensated diffusion weighting gradient waveform according to Stoeck et al. (DOI: 10.1002/mrm.25784).
Compare cmrseq.seqdefs.diffusion.m012 for more information
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
|
required |
direction
|
ndarray
|
|
required |
bvalues
|
Quantity
|
|
required |
start_time
|
Quantity
|
|
Quantity(0.0, 'ms')
|
flip_decoding
|
bool
|
|
False
|
Returns:
| Type | Description |
|---|---|
object
|
|
Source code in cmrseq/parametric_definitions/diffusion.py
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | |
Velocity¶
velocity ¶
This module contains functions defining compositions of building blocks commonly used in flow MRI
bipolar ¶
bipolar(
system_specs: SystemSpec,
venc: Quantity,
direction: ndarray,
duration: Quantity = Quantity(0.0, "ms"),
repetitions: int = 1,
start_time: Quantity = Quantity(0.0, "ms"),
) -> cmrseq.Sequence
Define a bipolar M0-compensated velocity-encoding waveform.
Longer derivation notes and legacy plots live in the velocity definitions guide.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
System limits used for validation. |
required |
venc
|
Quantity
|
Velocity that corresponds to a phase accrual of 2 pi. |
required |
direction
|
ndarray
|
Velocity encoding direction with shape |
required |
duration
|
Quantity
|
Duration of the VENC gradients. If zero, use the shortest valid duration. |
Quantity(0.0, 'ms')
|
repetitions
|
int
|
Number of repetitions. |
1
|
start_time
|
Quantity
|
Time offset before the first gradient. |
Quantity(0.0, 'ms')
|
Returns:
| Type | Description |
|---|---|
Sequence
|
Sequence containing the velocity encoding waveform. |
Source code in cmrseq/parametric_definitions/velocity.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | |
flow_comp ¶
flow_comp(
system_specs: SystemSpec,
venc_eff: Quantity,
direction: ndarray,
period: Quantity = Quantity(0.0, "ms"),
repetitions: int = 1,
start_time: Quantity = Quantity(0.0, "ms"),
) -> cmrseq.Sequence
Define concatenated trapezoids with flow compensation over the full duration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
System limits used for validation. |
required |
venc_eff
|
Quantity
|
Effective velocity encoding target. |
required |
direction
|
ndarray
|
Compensation direction with shape |
required |
period
|
Quantity
|
Total period to compensate. |
Quantity(0.0, 'ms')
|
repetitions
|
int
|
Number of repetitions. |
1
|
start_time
|
Quantity
|
Time offset before the first gradient. |
Quantity(0.0, 'ms')
|
Returns:
| Type | Description |
|---|---|
Sequence
|
Sequence containing the flow-compensated waveform. |
Source code in cmrseq/parametric_definitions/velocity.py
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 | |
Preparation¶
_spinlock_prepulse ¶
Definitions for spin-lock preparation pulses.
Each public function returns a :class:cmrseq.Sequence containing hard RF pulses
and spin-lock RF blocks. Passing adc_samples > 0 preserves the historical
debugging behavior of adding a centered ADC over the full preparation.
simple ¶
simple(
system_specs: SystemSpec,
spin_lock_time: Quantity,
spin_lock_frequency: Quantity,
adc_samples: int = 0,
) -> cmrseq.Sequence
Generate a simple spin-lock preparation.
Sequence
90+x -> SL+y -> 90-x
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
System specifications used for RF rasterization and limits. |
required |
spin_lock_time
|
Quantity
|
Total spin-lock duration. |
required |
spin_lock_frequency
|
Quantity
|
Spin-lock frequency. Values in |
required |
adc_samples
|
int
|
Number of ADC samples to add over the full preparation. If zero, no ADC block is added. Because this diagnostic ADC overlaps RF pulses, the returned sequence enables simultaneous transmit/receive validation on a copied system specification when needed. |
0
|
Returns:
| Type | Description |
|---|---|
Sequence
|
Spin-lock preparation sequence. |
Source code in cmrseq/parametric_definitions/preparation/_spinlock_prepulse.py
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | |
rotary_echo ¶
rotary_echo(
system_specs: SystemSpec,
spin_lock_time: Quantity,
spin_lock_frequency: Quantity,
adc_samples: int = 0,
) -> cmrseq.Sequence
Generate a rotary echo spin-lock preparation.
Sequence
90+x -> SL+y -> SL-y -> 90-x
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
System specifications used for RF rasterization and limits. |
required |
spin_lock_time
|
Quantity
|
Total spin-lock duration. |
required |
spin_lock_frequency
|
Quantity
|
Spin-lock frequency. Values in |
required |
adc_samples
|
int
|
Number of ADC samples to add over the full preparation. If zero, no ADC block is added. Because this diagnostic ADC overlaps RF pulses, the returned sequence enables simultaneous transmit/receive validation on a copied system specification when needed. |
0
|
Returns:
| Type | Description |
|---|---|
Sequence
|
Spin-lock preparation sequence. |
Source code in cmrseq/parametric_definitions/preparation/_spinlock_prepulse.py
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | |
composite ¶
composite(
system_specs: SystemSpec,
spin_lock_time: Quantity,
spin_lock_frequency: Quantity,
adc_samples: int = 0,
) -> cmrseq.Sequence
Generate a composite spin-lock preparation.
Sequence
90+x -> SL+y -> 180+y -> SL-y -> 90-x
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
System specifications used for RF rasterization and limits. |
required |
spin_lock_time
|
Quantity
|
Total spin-lock duration. |
required |
spin_lock_frequency
|
Quantity
|
Spin-lock frequency. Values in |
required |
adc_samples
|
int
|
Number of ADC samples to add over the full preparation. If zero, no ADC block is added. Because this diagnostic ADC overlaps RF pulses, the returned sequence enables simultaneous transmit/receive validation on a copied system specification when needed. |
0
|
Returns:
| Type | Description |
|---|---|
Sequence
|
Spin-lock preparation sequence. |
Source code in cmrseq/parametric_definitions/preparation/_spinlock_prepulse.py
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | |
balanced ¶
balanced(
system_specs: SystemSpec,
spin_lock_time: Quantity,
spin_lock_frequency: Quantity,
adc_samples: int = 0,
) -> cmrseq.Sequence
Generate a balanced spin-lock preparation.
Sequence
90+x -> SL+y -> 180+y -> SL-y -> 180-y -> SL+y -> 90-x
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
System specifications used for RF rasterization and limits. |
required |
spin_lock_time
|
Quantity
|
Total spin-lock duration. |
required |
spin_lock_frequency
|
Quantity
|
Spin-lock frequency. Values in |
required |
adc_samples
|
int
|
Number of ADC samples to add over the full preparation. If zero, no ADC block is added. Because this diagnostic ADC overlaps RF pulses, the returned sequence enables simultaneous transmit/receive validation on a copied system specification when needed. |
0
|
Returns:
| Type | Description |
|---|---|
Sequence
|
Spin-lock preparation sequence. |
Source code in cmrseq/parametric_definitions/preparation/_spinlock_prepulse.py
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 | |
paired_self_compensated ¶
paired_self_compensated(
system_specs: SystemSpec,
spin_lock_time: Quantity,
spin_lock_frequency: Quantity,
adc_samples: int = 0,
) -> cmrseq.Sequence
Generate a paired self-compensated spin-lock preparation.
Sequence
90+x -> SL+y -> SL-y -> 180+y -> SL+y -> SL-y -> 90-x
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
System specifications used for RF rasterization and limits. |
required |
spin_lock_time
|
Quantity
|
Total spin-lock duration. |
required |
spin_lock_frequency
|
Quantity
|
Spin-lock frequency. Values in |
required |
adc_samples
|
int
|
Number of ADC samples to add over the full preparation. If zero, no ADC block is added. Because this diagnostic ADC overlaps RF pulses, the returned sequence enables simultaneous transmit/receive validation on a copied system specification when needed. |
0
|
Returns:
| Type | Description |
|---|---|
Sequence
|
Spin-lock preparation sequence. |
Source code in cmrseq/parametric_definitions/preparation/_spinlock_prepulse.py
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | |
totally_balanced ¶
totally_balanced(
system_specs: SystemSpec,
spin_lock_time: Quantity,
spin_lock_frequency: Quantity,
adc_samples: int = 0,
) -> cmrseq.Sequence
Generate a totally balanced spin-lock preparation.
Sequence
90+x -> SL+y -> 180+y -> SL-y -> SL+y -> 180-y -> SL-y -> 90-x
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
System specifications used for RF rasterization and limits. |
required |
spin_lock_time
|
Quantity
|
Total spin-lock duration. |
required |
spin_lock_frequency
|
Quantity
|
Spin-lock frequency. Values in |
required |
adc_samples
|
int
|
Number of ADC samples to add over the full preparation. If zero, no ADC block is added. Because this diagnostic ADC overlaps RF pulses, the returned sequence enables simultaneous transmit/receive validation on a copied system specification when needed. |
0
|
Returns:
| Type | Description |
|---|---|
Sequence
|
Spin-lock preparation sequence. |
Source code in cmrseq/parametric_definitions/preparation/_spinlock_prepulse.py
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 | |
totally_balanced_composite ¶
totally_balanced_composite(
system_specs: SystemSpec,
spin_lock_time: Quantity,
spin_lock_frequency: Quantity,
adc_samples: int = 0,
) -> cmrseq.Sequence
Generate a totally balanced composite spin-lock preparation.
Sequence
90+x -> SL+y -> 90+x -> 180+y -> 90+x -> SL-y -> SL+y ->
90-x -> 180-y -> 90-x -> SL-y -> 90-x
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
System specifications used for RF rasterization and limits. |
required |
spin_lock_time
|
Quantity
|
Total spin-lock duration. |
required |
spin_lock_frequency
|
Quantity
|
Spin-lock frequency. Values in |
required |
adc_samples
|
int
|
Number of ADC samples to add over the full preparation. If zero, no ADC block is added. Because this diagnostic ADC overlaps RF pulses, the returned sequence enables simultaneous transmit/receive validation on a copied system specification when needed. |
0
|
Returns:
| Type | Description |
|---|---|
Sequence
|
Spin-lock preparation sequence. |
Source code in cmrseq/parametric_definitions/preparation/_spinlock_prepulse.py
387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 | |
Readout¶
_cartesian_single_lines ¶
This module contains parametric definitions for cartesian readouts, as well as helper functions associated with cartesian sequence design.
multi_line_cartesian ¶
multi_line_cartesian(
system_specs: SystemSpec,
fnc: callable,
matrix_size: ndarray,
inplane_resolution: Quantity,
dummy_shots: int = None,
**kwargs,
)
Creates a list of sequences, one for each k-space_line for a given single-line-definiton e.g. se_cartesian_line, gre_cartesian_line
Example: .. code-block: python
ro_blocks = cmrseq.seqdefs.readout.multi_line_cartesian(
system_specs=system_specs,
fnc=cmrseq.seqdefs.readout.gre_cartesian_line,
matrix_size=matrix_size,
inplane_resolution=inplane_resolution,
adc_duration=adc_duration,
prephaser_duration=ss_refocus.duration,
dummy_shots=dummy_shots)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
SystemSpecification |
required |
fnc
|
callable
|
callable |
required |
matrix_size
|
ndarray
|
array of shape (2, ) |
required |
inplane_resolution
|
Quantity
|
Quantity[Length] of shape (2, ) |
required |
dummy_shots
|
int
|
number of shots without adc-events |
None
|
kwargs
|
is forwared to call fnc. may not contain num_samples, k_readout, k_phase, prephaser_duration |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
|
Source code in cmrseq/parametric_definitions/readout/_cartesian_single_lines.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
matrix_to_kspace_2d ¶
matrix_to_kspace_2d(
matrix_size: ndarray, inplane_resolution: Quantity
) -> (np.ndarray, np.ndarray)
Calculates maximal k-space vector and phase encoding for each line for a bottom up filling.
The k-space center will allway be covered by a line, therefore:
- For an even number of k-space lines the first line at -kmax_pe and
the last line is at +kmax_pe - delta_kpe
- For and odd number the lines are symmetric around the center in pe direction
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
matrix_size
|
ndarray
|
(2, ) Integer array providing the inplane matrix size |
required |
inplane_resolution
|
Quantity
|
(2, ) Quantity with length-dimension providing the inplane resolution |
required |
Returns:
| Type | Description |
|---|---|
k_max (2, ), k-phase positions in phase encoding direction
|
|
Source code in cmrseq/parametric_definitions/readout/_cartesian_single_lines.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | |
get_shortest_adc_duration ¶
get_shortest_adc_duration(
system_specs: SystemSpec,
num_samples: int,
resolution: Quantity,
) -> (Quantity, Quantity, Quantity)
Computes the shortest possible single-line readout gradient (without prephaser) for the given resolution and matrix size in RO direction.
Assumes gradients are ramped with maximum slew-rate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
|
required |
num_samples
|
int
|
|
required |
resolution
|
Quantity
|
|
required |
Returns:
| Type | Description |
|---|---|
gradient object for the readout gradient and adc object
|
|
Source code in cmrseq/parametric_definitions/readout/_cartesian_single_lines.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | |
get_longest_adc_duration ¶
get_longest_adc_duration(
system_specs: SystemSpec,
total_duration: Quantity,
num_samples: int,
resolution: Quantity,
balanced: bool = False,
additional_kspace_traverse: Quantity = None,
readout_prephaser_scaling: float = -0.5,
max_iters: int = 10,
) -> (
cmrseq.bausteine.TrapezoidalGradient,
cmrseq.bausteine.TrapezoidalGradient,
)
Creates the readout-gradient and prephaser (and balancing rewinder) with maximum flat top duration of the readout gradient, for the specified flat top area (defined by the image resoultion) and a specified total duration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
|
required |
total_duration
|
Quantity
|
Total duration to fit the gradients into. |
required |
num_samples
|
int
|
Number of samples (used to compute the required k-space traverse) |
required |
resolution
|
Quantity
|
Resolution in RO direction (used to compute the required k-space traverse) |
required |
balanced
|
bool
|
If true, the total duration includes the rewinder after the readout, otherwise not |
False
|
additional_kspace_traverse
|
Quantity
|
k-space vector that needs to be traversed during the prephaser, while adhering to the norm of the combined gradient channels being smaller than system_specs.max_grad. If None, no additional traverse is assumed, potentially resulting in higher prephaser amplitudes. |
None
|
max_iters
|
int
|
optional, maximum number of iteration loops for finding optimal gradients. Typically converges with less than 4 |
10
|
Returns:
| Type | Description |
|---|---|
Two trapezoidal gradient objects, one for the prephaser and the other for the readout gradient, and one ADC object
|
|
Source code in cmrseq/parametric_definitions/readout/_cartesian_single_lines.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 | |
get_longest_adc_duration_noprephaser ¶
get_longest_adc_duration_noprephaser(
system_specs: SystemSpec,
total_duration: Quantity,
num_samples: int,
resolution: Quantity,
iters: int = 3,
)
Source code in cmrseq/parametric_definitions/readout/_cartesian_single_lines.py
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 | |
gre_cartesian_line ¶
gre_cartesian_line(
system_specs: SystemSpec,
num_samples: int,
k_readout: Quantity,
k_phase: Quantity,
adc_duration: Quantity,
k_slice: Quantity = None,
delay: Quantity = Quantity(0.0, "ms"),
prephaser_duration: Quantity = None,
) -> cmrseq.Sequence
Generates a gradient sequence to apply phase encoding (0, 1.,0.) direction and a readout including adc-events for a single line in gradient direction (1., 0., 0.). Is designed to work for gradient-echo based readouts.
.. code-block:: python
. ADC: |||||| -> num_samples . . __ . . RO: _ / \ . . _/ . . ___ . . PE: __/ _____ . . . . | delay | | | . . adc_duration .
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
SystemSpecification |
required |
num_samples
|
int
|
Number of samples acquired during frequency encoding |
required |
k_readout
|
Quantity
|
Quantity[1/Length] :math: |
required |
k_phase
|
Quantity
|
Quantity[1/Length] :math: |
required |
adc_duration
|
Quantity
|
Quantity[time] Total duration of adc-sampling for a single TR |
required |
k_slice
|
Quantity
|
Optional slice-direction phase encoding strength for 3D encoding. If specified, a slice-direction prephaser is added. |
None
|
delay
|
Quantity
|
|
Quantity(0.0, 'ms')
|
prephaser_duration
|
Quantity
|
Optional if not specified the shortest possible duration for the RO/PE prephaser is calculated |
None
|
Returns:
| Type | Description |
|---|---|
Sequence object containing RO- & PE-gradients as well as ADC events
|
|
Source code in cmrseq/parametric_definitions/readout/_cartesian_single_lines.py
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
balanced_gre_cartesian_line ¶
balanced_gre_cartesian_line(
system_specs: SystemSpec,
num_samples: int,
k_readout: Quantity,
k_phase: Quantity,
adc_duration: Quantity,
k_slice: Quantity = None,
delay: Quantity = Quantity(0.0, "ms"),
prephaser_duration: Quantity = None,
) -> cmrseq.Sequence
Generates a gradient sequence to apply phase encoding (0, 1.,0.) direction and a readout including adc-events for a single line in gradient direction (1., 0., 0.). After readout prephasers are rewound. Is designed to work for gradient-echo based readouts.
.. code-block: python
. ADC: |||||| -> num_samples . . __ . . RO: _ / \ ______ . . _/ ___/ . . ___ ___ . . PE: __/ __/ __ . . . . | delay | | | . . adc_duration .
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
SystemSpecification |
required |
num_samples
|
int
|
Number of samples acquired during frequency encoding |
required |
k_readout
|
Quantity
|
Quantity[1/Length] :math: |
required |
k_phase
|
Quantity
|
Quantity[1/Length] :math: |
required |
adc_duration
|
Quantity
|
Quantity[time] Total duration of adc-sampling for a single TR |
required |
delay
|
Quantity
|
Defaults to 0 ms |
Quantity(0.0, 'ms')
|
prephaser_duration
|
Quantity
|
Optional if not specified the shortest possible duration for the RO/PE prephaser is calculates |
None
|
Returns:
| Type | Description |
|---|---|
Sequence object containing RO- & PE-gradients plus rewinders as well as ADC events
|
|
Source code in cmrseq/parametric_definitions/readout/_cartesian_single_lines.py
575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 | |
se_cartesian_line ¶
se_cartesian_line(
system_specs: SystemSpec,
num_samples: int,
echo_time: Quantity,
pulse_duration: Quantity,
excitation_center_time: Quantity,
k_readout: Quantity,
k_phase: Quantity,
adc_duration: Quantity,
delay: Quantity = Quantity(0.0, "ms"),
prephaser_duration: Quantity = None,
) -> cmrseq.Sequence
Generates a gradient sequence to apply phase encoding (0, 1.,0.) direction and a readout including adc-events for a single line in gradient direction (1., 0., 0.) for a spin-echo based readout.
.. code-block:: python
. excitation center .
. | .
. | TE/2 | TE/2 | .
. ADC: |||||| -> num_samples .
. ___ ______ .
. RO: ____/ \_______/ \ .
. ___ .
. PE: ____/ \_____________ .
. | | | | .
. delay adc_duration .
. | | .
. pulse_duration .
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
SystemSpecification |
required |
num_samples
|
int
|
Number of samples acquired during frequency encoding |
required |
echo_time
|
Quantity
|
|
required |
pulse_duration
|
Quantity
|
total time of ss-gradient (including ramps) |
required |
excitation_center_time
|
Quantity
|
Quantity[Time] Reference time-point to calculate TE from |
required |
k_readout
|
Quantity
|
Quantity[1/Length] :math: |
required |
k_phase
|
Quantity
|
Quantity[1/Length] :math: |
required |
adc_duration
|
Quantity
|
Quantity[time] Total duration of adc-sampling for a single TR |
required |
prephaser_duration
|
Quantity
|
Optional if not specified the shortest possible duration for the RO/PE prephaser is calculates |
None
|
Returns:
| Type | Description |
|---|---|
Sequence containing the RO/PE prephaser, RO and adc events for a spin-echo read-out
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If phase/frequency encoding amplitude would exceed system limits |
Source code in cmrseq/parametric_definitions/readout/_cartesian_single_lines.py
653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 | |
_epi ¶
This modules contains compositions of building blocks commonly used for in defining actual signal acqusition and spatial encoding
single_shot_epi ¶
single_shot_epi(
system_specs: SystemSpec,
field_of_view: Quantity,
matrix_size: ndarray,
blip_direction: str = "up",
partial_fourier_lines: int = 0,
slope_sampling: bool = False,
water_fat_shift: Union[str, float] = "minimum",
max_total_duration: Quantity = None,
delay: Quantity = Quantity(0, "ms"),
) -> cmrseq.Sequence
Define a single-shot EPI readout sequence from image configuration.
The prephaser is assumed to be as short as possible. Legacy diagrams and stale figures live in the readouts guide.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
System limits used for validation. |
required |
field_of_view
|
Quantity
|
Spatial extent in readout and phase-encoding directions. |
required |
matrix_size
|
ndarray
|
Number of samples in readout and phase-encoding directions. |
required |
blip_direction
|
str
|
Direction of phase encoding steps, either |
'up'
|
partial_fourier_lines
|
int
|
Number of lines skipped before k-space center. |
0
|
slope_sampling
|
bool
|
If |
False
|
water_fat_shift
|
Union[str, float]
|
Echo-spacing target: |
'minimum'
|
max_total_duration
|
Quantity
|
Maximum total readout duration. Required when |
None
|
delay
|
Quantity
|
Time gap added before the sequence. |
Quantity(0, 'ms')
|
Returns:
| Type | Description |
|---|---|
Sequence
|
Sequence containing the EPI readout. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the shortest duration exceeds |
Source code in cmrseq/parametric_definitions/readout/_epi.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | |
_radial ¶
This module contains parametric definitions for generating radial readouts, as well as 3D radial ordering schemes.
radial_spoke ¶
radial_spoke(
system_specs: SystemSpec,
num_samples: int,
kr_max: Quantity,
angle: Quantity,
adc_duration: Quantity,
delay: Quantity = Quantity(0.0, "ms"),
prephaser_duration: Quantity = None,
balanced: bool = False,
readout_ramp_sampling: bool = False,
sample_prephaser: bool = False,
sample_balanced: bool = False,
prephaser_ramp_sampling: bool = False,
balanced_ramp_sampling: bool = False,
match_prephaser_amp_to_readout: bool = False,
) -> cmrseq.Sequence
Generates a single 2D radial spoke that traverses from [-kr_max,kr_max] at a given angle.
The prephaser / rewinder ADC sampling is chosen such that the maximum k-space increment per sample satisfies
gamma * |G_pre/bal|max * dwell_pre/bal <= gamma * |G_ro|max * dwell_ro
i.e. the prephaser / rewinder never has a larger Δk per sample than the main readout. If the required dwell would be below system_specs.adc_raster_time, an error is raised.
Source code in cmrseq/parametric_definitions/readout/_radial.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 | |
old_radial_spoke ¶
old_radial_spoke(
system_specs: SystemSpec,
num_samples: int,
kr_max: Quantity,
angle: Quantity,
adc_duration: Quantity,
delay: Quantity = Quantity(0.0, "ms"),
prephaser_duration: Quantity = None,
balanced: bool = False,
readout_ramp_sampling: bool = False,
sample_prephaser: bool = False,
sample_balanced: bool = False,
prephaser_ramp_sampling: bool = False,
balanced_ramp_sampling: bool = False,
match_prephaser_amp_to_readout: bool = False,
) -> cmrseq.Sequence
Generate a single 2D radial spoke from -kr_max to kr_max.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
System specifications used for rasterization and hardware limits. |
required |
num_samples
|
int
|
Number of ADC samples from |
required |
kr_max
|
Quantity
|
Maximum k-space radius with units of inverse length. |
required |
angle
|
Quantity
|
Spoke angle in the measurement/phase plane. An angle of zero corresponds to the readout direction. |
required |
adc_duration
|
Quantity
|
Total ADC sampling duration. |
required |
delay
|
Quantity
|
Delay before the spoke. |
Quantity(0., "ms")
|
prephaser_duration
|
Quantity
|
Prephaser duration. If omitted, the shortest feasible duration is used. |
None
|
balanced
|
bool
|
Add a rewinder gradient after the ADC to balance the zeroth moment. |
False
|
readout_ramp_sampling
|
bool
|
Sample during readout ramps while preserving the flat-top ADC dwell time. |
False
|
sample_prephaser
|
bool
|
Add ADC sampling during the prephaser. |
False
|
sample_balanced
|
bool
|
Add ADC sampling during the rewinder. |
False
|
prephaser_ramp_sampling
|
bool
|
Enable ramp sampling for the prephaser ADC. |
False
|
balanced_ramp_sampling
|
bool
|
Enable ramp sampling for the rewinder ADC. |
False
|
match_prephaser_amp_to_readout
|
bool
|
Match prephaser and rewinder amplitudes to the readout amplitude. |
False
|
Returns:
| Type | Description |
|---|---|
Sequence
|
Sequence containing the radial readout. |
Source code in cmrseq/parametric_definitions/readout/_radial.py
362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 | |
radial_3D ¶
radial_3D(
system_specs: SystemSpec,
spoke_directions: array,
samples_per_spoke: int,
kr_max: Quantity,
adc_duration: Quantity,
prephaser_duration: Quantity = None,
balanced: bool = False,
partial_fourier=None,
readout_ramp_sampling: bool = False,
sample_prephaser: bool = False,
sample_balanced: bool = False,
prephaser_ramp_sampling: bool = False,
balanced_ramp_sampling: bool = False,
match_prephaser_amp_to_readout: bool = False,
) -> list
Generate 3D radial spokes for the supplied readout directions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
System specifications used for rasterization and hardware limits. |
required |
spoke_directions
|
ndarray
|
Array with shape |
required |
samples_per_spoke
|
int
|
Number of ADC samples from |
required |
kr_max
|
Quantity
|
Maximum k-space radius with units of inverse length. |
required |
adc_duration
|
Quantity
|
Total ADC sampling duration for a spoke. |
required |
prephaser_duration
|
Quantity
|
Prephaser duration. If omitted, the shortest feasible duration is used. |
None
|
balanced
|
bool
|
Add a rewinder gradient after the ADC to balance the zeroth moment. |
False
|
partial_fourier
|
optional
|
Reserved for future partial Fourier support. |
None
|
readout_ramp_sampling
|
bool
|
Sample during readout ramps while preserving the flat-top ADC dwell time. |
False
|
sample_prephaser
|
bool
|
Add ADC sampling during the prephaser. |
False
|
sample_balanced
|
bool
|
Add ADC sampling during the rewinder. |
False
|
prephaser_ramp_sampling
|
bool
|
Enable ramp sampling for the prephaser ADC. |
False
|
balanced_ramp_sampling
|
bool
|
Enable ramp sampling for the rewinder ADC. |
False
|
match_prephaser_amp_to_readout
|
bool
|
Match prephaser and rewinder amplitudes to the readout amplitude. |
False
|
Returns:
| Type | Description |
|---|---|
list[Sequence]
|
One radial readout sequence for each spoke direction. |
Source code in cmrseq/parametric_definitions/readout/_radial.py
538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 | |
radial_3D_spiral_WongRoos ¶
radial_3D_spiral_WongRoos(
num_interleaves: int,
spokes_per_interleave: int,
single_hemisphere: bool = False,
)
Generate 3D radial spoke ordering using the Wong-Roos scheme.
The ordering follows Wong STS, Roos MS. A strategy for sampling on a sphere applied to 3D selective RF pulse design. Magnetic Resonance in Medicine. 1994;32(6):778-784. doi:10.1002/mrm.1910320614
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
num_interleaves
|
int
|
Number of spiral interleaves. |
required |
spokes_per_interleave
|
int
|
Number of radial spokes per interleave. |
required |
single_hemisphere
|
bool
|
Restrict the spiral to a single hemisphere. |
False
|
Returns:
| Type | Description |
|---|---|
ndarray
|
Array with shape |
Source code in cmrseq/parametric_definitions/readout/_radial.py
631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 | |
radial_3D_spiral_phyllotaxis ¶
radial_3D_spiral_phyllotaxis(
num_interleaves: int,
spokes_per_interleave: int,
single_hemisphere: bool = False,
)
Generate 3D radial spoke ordering using spiral phyllotaxis.
The ordering follows Piccini D, Littmann A, Nielles-Vallespin S, Zenge MO. Spiral phyllotaxis: The natural way to construct a 3D radial trajectory in MRI. Magnetic Resonance in Medicine. 2011;66(4):1049-1056. doi:10.1002/mrm.22898
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
num_interleaves
|
int
|
Number of spiral interleaves. |
required |
spokes_per_interleave
|
int
|
Number of radial spokes per interleave. |
required |
single_hemisphere
|
bool
|
Restrict the spiral to a single hemisphere. |
False
|
Returns:
| Type | Description |
|---|---|
ndarray
|
Array with shape |
Source code in cmrseq/parametric_definitions/readout/_radial.py
677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 | |
_spiral ¶
This module contains parametric definitions for generating spiral readouts
spiral_pipezwart ¶
spiral_pipezwart(
system_specs: SystemSpec,
interleaves: int,
kr_max: Quantity,
kr_delta: Quantity,
spiral_type: str = "archimedean",
gradient_rewind_type: str = "ramp down",
undersampling_type: str = "none",
undersampling_start: float = 1.0,
undersampling_end: float = 1.0,
undersampling_factor: float = 1.0,
kz_max: Quantity = Quantity(1.0, "1/m"),
kz_delta: Quantity = Quantity(1.0, "1/m"),
) -> cmrseq.bausteine.ArbitraryGradient
Generates spiral trajectory. Ported from C code provided along with: Pipe JG, Zwart NR. Spiral trajectory design: A flexible numerical algorithm and base analytical equations. Magn. Reson. Med. 2014;71:278–285 doi: 10.1002/mrm.24675.
Original C code can be found at https://www.ismrm.org/mri_unbound/sequence.htm
Some small changes to indexing when defining rewinder gradients and to address slew rate violations
:warning: If not rewound, gradient waveform does not end on 0 magnitude, therefore it is likely to violate subsequent sequence validation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
SystemSpecifications |
required |
interleaves
|
int
|
number of interleaved spirals |
required |
kr_max
|
Quantity
|
:math: |
required |
kr_delta
|
Quantity
|
k-space radial step-length |
required |
spiral_type
|
str
|
str from ['Archimedean', 'spherical dst'] denoting the type of spiral |
'archimedean'
|
gradient_rewind_type
|
str
|
From [None, 'ramp down', 'rewind to center'] denoting the type of gradient rewind. If None is specified, the gradient waveform will not end on 0 magnitude, potentially violating subsequent sequence-validation |
'ramp down'
|
undersampling_type
|
str
|
str from ['linear', 'quadratic', 'hanning'] defining the type of undersampling during acquisition |
'none'
|
undersampling_start
|
float
|
|
1.0
|
undersampling_end
|
float
|
|
1.0
|
undersampling_factor
|
float
|
|
1.0
|
kz_max
|
Quantity
|
|
Quantity(1.0, '1/m')
|
kz_delta
|
Quantity
|
|
Quantity(1.0, '1/m')
|
Returns:
| Type | Description |
|---|---|
Gradient block containing the spiral waveform
|
|
Source code in cmrseq/parametric_definitions/readout/_spiral.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 | |
pipe_WHIRLED_PEAS ¶
pipe_WHIRLED_PEAS(
system_specs: SystemSpec,
interleaves: int,
fov: Quantity,
kr_max: Quantity,
freq_max: Quantity = Quantity(0, "Hz"),
)
Generates WHIRL trajectory from analytic equations from James Pipe.
Pipe JG. WHIRLED PEAS: Analytical Equations for Spiral Trajectories and Matching Gradient Waveforms. ISMRM Annual Meeting 2023 Original code can be found at https://github.com/jim-pipe/whirled-peas
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
SystemSpecifications |
required |
interleaves
|
int
|
number of interleaved spirals |
required |
fov
|
Quantity
|
field of view |
required |
kr_max
|
Quantity
|
:math: |
required |
freq_max
|
Quantity
|
maximum frequency of spiral rotation, optional |
Quantity(0, 'Hz')
|
Returns:
| Type | Description |
|---|---|
object
|
|
Source code in cmrseq/parametric_definitions/readout/_spiral.py
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 | |
Sequences¶
_gradient_echo ¶
This module contains parametric definitions of complete multi-TR GRE-based sequences
flash ¶
flash(
system_specs: SystemSpec,
matrix_size: ndarray,
inplane_resolution: Quantity,
slice_thickness: Quantity,
adc_duration: Quantity,
flip_angle: Quantity,
pulse_duration: Quantity,
repetition_time: Quantity,
echo_time: Quantity,
slice_position_offset: Quantity = Quantity(0.0, "m"),
time_bandwidth_product: float = 4.0,
dummy_shots: int = 0,
fuse_slice_rewind_and_prephaser: bool = True,
rf_spoil: bool = True,
spoiler_strength: Quantity = None,
) -> List[cmrseq.Sequence]
Defines a 2D gradient echo sequence.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
SystemSpecifications |
required |
matrix_size
|
ndarray
|
array of shape (2, ) containing the resulting matrix dimensions |
required |
inplane_resolution
|
Quantity
|
Quantity[Length] of shape (2, ) containing the in-plane voxel dimensions |
required |
slice_thickness
|
Quantity
|
Quantity[Length] containing the required slice-thickness |
required |
adc_duration
|
Quantity
|
Quantity[time] Total duration of adc-sampling for a single TR |
required |
repetition_time
|
Quantity
|
Quantity[Time] containing the required repetition_time |
required |
echo_time
|
Quantity
|
Quantity[Time] containing the required echo-time. If too short for given system specifications, it is increased to minimum and a warning is raised. |
required |
flip_angle
|
Quantity
|
Quantity[Angle] containing the required flip_angle |
required |
pulse_duration
|
Quantity
|
Quantity[Time] Total pulse duration (corresponds to flat_duration of the slice selection gradient) |
required |
slice_position_offset
|
Quantity
|
Quantity[Length] positional offset in slice normal direction defining the frequency offset of the RF pulse |
Quantity(0.0, 'm')
|
time_bandwidth_product
|
float
|
float used to calculate the rf bandwidth from duration |
4.0
|
dummy_shots
|
int
|
number of dummy shots (TRs) without adc-events, with k-space center phase encoding |
0
|
fuse_slice_rewind_and_prephaser
|
bool
|
If True, the slice selection rewinder is recalculated to match the duration of the prephaser, resulting in the fastest possible 3D k-space traverse. |
True
|
rf_spoil
|
bool
|
If True, the RF phase is incremented for each TR to achieve spoiling, according to Zur et al (1991) |
True
|
Returns:
| Type | Description |
|---|---|
List of sequence objects, that each represent a single TR
|
|
Source code in cmrseq/parametric_definitions/sequences/_gradient_echo.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 | |
radial_flash ¶
radial_flash(
system_specs: SystemSpec,
samples_per_spoke: int,
inplane_resolution: Quantity,
slice_thickness: Quantity,
adc_duration: Quantity,
flip_angle: Quantity,
pulse_duration: Quantity,
repetition_time: Quantity,
echo_time: Quantity,
spoke_angle_increment: Quantity = None,
num_spokes: int = None,
slice_position_offset: Quantity = Quantity(0.0, "m"),
time_bandwidth_product: float = 4.0,
dummy_shots: int = 0,
fuse_slice_rewind_and_prephaser: bool = True,
) -> List[cmrseq.Sequence]
Defines a 2D radial FLASH sequence. Not as optimized as cartesian FLASH.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
SystemSpecification |
required |
samples_per_spoke
|
int
|
number of samples per spoke, i.e. number of adc-events per TR |
required |
inplane_resolution
|
Quantity
|
Isotropic in-plane resolution, defines max kspace radius. Quantity[Length] |
required |
slice_thickness
|
Quantity
|
Quantity[Length] containing the required slice-thickness |
required |
adc_duration
|
Quantity
|
Quantity[time] Total duration of adc-sampling for a single TR |
required |
flip_angle
|
Quantity
|
Quantity[Angle] containing the required flip_angle |
required |
pulse_duration
|
Quantity
|
Quantity[Time] Total pulse duration (corresponds to flat_duration of the slice selection gradient) |
required |
repetition_time
|
Quantity
|
Quantity[Time] containing the desired repetition time |
required |
echo_time
|
Quantity
|
Quantity[Time] containing the desired echo time |
required |
spoke_angle_increment
|
Quantity
|
Quantity[Angle] angle increment between spokes, if None, sets to uniformly fill 2pi |
None
|
num_spokes
|
int
|
number of spokes to acquire, if None, if None, defaults to satisfy nyquist |
None
|
slice_position_offset
|
Quantity
|
Quantity[Length] positional offset in slice normal direction defining the frequency offset of the RF pulse |
Quantity(0.0, 'm')
|
time_bandwidth_product
|
float
|
float used to calculate the rf bandwidth from duration |
4.0
|
dummy_shots
|
int
|
number of shots(TRs) without adc-events before starting the acquisition |
0
|
fuse_slice_rewind_and_prephaser
|
bool
|
If True, the slice selection rewinder is recalculated to match the duration of the prephaser, resulting in the fastest possible 3D k-space traverse. |
True
|
Returns:
| Type | Description |
|---|---|
List of length (n_dummy+matrix_size[1]) containting one Sequence object per TR
|
|
Source code in cmrseq/parametric_definitions/sequences/_gradient_echo.py
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 | |
_spin_echo ¶
This module contains parametric definitions of complete multi-TR SE-based sequences
single_line_cartesian2d ¶
single_line_cartesian2d(
system_specs: SystemSpec,
echo_time: Quantity,
repetition_time: Quantity,
matrix_size: ndarray,
inplane_resolution: Quantity,
slice_thickness: Quantity,
adc_duration: Quantity,
pulse_duration: Quantity,
time_bandwidth_product: float = 4.0,
) -> List[cmrseq.Sequence]
Constructs a basis spin echo single line acquisition scheme for a cartesian trajectory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
SystemSpecification |
required |
echo_time
|
Quantity
|
|
required |
repetition_time
|
Quantity
|
Quantity[Time] containing the required repetition_time |
required |
matrix_size
|
ndarray
|
array of shape (2, ) |
required |
inplane_resolution
|
Quantity
|
Quantity[Length] of shape (2, ) |
required |
slice_thickness
|
Quantity
|
Quantity[Length] containing the required slice-thickness |
required |
adc_duration
|
Quantity
|
Quantity[time] Total duration of adc-sampling for a single TR |
required |
pulse_duration
|
Quantity
|
Quantity[Time] Total pulse duration (corresponds to flat_duration of the slice selection gradient) |
required |
time_bandwidth_product
|
float
|
float used to calculate the rf bandwidth from duration |
4.0
|
Returns:
| Type | Description |
|---|---|
List of length (matrix_size[1]) containting one Sequence object per TR
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
if repetition time is smaller than the composite of elements within one TR |
Source code in cmrseq/parametric_definitions/sequences/_spin_echo.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | |
se_ssepi ¶
se_ssepi(
system_specs: SystemSpec,
field_of_view: Quantity,
matrix_size: ndarray,
echo_time: Quantity,
slice_thickness: Quantity,
slice_orientation: ndarray,
pulse_duration: Quantity,
epi_slope_sampling: bool = False,
tbw_product: float = 4,
max_epi_duration: Quantity = None,
epi_water_fat_shift: Union[str, float, int] = "minimum",
partial_fourier_lines: int = 0,
blip_direction: str = "up",
)
Defines a single shot EPI sequence. If the specified echo time is too short, the shortest possible echo-time is used.
.. note::
The sequence object returned by this function contains the SimpleNamespace "additional_info"
as attribute, which contains the k-space center index, actually used echo-time and the
absolute value of the echo-formation time
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
SystemSpecification |
required |
field_of_view
|
Quantity
|
spatial extend in readout and phase encoding direction; shape = (2, ) |
required |
matrix_size
|
ndarray
|
number of pixels in readout and phase encoding direction; shape = (2, ) |
required |
echo_time
|
Quantity
|
Time at which the central k-space line is placed |
required |
slice_thickness
|
Quantity
|
Thickness of slice-selective excitation definitions |
required |
slice_orientation
|
ndarray
|
Slice normal of excitation slice |
required |
pulse_duration
|
Quantity
|
Duration of the excitation & refocusing pulses |
required |
epi_slope_sampling
|
bool
|
If yes the epi readout uses slope sampling |
False
|
tbw_product
|
float
|
Time-bandwidth product of the inc-Pulses used for excitation and refocus |
4
|
max_epi_duration
|
Quantity
|
See documentation (cmrseq.seqdefs.readout.single_shot_epi) |
None
|
epi_water_fat_shift
|
Union[str, float, int]
|
See documentation (cmrseq.seqdefs.readout.single_shot_epi) |
'minimum'
|
partial_fourier_lines
|
int
|
number of lines to skip before k-space center, allowing shorter echo times |
0
|
blip_direction
|
str
|
from ["up", "down"] defining the direction of phase-encoding kspace travers |
'up'
|
Returns:
| Type | Description |
|---|---|
sequence object
|
|
Source code in cmrseq/parametric_definitions/sequences/_spin_echo.py
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
_ssfp ¶
This module contains parametric definitions of complete multi-TR balanced SSFP sequences
balanced_ssfp ¶
balanced_ssfp(
system_specs: SystemSpec,
matrix_size: ndarray,
inplane_resolution: Quantity,
slice_thickness: Quantity,
adc_duration: Quantity,
flip_angle: Quantity,
pulse_duration: Quantity,
repetition_time: Quantity,
slice_position_offset: Quantity = Quantity(0.0, "m"),
time_bandwidth_product: float = 4.0,
dummy_shots: int = None,
dummy_scheme: str = "Linear",
fuse_slice_rewind_and_prephaser: bool = True,
) -> List[cmrseq.Sequence]
Defines a balanced steady state free precession sequence with a/2-TR/2 preparation, with a cartesian readout.
Assumptions in temporal optimization for combinations of specified arguments:
- Neither TR nor adc_duration: Timing is optimized to have minimal TR, hence also shortest possible ADC-duration
- TR and adc_duration is provided: Padding around the readout gradient is applied to match TR if needed. If ADC is longer than possible, TR is set to minimal feasible value, marked by a warning.
- TR specified, adc_duration is None: ADC-duration is maximized, according to given TR
- TR is None, adc_duration is specified: TR is set to minimally possible value for given adc-duration
In all cases the gradient limits for combined k-space traverse during the prephaser is respected, both for fusing and not fusing the slice select rewinder with the phase and readout prephaser.
.. code-block::
. | TR | .
. | TE | .
. .
. RF: /\ .
. ADC \/ \/ ||||||||||||||||||||| .
. ______ .
. SS: / \ _______________________ .
. \__/ \__/ .
. _____________________ .
. RO: ________ / \ .
. \__/ \__/ .
. __ .
. PE: ________ ______________________/ \ .
. \__/ .
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
SystemSpecification |
required |
matrix_size
|
ndarray
|
array of shape (2, ) |
required |
inplane_resolution
|
Quantity
|
Quantity[Length] of shape (2, ) |
required |
repetition_time
|
Quantity
|
Quantity[Time] containing the required repetition_time If None or too short, the shortest possible time under system constraints is used. |
required |
slice_thickness
|
Quantity
|
Quantity[Length] containing the required slice-thickness |
required |
adc_duration
|
Quantity
|
Quantity[time] Total duration of adc-sampling for a single TR |
required |
flip_angle
|
Quantity
|
Quantity[Angle] containing the required flip_angle |
required |
pulse_duration
|
Quantity
|
Quantity[Time] Total pulse duration (corresponds to flat_duration of the slice selection gradient) |
required |
slice_position_offset
|
Quantity
|
Quantity[Length] positional offset in slice normal direction defining the frequency offset of the RF pulse |
Quantity(0.0, 'm')
|
time_bandwidth_product
|
float
|
float used to calculate the rf bandwidth from duration |
4.0
|
dummy_shots
|
int
|
number of shots(TRs) without adc-events before starting the acquisition |
None
|
dummy_scheme
|
str
|
str scheme to use for dummy shots, options are "Linear" or "AlphaHalf" |
'Linear'
|
fuse_slice_rewind_and_prephaser
|
bool
|
If True, the slice selection rewinder is recalculated to match the duration of the prephaser, resulting in the fastest possible 3D k-space traverse. |
True
|
Returns:
| Type | Description |
|---|---|
List of length (n_dummy+matrix_size[1]) containting one Sequence object per TR
|
|
Source code in cmrseq/parametric_definitions/sequences/_ssfp.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 | |
radial_balanced_ssfp ¶
radial_balanced_ssfp(
system_specs: SystemSpec,
samples_per_spoke: int,
inplane_resolution: Quantity,
slice_thickness: Quantity,
adc_duration: Quantity,
flip_angle: Quantity,
pulse_duration: Quantity,
repetition_time: Quantity,
spoke_angle_increment: Quantity = None,
num_spokes: int = None,
slice_position_offset: Quantity = Quantity(0.0, "m"),
time_bandwidth_product: float = 4.0,
dummy_shots: int = 0,
dummy_scheme: str = "Linear",
fuse_slice_rewind_and_prephaser: bool = True,
) -> List[cmrseq.Sequence]
Defines a 2D radial balanced steady state free precession sequence with a/2-TR/2 preparation Not as optimized as cartesian bSSFP.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
SystemSpecification |
required |
samples_per_spoke
|
int
|
number of samples per spoke, i.e. number of adc-events per TR |
required |
inplane_resolution
|
Quantity
|
Isotropic in-plane resolution, defines max kspace radius. Quantity[Length] |
required |
slice_thickness
|
Quantity
|
Quantity[Length] containing the required slice-thickness |
required |
adc_duration
|
Quantity
|
Quantity[time] Total duration of adc-sampling for a single TR |
required |
flip_angle
|
Quantity
|
Quantity[Angle] containing the required flip_angle |
required |
pulse_duration
|
Quantity
|
Quantity[Time] Total pulse duration (corresponds to flat_duration of the slice selection gradient) |
required |
repetition_time
|
Quantity
|
Quantity[Time] containing the desired repetition time |
required |
spoke_angle_increment
|
Quantity
|
Quantity[Angle] angle increment between spokes, if None, sets to uniformly fill 2pi |
None
|
num_spokes
|
int
|
number of spokes to acquire, if None, if None, defaults to satisfy nyquist |
None
|
slice_position_offset
|
Quantity
|
Quantity[Length] positional offset in slice normal direction defining the frequency offset of the RF pulse |
Quantity(0.0, 'm')
|
time_bandwidth_product
|
float
|
float used to calculate the rf bandwidth from duration |
4.0
|
dummy_shots
|
int
|
number of shots(TRs) without adc-events before starting the acquisition |
0
|
dummy_scheme
|
str
|
str scheme to use for dummy shots, either "Linear" or "AlphaHalf" |
'Linear'
|
fuse_slice_rewind_and_prephaser
|
bool
|
If True, the slice selection rewinder is recalculated to match the duration of the prephaser, resulting in the fastest possible 3D k-space traverse. |
True
|
Returns:
| Type | Description |
|---|---|
List of length (n_dummy+matrix_size[1]) containting one Sequence object per TR
|
|
Source code in cmrseq/parametric_definitions/sequences/_ssfp.py
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 | |
balanced_ssfp_3d ¶
balanced_ssfp_3d(
system_specs: SystemSpec,
k_phase: Quantity,
k_z: Quantity,
matrix_size: ndarray,
inplane_resolution: Quantity,
slice_thickness: Quantity,
adc_duration: Quantity,
flip_angle: Quantity,
pulse_duration: Quantity,
repetition_time: Quantity,
slice_position_offset: Quantity,
time_bandwidth_product: float = 4.0,
dummy_shots: int = None,
dummy_scheme: str = "Linear",
fuse_slice_rewind_and_prephaser: bool = True,
) -> List[cmrseq.Sequence]
Define a 3D balanced steady-state free precession sequence.
The sequence uses alpha/2-TR/2 preparation and a Cartesian readout.
Assumptions in temporal optimization for combinations of specified arguments:
- Neither TR nor adc_duration: Timing is optimized to have minimal TR, hence also shortest possible ADC-duration
- TR and adc_duration is provided: Padding around the readout gradient is applied to match TR if needed. If ADC is longer than possible, TR is set to minimal feasible value, marked by a warning.
- TR specified, adc_duration is None: ADC-duration is maximized, according to given TR
- TR is None, adc_duration is specified: TR is set to minimally possible value for given adc-duration
In all cases the gradient limits for combined k-space traverse during the prephaser is respected, both for fusing and not fusing the slice select rewinder with the phase and readout prephaser.
.. code-block::
. | TR | .
. | TE | .
. .
. RF: /\ .
. ADC \/ \/ ||||||||||||||||||||| .
. ______ .
. SS: / \ _______________________ .
. \__/ \__/ .
. _____________________ .
. RO: ________ / \ .
. \__/ \__/ .
. __ .
. PE_Y: ________ ______________________/ \ .
. \__/ __ . .
. PE_Z: ________ ______________________/ \ .
. \__/
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
System specifications used for rasterization and hardware limits. |
required |
k_phase
|
Quantity
|
Phase-encoding |
required |
k_z
|
Quantity
|
Slice-encoding |
required |
matrix_size
|
ndarray
|
Matrix size in readout, phase, and slice directions. |
required |
inplane_resolution
|
Quantity
|
Resolution in readout, phase, and slice directions. |
required |
slice_thickness
|
Quantity
|
Slice thickness. |
required |
adc_duration
|
Quantity
|
Total ADC sampling duration for a single TR. |
required |
flip_angle
|
Quantity
|
RF flip angle. |
required |
pulse_duration
|
Quantity
|
Total RF pulse duration. This corresponds to the flat duration of the slice-selection gradient. |
required |
repetition_time
|
Quantity
|
Requested repetition time. If |
required |
slice_position_offset
|
Quantity
|
Positional offset in the slice-normal direction used to define the RF pulse frequency offset. |
required |
time_bandwidth_product
|
float
|
Time-bandwidth product used to calculate RF bandwidth from duration. |
4.
|
dummy_shots
|
int
|
Number of TRs without ADC events before starting acquisition. |
None
|
dummy_scheme
|
(Linear, AlphaHalf)
|
Dummy-shot preparation scheme. |
"Linear"
|
fuse_slice_rewind_and_prephaser
|
bool
|
Recalculate the slice-selection rewinder to match the prephaser duration, producing the fastest feasible 3D k-space traverse. |
True
|
Returns:
| Type | Description |
|---|---|
list[Sequence]
|
One sequence object per TR, including dummy shots. |
Source code in cmrseq/parametric_definitions/sequences/_ssfp.py
549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 | |
_b0 ¶
This module contains parametric definitions of complete B0 sequences
B0_map ¶
B0_map(
system_specs: SystemSpec,
matrix_size: ndarray,
inplane_resolution: Quantity,
slice_thickness: Quantity,
adc_duration: Quantity,
flip_angle: Quantity,
pulse_duration: Quantity,
repetition_time: Quantity,
echo_time: Quantity,
echo_spacing: Quantity,
num_echoes: int,
positive_multiecho: bool = False,
slice_position_offset: Quantity = Quantity(0.0, "m"),
time_bandwidth_product: float = 4.0,
dummy_shots: int = 0,
fuse_slice_rewind_and_prephaser: bool = True,
rf_spoil: bool = True,
spoiler_strength: Quantity = None,
) -> List[cmrseq.Sequence]
Defines 2D multiecho gradient echo sequence.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system_specs
|
SystemSpec
|
SystemSpecifications |
required |
matrix_size
|
ndarray
|
array of shape (2, ) containing the resulting matrix dimensions |
required |
inplane_resolution
|
Quantity
|
Quantity[Length] of shape (2, ) containing the in-plane voxel dimensions |
required |
slice_thickness
|
Quantity
|
Quantity[Length] containing the required slice-thickness |
required |
adc_duration
|
Quantity
|
Quantity[time] Total duration of adc-sampling for a single TR |
required |
repetition_time
|
Quantity
|
Quantity[Time] containing the required repetition_time |
required |
echo_time
|
Quantity
|
Quantity[Time] containing the required echo-time. If too short for given system specifications, it is increased to minimum and a warning is raised. |
required |
flip_angle
|
Quantity
|
Quantity[Angle] containing the required flip_angle |
required |
pulse_duration
|
Quantity
|
Quantity[Time] Total pulse duration (corresponds to flat_duration of the slice selection gradient) |
required |
slice_position_offset
|
Quantity
|
Quantity[Length] positional offset in slice normal direction defining the frequency offset of the RF pulse |
Quantity(0.0, 'm')
|
time_bandwidth_product
|
float
|
float used to calculate the rf bandwidth from duration |
4.0
|
dummy_shots
|
int
|
number of dummy shots (TRs) without adc-events, with k-space center phase encoding |
0
|
fuse_slice_rewind_and_prephaser
|
bool
|
If True, the slice selection rewinder is recalculated to match the duration of the prephaser, resulting in the fastest possible 3D k-space traverse. |
True
|
rf_spoil
|
bool
|
If True, the RF phase is incremented for each TR to achieve spoiling, according to Zur et al (1991) |
True
|
Returns:
| Type | Description |
|---|---|
List of sequence objects, that each represent a single TR
|
|
Source code in cmrseq/parametric_definitions/sequences/_b0.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 | |