import math import warnings import numpy as np from matplotlib import pyplot as plt import pypulseq as pp # ====== # SETUP # ====== dG = 250e-6 # Set system limits system = pp.Opts(max_grad=32, grad_unit='mT/m', max_slew=130, slew_unit='T/m/s', rf_ringdown_time=100e-6, rf_dead_time=100e-6, adc_dead_time=10e-6) seq = pp.Sequence(system) # Create a new sequence object # Define FOV and resolution fov = 256e-3 Nx, Ny = 128, 128 n_echo = 16 n_slices = 1 rf_flip = 180 if isinstance(rf_flip, int): rf_flip = np.zeros(n_echo) + rf_flip slice_thickness = 5e-3 TE = 12e-3 TR = 2000e-3 TE_eff = 60e-3 k0 = round(TE_eff / TE)
Nx = 256 Ny = 256 alpha = 90 # flip angle slice_thickness = 3e-3 # slice TE = np.array([4.3e-3]) TR = 300e-3 rf_spoiling_inc = 117 # RF spoiling increment ext_pulse_library = 1 # 0 - pypulseq, 1 - sigpy ext_pulse_type = 'slr' disp_pulse = 0 system = pp.Opts(max_grad=28, grad_unit='mT/m', max_slew=150, slew_unit='T/m/s', rf_ringdown_time=20e-6, rf_dead_time=100e-6, adc_dead_time=10e-6, rf_raster_time=1e-6) # Common pulse design parameters duration = 3e-3 # seconds tb = 4 # ====== # CREATE EVENTS # ====== if (ext_pulse_library): # Declare pulse configuration inputs here pulse_freq_offset = 0.0 # if designing rf pulse without a FM if ext_pulse_type == 'slr':