├── ISMRM_slides.pdf ├── case_5 ├── rf_pulse.png ├── README.md ├── case_5_2pool_model.yaml ├── case_5_create_sequence_pypulseq_v140.py ├── rf_pulse.csv ├── rf_pulse.txt └── case_5_create_sequence_pypulseq_v131.py ├── case_6 ├── rf_pulse.png ├── README.md ├── case_6_2pool_model.yaml ├── case_6_create_sequence.py ├── case_6_create_sequence_pypulseq_v140.py ├── rf_pulse.csv ├── rf_pulse.txt └── case_6_create_sequence_pypulseq_v131.py ├── case_7 ├── rf_pulse.png ├── README.md ├── case_7_5pool_model.yaml ├── case_7_create_sequence_pypulseq_v140.py ├── rf_pulse.csv ├── rf_pulse.txt └── case_7_create_sequence_pypulseq_v131.py ├── ISMRM_Abstract_BMsim.pdf ├── release_notes.md ├── personal_scripts ├── schuenke_bmctool_sim.py └── Moritz_Zaiss_run_sim.m ├── case_2 ├── README.md ├── case_2_2pool_model.yaml └── case_2_create_seq.m ├── case_1 ├── README.md ├── case_1_2pool_model.yaml └── case_1_create_seq.m ├── case_8 ├── README.md ├── case_8_5pool_model.yaml ├── case_8_create_sequence_pypulseq_v140.py ├── case_8_create_sequence_pypulseq_v131.py ├── case_8_pypulseq_v131.seq └── case_8_pypulseq_v140.seq ├── case_4 ├── README.md ├── case_4_5pool_model.yaml ├── case_4_create_seq.m └── case_4_create_seq.seq ├── case_3 ├── README.md ├── case_3_5pool_model.yaml └── case_3_create_seq.m └── README.md /ISMRM_slides.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pulseq-cest/BMsim_challenge/HEAD/ISMRM_slides.pdf -------------------------------------------------------------------------------- /case_5/rf_pulse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pulseq-cest/BMsim_challenge/HEAD/case_5/rf_pulse.png -------------------------------------------------------------------------------- /case_6/rf_pulse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pulseq-cest/BMsim_challenge/HEAD/case_6/rf_pulse.png -------------------------------------------------------------------------------- /case_7/rf_pulse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pulseq-cest/BMsim_challenge/HEAD/case_7/rf_pulse.png -------------------------------------------------------------------------------- /ISMRM_Abstract_BMsim.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pulseq-cest/BMsim_challenge/HEAD/ISMRM_Abstract_BMsim.pdf -------------------------------------------------------------------------------- /release_notes.md: -------------------------------------------------------------------------------- 1 | # V2.0 2 | - finer offset sampling, 3 | - well defined gamma 42.5764 MHz/T with these four digits 4 | - defined Trec and tpost 5 | - we went from 7 pool to 5 pool to be more inclusive 6 | - we added a steady state 2 pool case as suggested by Phil Sun (Thanks, Phil!) 7 | - more description and renaming. 8 | - normalization scan at -300 ppm 9 | 10 | # V1.0 11 | - 3 cases, 2pool APT, 7 pool APT, 7 pool WASABI 12 | 13 | -------------------------------------------------------------------------------- /personal_scripts/schuenke_bmctool_sim.py: -------------------------------------------------------------------------------- 1 | """ 2 | Script requires "BMCTool" package 3 | can be installed from PyPi using "pip install bmctool" 4 | 5 | My environment was: 6 | Python 3.10 7 | - numpy 1.22.4 8 | - pandas 1.4.3 9 | - bmctool 0.4.0 10 | - pypulseq 1.4.0 11 | 12 | Author: Patrick Schuenke 13 | e-mail: patrick.schuenke@ptb.de 14 | date: 2022-10-07 15 | """ 16 | from pathlib import Path 17 | 18 | import pandas as pd 19 | 20 | from bmctool.bmc_tool import BMCTool 21 | from bmctool.set_params import load_params 22 | from bmctool.utils.eval import plot_z 23 | 24 | seq_file = Path(r'\BMsim_challenge\case_4\case_4_create_seq.seq') 25 | config_file = Path(r'\BMsim_challenge\case_4\case_4_5pool_model.yaml') 26 | 27 | # load config file 28 | sim_params = load_params(config_file) 29 | sim_params.update_options(par_calc=True) 30 | 31 | # create BMCTool object and run simulation 32 | sim = BMCTool(sim_params, seq_file) 33 | sim.run() 34 | 35 | # get x,y data for Z-spectrum 36 | offsets, mz = sim.get_zspec() 37 | 38 | # create panda DataFrame and copy it to clipboard to be able to paste it in excel 39 | pd_data = pd.DataFrame(mz) 40 | pd_data.to_clipboard(excel=True) 41 | 42 | # plot data 43 | plot_z(mz=mz, 44 | offsets=offsets, 45 | normalize=True) 46 | -------------------------------------------------------------------------------- /case_5/README.md: -------------------------------------------------------------------------------- 1 | # BMsim challenge - CASE 5 2 | 3 | ## Pool model 4 | 5 | The pool model of case 5 is identical to the [z_phantom_creatine_3T_pH6.4_T22C_bmsim](https://github.com/kherz/pulseq-cest-library/blob/6ffca73282badd2828b86ace383969e9b4276e80/sim-library/WM_3T_default_7pool_bmsim.yaml) 6 | model published in the [pulseq-cest-library](https://github.com/kherz/pulseq-cest-library). It consists of: 7 | 8 | - 1 water pool 9 | - 1 CEST pool 10 | 11 | ### The exact settings are 12 | 13 | - water_pool: 14 | - f: 1.0 15 | - T1: 3.0 16 | - T2: 2.0 17 | 18 | - cest pool: 19 | - f: 5.0e-04 20 | - T1: 1.05 21 | - T2: 0.1 22 | - k: 50 23 | - dw: 1.9 24 | 25 | More details and references are given in [case_5_2pool_model.yaml](/case_5/case_5_2pool_model.yaml) 26 | 27 | ## Preparation scheme 28 | 29 | The preparation scheme for case 5 consists of a single sinc-pulse, which has exactly the same settings as the sinc-pulses used in case 6 and case 7. 30 | 31 | The preparation settings are: 32 | 33 | - pulse shape: Gaussian 34 | - pulse duration: 50 ms 35 | - number of pulses: 1 36 | - total saturation time: 50 ms 37 | - pulse power (B1rms): 1.9962 µT 38 | - offset list: -5:0.1:5 ppm 39 | 40 | A MATLAB and a Python script to create a [Pulseq](https://github.com/pulseq/pulseq) seq-file is given in the [subfolder of case 5](/case_5) 41 | -------------------------------------------------------------------------------- /case_6/README.md: -------------------------------------------------------------------------------- 1 | # BMsim challenge - CASE 6 2 | 3 | ## Pool model 4 | 5 | The pool model of case 6 is identical to the [z_phantom_creatine_3T_pH6.4_T22C_bmsim](https://github.com/kherz/pulseq-cest-library/blob/6ffca73282badd2828b86ace383969e9b4276e80/sim-library/WM_3T_default_7pool_bmsim.yaml) 6 | model published in the [pulseq-cest-library](https://github.com/kherz/pulseq-cest-library). It consists of: 7 | 8 | - 1 water pool 9 | - 1 CEST pool 10 | 11 | ### The exact settings are 12 | 13 | - water_pool: 14 | - f: 1.0 15 | - T1: 3.0 16 | - T2: 2.0 17 | 18 | - cest pool: 19 | - f: 5.0e-04 20 | - T1: 1.05 21 | - T2: 0.1 22 | - k: 50 23 | - dw: 1.9 24 | 25 | More details and references are given in [case_6_2pool_model.yaml](/case_6/case_6_2pool_model.yaml) 26 | 27 | ## Preparation scheme 28 | 29 | The preparation scheme for case 6 is based on [APTw_3T_001_2uT_36SincGauss_DC90_2s_braintumor](https://github.com/kherz/pulseq-cest-library/tree/master/seq-library/APTw_3T_001_2uT_36SincGauss_DC90_2s_braintumor) published in the [pulseq-cest-library](https://github.com/kherz/pulseq-cest-library). 30 | 31 | The preparation settings are: 32 | 33 | - pulse shape: Gaussian 34 | - pulse duration: 50 ms 35 | - number of pulses: 36 36 | - interpulse delay: 5 ms 37 | - number of interpulse delays: 35 38 | - total saturation time: 1.975 s 39 | - pulse power (B1rms): 1.9962 µT 40 | - offset list: -15:0.1:15 ppm 41 | 42 | A MATLAB and a Python script to create a [Pulseq](https://github.com/pulseq/pulseq) seq-file is given in the [subfolder of case 6](/case_6) 43 | -------------------------------------------------------------------------------- /case_2/README.md: -------------------------------------------------------------------------------- 1 | # BMsim challenge - CASE 2 2 | 3 | ## Pool model: 4 | The pool model of case 2 is identical to the [z_phantom_creatine_3T_pH6.4_T22C_bmsim](https://github.com/kherz/pulseq-cest-library/blob/6ffca73282badd2828b86ace383969e9b4276e80/sim-library/WM_3T_default_7pool_bmsim.yaml) 5 | model published in the [pulseq-cest-library](https://github.com/kherz/pulseq-cest-library). It consists of: 6 | - 1 water pool 7 | - 1 CEST pool 8 | 9 | 10 | #### The exact settings are: 11 | 12 | - water_pool: 13 | - f: 1.0 14 | - T1: 3.0 15 | - T2: 2.0 16 | 17 | 18 | - cest pool: 19 | - f: 5.0e-04 20 | - T1: 1.05 21 | - T2: 0.1 22 | - k: 50 23 | - dw: 1.9 24 | 25 | 26 | More details and references are given in [case_2_2pool_model.yaml](/case_2/case_2_2pool_model.yaml) 27 | 28 | ## Preparation scheme: 29 | The preparation scheme for case 2 is identical to the 30 | [APTw_3T_000_2uT_1block_2s_braintumor](https://github.com/kherz/pulseq-cest-library/blob/22009a462a689e10f407374efc0d63760344519b/seq-library/APTw_3T_000_2uT_1block_2s_braintumor/) 31 | scheme published in the published in the [pulseq-cest-library](https://github.com/kherz/pulseq-cest-library). 32 | 33 | The preparation settings are: 34 | - pulse shape: block 35 | - pulse duration: 2 s 36 | - pulse power: 2 µT 37 | - post-pulse delay: 6.5 ms (in the seq-file this corresponds to the gradient spoiler duration) 38 | - offset list: -15:0.1:15 ppm 39 | - normalization scan at -300 ppm 40 | 41 | A MATLAB script to create a [Pulseq](https://github.com/pulseq/pulseq) seq-file is given in the [subfolder of challenge 2](/case_2) 42 | 43 | -------------------------------------------------------------------------------- /personal_scripts/Moritz_Zaiss_run_sim.m: -------------------------------------------------------------------------------- 1 | lib_path='D:\root\LABLOG\FAU\MRIlab\SIM\pulseq-cest-library'; 2 | seq_path=[lib_path '/seq-library/']; 3 | sim_path=[lib_path '/sim-library/']; 4 | 5 | 6 | %% 1 7 | figure('Name','APTw_SS Cr'); 8 | seq_filename=fullfile(pwd,'../case_1/.seq') 9 | seq = mr.Sequence; seq.read(seq_filename); 10 | offsets_ppm = seq.definitions('offsets_ppm'); % offsets 11 | m0_offset = seq.definitions('M0_offset'); % m0 offset frequency 12 | M_z = simulate_pulseqcest(seq_filename,[sim_path 'WM_3T_default_7pool_bmsim.yaml']); 13 | plotSimulationResults(M_z,offsets_ppm,m0_offset); 14 | 15 | legend(shortID, 'Interpreter', 'none'); 16 | 17 | %% 2 18 | figure('Name','APTw_000 Cr'); 19 | seq_filename=fullfile(seq_path,'/APTw_3T_000_2uT_1block_2s_braintumor/APTw_3T_000_2uT_1block_2s_braintumor.seq') 20 | seq = mr.Sequence; seq.read(seq_filename); 21 | offsets_ppm = seq.definitions('offsets_ppm'); % offsets 22 | m0_offset = seq.definitions('M0_offset'); % m0 offset frequency 23 | M_z = simulate_pulseqcest(seq_filename,[sim_path 'z_phantom_creatine_3T_pH6.4_T22C_bmsim.yaml']); 24 | plotSimulationResults(M_z,offsets_ppm,m0_offset); 25 | 26 | legend(shortID, 'Interpreter', 'none'); 27 | 28 | %% 3 29 | figure('Name','WASABI WM'); 30 | seq_filename=fullfile(lib_path,'/sandbox/002_BMsim_challenge/WASABI_3T_001_3p7uT_1block_5ms.seq') 31 | seq = mr.Sequence; seq.read(seq_filename); 32 | offsets_ppm = seq.definitions('offsets_ppm'); % offsets 33 | m0_offset = seq.definitions('M0_offset'); % m0 offset frequency 34 | M_z = simulate_pulseqcest(seq_filename,[sim_path 'WM_3T_default_7pool_bmsim.yaml']); 35 | plotSimulationResults(M_z,offsets_ppm,m0_offset); 36 | 37 | legend(shortID, 'Interpreter', 'none'); 38 | 39 | 40 | -------------------------------------------------------------------------------- /case_1/README.md: -------------------------------------------------------------------------------- 1 | # BMsim challenge - CASE 1 2 | 3 | ## Pool model: 4 | The pool model of case 1 is identical to the [z_phantom_creatine_3T_pH6.4_T22C_bmsim](https://github.com/kherz/pulseq-cest-library/blob/6ffca73282badd2828b86ace383969e9b4276e80/sim-library/WM_3T_default_7pool_bmsim.yaml) 5 | model published in the [pulseq-cest-library](https://github.com/kherz/pulseq-cest-library). It consists of: 6 | - 1 water pool 7 | - 1 CEST pool 8 | 9 | 10 | #### The exact settings are: 11 | 12 | - water_pool: 13 | - f: 1.0 14 | - T1: 3.0 15 | - T2: 2.0 16 | 17 | 18 | - cest pool: 19 | - f: 5.0e-04 20 | - T1: 1.05 21 | - T2: 0.1 22 | - k: 50 23 | - dw: 1.9 24 | 25 | 26 | More details and references are given in [case_1_2pool_model.yaml](/case_1/case_1_2pool_model.yaml) 27 | 28 | ## Preparation scheme: 29 | The preparation scheme for case 1 is based on 30 | [APTw_3T_000_2uT_1block_2s_braintumor](https://github.com/kherz/pulseq-cest-library/blob/22009a462a689e10f407374efc0d63760344519b/seq-library/APTw_3T_000_2uT_1block_2s_braintumor/) 31 | scheme published in the published in the [pulseq-cest-library](https://github.com/kherz/pulseq-cest-library), 32 | but with 30 seconds of saturation to be close to steady-state (10*T1, deviation from steady state <10^-4) 33 | 34 | The preparation settings are: 35 | - pulse shape: block 36 | - pulse duration: 15 s 37 | - pulse power: 2 µT 38 | - post-pulse delay: 6.5 ms (in the seq-file this corresponds to the gradient spoiler duration) 39 | - offset list: -15:0.1:15 ppm 40 | - normalization scan at -300 ppm 41 | 42 | A MATLAB script to create a [Pulseq](https://github.com/pulseq/pulseq) seq-file is given in the [subfolder of case 1](/case_1) 43 | 44 | -------------------------------------------------------------------------------- /case_5/case_5_2pool_model.yaml: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # ---- Simulation settings for (py)pulseq-cest BlochMcConnell simulations ---- # 3 | # ---------------------- https://pulseq-cest.github.io/ ---------------------- # 4 | ################################################################################ 5 | 6 | # Simulation parameters for white matter at 3T with 7 | # - water pool 8 | # - 1 CEST pool 9 | 10 | ### Pool settings 11 | # f: relative pool size fraction (float) 12 | # t1: longitudinal relaxation time T1 = 1/R1 [s] (float) 13 | # t2: transversal relaxation time T2 = 1/R2 [s] (float) 14 | # k: exchange rate [Hz] to water pool (MT and CEST pools only) (float) 15 | # dw: chemical shift relative to water [ppm] (MT/CEST pools only) (float) 16 | 17 | # water pool 18 | water_pool: { f: 1.0, t1: 3.0, t2: 2.0 } 19 | 20 | # CEST pool 21 | cest_pool: { "creatine_gua": { f: 5.0e-04, t1: 1.05, t2: 0.1, k: 50, dw: 1.9 } } 22 | 23 | ### Scanner settings 24 | # b0: field strength [T] (float) 25 | # gamma: gyromagnetic ratio [rad / uT], default 267.5153 (float) 26 | # b0_inhom: field inhomogeneity [ppm], default 0.0 (float) 27 | # rel_b1: relative amp inhomogeneity, default 1.0 (float) 28 | b0: 3 29 | gamma: 267.5154109126009 30 | b0_inhom: 0.0 31 | rel_b1: 1 32 | 33 | ### Additional simulation settings 34 | # verbose: verbose output, default False (bool) 35 | # reset_init_mag: reset magnetization after each readout, default True (bool) 36 | # scale: reset of magnetization to this value, default is 1 (float) 37 | # max_pulse_samples: max. number of samples for shaped pulses, default 500 (int) 38 | verbose: False 39 | reset_init_mag: True 40 | scale: 1 41 | max_pulse_samples: 200 42 | -------------------------------------------------------------------------------- /case_6/case_6_2pool_model.yaml: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # ---- Simulation settings for (py)pulseq-cest BlochMcConnell simulations ---- # 3 | # ---------------------- https://pulseq-cest.github.io/ ---------------------- # 4 | ################################################################################ 5 | 6 | # Simulation parameters for white matter at 3T with 7 | # - water pool 8 | # - 1 CEST pool 9 | 10 | ### Pool settings 11 | # f: relative pool size fraction (float) 12 | # t1: longitudinal relaxation time T1 = 1/R1 [s] (float) 13 | # t2: transversal relaxation time T2 = 1/R2 [s] (float) 14 | # k: exchange rate [Hz] to water pool (MT and CEST pools only) (float) 15 | # dw: chemical shift relative to water [ppm] (MT/CEST pools only) (float) 16 | 17 | # water pool 18 | water_pool: { f: 1.0, t1: 3.0, t2: 2.0 } 19 | 20 | # CEST pool(s) 21 | cest_pool: { "creatine_gua": { f: 5.0e-04, t1: 1.05, t2: 0.1, k: 50, dw: 1.9 } } 22 | 23 | ### Scanner settings 24 | # b0: field strength [T] (float) 25 | # gamma: gyromagnetic ratio [rad / uT], default 267.5153 (float) 26 | # b0_inhom: field inhomogeneity [ppm], default 0.0 (float) 27 | # rel_b1: relative amp inhomogeneity, default 1.0 (float) 28 | b0: 3 29 | gamma: 267.5154109126009 30 | b0_inhom: 0.0 31 | rel_b1: 1 32 | 33 | ### Additional simulation settings 34 | # verbose: verbose output, default False (bool) 35 | # reset_init_mag: reset magnetization after each readout, default True (bool) 36 | # scale: reset of magnetization to this value, default is 1 (float) 37 | # max_pulse_samples: max. number of samples for shaped pulses, default 500 (int) 38 | verbose: False 39 | reset_init_mag: True 40 | scale: 1 41 | max_pulse_samples: 200 42 | -------------------------------------------------------------------------------- /case_8/README.md: -------------------------------------------------------------------------------- 1 | # BMsim challenge - CASE 8 2 | 3 | ## Pool model 4 | 5 | The pool model of case 8 (and case 7) is similar to the [WM_3T_default_7pool_bmsim](https://github.com/kherz/pulseq-cest-library/blob/6ffca73282badd2828b86ace383969e9b4276e80/sim-library/WM_3T_default_7pool_bmsim.yaml) model published in the [pulseq-cest-library](https://github.com/kherz/pulseq-cest-library). It consists of: 6 | 7 | - 1 water pool 8 | - 2 CEST pools 9 | - 1 NOE pool 10 | - 1 MT pool 11 | 12 | ### The exact settings are 13 | 14 | - water_pool: 15 | - f: 1.0 16 | - T1: 1.0 17 | - T2: 0.040 18 | 19 | - mt_pool 20 | - f: 0.1351 21 | - T1: 1.0 22 | - T2: 4.0e-05 23 | - k: 30 24 | - dw: -3.0 25 | 26 | - cest pool 1: "amide" 27 | - f: 0.0009009 28 | - T1: 1.0 29 | - T2: 0.1 30 | - k: 50 31 | - dw: 3.5 32 | 33 | - cest pool 2: "guanidine" 34 | - f: 0.0009009 35 | - T1: 1.0 36 | - T2: 0.1 37 | - k: 1000 38 | - dw: 2 39 | 40 | - NOE pool: 41 | - f: 0.0045 42 | - T1: 1.3 43 | - T2: 0.005 44 | - k: 20 45 | - dw: -3 46 | 47 | More details and references are given in [case_8_5pool_model.yaml](/case_8/case_8_5pool_model.yaml) 48 | 49 | ## Preparation scheme 50 | 51 | The preparation scheme for case 8 is inspired by [WASABI_3T_001_3p7uT_1block_5ms](https://github.com/kherz/pulseq-cest-library/tree/master/seq-library/WASABI_3T_001_3p7uT_1block_5ms) 52 | published in the [pulseq-cest-library](https://github.com/kherz/pulseq-cest-library). 53 | 54 | The preparation settings are: 55 | 56 | - pulse shape: block 57 | - pulse duration: 5 ms 58 | - number of pulses: 2 59 | - interpulse delay: 100 µs 60 | - number of interpulse delays: 1 61 | - total saturation time: 0.0101 s 62 | - pulse power: 3.7 µT 63 | - offset list: -2:0.05:2 ppm 64 | 65 | A MATLAB and a Python script to create a [Pulseq](https://github.com/pulseq/pulseq) seq-file is given in the [subfolder of case 8](/case_8) 66 | -------------------------------------------------------------------------------- /case_7/README.md: -------------------------------------------------------------------------------- 1 | # BMsim challenge - CASE 7 2 | 3 | ## Pool model 4 | 5 | The pool model of case 7 (and case 8) is similar to the [WM_3T_default_7pool_bmsim](https://github.com/kherz/pulseq-cest-library/blob/6ffca73282badd2828b86ace383969e9b4276e80/sim-library/WM_3T_default_7pool_bmsim.yaml) model published in the [pulseq-cest-library](https://github.com/kherz/pulseq-cest-library). It consists of: 6 | 7 | - 1 water pool 8 | - 2 CEST pools 9 | - 1 NOE pool 10 | - 1 MT pool 11 | 12 | ### The exact settings are 13 | 14 | - water_pool: 15 | - f: 1.0 16 | - T1: 1.0 17 | - T2: 0.040 18 | 19 | - mt_pool 20 | - f: 0.1351 21 | - T1: 1.0 22 | - T2: 4.0e-05 23 | - k: 30 24 | - dw: -3.0 25 | 26 | - cest pool 1: "amide" 27 | - f: 0.0009009 28 | - T1: 1.0 29 | - T2: 0.1 30 | - k: 50 31 | - dw: 3.5 32 | 33 | - cest pool 2: "guanidine" 34 | - f: 0.0009009 35 | - T1: 1.0 36 | - T2: 0.1 37 | - k: 1000 38 | - dw: 2 39 | 40 | - NOE pool: 41 | - f: 0.0045 42 | - T1: 1.3 43 | - T2: 0.005 44 | - k: 20 45 | - dw: -3 46 | 47 | More details and references are given in [case_7_5pool_model.yaml](/case_7/case_7_5pool_model.yaml) 48 | 49 | ## Preparation scheme 50 | 51 | The preparation scheme for case 7 is based on [APTw_3T_001_2uT_36SincGauss_DC90_2s_braintumor](https://github.com/kherz/pulseq-cest-library/tree/master/seq-library/APTw_3T_001_2uT_36SincGauss_DC90_2s_braintumor) published in the [pulseq-cest-library](https://github.com/kherz/pulseq-cest-library). 52 | 53 | The preparation settings are: 54 | 55 | - pulse shape: Gaussian 56 | - pulse duration: 50 ms 57 | - number of pulses: 36 58 | - interpulse delay: 5 ms 59 | - number of interpulse delays: 35 60 | - total saturation time: 1.975 s 61 | - pulse power (B1rms): 1.9962 µT 62 | - offset list: -15:0.1:15 ppm 63 | 64 | A MATLAB and a Python script to create a [Pulseq](https://github.com/pulseq/pulseq) seq-file is given in the [subfolder of case 7](/case_7) 65 | -------------------------------------------------------------------------------- /case_7/case_7_5pool_model.yaml: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # ---- Simulation settings for (py)pulseq-cest BlochMcConnell simulations ---- # 3 | # ---------------------- https://pulseq-cest.github.io/ ---------------------- # 4 | ################################################################################ 5 | 6 | # Simulation parameters for a 5 pool model at 3T with 7 | # - water pool 8 | # - 2 CEST pools 9 | # - 1 NOE pool 10 | # - 1 MT pool 11 | 12 | ### Pool settings 13 | # f: relative pool size fraction (float) 14 | # t1: longitudinal relaxation time T1 = 1/R1 [s] (float) 15 | # t2: transversal relaxation time T2 = 1/R2 [s] (float) 16 | # k: exchange rate [Hz] to water pool (MT and CEST pools only) (float) 17 | # dw: chemical shift relative to water [ppm] (MT/CEST pools only) (float) 18 | 19 | # water pool 20 | water_pool: { f: 1.0, t1: 1.0, t2: 0.040 } 21 | 22 | # CEST, NOE, MT pools 23 | cest_pool: 24 | { 25 | "amide": { f: 0.0009009, t1: 1.0, t2: 0.1, k: 50, dw: 3.5 }, 26 | "guanidine_1": { f: 0.0009009, t1: 1.0, t2: 0.1, k: 1000, dw: 2 }, 27 | "NOE_1": { f: 0.0045, t1: 1.3, t2: 0.005, k: 20, dw: -3 }, 28 | "MT": { f: 0.1351, t1: 1.0, t2: 4.0e-05, k: 30, dw: -3.0 }, 29 | } 30 | 31 | ### Scanner settings 32 | # b0: field strength [T] (float) 33 | # gamma: gyromagnetic ratio [rad / uT], default 267.5153 (float) 34 | # b0_inhom: field inhomogeneity [ppm], default 0.0 (float) 35 | # rel_b1: relative amp inhomogeneity, default 1.0 (float) 36 | b0: 3 37 | gamma: 267.5154109126009 38 | b0_inhom: 0.0 39 | rel_b1: 1 40 | 41 | ### Additional simulation settings 42 | # verbose: verbose output, default False (bool) 43 | # reset_init_mag: reset magnetization after each readout, default True (bool) 44 | # scale: reset of magnetization to this value, default is 1 (float) 45 | # max_pulse_samples: max. number of samples for shaped pulses, default 500 (int) 46 | verbose: False 47 | reset_init_mag: True 48 | scale: 1 49 | max_pulse_samples: 200 50 | -------------------------------------------------------------------------------- /case_8/case_8_5pool_model.yaml: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # ---- Simulation settings for (py)pulseq-cest BlochMcConnell simulations ---- # 3 | # ---------------------- https://pulseq-cest.github.io/ ---------------------- # 4 | ################################################################################ 5 | 6 | # Simulation parameters for a 5 pool model at 3T with 7 | # - water pool 8 | # - 2 CEST pools 9 | # - 1 NOE pool 10 | # - 1 MT pool 11 | 12 | ### Pool settings 13 | # f: relative pool size fraction (float) 14 | # t1: longitudinal relaxation time T1 = 1/R1 [s] (float) 15 | # t2: transversal relaxation time T2 = 1/R2 [s] (float) 16 | # k: exchange rate [Hz] to water pool (MT and CEST pools only) (float) 17 | # dw: chemical shift relative to water [ppm] (MT/CEST pools only) (float) 18 | 19 | # water pool 20 | water_pool: { f: 1.0, t1: 1.0, t2: 0.040 } 21 | 22 | # CEST, NOE, MT pools 23 | cest_pool: 24 | { 25 | "amide": { f: 0.0009009, t1: 1.0, t2: 0.1, k: 50, dw: 3.5 }, 26 | "guanidine_1": { f: 0.0009009, t1: 1.0, t2: 0.1, k: 1000, dw: 2 }, 27 | "NOE_1": { f: 0.0045, t1: 1.3, t2: 0.005, k: 20, dw: -3 }, 28 | "MT": { f: 0.1351, t1: 1.0, t2: 4.0e-05, k: 30, dw: -3.0 }, 29 | } 30 | 31 | ### Scanner settings 32 | # b0: field strength [T] (float) 33 | # gamma: gyromagnetic ratio [rad / uT], default 267.5153 (float) 34 | # b0_inhom: field inhomogeneity [ppm], default 0.0 (float) 35 | # rel_b1: relative amp inhomogeneity, default 1.0 (float) 36 | b0: 3 37 | gamma: 267.5154109126009 38 | b0_inhom: 0.0 39 | rel_b1: 1 40 | 41 | ### Additional simulation settings 42 | # verbose: verbose output, default False (bool) 43 | # reset_init_mag: reset magnetization after each readout, default True (bool) 44 | # scale: reset of magnetization to this value, default is 1 (float) 45 | # max_pulse_samples: max. number of samples for shaped pulses, default 500 (int) 46 | verbose: False 47 | reset_init_mag: True 48 | scale: 1 49 | max_pulse_samples: 200 50 | -------------------------------------------------------------------------------- /case_4/README.md: -------------------------------------------------------------------------------- 1 | # BMsim challenge - CASE 4 2 | 3 | ## Pool model: 4 | The pool model of case 4 (and case 3) is similar to the [WM_3T_default_7pool_bmsim](https://github.com/kherz/pulseq-cest-library/blob/6ffca73282badd2828b86ace383969e9b4276e80/sim-library/WM_3T_default_7pool_bmsim.yaml) 5 | model published in the [pulseq-cest-library](https://github.com/kherz/pulseq-cest-library). It consists of: 6 | - 1 water pool 7 | - 2 CEST pools 8 | - 1 NOE pool 9 | - 1 Lorentzian shaped MT pool 10 | 11 | 12 | #### The exact settings are: 13 | 14 | - water_pool: 15 | - f: 1.0 16 | - T1: 1.0 17 | - T2: 0.040 18 | 19 | 20 | - mt_pool 21 | - f: 0.1351 22 | - T1: 1.0 23 | - T2: 4.0e-05 24 | - k: 30 25 | - dw: -3.0 26 | 27 | 28 | - cest pool 1: "amide" 29 | - f: 0.0009009 30 | - T1: 1.0 31 | - T2: 0.1 32 | - k: 50 33 | - dw: 3.5 34 | 35 | 36 | - cest pool 2: "guanidine" 37 | - f: 0.0009009 38 | - T1: 1.0 39 | - T2: 0.1 40 | - k: 1000 41 | - dw: 2 42 | 43 | 44 | - NOE pool: 45 | - f: 0.0045 46 | - T1: 1.3 47 | - T2: 0.005 48 | - k: 20 49 | - dw: -3 50 | 51 | More details and references are given in [case_4_5pool_model.yaml](/case_4/case_4_5pool_model.yaml) 52 | 53 | ## Preparation scheme: 54 | The preparation scheme for case 4 is identical to the 55 | [WASABI_3T_001_3p7uT_1block_5ms](https://github.com/kherz/pulseq-cest-library/tree/22009a462a689e10f407374efc0d63760344519b/seq-library/WASABI_3T_001_3p7uT_1block_5ms) 56 | scheme published in the published in the [pulseq-cest-library](https://github.com/kherz/pulseq-cest-library). 57 | 58 | The preparation settings are: 59 | - pulse shape: block 60 | - pulse duration: 5 ms 61 | - pulse power: 3.7 µT 62 | - post-pulse delay: 6.5 ms (in the seq-file this corresponds to the gradient spoiler duration) 63 | - offset list: -2:0.05:2 ppm 64 | - normalization scan at -300 ppm 65 | 66 | A MATLAB script to create a [Pulseq](https://github.com/pulseq/pulseq) seq-file is given in the [subfolder of case 4](/case_4) 67 | 68 | -------------------------------------------------------------------------------- /case_3/README.md: -------------------------------------------------------------------------------- 1 | # BMsim challenge - CASE 3 2 | 3 | ## Pool model: 4 | The pool model of case 3 (and case 4) is similar to the [WM_3T_default_7pool_bmsim](https://github.com/kherz/pulseq-cest-library/blob/6ffca73282badd2828b86ace383969e9b4276e80/sim-library/WM_3T_default_7pool_bmsim.yaml) 5 | model published in the [pulseq-cest-library](https://github.com/kherz/pulseq-cest-library). It consists of: 6 | - 1 water pool 7 | - 2 CEST pools 8 | - 1 NOE pool 9 | - 1 Lorentzian shaped MT pool 10 | 11 | 12 | #### The exact settings are: 13 | 14 | - water_pool: 15 | - f: 1.0 16 | - T1: 1.0 17 | - T2: 0.040 18 | 19 | 20 | - mt_pool 21 | - f: 0.1351 22 | - T1: 1.0 23 | - T2: 4.0e-05 24 | - k: 30 25 | - dw: -3.0 26 | 27 | 28 | - cest pool 1: "amide" 29 | - f: 0.0009009 30 | - T1: 1.0 31 | - T2: 0.1 32 | - k: 50 33 | - dw: 3.5 34 | 35 | 36 | - cest pool 2: "guanidine" 37 | - f: 0.0009009 38 | - T1: 1.0 39 | - T2: 0.1 40 | - k: 1000 41 | - dw: 2 42 | 43 | 44 | - NOE pool: 45 | - f: 0.0045 46 | - T1: 1.3 47 | - T2: 0.005 48 | - k: 20 49 | - dw: -3 50 | 51 | More details and references are given in [case_3_5pool_model.yaml](/case_3/case_3_5pool_model.yaml) 52 | 53 | ## Preparation scheme: 54 | The preparation scheme for case 3 is identical to the 55 | [APTw_3T_000_2uT_1block_2s_braintumor](https://github.com/kherz/pulseq-cest-library/blob/22009a462a689e10f407374efc0d63760344519b/seq-library/APTw_3T_000_2uT_1block_2s_braintumor/) 56 | scheme published in the published in the [pulseq-cest-library](https://github.com/kherz/pulseq-cest-library). 57 | 58 | The preparation settings are: 59 | - pulse shape: block 60 | - pulse duration: 2 s 61 | - pulse power: 2 µT 62 | - post-pulse delay: 6.5 ms (in the seq-file this corresponds to the gradient spoiler duration) 63 | - offset list: -15:0.1:15 ppm 64 | - normalization scan at -300 ppm 65 | 66 | A MATLAB script to create a [Pulseq](https://github.com/pulseq/pulseq) seq-file is given in the [subfolder of case 3](/case_3) 67 | 68 | -------------------------------------------------------------------------------- /case_1/case_1_2pool_model.yaml: -------------------------------------------------------------------------------- 1 | #################################################################################### 2 | # ------ Simulation settings for (py)pulseq-cest BlochMcConnell simulations ------ # 3 | # ------------------------ https://pulseq-cest.github.io/ ------------------------ # 4 | #################################################################################### 5 | # Simulation parameters for white matter at 3T with 6 | # - 1 CEST pool 7 | # - water pool as in water solution 8 | # 9 | # sources/references for settings in this file: 10 | # https://onlinelibrary.wiley.com/doi/full/10.1002/mrm.28433 11 | # exchange rate of creatine at 21�C and pH 6.4 = 47 Hz, we use 50 Hz herein 12 | # in this paper they used 55.5 mM Creatine, which is close to the maximum solubility this would be f= 55.5mM/(2*55.5M)=0.0005 13 | # this should give around 7% CEST effect 14 | 15 | ###### Pool settings 16 | # f: relative pool size fraction (float) 17 | # t1: longitudinal relaxation time T1 = 1/R1 [s] (float) 18 | # t2: transversal relaxation time T2 = 1/R2 [s] (float) 19 | # k: exchange rate [Hz] to water pool (MT and CEST pools only) (float) 20 | # dw: chemical shift (delta omega) relative to water [ppm] (MT and CEST pools only) (float) 21 | # lineshape: lineshape of the MT Pool ('Lorentzian', 'SuperLorentzian' or 'None') (str) 22 | 23 | ### water pool 24 | water_pool: { 25 | f: 1.0, 26 | t1: 3.0, 27 | t2: 2.0 28 | } 29 | 30 | ### CEST pool(s) 31 | cest_pool: { 32 | 'creatine_gua': { 33 | f: 5.0e-04, #55.5e-3 / 111, 34 | t1: 1.05, 35 | t2: 0.1, 36 | k: 50, 37 | dw: 1.9 38 | } 39 | } 40 | 41 | ###### Scanner settings 42 | # b0: field strength [T] (float) 43 | # gamma: gyromagnetic ratio [rad / uT], default is 267.5153 (float) 44 | # b0_inhom: field inhomogeneity [ppm], default is 0.0 (float) 45 | # rel_b1: relative amp inhomogeneity, default is 1.0 (float) 46 | b0: 3 47 | gamma: 267.5154109126009 48 | b0_inhom: 0.0 49 | rel_b1: 1 50 | 51 | ##### Additional simulation settings 52 | # verbose: verbose output, default is False (bool) 53 | # reset_init_mag: True to reset magnetization after each readout, default is True (bool) 54 | # scale: relative magnetization after reset of magnetization, default is 1 (float) 55 | # max_pulse_samples: maximum number of samples for each shaped rf pulse, default is 500 (int) 56 | verbose: False 57 | reset_init_mag: True 58 | scale: 1 59 | max_pulse_samples: 300 60 | -------------------------------------------------------------------------------- /case_2/case_2_2pool_model.yaml: -------------------------------------------------------------------------------- 1 | #################################################################################### 2 | # ------ Simulation settings for (py)pulseq-cest BlochMcConnell simulations ------ # 3 | # ------------------------ https://pulseq-cest.github.io/ ------------------------ # 4 | #################################################################################### 5 | # Simulation parameters for white matter at 3T with 6 | # - 1 CEST pool 7 | # - water pool as in water solution 8 | # 9 | # sources/references for settings in this file: 10 | # https://onlinelibrary.wiley.com/doi/full/10.1002/mrm.28433 11 | # exchange rate of creatine at 21�C and pH 6.4 = 47 Hz, we use 50 Hz herein 12 | # in this paper they used 55.5 mM Creatine, which is close to the maximum solubility this would be f= 55.5mM/(2*55.5M)=0.0005 13 | # this should give around 7% CEST effect 14 | 15 | ###### Pool settings 16 | # f: relative pool size fraction (float) 17 | # t1: longitudinal relaxation time T1 = 1/R1 [s] (float) 18 | # t2: transversal relaxation time T2 = 1/R2 [s] (float) 19 | # k: exchange rate [Hz] to water pool (MT and CEST pools only) (float) 20 | # dw: chemical shift (delta omega) relative to water [ppm] (MT and CEST pools only) (float) 21 | # lineshape: lineshape of the MT Pool ('Lorentzian', 'SuperLorentzian' or 'None') (str) 22 | 23 | ### water pool 24 | water_pool: { 25 | f: 1.0, 26 | t1: 3.0, 27 | t2: 2.0 28 | } 29 | 30 | ### CEST pool(s) 31 | cest_pool: { 32 | 'creatine_gua': { 33 | f: 5.0e-04, #55.5e-3 / 111, 34 | t1: 1.05, 35 | t2: 0.1, 36 | k: 50, 37 | dw: 1.9 38 | } 39 | } 40 | 41 | ###### Scanner settings 42 | # b0: field strength [T] (float) 43 | # gamma: gyromagnetic ratio [rad / uT], default is 267.5153 (float) 44 | # b0_inhom: field inhomogeneity [ppm], default is 0.0 (float) 45 | # rel_b1: relative amp inhomogeneity, default is 1.0 (float) 46 | b0: 3 47 | gamma: 267.5154109126009 48 | b0_inhom: 0.0 49 | rel_b1: 1 50 | 51 | ##### Additional simulation settings 52 | # verbose: verbose output, default is False (bool) 53 | # reset_init_mag: True to reset magnetization after each readout, default is True (bool) 54 | # scale: relative magnetization after reset of magnetization, default is 1 (float) 55 | # max_pulse_samples: maximum number of samples for each shaped rf pulse, default is 500 (int) 56 | verbose: False 57 | reset_init_mag: True 58 | scale: 1 59 | max_pulse_samples: 300 60 | -------------------------------------------------------------------------------- /case_3/case_3_5pool_model.yaml: -------------------------------------------------------------------------------- 1 | #################################################################################### 2 | # ------ Simulation settings for (py)pulseq-cest BlochMcConnell simulations ------ # 3 | # ------------------------ https://pulseq-cest.github.io/ ------------------------ # 4 | #################################################################################### 5 | # Simulation parameters for white matter at 3T 6 | # This file is inspired by WM_001, but all numbers are made simpler to form a easy to share default model 7 | # 8 | # - 4 CEST pools 9 | # - 1 NOE pool 10 | # - a Lorentzian shaped MT pool (with adjusted R2x by a factor 0.23, this makes the pool shiftable 11 | # 12 | # sources/references for settings in this file: 13 | # CEST pools: https://doi.org/10.1016/j.neuroimage.2017.04.045 14 | 15 | ###### Pool settings 16 | # f: relative pool size fraction (float) 17 | # t1: longitudinal relaxation time T1 = 1/R1 [s] (float) 18 | # t2: transversal relaxation time T2 = 1/R2 [s] (float) 19 | # k: exchange rate [Hz] to water pool (MT and CEST pools only) (float) 20 | # dw: chemical shift (delta omega) relative to water [ppm] (MT and CEST pools only) (float) 21 | # lineshape: lineshape of the MT Pool ('Lorentzian', 'SuperLorentzian' or 'None') (str) 22 | 23 | ### water pool # as in WM_3T_001 24 | water_pool: { 25 | f: 1.0, 26 | t1: 1.0, 27 | t2: 0.040 28 | } 29 | 30 | ### MT pool pectra 31 | mt_pool: { 32 | f: 0.1351, #15 / 111, 33 | t1: 1.0, 34 | t2: 4.0e-05 , # adjusted to have similar shape to SuperLorentzian 35 | k: 30, 36 | dw: -3.0, # leads to most simlar asym at 15 ppm of - 3% 37 | lineshape: 'Lorentzian' 38 | } 39 | 40 | cest_pool: { 41 | 'amide': { 42 | f: 0.0009009, # 100e-3 / 111, 43 | t1: 1.0, 44 | t2: 0.1, 45 | k: 50, 46 | dw: 3.5 47 | }, 48 | 'guanidine_1': { # eight times the value of WM_3T_001, needed to get the peak at 1.5 ppm in MTRasym 49 | f: 0.0009009, # 100e-3 / 111, 50 | t1: 1.0, 51 | t2: 0.1, 52 | k: 1000, 53 | dw: 2 54 | }, 55 | 'NOE_1': { #% until now, all 4 pools from the reference paper combined in one at -3.5 ppm with 5 fold concentration 56 | f: 0.0045, #500e-3 / 111, 57 | t1: 1.3, 58 | t2: 0.005, 59 | k: 20, 60 | dw: -3 61 | } 62 | } 63 | 64 | 65 | ###### Scanner settings 66 | # b0: field strength [T] (float) 67 | # gamma: gyromagnetic ratio [rad / uT], default is 267.5153 (float) 68 | # b0_inhom: field inhomogeneity [ppm], default is 0.0 (float) 69 | # rel_b1: relative amp inhomogeneity, default is 1.0 (float) 70 | b0: 3 71 | gamma: 267.5154109126009 72 | b0_inhom: 0.0 73 | rel_b1: 1 74 | 75 | ##### Additional simulation settings 76 | # verbose: verbose output, default is False (bool) 77 | # reset_init_mag: True to reset magnetization after each readout, default is True (bool) 78 | # scale: relative magnetization after reset of magnetization, default is 1 (float) 79 | # max_pulse_samples: maximum number of samples for each shaped rf pulse, default is 500 (int) 80 | verbose: False 81 | reset_init_mag: True 82 | scale: 1 83 | max_pulse_samples: 300 84 | -------------------------------------------------------------------------------- /case_4/case_4_5pool_model.yaml: -------------------------------------------------------------------------------- 1 | #################################################################################### 2 | # ------ Simulation settings for (py)pulseq-cest BlochMcConnell simulations ------ # 3 | # ------------------------ https://pulseq-cest.github.io/ ------------------------ # 4 | #################################################################################### 5 | # Simulation parameters for white matter at 3T 6 | # This file is inspired by WM_001, but all numbers are made simpler to form a easy to share default model 7 | # 8 | # - 4 CEST pools 9 | # - 1 NOE pool 10 | # - a Lorentzian shaped MT pool (with adjusted R2x by a factor 0.23, this makes the pool shiftable 11 | # 12 | # sources/references for settings in this file: 13 | # CEST pools: https://doi.org/10.1016/j.neuroimage.2017.04.045 14 | 15 | ###### Pool settings 16 | # f: relative pool size fraction (float) 17 | # t1: longitudinal relaxation time T1 = 1/R1 [s] (float) 18 | # t2: transversal relaxation time T2 = 1/R2 [s] (float) 19 | # k: exchange rate [Hz] to water pool (MT and CEST pools only) (float) 20 | # dw: chemical shift (delta omega) relative to water [ppm] (MT and CEST pools only) (float) 21 | # lineshape: lineshape of the MT Pool ('Lorentzian', 'SuperLorentzian' or 'None') (str) 22 | 23 | ### water pool # as in WM_3T_001 24 | water_pool: { 25 | f: 1.0, 26 | t1: 1.0, 27 | t2: 0.040 28 | } 29 | 30 | ### MT pool pectra 31 | mt_pool: { 32 | f: 0.1351, #15 / 111, 33 | t1: 1.0, 34 | t2: 4.0e-05 , # adjusted to have similar shape to SuperLorentzian 35 | k: 30, 36 | dw: -3.0, # leads to most simlar asym at 15 ppm of - 3% 37 | lineshape: 'Lorentzian' 38 | } 39 | 40 | cest_pool: { 41 | 'amide': { 42 | f: 0.0009009, # 100e-3 / 111, 43 | t1: 1.0, 44 | t2: 0.1, 45 | k: 50, 46 | dw: 3.5 47 | }, 48 | 'guanidine_1': { # eight times the value of WM_3T_001, needed to get the peak at 1.5 ppm in MTRasym 49 | f: 0.0009009, # 100e-3 / 111, 50 | t1: 1.0, 51 | t2: 0.1, 52 | k: 1000, 53 | dw: 2 54 | }, 55 | 'NOE_1': { #% until now, all 4 pools from the reference paper combined in one at -3.5 ppm with 5 fold concentration 56 | f: 0.0045, #500e-3 / 111, 57 | t1: 1.3, 58 | t2: 0.005, 59 | k: 20, 60 | dw: -3 61 | } 62 | } 63 | 64 | 65 | ###### Scanner settings 66 | # b0: field strength [T] (float) 67 | # gamma: gyromagnetic ratio [rad / uT], default is 267.5153 (float) 68 | # b0_inhom: field inhomogeneity [ppm], default is 0.0 (float) 69 | # rel_b1: relative amp inhomogeneity, default is 1.0 (float) 70 | b0: 3 71 | gamma: 267.5154109126009 72 | b0_inhom: 0.0 73 | rel_b1: 1 74 | 75 | ##### Additional simulation settings 76 | # verbose: verbose output, default is False (bool) 77 | # reset_init_mag: True to reset magnetization after each readout, default is True (bool) 78 | # scale: relative magnetization after reset of magnetization, default is 1 (float) 79 | # max_pulse_samples: maximum number of samples for each shaped rf pulse, default is 500 (int) 80 | verbose: False 81 | reset_init_mag: True 82 | scale: 1 83 | max_pulse_samples: 300 84 | -------------------------------------------------------------------------------- /case_4/case_4_create_seq.m: -------------------------------------------------------------------------------- 1 | % WASABI_3T_001_3p7uT_1block_5ms 2 | % Creates a sequence file for a WASABI protocol with 31 offsets and one M0 image at 3T according to: 3 | % https://doi.org/10.1002/mrm.26133 4 | % 5 | % Kai Herz 2020 6 | % kai.herz@tuebingen.mpg.de 7 | 8 | % author name for sequence file 9 | author = 'Kai Herz'; 10 | 11 | %% get id of generation file 12 | if contains(mfilename, 'LiveEditorEvaluationHelperESectionEval') 13 | [~, seqid] = fileparts(matlab.desktop.editor.getActiveFilename); 14 | else 15 | [~, seqid] = fileparts(which(mfilename)); 16 | end 17 | 18 | %% sequence definitions 19 | % everything in seq_defs gets written as definition in .seq-file 20 | seq_defs.n_pulses = 1 ; % number of pulses 21 | seq_defs.B1cwpe = 3.7 ; % b1 for 1 block is cqpe 22 | seq_defs.tp = 5e-3 ; % pulse duration [s] 23 | seq_defs.Trec = 3 ; % recovery time [s] 24 | seq_defs.Trec_M0 = 12 ; % recovery time before M0 [s] 25 | seq_defs.M0_offset = -300 ; % m0 offset [ppm] 26 | seq_defs.offsets_ppm = [seq_defs.M0_offset -2:0.05:2]; % offset vector [ppm] 27 | seq_defs.num_meas = numel(seq_defs.offsets_ppm) ; % number of repetition 28 | seq_defs.Tsat = seq_defs.tp ; % saturation time [s] 29 | seq_defs.B0 = 3 ; % B0 [T] 30 | seq_defs.seq_id_string = seqid ; % unique seq id 31 | 32 | 33 | %% get info from struct 34 | offsets_ppm = seq_defs.offsets_ppm; % [ppm] 35 | Trec = seq_defs.Trec; % recovery time between scans [s] 36 | Trec_M0 = seq_defs.Trec_M0; % recovery time before m0 scan [s] 37 | tp = seq_defs.tp; % sat pulse duration [s] 38 | n_pulses = seq_defs.n_pulses; % number of sat pulses per measurement. if DC changes use: n_pulses = round(2/(t_p+t_d)) 39 | B0 = seq_defs.B0; % B0 [T] 40 | B1 = seq_defs.B1cwpe; % B1 [uT] 41 | spoiling = 1; % 0=no spoiling, 1=before readout, Gradient in x,y,z 42 | seq_filename = strcat(seq_defs.seq_id_string,'.seq'); % filename 43 | 44 | %% scanner limits 45 | % see pulseq doc for more ino 46 | seq = SequenceSBB(getScannerLimits()); 47 | 48 | %% create scanner events 49 | % satpulse 50 | gyroRatio_hz = 42.5764; % for H [Hz/uT] 51 | gyroRatio_rad = gyroRatio_hz*2*pi; % [rad/uT] 52 | fa_sat = B1*gyroRatio_rad*tp; % flip angle of sat pulse 53 | 54 | % create pulseq saturation pulse object 55 | satPulse = mr.makeBlockPulse(fa_sat, 'Duration', tp, 'system', seq.sys); % block pulse 56 | 57 | 58 | %% loop through zspec offsets 59 | offsets_Hz = offsets_ppm*gyroRatio_hz*B0; 60 | 61 | % loop through offsets and set pulses and delays 62 | for currentOffset = offsets_Hz 63 | if currentOffset == seq_defs.M0_offset*gyroRatio_hz*B0 64 | if Trec_M0 > 0 65 | seq.addBlock(mr.makeDelay(Trec_M0)); 66 | end 67 | else 68 | if Trec > 0 69 | seq.addBlock(mr.makeDelay(Trec)); % recovery time 70 | end 71 | end 72 | % add single pulse 73 | satPulse.freqOffset = currentOffset; % set freuqncy offset of the pulse 74 | seq.addBlock(satPulse) % add sat pulse 75 | if spoiling % spoiling before readout 76 | seq.addSpoilerGradients(); 77 | end 78 | seq.addPseudoADCBlock(); % readout trigger event 79 | end 80 | 81 | %% write definitions 82 | def_fields = fieldnames(seq_defs); 83 | for n_id = 1:numel(def_fields) 84 | seq.setDefinition(def_fields{n_id}, seq_defs.(def_fields{n_id})); 85 | end 86 | seq.write(seq_filename, author); 87 | 88 | %% call standard sim 89 | M_z = simulate_pulseqcest(seq_filename,'case_4_5pool_model.yaml'); 90 | 91 | %% plot 92 | plotSimulationResults(M_z,offsets_ppm, seq_defs.M0_offset); 93 | -------------------------------------------------------------------------------- /case_6/case_6_create_sequence.py: -------------------------------------------------------------------------------- 1 | # BMSim Challenge: CASE 6 2 | # Script to create the seq-file for the BMSim Challenge CASE 6 3 | # 4 | # https://github.com/pulseq-cest/BMsim_challenge 5 | # 6 | # Tested with pypulseq version 1.3.1post1 and bmctool version 0.6.0 7 | # 8 | # Patrick Schuenke 2023 9 | # patrick.schuenke@ptb.de 10 | 11 | from pathlib import Path 12 | 13 | import numpy as np 14 | import pypulseq as pp 15 | from bmctool.utils.pulses.calc_power_equivalents import calc_power_equivalent 16 | from bmctool.utils.seq.write import write_seq 17 | 18 | # get id of generation file 19 | seqid = Path(__file__).stem + "_py" 20 | 21 | # get folder of generation file 22 | folder = Path(__file__).parent 23 | 24 | # define gyromagnetic ratio [Hz/T] 25 | GAMMA_HZ = 42.5764 26 | 27 | # sequence definitions 28 | defs: dict = {} 29 | defs["b1pa"] = 1.78 # B1 peak amplitude [µT] (b1rms calculated below) 30 | defs["b0"] = 3 # B0 [T] 31 | defs["freq"] = defs["b0"] * GAMMA_HZ # Larmor frequency [Hz] 32 | defs["n_pulses"] = 36 # number of pulses # 33 | defs["tp"] = 50e-3 # pulse duration [s] 34 | defs["td"] = 5e-3 # interpulse delay [s] 35 | defs["trec"] = 3.5 # recovery time [s] 36 | defs["trec_m0"] = 3.5 # recovery time before M0 [s] 37 | defs["m0_offset"] = -300 # m0 offset [ppm] 38 | defs["offsets_ppm"] = np.append(defs["m0_offset"], np.linspace(-15, 15, 301)) # offset vector [ppm] 39 | 40 | defs["num_meas"] = defs["offsets_ppm"].size # number of repetition 41 | defs["tsat"] = defs["n_pulses"] * (defs["tp"] + defs["td"]) - defs["td"] # saturation time [s] 42 | defs["seq_id_string"] = seqid # unique seq id 43 | 44 | seq_filename = defs["seq_id_string"] + ".seq" 45 | 46 | # scanner limits 47 | sys = pp.Opts( 48 | max_grad=80, 49 | grad_unit="mT/m", 50 | max_slew=200, 51 | slew_unit="T/m/s", 52 | rf_ringdown_time=0, 53 | rf_dead_time=0, 54 | rf_raster_time=1e-6, 55 | gamma=GAMMA_HZ * 1e6, 56 | ) 57 | 58 | # =========== 59 | # PREPARATION 60 | # =========== 61 | 62 | # spoiler 63 | spoil_amp = 0.8 * sys.max_grad # Hz/m 64 | rise_time = 1.0e-3 # spoiler rise time in seconds 65 | flat_time = 4.5e-3 # spoiler flat time in seconds 66 | 67 | gx_spoil, gy_spoil, gz_spoil = [ 68 | pp.make_trapezoid(channel=c, system=sys, amplitude=spoil_amp, flat_time=flat_time, rise_time=rise_time) 69 | for c in ["x", "y", "z"] 70 | ] 71 | 72 | # RF pulses 73 | flip_angle_sat = defs["b1pa"] * GAMMA_HZ * 2 * np.pi * defs["tp"] 74 | sat_pulse = pp.make_sinc_pulse( 75 | flip_angle=flip_angle_sat, duration=defs["tp"], system=sys, time_bw_product=2, apodization=0.15 76 | ) 77 | 78 | # calculate b1rms 79 | defs["b1rms"] = calc_power_equivalent(rf_pulse=sat_pulse, tp=defs["tp"], td=defs["td"], gamma_hz=GAMMA_HZ) 80 | 81 | # pseudo ADC event 82 | pseudo_adc = pp.make_adc(num_samples=1, duration=1e-3) 83 | 84 | # delays 85 | td_delay = pp.make_delay(defs["td"]) 86 | trec_delay = pp.make_delay(defs["trec"]) 87 | m0_delay = pp.make_delay(defs["trec_m0"]) 88 | 89 | # Sequence object 90 | seq = pp.Sequence() 91 | 92 | # === 93 | # RUN 94 | # === 95 | 96 | offsets_hz = defs["offsets_ppm"] * defs["freq"] # convert from ppm to Hz 97 | 98 | for m, offset in enumerate(offsets_hz): 99 | # print progress/offset 100 | print(f"#{m + 1} / {len(offsets_hz)} : offset {offset / defs['freq']:.2f} ppm ({offset:.3f} Hz)") 101 | 102 | # reset accumulated phase 103 | accum_phase = 0 104 | 105 | # add delay 106 | if offset == defs["m0_offset"] * defs["freq"]: 107 | if defs["trec_m0"] > 0: 108 | seq.add_block(m0_delay) 109 | else: 110 | if defs["trec"] > 0: 111 | seq.add_block(trec_delay) 112 | 113 | # set sat_pulse 114 | sat_pulse.freq_offset = offset 115 | for n in range(defs["n_pulses"]): 116 | sat_pulse.phase_offset = accum_phase % (2 * np.pi) 117 | seq.add_block(sat_pulse) 118 | accum_phase = (accum_phase + offset * 2 * np.pi * np.sum(np.abs(sat_pulse.signal) > 0) * 1e-6) % (2 * np.pi) 119 | if n < defs["n_pulses"] - 1: 120 | seq.add_block(td_delay) 121 | 122 | # add spoiler gradients 123 | seq.add_block(gx_spoil, gy_spoil, gz_spoil) 124 | 125 | # add pseudo ADC event 126 | seq.add_block(pseudo_adc) 127 | 128 | write_seq( 129 | seq=seq, 130 | seq_defs=defs, 131 | filename=str(folder / seq_filename), 132 | author="https://github.com/pulseq-cest/BMsim_challenge", 133 | use_matlab_names=True, 134 | ) 135 | -------------------------------------------------------------------------------- /case_8/case_8_create_sequence_pypulseq_v140.py: -------------------------------------------------------------------------------- 1 | # BMSim Challenge: CASE 8 2 | # Script to create the seq-file for the BMSim Challenge CASE 8 3 | # 4 | # https://github.com/pulseq-cest/BMsim_challenge 5 | # 6 | # Tested with pypulseq version 1.4.0 and bmctool version 0.6.1 7 | # 8 | # Patrick Schuenke 2023 9 | # patrick.schuenke@ptb.de 10 | 11 | from pathlib import Path 12 | from types import SimpleNamespace 13 | 14 | import numpy as np 15 | import pypulseq as pp 16 | from bmctool.utils.pulses.calc_power_equivalents import calc_power_equivalent 17 | from bmctool.utils.seq.write import write_seq 18 | 19 | # get id of generation file 20 | seqid = Path(__file__).stem.replace("_create_sequence", "") 21 | 22 | # get folder of generation file 23 | folder = Path(__file__).parent 24 | 25 | # define file path of rf pulse 26 | fpath = Path(R"case_5\rf_pulse.txt") 27 | 28 | # define gyromagnetic ratio [Hz/T] 29 | GAMMA_HZ = 42.5764 30 | 31 | # sequence definitions 32 | defs: dict = {} 33 | defs["b1pa"] = 3.7 # B1 peak average [µT] (b1rms calculated below) 34 | defs["b0"] = 3 # B0 [T] 35 | defs["freq"] = defs["b0"] * GAMMA_HZ # Larmor frequency [Hz] 36 | defs["n_pulses"] = 2 # number of pulses # 37 | defs["tp"] = 5e-3 # pulse duration [s] 38 | defs["td"] = 100e-6 # interpulse delay [s] 39 | defs["trec"] = 3.0 # recovery time [s] 40 | defs["trec_m0"] = 12 # recovery time before M0 [s] 41 | defs["m0_offset"] = -300 # m0 offset [ppm] 42 | defs["offsets_ppm"] = np.append( 43 | defs["m0_offset"], 44 | np.linspace(-2, 2, 81), 45 | ) # offset vector [ppm] 46 | 47 | defs["num_meas"] = defs["offsets_ppm"].size # number of repetition 48 | defs["tsat"] = ( 49 | defs["n_pulses"] * (defs["tp"] + defs["td"]) - defs["td"] 50 | ) # saturation time [s] 51 | defs["seq_id_string"] = seqid # unique seq id 52 | 53 | seq_filename = defs["seq_id_string"] + ".seq" 54 | 55 | # scanner limits 56 | sys = pp.Opts( 57 | max_grad=80, 58 | grad_unit="mT/m", 59 | max_slew=200, 60 | slew_unit="T/m/s", 61 | rf_ringdown_time=0, 62 | rf_dead_time=0, 63 | rf_raster_time=1e-6, 64 | gamma=GAMMA_HZ * 1e6, 65 | ) 66 | 67 | # =========== 68 | # PREPARATION 69 | # =========== 70 | 71 | # spoiler 72 | spoil_amp = 0.8 * sys.max_grad # Hz/m 73 | rise_time = 1.0e-3 # spoiler rise time in seconds 74 | flat_time = 4.5e-3 # spoiler flat time in seconds 75 | 76 | gx_spoil, gy_spoil, gz_spoil = [ 77 | pp.make_trapezoid( 78 | channel=c, 79 | system=sys, 80 | amplitude=spoil_amp, 81 | flat_time=flat_time, 82 | rise_time=rise_time, 83 | ) 84 | for c in ["x", "y", "z"] 85 | ] 86 | 87 | # RF pulses 88 | flip_angle_sat = defs["b1pa"] * GAMMA_HZ * 2 * np.pi * defs["tp"] 89 | sat_pulse = pp.make_block_pulse( 90 | flip_angle=flip_angle_sat, 91 | duration=defs["tp"], 92 | system=sys, 93 | ) 94 | 95 | # calculate b1rms 96 | defs["b1rms"] = calc_power_equivalent( 97 | rf_pulse=sat_pulse, tp=defs["tp"], td=defs["td"], gamma_hz=GAMMA_HZ 98 | ) 99 | 100 | # pseudo ADC event 101 | pseudo_adc = pp.make_adc(num_samples=1, duration=1e-3) 102 | 103 | # delays 104 | td_delay = pp.make_delay(defs["td"]) 105 | trec_delay = pp.make_delay(defs["trec"]) 106 | m0_delay = pp.make_delay(defs["trec_m0"]) 107 | 108 | # Sequence object 109 | seq = pp.Sequence() 110 | 111 | # === 112 | # RUN 113 | # === 114 | 115 | offsets_hz = defs["offsets_ppm"] * defs["freq"] # convert from ppm to Hz 116 | 117 | for m, offset in enumerate(offsets_hz): 118 | # print progress/offset 119 | print( 120 | f"#{m + 1} / {len(offsets_hz)} : offset {offset / defs['freq']:.2f} ppm ({offset:.3f} Hz)" 121 | ) 122 | 123 | # reset accumulated phase 124 | accum_phase = 0 125 | 126 | # add delay 127 | if offset == defs["m0_offset"] * defs["freq"]: 128 | if defs["trec_m0"] > 0: 129 | seq.add_block(m0_delay) 130 | else: 131 | if defs["trec"] > 0: 132 | seq.add_block(trec_delay) 133 | 134 | # set sat_pulse 135 | sat_pulse.freq_offset = offset 136 | for n in range(defs["n_pulses"]): 137 | sat_pulse.phase_offset = accum_phase % (2 * np.pi) 138 | seq.add_block(sat_pulse) 139 | _dur = sat_pulse.shape_dur 140 | accum_phase = (accum_phase + offset * 2 * np.pi * _dur) % (2 * np.pi) 141 | if n < defs["n_pulses"] - 1: 142 | seq.add_block(td_delay) 143 | 144 | # add spoiler gradients 145 | seq.add_block(gx_spoil, gy_spoil, gz_spoil) 146 | 147 | # add pseudo ADC event 148 | seq.add_block(pseudo_adc) 149 | 150 | write_seq( 151 | seq=seq, 152 | seq_defs=defs, 153 | filename=str(folder / seq_filename), 154 | author="https://github.com/pulseq-cest/BMsim_challenge", 155 | use_matlab_names=True, 156 | ) 157 | -------------------------------------------------------------------------------- /case_8/case_8_create_sequence_pypulseq_v131.py: -------------------------------------------------------------------------------- 1 | # BMSim Challenge: CASE 8 2 | # Script to create the seq-file for the BMSim Challenge CASE 8 3 | # 4 | # https://github.com/pulseq-cest/BMsim_challenge 5 | # 6 | # Tested with pypulseq version 1.3.1post1 and bmctool version 0.6.1 7 | # 8 | # Patrick Schuenke 2023 9 | # patrick.schuenke@ptb.de 10 | 11 | from pathlib import Path 12 | from types import SimpleNamespace 13 | 14 | import numpy as np 15 | import pypulseq as pp 16 | from bmctool.utils.pulses.calc_power_equivalents import calc_power_equivalent 17 | from bmctool.utils.seq.write import write_seq 18 | 19 | # get id of generation file 20 | seqid = Path(__file__).stem.replace("_create_sequence", "") 21 | 22 | # get folder of generation file 23 | folder = Path(__file__).parent 24 | 25 | # define file path of rf pulse 26 | fpath = Path(R"case_5\rf_pulse.txt") 27 | 28 | # define gyromagnetic ratio [Hz/T] 29 | GAMMA_HZ = 42.5764 30 | 31 | # sequence definitions 32 | defs: dict = {} 33 | defs["b1pa"] = 3.7 # B1 peak average [µT] (b1rms calculated below) 34 | defs["b0"] = 3 # B0 [T] 35 | defs["freq"] = defs["b0"] * GAMMA_HZ # Larmor frequency [Hz] 36 | defs["n_pulses"] = 2 # number of pulses # 37 | defs["tp"] = 5e-3 # pulse duration [s] 38 | defs["td"] = 100e-6 # interpulse delay [s] 39 | defs["trec"] = 3.0 # recovery time [s] 40 | defs["trec_m0"] = 12 # recovery time before M0 [s] 41 | defs["m0_offset"] = -300 # m0 offset [ppm] 42 | defs["offsets_ppm"] = np.append( 43 | defs["m0_offset"], 44 | np.linspace(-2, 2, 81), 45 | ) # offset vector [ppm] 46 | 47 | defs["num_meas"] = defs["offsets_ppm"].size # number of repetition 48 | defs["tsat"] = ( 49 | defs["n_pulses"] * (defs["tp"] + defs["td"]) - defs["td"] 50 | ) # saturation time [s] 51 | defs["seq_id_string"] = seqid # unique seq id 52 | 53 | seq_filename = defs["seq_id_string"] + ".seq" 54 | 55 | # scanner limits 56 | sys = pp.Opts( 57 | max_grad=80, 58 | grad_unit="mT/m", 59 | max_slew=200, 60 | slew_unit="T/m/s", 61 | rf_ringdown_time=0, 62 | rf_dead_time=0, 63 | rf_raster_time=1e-6, # rf raster time = 1 µs for PyPulseq v1.4 64 | gamma=GAMMA_HZ * 1e6, 65 | ) 66 | 67 | # =========== 68 | # PREPARATION 69 | # =========== 70 | 71 | # spoiler 72 | spoil_amp = 0.8 * sys.max_grad # Hz/m 73 | rise_time = 1.0e-3 # spoiler rise time in seconds 74 | flat_time = 4.5e-3 # spoiler flat time in seconds 75 | 76 | gx_spoil, gy_spoil, gz_spoil = [ 77 | pp.make_trapezoid( 78 | channel=c, 79 | system=sys, 80 | amplitude=spoil_amp, 81 | flat_time=flat_time, 82 | rise_time=rise_time, 83 | ) 84 | for c in ["x", "y", "z"] 85 | ] 86 | 87 | # RF pulses 88 | flip_angle_sat = defs["b1pa"] * GAMMA_HZ * 2 * np.pi * defs["tp"] 89 | sat_pulse = pp.make_block_pulse( 90 | flip_angle=flip_angle_sat, 91 | duration=defs["tp"], 92 | system=sys, 93 | ) 94 | 95 | # calculate b1rms 96 | defs["b1rms"] = calc_power_equivalent( 97 | rf_pulse=sat_pulse, tp=defs["tp"], td=defs["td"], gamma_hz=GAMMA_HZ 98 | ) 99 | 100 | # pseudo ADC event 101 | pseudo_adc = pp.make_adc(num_samples=1, duration=1e-3) 102 | 103 | # delays 104 | td_delay = pp.make_delay(defs["td"]) 105 | trec_delay = pp.make_delay(defs["trec"]) 106 | m0_delay = pp.make_delay(defs["trec_m0"]) 107 | 108 | # Sequence object 109 | seq = pp.Sequence() 110 | 111 | # === 112 | # RUN 113 | # === 114 | 115 | offsets_hz = defs["offsets_ppm"] * defs["freq"] # convert from ppm to Hz 116 | 117 | for m, offset in enumerate(offsets_hz): 118 | # print progress/offset 119 | print( 120 | f"#{m + 1} / {len(offsets_hz)} : offset {offset / defs['freq']:.2f} ppm ({offset:.3f} Hz)" 121 | ) 122 | 123 | # reset accumulated phase 124 | accum_phase = 0 125 | 126 | # add delay 127 | if offset == defs["m0_offset"] * defs["freq"]: 128 | if defs["trec_m0"] > 0: 129 | seq.add_block(m0_delay) 130 | else: 131 | if defs["trec"] > 0: 132 | seq.add_block(trec_delay) 133 | 134 | # set sat_pulse 135 | sat_pulse.freq_offset = offset 136 | for n in range(defs["n_pulses"]): 137 | sat_pulse.phase_offset = accum_phase % (2 * np.pi) 138 | seq.add_block(sat_pulse) 139 | _dur = np.sum(np.abs(sat_pulse.signal) > 0) * 1e-6 140 | accum_phase = (accum_phase + offset * 2 * np.pi * _dur) % (2 * np.pi) 141 | if n < defs["n_pulses"] - 1: 142 | seq.add_block(td_delay) 143 | 144 | # add spoiler gradients 145 | seq.add_block(gx_spoil, gy_spoil, gz_spoil) 146 | 147 | # add pseudo ADC event 148 | seq.add_block(pseudo_adc) 149 | 150 | write_seq( 151 | seq=seq, 152 | seq_defs=defs, 153 | filename=str(folder / seq_filename), 154 | author="https://github.com/pulseq-cest/BMsim_challenge", 155 | use_matlab_names=True, 156 | ) 157 | -------------------------------------------------------------------------------- /case_1/case_1_create_seq.m: -------------------------------------------------------------------------------- 1 | %% APTw_3T_000_2uT_1block_2s_braintumor 2 | % Creates a sequence file for an APTw protocol with on single cw (block) pulse 3 | % this sequence will not run on some real Systems. 4 | % it serves as a reference for the pulsed pre-saturation schemes 5 | % 6 | % Moritz Zaiss 2021 7 | % kai.herz@tuebingen.mpg.de 8 | 9 | % author name for sequence file 10 | author = 'Moritz Zaiss'; 11 | 12 | %% get id of generation file 13 | if contains(mfilename, 'LiveEditorEvaluationHelperESectionEval') 14 | [~, seqid] = fileparts(matlab.desktop.editor.getActiveFilename); 15 | else 16 | [~, seqid] = fileparts(which(mfilename)); 17 | end 18 | 19 | %% sequence definitions 20 | % everything in seq_defs gets written as definition in .seq-file 21 | seq_defs.n_pulses = 1 ; % number of pulses 22 | seq_defs.tp = 15 ; % pulse duration [s] 23 | seq_defs.td = 0 ; % interpulse delay [s] 24 | seq_defs.Trec = 3.5 ; % recovery time [s] 25 | seq_defs.Trec_M0 = 3.5 ; % recovery time before M0 [s] 26 | seq_defs.M0_offset = -300 ; % m0 offset [ppm] 27 | seq_defs.DCsat = (seq_defs.tp)/(seq_defs.tp+seq_defs.td); % duty cycle 28 | seq_defs.offsets_ppm = [seq_defs.M0_offset -15:0.1:15]; % offset vector [ppm] 29 | seq_defs.num_meas = numel(seq_defs.offsets_ppm) ; % number of repetition 30 | seq_defs.Tsat = seq_defs.n_pulses*(seq_defs.tp+seq_defs.td) - ... 31 | seq_defs.td ; % saturation time [s] 32 | seq_defs.B0 = 3 ; % B0 [T] 33 | seq_defs.seq_id_string = seqid ; % unique seq id 34 | 35 | 36 | %% get info from struct 37 | offsets_ppm = seq_defs.offsets_ppm; % [ppm] 38 | Trec = seq_defs.Trec; % recovery time between scans [s] 39 | Trec_M0 = seq_defs.Trec_M0; % recovery time before m0 scan [s] 40 | tp = seq_defs.tp; % sat pulse duration [s] 41 | td = seq_defs.td; % delay between pulses [s] 42 | n_pulses = seq_defs.n_pulses; % number of sat pulses per measurement. if DC changes use: n_pulses = round(2/(t_p+t_d)) 43 | B0 = seq_defs.B0; % B0 [T] 44 | B1pa = 2; % mean sat pulse b1 [uT] 45 | spoiling = 1; % 0=no spoiling, 1=before readout, Gradient in x,y,z 46 | 47 | seq_filename = strcat(seq_defs.seq_id_string,'.seq'); % filename 48 | 49 | %% scanner limits 50 | % see pulseq doc for more ino 51 | seq = SequenceSBB(getScannerLimits()); 52 | 53 | %% create scanner events 54 | % satpulse 55 | gyroRatio_hz = 42.5764; % for H [Hz/uT] 56 | gyroRatio_rad = gyroRatio_hz*2*pi; % [rad/uT] 57 | fa_sat = B1pa*gyroRatio_rad*tp; % flip angle of sat pulse 58 | % create pulseq saturation pulse object 59 | 60 | %satPulse = mr.makeGaussPulse(fa_sat, 'Duration', t_p,'system',lims,'timeBwProduct', 0.2,'apodization', 0.5); % siemens-like gauss 61 | %satPulse = mr.makeSincPulse(fa_sat, 'Duration', tp, 'system', lims,'timeBwProduct', 2,'apodization', 0.15); % philips-like sinc 62 | satPulse = mr.makeBlockPulse(fa_sat, 'Duration', tp, 'system', seq.sys); % block pusle cw 63 | 64 | [B1cwpe,B1cwae,B1cwae_pure,alpha]= calculatePowerEquivalents(satPulse,tp,td,1,gyroRatio_hz); 65 | seq_defs.B1cwpe = B1cwpe; 66 | 67 | 68 | %% loop through zspec offsets 69 | offsets_Hz = offsets_ppm*gyroRatio_hz*B0; 70 | 71 | % loop through offsets and set pulses and delays 72 | for currentOffset = offsets_Hz 73 | if currentOffset == seq_defs.M0_offset*gyroRatio_hz*B0 74 | if Trec_M0 > 0 75 | seq.addBlock(mr.makeDelay(Trec_M0)); 76 | end 77 | else 78 | if Trec > 0 79 | seq.addBlock(mr.makeDelay(Trec)); % recovery time 80 | end 81 | end 82 | satPulse.freqOffset = currentOffset; % set freuqncy offset of the pulse 83 | accumPhase=0; 84 | for np = 1:n_pulses 85 | satPulse.phaseOffset = mod(accumPhase,2*pi); % set accumulated pahse from previous rf pulse 86 | seq.addBlock(satPulse) % add sat pulse 87 | % calc phase for next rf pulse 88 | accumPhase = mod(accumPhase + currentOffset*2*pi*(numel(find(abs(satPulse.signal)>0))*1e-6),2*pi); 89 | if np < n_pulses % delay between pulses 90 | seq.addBlock(mr.makeDelay(td)); % add delay 91 | end 92 | end 93 | if spoiling % spoiling before readout 94 | seq.addSpoilerGradients() 95 | end 96 | seq.addPseudoADCBlock(); % readout trigger event 97 | end 98 | 99 | %% write definitions 100 | def_fields = fieldnames(seq_defs); 101 | for n_id = 1:numel(def_fields) 102 | seq.setDefinition(def_fields{n_id}, seq_defs.(def_fields{n_id})); 103 | end 104 | seq.write(seq_filename, author); 105 | 106 | warndlg(' This sequence will not run on all scanners with DC limits and can crash the scanner software! Use pulsed sequences instead' ) 107 | %% call standard sim 108 | M_z = simulate_pulseqcest(seq_filename,'case_1_2pool_model.yaml'); 109 | figure('Name','Z-asym'); 110 | plotSimulationResults(M_z,offsets_ppm,seq_defs.M0_offset); 111 | 112 | -------------------------------------------------------------------------------- /case_2/case_2_create_seq.m: -------------------------------------------------------------------------------- 1 | %% APTw_3T_000_2uT_1block_2s_braintumor 2 | % Creates a sequence file for an APTw protocol with on single cw (block) pulse 3 | % this sequence will not run on some real Systems. 4 | % it serves as a reference for the pulsed pre-saturation schemes 5 | % 6 | % Moritz Zaiss 2021 7 | % kai.herz@tuebingen.mpg.de 8 | 9 | % author name for sequence file 10 | author = 'Moritz Zaiss'; 11 | 12 | %% get id of generation file 13 | if contains(mfilename, 'LiveEditorEvaluationHelperESectionEval') 14 | [~, seqid] = fileparts(matlab.desktop.editor.getActiveFilename); 15 | else 16 | [~, seqid] = fileparts(which(mfilename)); 17 | end 18 | 19 | %% sequence definitions 20 | % everything in seq_defs gets written as definition in .seq-file 21 | seq_defs.n_pulses = 1 ; % number of pulses 22 | seq_defs.tp = 2 ; % pulse duration [s] 23 | seq_defs.td = 0 ; % interpulse delay [s] 24 | seq_defs.Trec = 3.5 ; % recovery time [s] 25 | seq_defs.Trec_M0 = 3.5 ; % recovery time before M0 [s] 26 | seq_defs.M0_offset = -300 ; % m0 offset [ppm] 27 | seq_defs.DCsat = (seq_defs.tp)/(seq_defs.tp+seq_defs.td); % duty cycle 28 | seq_defs.offsets_ppm = [seq_defs.M0_offset -15:0.1:15]; % offset vector [ppm] 29 | seq_defs.num_meas = numel(seq_defs.offsets_ppm) ; % number of repetition 30 | seq_defs.Tsat = seq_defs.n_pulses*(seq_defs.tp+seq_defs.td) - ... 31 | seq_defs.td ; % saturation time [s] 32 | seq_defs.B0 = 3 ; % B0 [T] 33 | seq_defs.seq_id_string = seqid ; % unique seq id 34 | 35 | 36 | %% get info from struct 37 | offsets_ppm = seq_defs.offsets_ppm; % [ppm] 38 | Trec = seq_defs.Trec; % recovery time between scans [s] 39 | Trec_M0 = seq_defs.Trec_M0; % recovery time before m0 scan [s] 40 | tp = seq_defs.tp; % sat pulse duration [s] 41 | td = seq_defs.td; % delay between pulses [s] 42 | n_pulses = seq_defs.n_pulses; % number of sat pulses per measurement. if DC changes use: n_pulses = round(2/(t_p+t_d)) 43 | B0 = seq_defs.B0; % B0 [T] 44 | B1pa = 2; % mean sat pulse b1 [uT] 45 | spoiling = 1; % 0=no spoiling, 1=before readout, Gradient in x,y,z 46 | 47 | seq_filename = strcat(seq_defs.seq_id_string,'.seq'); % filename 48 | 49 | %% scanner limits 50 | % see pulseq doc for more ino 51 | seq = SequenceSBB(getScannerLimits()); 52 | 53 | %% create scanner events 54 | % satpulse 55 | gyroRatio_hz = 42.5764; % for H [Hz/uT] 56 | gyroRatio_rad = gyroRatio_hz*2*pi; % [rad/uT] 57 | fa_sat = B1pa*gyroRatio_rad*tp; % flip angle of sat pulse 58 | % create pulseq saturation pulse object 59 | 60 | %satPulse = mr.makeGaussPulse(fa_sat, 'Duration', t_p,'system',lims,'timeBwProduct', 0.2,'apodization', 0.5); % siemens-like gauss 61 | %satPulse = mr.makeSincPulse(fa_sat, 'Duration', tp, 'system', lims,'timeBwProduct', 2,'apodization', 0.15); % philips-like sinc 62 | satPulse = mr.makeBlockPulse(fa_sat, 'Duration', tp, 'system', seq.sys); % block pusle cw 63 | 64 | [B1cwpe,B1cwae,B1cwae_pure,alpha]= calculatePowerEquivalents(satPulse,tp,td,1,gyroRatio_hz); 65 | seq_defs.B1cwpe = B1cwpe; 66 | 67 | 68 | %% loop through zspec offsets 69 | offsets_Hz = offsets_ppm*gyroRatio_hz*B0; 70 | 71 | % loop through offsets and set pulses and delays 72 | for currentOffset = offsets_Hz 73 | if currentOffset == seq_defs.M0_offset*gyroRatio_hz*B0 74 | if Trec_M0 > 0 75 | seq.addBlock(mr.makeDelay(Trec_M0)); 76 | end 77 | else 78 | if Trec > 0 79 | seq.addBlock(mr.makeDelay(Trec)); % recovery time 80 | end 81 | end 82 | satPulse.freqOffset = currentOffset; % set freuqncy offset of the pulse 83 | accumPhase=0; 84 | for np = 1:n_pulses 85 | satPulse.phaseOffset = mod(accumPhase,2*pi); % set accumulated pahse from previous rf pulse 86 | seq.addBlock(satPulse) % add sat pulse 87 | % calc phase for next rf pulse 88 | accumPhase = mod(accumPhase + currentOffset*2*pi*(numel(find(abs(satPulse.signal)>0))*1e-6),2*pi); 89 | if np < n_pulses % delay between pulses 90 | seq.addBlock(mr.makeDelay(td)); % add delay 91 | end 92 | end 93 | if spoiling % spoiling before readout 94 | seq.addSpoilerGradients() 95 | end 96 | seq.addPseudoADCBlock(); % readout trigger event 97 | end 98 | 99 | 100 | 101 | %% write definitions 102 | def_fields = fieldnames(seq_defs); 103 | for n_id = 1:numel(def_fields) 104 | seq.setDefinition(def_fields{n_id}, seq_defs.(def_fields{n_id})); 105 | end 106 | seq.write(seq_filename, author); 107 | 108 | warndlg(' This sequence will not run on all scanners with DC limits and can crash the scanner software! Use pulsed sequences instead' ) 109 | %% call standard sim 110 | M_z = simulate_pulseqcest(seq_filename,'case_2_2pool_model.yaml'); 111 | figure('Name','Z-asym'); 112 | plotSimulationResults(M_z,offsets_ppm,seq_defs.M0_offset); 113 | 114 | -------------------------------------------------------------------------------- /case_3/case_3_create_seq.m: -------------------------------------------------------------------------------- 1 | %% APTw_3T_000_2uT_1block_2s_braintumor 2 | % Creates a sequence file for an APTw protocol with on single cw (block) pulse 3 | % this sequence will not run on some real Systems. 4 | % it serves as a reference for the pulsed pre-saturation schemes 5 | % 6 | % Moritz Zaiss 2021 7 | % kai.herz@tuebingen.mpg.de 8 | 9 | % author name for sequence file 10 | author = 'Moritz Zaiss'; 11 | 12 | %% get id of generation file 13 | if contains(mfilename, 'LiveEditorEvaluationHelperESectionEval') 14 | [~, seqid] = fileparts(matlab.desktop.editor.getActiveFilename); 15 | else 16 | [~, seqid] = fileparts(which(mfilename)); 17 | end 18 | 19 | %% sequence definitions 20 | % everything in seq_defs gets written as definition in .seq-file 21 | seq_defs.n_pulses = 1 ; % number of pulses 22 | seq_defs.tp = 2 ; % pulse duration [s] 23 | seq_defs.td = 0 ; % interpulse delay [s] 24 | seq_defs.Trec = 3.5 ; % recovery time [s] 25 | seq_defs.Trec_M0 = 3.5 ; % recovery time before M0 [s] 26 | seq_defs.M0_offset = -300 ; % m0 offset [ppm] 27 | seq_defs.DCsat = (seq_defs.tp)/(seq_defs.tp+seq_defs.td); % duty cycle 28 | seq_defs.offsets_ppm = [seq_defs.M0_offset -15:0.1:15]; % offset vector [ppm] 29 | seq_defs.num_meas = numel(seq_defs.offsets_ppm) ; % number of repetition 30 | seq_defs.Tsat = seq_defs.n_pulses*(seq_defs.tp+seq_defs.td) - ... 31 | seq_defs.td ; % saturation time [s] 32 | seq_defs.B0 = 3 ; % B0 [T] 33 | seq_defs.seq_id_string = seqid ; % unique seq id 34 | 35 | 36 | %% get info from struct 37 | offsets_ppm = seq_defs.offsets_ppm; % [ppm] 38 | Trec = seq_defs.Trec; % recovery time between scans [s] 39 | Trec_M0 = seq_defs.Trec_M0; % recovery time before m0 scan [s] 40 | tp = seq_defs.tp; % sat pulse duration [s] 41 | td = seq_defs.td; % delay between pulses [s] 42 | n_pulses = seq_defs.n_pulses; % number of sat pulses per measurement. if DC changes use: n_pulses = round(2/(t_p+t_d)) 43 | B0 = seq_defs.B0; % B0 [T] 44 | B1pa = 2; % mean sat pulse b1 [uT] 45 | spoiling = 1; % 0=no spoiling, 1=before readout, Gradient in x,y,z 46 | 47 | seq_filename = strcat(seq_defs.seq_id_string,'.seq'); % filename 48 | 49 | %% scanner limits 50 | % see pulseq doc for more ino 51 | seq = SequenceSBB(getScannerLimits()); 52 | 53 | %% create scanner events 54 | % satpulse 55 | gyroRatio_hz = 42.5764; % for H [Hz/uT] 56 | gyroRatio_rad = gyroRatio_hz*2*pi; % [rad/uT] 57 | fa_sat = B1pa*gyroRatio_rad*tp; % flip angle of sat pulse 58 | % create pulseq saturation pulse object 59 | 60 | %satPulse = mr.makeGaussPulse(fa_sat, 'Duration', t_p,'system',lims,'timeBwProduct', 0.2,'apodization', 0.5); % siemens-like gauss 61 | %satPulse = mr.makeSincPulse(fa_sat, 'Duration', tp, 'system', lims,'timeBwProduct', 2,'apodization', 0.15); % philips-like sinc 62 | satPulse = mr.makeBlockPulse(fa_sat, 'Duration', tp, 'system', seq.sys); % block pusle cw 63 | 64 | [B1cwpe,B1cwae,B1cwae_pure,alpha]= calculatePowerEquivalents(satPulse,tp,td,1,gyroRatio_hz); 65 | seq_defs.B1cwpe = B1cwpe; 66 | 67 | 68 | %% loop through zspec offsets 69 | offsets_Hz = offsets_ppm*gyroRatio_hz*B0; 70 | 71 | % loop through offsets and set pulses and delays 72 | for currentOffset = offsets_Hz 73 | if currentOffset == seq_defs.M0_offset*gyroRatio_hz*B0 74 | if Trec_M0 > 0 75 | seq.addBlock(mr.makeDelay(Trec_M0)); 76 | end 77 | else 78 | if Trec > 0 79 | seq.addBlock(mr.makeDelay(Trec)); % recovery time 80 | end 81 | end 82 | satPulse.freqOffset = currentOffset; % set freuqncy offset of the pulse 83 | accumPhase=0; 84 | for np = 1:n_pulses 85 | satPulse.phaseOffset = mod(accumPhase,2*pi); % set accumulated pahse from previous rf pulse 86 | seq.addBlock(satPulse) % add sat pulse 87 | % calc phase for next rf pulse 88 | accumPhase = mod(accumPhase + currentOffset*2*pi*(numel(find(abs(satPulse.signal)>0))*1e-6),2*pi); 89 | if np < n_pulses % delay between pulses 90 | seq.addBlock(mr.makeDelay(td)); % add delay 91 | end 92 | end 93 | if spoiling % spoiling before readout 94 | seq.addSpoilerGradients() 95 | end 96 | seq.addPseudoADCBlock(); % readout trigger event 97 | end 98 | 99 | 100 | 101 | %% write definitions 102 | def_fields = fieldnames(seq_defs); 103 | for n_id = 1:numel(def_fields) 104 | seq.setDefinition(def_fields{n_id}, seq_defs.(def_fields{n_id})); 105 | end 106 | seq.write(seq_filename, author); 107 | 108 | warndlg(' This sequence will not run on all scanners with DC limits and can crash the scanner software! Use pulsed sequences instead' ) 109 | %% call standard sim 110 | M_z = simulate_pulseqcest(seq_filename,'case_3_5pool_model.yaml'); 111 | figure('Name','Z-asym'); 112 | plotSimulationResults(M_z,offsets_ppm,seq_defs.M0_offset); 113 | 114 | -------------------------------------------------------------------------------- /case_5/case_5_create_sequence_pypulseq_v140.py: -------------------------------------------------------------------------------- 1 | # BMSim Challenge: CASE 5 2 | # Script to create the seq-file for the BMSim Challenge CASE 5 3 | # 4 | # https://github.com/pulseq-cest/BMsim_challenge 5 | # 6 | # Tested with pypulseq version 1.4.0 and bmctool version 0.6.1 7 | # 8 | # Patrick Schuenke 2023 9 | # patrick.schuenke@ptb.de 10 | 11 | from pathlib import Path 12 | from types import SimpleNamespace 13 | 14 | import numpy as np 15 | import pypulseq as pp 16 | from bmctool.utils.pulses.calc_power_equivalents import calc_power_equivalent 17 | from bmctool.utils.seq.write import write_seq 18 | 19 | 20 | def make_pulse_from_txt(fpath, system): 21 | """Creates a rf event using the signal from the provided txt-file. 22 | 23 | The txt-file contains the time steps in the first column and the signal 24 | in the second column. The total duration of the pulse is 50 ms and 200 25 | samples are given leading to a dwell time of 250 µs. 26 | 27 | Parameters 28 | ---------- 29 | fpath 30 | Path to the txt-file 31 | system 32 | PyPulseq system object 33 | 34 | Returns 35 | ------- 36 | RF event (SimpleNamespace) 37 | """ 38 | _data = np.loadtxt(fpath) 39 | _t = np.squeeze(_data[:, 0]) 40 | _signal = np.squeeze(_data[:, 1:]) 41 | 42 | _rf = SimpleNamespace() 43 | _rf.type = "rf" 44 | _rf.signal = _signal 45 | _rf.t = _t 46 | _rf.shape_dur = (_t[1] - _t[0]) * _signal.size # dwell * number of samples 47 | _rf.freq_offset = 0 48 | _rf.phase_offset = 0 49 | _rf.delay = 0 50 | _rf.dead_time = system.rf_dead_time 51 | _rf.ringdown_time = system.rf_ringdown_time 52 | 53 | return _rf 54 | 55 | 56 | # get id of generation file 57 | seqid = Path(__file__).stem.replace("_create_sequence", "") 58 | 59 | # get folder of generation file 60 | folder = Path(__file__).parent 61 | 62 | # define file path of rf pulse 63 | fpath = Path(R"case_5\rf_pulse.txt") 64 | 65 | # define gyromagnetic ratio [Hz/T] 66 | GAMMA_HZ = 42.5764 67 | 68 | # sequence definitions 69 | defs: dict = {} 70 | defs["b1pa"] = 1.78 # B1 peak amplitude [µT] (b1rms calculated below) 71 | defs["b0"] = 3 # B0 [T] 72 | defs["freq"] = defs["b0"] * GAMMA_HZ # Larmor frequency [Hz] 73 | defs["n_pulses"] = 1 # number of pulses # 74 | defs["tp"] = 50e-3 # pulse duration [s] 75 | defs["td"] = 5e-3 # interpulse delay [s] 76 | defs["trec"] = 3.5 # recovery time [s] 77 | defs["trec_m0"] = 3.5 # recovery time before M0 [s] 78 | defs["m0_offset"] = -300 # m0 offset [ppm] 79 | defs["offsets_ppm"] = np.append( 80 | defs["m0_offset"], 81 | np.linspace(-2, 2, 201), 82 | ) # offset vector [ppm] 83 | 84 | defs["num_meas"] = defs["offsets_ppm"].size # number of repetition 85 | defs["tsat"] = ( 86 | defs["n_pulses"] * (defs["tp"] + defs["td"]) - defs["td"] 87 | ) # saturation time [s] 88 | defs["seq_id_string"] = seqid # unique seq id 89 | 90 | seq_filename = defs["seq_id_string"] + ".seq" 91 | 92 | # scanner limits 93 | sys = pp.Opts( 94 | max_grad=80, 95 | grad_unit="mT/m", 96 | max_slew=200, 97 | slew_unit="T/m/s", 98 | rf_ringdown_time=0, 99 | rf_dead_time=0, 100 | rf_raster_time=250e-6, # rf raster time = 250 µs for PyPulseq v1.4 101 | gamma=GAMMA_HZ * 1e6, 102 | ) 103 | 104 | # =========== 105 | # PREPARATION 106 | # =========== 107 | 108 | # spoiler 109 | spoil_amp = 0.8 * sys.max_grad # Hz/m 110 | rise_time = 1.0e-3 # spoiler rise time in seconds 111 | flat_time = 4.5e-3 # spoiler flat time in seconds 112 | 113 | gx_spoil, gy_spoil, gz_spoil = [ 114 | pp.make_trapezoid( 115 | channel=c, 116 | system=sys, 117 | amplitude=spoil_amp, 118 | flat_time=flat_time, 119 | rise_time=rise_time, 120 | ) 121 | for c in ["x", "y", "z"] 122 | ] 123 | 124 | # RF pulses 125 | sat_pulse = make_pulse_from_txt(fpath, sys) 126 | 127 | # calculate b1rms 128 | defs["b1rms"] = calc_power_equivalent( 129 | rf_pulse=sat_pulse, tp=defs["tp"], td=defs["td"], gamma_hz=GAMMA_HZ 130 | ) 131 | 132 | # pseudo ADC event 133 | pseudo_adc = pp.make_adc(num_samples=1, duration=1e-3) 134 | 135 | # delays 136 | td_delay = pp.make_delay(defs["td"]) 137 | trec_delay = pp.make_delay(defs["trec"]) 138 | m0_delay = pp.make_delay(defs["trec_m0"]) 139 | 140 | # Sequence object 141 | seq = pp.Sequence() 142 | 143 | # === 144 | # RUN 145 | # === 146 | 147 | offsets_hz = defs["offsets_ppm"] * defs["freq"] # convert from ppm to Hz 148 | 149 | for m, offset in enumerate(offsets_hz): 150 | # print progress/offset 151 | print( 152 | f"#{m + 1} / {len(offsets_hz)} : offset {offset / defs['freq']:.2f} ppm ({offset:.3f} Hz)" 153 | ) 154 | 155 | # add delay 156 | if offset == defs["m0_offset"] * defs["freq"]: 157 | if defs["trec_m0"] > 0: 158 | seq.add_block(m0_delay) 159 | else: 160 | if defs["trec"] > 0: 161 | seq.add_block(trec_delay) 162 | 163 | # set sat_pulse 164 | sat_pulse.freq_offset = offset 165 | seq.add_block(sat_pulse) 166 | 167 | # add spoiler gradients 168 | seq.add_block(gx_spoil, gy_spoil, gz_spoil) 169 | 170 | # add pseudo ADC event 171 | seq.add_block(pseudo_adc) 172 | 173 | write_seq( 174 | seq=seq, 175 | seq_defs=defs, 176 | filename=str(folder / seq_filename), 177 | author="https://github.com/pulseq-cest/BMsim_challenge", 178 | use_matlab_names=True, 179 | ) 180 | -------------------------------------------------------------------------------- /case_6/case_6_create_sequence_pypulseq_v140.py: -------------------------------------------------------------------------------- 1 | # BMSim Challenge: CASE 6 2 | # Script to create the seq-file for the BMSim Challenge CASE 6 3 | # 4 | # https://github.com/pulseq-cest/BMsim_challenge 5 | # 6 | # Tested with pypulseq version 1.4.0 and bmctool version 0.6.1 7 | # 8 | # Patrick Schuenke 2023 9 | # patrick.schuenke@ptb.de 10 | 11 | from pathlib import Path 12 | from types import SimpleNamespace 13 | 14 | import numpy as np 15 | import pypulseq as pp 16 | from bmctool.utils.pulses.calc_power_equivalents import calc_power_equivalent 17 | from bmctool.utils.seq.write import write_seq 18 | 19 | 20 | def make_pulse_from_txt(fpath, system): 21 | """Creates a rf event using the signal from the provided txt-file. 22 | 23 | The txt-file contains the time steps in the first column and the signal 24 | in the second column. The total duration of the pulse is 50 ms and 200 25 | samples are given leading to a dwell time of 250 µs. 26 | 27 | Parameters 28 | ---------- 29 | fpath 30 | Path to the txt-file 31 | system 32 | PyPulseq system object 33 | 34 | Returns 35 | ------- 36 | RF event (SimpleNamespace) 37 | """ 38 | _data = np.loadtxt(fpath) 39 | _t = np.squeeze(_data[:, 0]) 40 | _signal = np.squeeze(_data[:, 1:]) 41 | 42 | _rf = SimpleNamespace() 43 | _rf.type = "rf" 44 | _rf.signal = _signal 45 | _rf.t = _t 46 | _rf.shape_dur = (_t[1] - _t[0]) * _signal.size # dwell * number of samples 47 | _rf.freq_offset = 0 48 | _rf.phase_offset = 0 49 | _rf.delay = 0 50 | _rf.dead_time = system.rf_dead_time 51 | _rf.ringdown_time = system.rf_ringdown_time 52 | 53 | return _rf 54 | 55 | 56 | # get id of generation file 57 | seqid = Path(__file__).stem.replace("_create_sequence", "") 58 | 59 | # get folder of generation file 60 | folder = Path(__file__).parent 61 | 62 | # define file path of rf pulse 63 | fpath = Path(R"case_5\rf_pulse.txt") 64 | 65 | # define gyromagnetic ratio [Hz/T] 66 | GAMMA_HZ = 42.5764 67 | 68 | # sequence definitions 69 | defs: dict = {} 70 | defs["b1pa"] = 1.78 # B1 peak amplitude [µT] (b1rms calculated below) 71 | defs["b0"] = 3 # B0 [T] 72 | defs["freq"] = defs["b0"] * GAMMA_HZ # Larmor frequency [Hz] 73 | defs["n_pulses"] = 36 # number of pulses # 74 | defs["tp"] = 50e-3 # pulse duration [s] 75 | defs["td"] = 5e-3 # interpulse delay [s] 76 | defs["trec"] = 3.5 # recovery time [s] 77 | defs["trec_m0"] = 3.5 # recovery time before M0 [s] 78 | defs["m0_offset"] = -300 # m0 offset [ppm] 79 | defs["offsets_ppm"] = np.append( 80 | defs["m0_offset"], 81 | np.linspace(-15, 15, 301), 82 | ) # offset vector [ppm] 83 | 84 | defs["num_meas"] = defs["offsets_ppm"].size # number of repetition 85 | defs["tsat"] = ( 86 | defs["n_pulses"] * (defs["tp"] + defs["td"]) - defs["td"] 87 | ) # saturation time [s] 88 | defs["seq_id_string"] = seqid # unique seq id 89 | 90 | seq_filename = defs["seq_id_string"] + ".seq" 91 | 92 | # scanner limits 93 | sys = pp.Opts( 94 | max_grad=80, 95 | grad_unit="mT/m", 96 | max_slew=200, 97 | slew_unit="T/m/s", 98 | rf_ringdown_time=0, 99 | rf_dead_time=0, 100 | rf_raster_time=250e-6, # rf raster time = 250 µs for PyPulseq v1.4 101 | gamma=GAMMA_HZ * 1e6, 102 | ) 103 | 104 | # =========== 105 | # PREPARATION 106 | # =========== 107 | 108 | # spoiler 109 | spoil_amp = 0.8 * sys.max_grad # Hz/m 110 | rise_time = 1.0e-3 # spoiler rise time in seconds 111 | flat_time = 4.5e-3 # spoiler flat time in seconds 112 | 113 | gx_spoil, gy_spoil, gz_spoil = [ 114 | pp.make_trapezoid( 115 | channel=c, 116 | system=sys, 117 | amplitude=spoil_amp, 118 | flat_time=flat_time, 119 | rise_time=rise_time, 120 | ) 121 | for c in ["x", "y", "z"] 122 | ] 123 | 124 | # RF pulses 125 | sat_pulse = make_pulse_from_txt(fpath, sys) 126 | 127 | # calculate b1rms 128 | defs["b1rms"] = calc_power_equivalent( 129 | rf_pulse=sat_pulse, tp=defs["tp"], td=defs["td"], gamma_hz=GAMMA_HZ 130 | ) 131 | 132 | # pseudo ADC event 133 | pseudo_adc = pp.make_adc(num_samples=1, duration=1e-3) 134 | 135 | # delays 136 | td_delay = pp.make_delay(defs["td"]) 137 | trec_delay = pp.make_delay(defs["trec"]) 138 | m0_delay = pp.make_delay(defs["trec_m0"]) 139 | 140 | # Sequence object 141 | seq = pp.Sequence() 142 | 143 | # === 144 | # RUN 145 | # === 146 | 147 | offsets_hz = defs["offsets_ppm"] * defs["freq"] # convert from ppm to Hz 148 | 149 | for m, offset in enumerate(offsets_hz): 150 | # print progress/offset 151 | print( 152 | f"#{m + 1} / {len(offsets_hz)} : offset {offset / defs['freq']:.2f} ppm ({offset:.3f} Hz)" 153 | ) 154 | 155 | # reset accumulated phase 156 | accum_phase = 0 157 | 158 | # add delay 159 | if offset == defs["m0_offset"] * defs["freq"]: 160 | if defs["trec_m0"] > 0: 161 | seq.add_block(m0_delay) 162 | else: 163 | if defs["trec"] > 0: 164 | seq.add_block(trec_delay) 165 | 166 | # set sat_pulse 167 | sat_pulse.freq_offset = offset 168 | for n in range(defs["n_pulses"]): 169 | sat_pulse.phase_offset = accum_phase % (2 * np.pi) 170 | seq.add_block(sat_pulse) 171 | _dur = sat_pulse.shape_dur 172 | accum_phase = (accum_phase + offset * 2 * np.pi * _dur) % (2 * np.pi) 173 | if n < defs["n_pulses"] - 1: 174 | seq.add_block(td_delay) 175 | 176 | # add spoiler gradients 177 | seq.add_block(gx_spoil, gy_spoil, gz_spoil) 178 | 179 | # add pseudo ADC event 180 | seq.add_block(pseudo_adc) 181 | 182 | write_seq( 183 | seq=seq, 184 | seq_defs=defs, 185 | filename=str(folder / seq_filename), 186 | author="https://github.com/pulseq-cest/BMsim_challenge", 187 | use_matlab_names=True, 188 | ) 189 | -------------------------------------------------------------------------------- /case_7/case_7_create_sequence_pypulseq_v140.py: -------------------------------------------------------------------------------- 1 | # BMSim Challenge: CASE 7 2 | # Script to create the seq-file for the BMSim Challenge CASE 7 3 | # 4 | # https://github.com/pulseq-cest/BMsim_challenge 5 | # 6 | # Tested with pypulseq version 1.4.0 and bmctool version 0.6.1 7 | # 8 | # Patrick Schuenke 2023 9 | # patrick.schuenke@ptb.de 10 | 11 | from pathlib import Path 12 | from types import SimpleNamespace 13 | 14 | import numpy as np 15 | import pypulseq as pp 16 | from bmctool.utils.pulses.calc_power_equivalents import calc_power_equivalent 17 | from bmctool.utils.seq.write import write_seq 18 | 19 | 20 | def make_pulse_from_txt(fpath, system): 21 | """Creates a rf event using the signal from the provided txt-file. 22 | 23 | The txt-file contains the time steps in the first column and the signal 24 | in the second column. The total duration of the pulse is 50 ms and 200 25 | samples are given leading to a dwell time of 250 µs. 26 | 27 | Parameters 28 | ---------- 29 | fpath 30 | Path to the txt-file 31 | system 32 | PyPulseq system object 33 | 34 | Returns 35 | ------- 36 | RF event (SimpleNamespace) 37 | """ 38 | _data = np.loadtxt(fpath) 39 | _t = np.squeeze(_data[:, 0]) 40 | _signal = np.squeeze(_data[:, 1:]) 41 | 42 | _rf = SimpleNamespace() 43 | _rf.type = "rf" 44 | _rf.signal = _signal 45 | _rf.t = _t 46 | _rf.shape_dur = (_t[1] - _t[0]) * _signal.size # dwell * number of samples 47 | _rf.freq_offset = 0 48 | _rf.phase_offset = 0 49 | _rf.delay = 0 50 | _rf.dead_time = system.rf_dead_time 51 | _rf.ringdown_time = system.rf_ringdown_time 52 | 53 | return _rf 54 | 55 | 56 | # get id of generation file 57 | seqid = Path(__file__).stem.replace("_create_sequence", "") 58 | 59 | # get folder of generation file 60 | folder = Path(__file__).parent 61 | 62 | # define file path of rf pulse 63 | fpath = Path(R"case_5\rf_pulse.txt") 64 | 65 | # define gyromagnetic ratio [Hz/T] 66 | GAMMA_HZ = 42.5764 67 | 68 | # sequence definitions 69 | defs: dict = {} 70 | defs["b1pa"] = 1.78 # B1 peak amplitude [µT] (b1rms calculated below) 71 | defs["b0"] = 3 # B0 [T] 72 | defs["freq"] = defs["b0"] * GAMMA_HZ # Larmor frequency [Hz] 73 | defs["n_pulses"] = 36 # number of pulses # 74 | defs["tp"] = 50e-3 # pulse duration [s] 75 | defs["td"] = 5e-3 # interpulse delay [s] 76 | defs["trec"] = 3.5 # recovery time [s] 77 | defs["trec_m0"] = 3.5 # recovery time before M0 [s] 78 | defs["m0_offset"] = -300 # m0 offset [ppm] 79 | defs["offsets_ppm"] = np.append( 80 | defs["m0_offset"], 81 | np.linspace(-15, 15, 301), 82 | ) # offset vector [ppm] 83 | 84 | defs["num_meas"] = defs["offsets_ppm"].size # number of repetition 85 | defs["tsat"] = ( 86 | defs["n_pulses"] * (defs["tp"] + defs["td"]) - defs["td"] 87 | ) # saturation time [s] 88 | defs["seq_id_string"] = seqid # unique seq id 89 | 90 | seq_filename = defs["seq_id_string"] + ".seq" 91 | 92 | # scanner limits 93 | sys = pp.Opts( 94 | max_grad=80, 95 | grad_unit="mT/m", 96 | max_slew=200, 97 | slew_unit="T/m/s", 98 | rf_ringdown_time=0, 99 | rf_dead_time=0, 100 | rf_raster_time=250e-6, # rf raster time = 250 µs for PyPulseq v1.4 101 | gamma=GAMMA_HZ * 1e6, 102 | ) 103 | 104 | # =========== 105 | # PREPARATION 106 | # =========== 107 | 108 | # spoiler 109 | spoil_amp = 0.8 * sys.max_grad # Hz/m 110 | rise_time = 1.0e-3 # spoiler rise time in seconds 111 | flat_time = 4.5e-3 # spoiler flat time in seconds 112 | 113 | gx_spoil, gy_spoil, gz_spoil = [ 114 | pp.make_trapezoid( 115 | channel=c, 116 | system=sys, 117 | amplitude=spoil_amp, 118 | flat_time=flat_time, 119 | rise_time=rise_time, 120 | ) 121 | for c in ["x", "y", "z"] 122 | ] 123 | 124 | # RF pulses 125 | sat_pulse = make_pulse_from_txt(fpath, sys) 126 | 127 | # calculate b1rms 128 | defs["b1rms"] = calc_power_equivalent( 129 | rf_pulse=sat_pulse, tp=defs["tp"], td=defs["td"], gamma_hz=GAMMA_HZ 130 | ) 131 | 132 | # pseudo ADC event 133 | pseudo_adc = pp.make_adc(num_samples=1, duration=1e-3) 134 | 135 | # delays 136 | td_delay = pp.make_delay(defs["td"]) 137 | trec_delay = pp.make_delay(defs["trec"]) 138 | m0_delay = pp.make_delay(defs["trec_m0"]) 139 | 140 | # Sequence object 141 | seq = pp.Sequence() 142 | 143 | # === 144 | # RUN 145 | # === 146 | 147 | offsets_hz = defs["offsets_ppm"] * defs["freq"] # convert from ppm to Hz 148 | 149 | for m, offset in enumerate(offsets_hz): 150 | # print progress/offset 151 | print( 152 | f"#{m + 1} / {len(offsets_hz)} : offset {offset / defs['freq']:.2f} ppm ({offset:.3f} Hz)" 153 | ) 154 | 155 | # reset accumulated phase 156 | accum_phase = 0 157 | 158 | # add delay 159 | if offset == defs["m0_offset"] * defs["freq"]: 160 | if defs["trec_m0"] > 0: 161 | seq.add_block(m0_delay) 162 | else: 163 | if defs["trec"] > 0: 164 | seq.add_block(trec_delay) 165 | 166 | # set sat_pulse 167 | sat_pulse.freq_offset = offset 168 | for n in range(defs["n_pulses"]): 169 | sat_pulse.phase_offset = accum_phase % (2 * np.pi) 170 | seq.add_block(sat_pulse) 171 | _dur = sat_pulse.shape_dur 172 | accum_phase = (accum_phase + offset * 2 * np.pi * _dur) % (2 * np.pi) 173 | if n < defs["n_pulses"] - 1: 174 | seq.add_block(td_delay) 175 | 176 | # add spoiler gradients 177 | seq.add_block(gx_spoil, gy_spoil, gz_spoil) 178 | 179 | # add pseudo ADC event 180 | seq.add_block(pseudo_adc) 181 | 182 | write_seq( 183 | seq=seq, 184 | seq_defs=defs, 185 | filename=str(folder / seq_filename), 186 | author="https://github.com/pulseq-cest/BMsim_challenge", 187 | use_matlab_names=True, 188 | ) 189 | -------------------------------------------------------------------------------- /case_5/rf_pulse.csv: -------------------------------------------------------------------------------- 1 | 0.000125,0.49835002035445825 2 | 0.000375,1.5100506512732437 3 | 0.000625,2.5419648068662166 4 | 0.000875,3.594353937897367 5 | 0.001125,4.667484883892529 6 | 0.001375,5.761627953830904 7 | 0.001625,6.877054927853293 8 | 0.001875,8.014036986445126 9 | 0.002125,9.172842573871385 10 | 0.002375,10.353735202940463 11 | 0.002625,11.556971208449738 12 | 0.002875,12.78279745691981 13 | 0.003125,14.031449020452829 14 | 0.003375,15.30314682275491 15 | 0.003625,16.598095265539516 16 | 0.003875,17.91647984368098 17 | 0.004125,19.2584647576096 18 | 0.004375,20.624190531536755 19 | 0.004625,22.013771646164116 20 | 0.004875,23.427294194570788 21 | 0.005125,24.864813569979994 22 | 0.005375,26.326352194087452 23 | 0.005625,27.811897294583833 24 | 0.005875,29.32139874042426 25 | 0.006125,30.854766943289693 26 | 0.006375,32.411870833547766 27 | 0.006625,33.9925359188538 28 | 0.006875,35.59654243333865 29 | 0.007125,37.22362358510763 30 | 0.007375,38.873463909524126 31 | 0.007625,40.545697735476814 32 | 0.007875,42.239907771525395 33 | 0.008125,43.95562381849493 34 | 0.008375,45.692321614735896 35 | 0.008625,47.44942181989536 36 | 0.008875,49.22628914264742 37 | 0.009125,51.02223161741662 38 | 0.009375,52.83650003469164 39 | 0.009625,54.66828752907435 40 | 0.009875,56.51672932873899 41 | 0.010125,58.38090266949243 42 | 0.010375,60.259826876127825 43 | 0.010625,62.15246361325442 44 | 0.010875,64.05771730726623 45 | 0.011125,65.97443574058312 46 | 0.011375,67.90141081876283 47 | 0.011625,69.83737951054157 48 | 0.011875,71.78102496031647 49 | 0.012125,73.7309777720379 50 | 0.012375,75.68581746293373 51 | 0.012625,77.64407408494455 52 | 0.012875,79.6042300112084 53 | 0.013125,81.56472188440003 54 | 0.013375,83.523942723202 55 | 0.013625,85.48024418266745 56 | 0.013875,87.43193896372746 57 | 0.014125,89.37730336659999 58 | 0.014375,91.31457998237875 59 | 0.014625,93.24198051661345 60 | 0.014875,95.15768873824715 61 | 0.015125,97.05986354684609 62 | 0.015375,98.94664215065038 63 | 0.015625,100.81614334758599 64 | 0.015875,102.66647090101536 65 | 0.016125,104.49571700166406 66 | 0.016375,106.30196580684691 67 | 0.016625,108.0832970478292 68 | 0.016875,109.83778969589886 69 | 0.017125,111.56352567749295 70 | 0.017375,113.25859362852059 71 | 0.017625,114.92109267785054 72 | 0.017875,116.54913624979169 73 | 0.018125,118.14085587528184 74 | 0.018375,119.69440500142362 75 | 0.018625,121.20796278895664 76 | 0.018875,122.67973788724312 77 | 0.019125,124.1079721763586 78 | 0.019375,125.49094446593094 79 | 0.019625,126.8269741404527 80 | 0.019875,128.1144247409048 81 | 0.020125,129.35170747267628 82 | 0.020375,130.5372846299413 83 | 0.020625,131.66967292686212 84 | 0.020875,132.74744672622685 85 | 0.021125,133.76924115639451 86 | 0.021375,134.73375510772038 87 | 0.021625,135.639754099956 88 | 0.021875,136.48607301246966 89 | 0.022125,137.2716186695104 90 | 0.022375,137.9953722731394 91 | 0.022625,138.65639167687598 92 | 0.022875,139.25381349355442 93 | 0.023125,139.7868550313521 94 | 0.023375,140.25481605243698 95 | 0.023625,140.6570803491871 96 | 0.023875,140.9931171334518 97 | 0.024125,141.26248223486147 98 | 0.024375,141.46481910473773 99 | 0.024625,141.599859622714 100 | 0.024875,141.66742470374288 101 | 0.025125,141.66742470374288 102 | 0.025375,141.599859622714 103 | 0.025625,141.46481910473773 104 | 0.025875,141.26248223486147 105 | 0.026125,140.9931171334518 106 | 0.026375,140.6570803491871 107 | 0.026625,140.25481605243698 108 | 0.026875,139.7868550313521 109 | 0.027125,139.25381349355442 110 | 0.027375,138.656391676876 111 | 0.027625,137.99537227313942 112 | 0.027875,137.27161866951042 113 | 0.028125,136.48607301246966 114 | 0.028375,135.639754099956 115 | 0.028625,134.73375510772038 116 | 0.028875,133.76924115639451 117 | 0.029125,132.74744672622685 118 | 0.029375,131.66967292686212 119 | 0.029625,130.5372846299413 120 | 0.029875,129.35170747267628 121 | 0.030125,128.1144247409048 122 | 0.030375,126.82697414045273 123 | 0.030625,125.49094446593098 124 | 0.030875,124.10797217635863 125 | 0.031125,122.67973788724315 126 | 0.031375,121.20796278895666 127 | 0.031625,119.69440500142363 128 | 0.031875,118.1408558752819 129 | 0.032125,116.54913624979169 130 | 0.032375,114.92109267785054 131 | 0.032625,113.25859362852059 132 | 0.032875,111.56352567749295 133 | 0.033125,109.83778969589886 134 | 0.033375,108.0832970478292 135 | 0.033625,106.30196580684691 136 | 0.033875,104.49571700166406 137 | 0.034125,102.66647090101536 138 | 0.034375,100.81614334758599 139 | 0.034625,98.94664215065038 140 | 0.034875,97.05986354684609 141 | 0.035125,95.15768873824715 142 | 0.035375,93.24198051661345 143 | 0.035625,91.31457998237875 144 | 0.035875,89.37730336659999 145 | 0.036125,87.4319389637275 146 | 0.036375,85.48024418266752 147 | 0.036625,83.52394272320203 148 | 0.036875,81.56472188440007 149 | 0.037125,79.60423001120844 150 | 0.037375,77.64407408494458 151 | 0.037625,75.68581746293376 152 | 0.037875,73.73097777203792 153 | 0.038125,71.78102496031649 154 | 0.038375,69.83737951054157 155 | 0.038625,67.90141081876284 156 | 0.038875,65.97443574058313 157 | 0.039125,64.05771730726627 158 | 0.039375,62.152463613254454 159 | 0.039625,60.259826876127846 160 | 0.039875,58.380902669492464 161 | 0.040125,56.51672932873903 162 | 0.040375,54.66828752907437 163 | 0.040625,52.83650003469164 164 | 0.040875,51.02223161741662 165 | 0.041125,49.22628914264742 166 | 0.041375,47.44942181989536 167 | 0.041625,45.692321614735896 168 | 0.041875,43.95562381849493 169 | 0.042125,42.239907771525395 170 | 0.042375,40.545697735476814 171 | 0.042625,38.873463909524126 172 | 0.042875,37.22362358510763 173 | 0.043125,35.59654243333865 174 | 0.043375,33.9925359188538 175 | 0.043625,32.411870833547766 176 | 0.043875,30.854766943289693 177 | 0.044125,29.32139874042429 178 | 0.044375,27.811897294583876 179 | 0.044625,26.326352194087473 180 | 0.044875,24.86481356998002 181 | 0.045125,23.427294194570806 182 | 0.045375,22.01377164616413 183 | 0.045625,20.624190531536755 184 | 0.045875,19.25846475760962 185 | 0.046125,17.91647984368098 186 | 0.046375,16.59809526553953 187 | 0.046625,15.30314682275491 188 | 0.046875,14.031449020452849 189 | 0.047125,12.782797456919829 190 | 0.047375,11.556971208449758 191 | 0.047625,10.353735202940479 192 | 0.047875,9.172842573871385 193 | 0.048125,8.014036986445126 194 | 0.048375,6.877054927853293 195 | 0.048625,5.761627953830904 196 | 0.048875,4.667484883892529 197 | 0.049125,3.594353937897367 198 | 0.049375,2.5419648068662166 199 | 0.049625,1.5100506512732437 200 | 0.049875,0.49835002035445825 -------------------------------------------------------------------------------- /case_5/rf_pulse.txt: -------------------------------------------------------------------------------- 1 | 0.000125 0.49835002035445825 2 | 0.000375 1.5100506512732437 3 | 0.000625 2.5419648068662166 4 | 0.000875 3.594353937897367 5 | 0.001125 4.667484883892529 6 | 0.001375 5.761627953830904 7 | 0.001625 6.877054927853293 8 | 0.001875 8.014036986445126 9 | 0.002125 9.172842573871385 10 | 0.002375 10.353735202940463 11 | 0.002625 11.556971208449738 12 | 0.002875 12.78279745691981 13 | 0.003125 14.031449020452829 14 | 0.003375 15.30314682275491 15 | 0.003625 16.598095265539516 16 | 0.003875 17.91647984368098 17 | 0.004125 19.2584647576096 18 | 0.004375 20.624190531536755 19 | 0.004625 22.013771646164116 20 | 0.004875 23.427294194570788 21 | 0.005125 24.864813569979994 22 | 0.005375 26.326352194087452 23 | 0.005625 27.811897294583833 24 | 0.005875 29.32139874042426 25 | 0.006125 30.854766943289693 26 | 0.006375 32.411870833547766 27 | 0.006625 33.9925359188538 28 | 0.006875 35.59654243333865 29 | 0.007125 37.22362358510763 30 | 0.007375 38.873463909524126 31 | 0.007625 40.545697735476814 32 | 0.007875 42.239907771525395 33 | 0.008125 43.95562381849493 34 | 0.008375 45.692321614735896 35 | 0.008625 47.44942181989536 36 | 0.008875 49.22628914264742 37 | 0.009125 51.02223161741662 38 | 0.009375 52.83650003469164 39 | 0.009625 54.66828752907435 40 | 0.009875 56.51672932873899 41 | 0.010125 58.38090266949243 42 | 0.010375 60.259826876127825 43 | 0.010625 62.15246361325442 44 | 0.010875 64.05771730726623 45 | 0.011125 65.97443574058312 46 | 0.011375 67.90141081876283 47 | 0.011625 69.83737951054157 48 | 0.011875 71.78102496031647 49 | 0.012125 73.7309777720379 50 | 0.012375 75.68581746293373 51 | 0.012625 77.64407408494455 52 | 0.012875 79.6042300112084 53 | 0.013125 81.56472188440003 54 | 0.013375 83.523942723202 55 | 0.013625 85.48024418266745 56 | 0.013875 87.43193896372746 57 | 0.014125 89.37730336659999 58 | 0.014375 91.31457998237875 59 | 0.014625 93.24198051661345 60 | 0.014875 95.15768873824715 61 | 0.015125 97.05986354684609 62 | 0.015375 98.94664215065038 63 | 0.015625 100.81614334758599 64 | 0.015875 102.66647090101536 65 | 0.016125 104.49571700166406 66 | 0.016375 106.30196580684691 67 | 0.016625 108.0832970478292 68 | 0.016875 109.83778969589886 69 | 0.017125 111.56352567749295 70 | 0.017375 113.25859362852059 71 | 0.017625 114.92109267785054 72 | 0.017875 116.54913624979169 73 | 0.018125 118.14085587528184 74 | 0.018375 119.69440500142362 75 | 0.018625 121.20796278895664 76 | 0.018875 122.67973788724312 77 | 0.019125 124.1079721763586 78 | 0.019375 125.49094446593094 79 | 0.019625 126.8269741404527 80 | 0.019875 128.1144247409048 81 | 0.020125 129.35170747267628 82 | 0.020375 130.5372846299413 83 | 0.020625 131.66967292686212 84 | 0.020875 132.74744672622685 85 | 0.021125 133.76924115639451 86 | 0.021375 134.73375510772038 87 | 0.021625 135.639754099956 88 | 0.021875 136.48607301246966 89 | 0.022125 137.2716186695104 90 | 0.022375 137.9953722731394 91 | 0.022625 138.65639167687598 92 | 0.022875 139.25381349355442 93 | 0.023125 139.7868550313521 94 | 0.023375 140.25481605243698 95 | 0.023625 140.6570803491871 96 | 0.023875 140.9931171334518 97 | 0.024125 141.26248223486147 98 | 0.024375 141.46481910473773 99 | 0.024625 141.599859622714 100 | 0.024875 141.66742470374288 101 | 0.025125 141.66742470374288 102 | 0.025375 141.599859622714 103 | 0.025625 141.46481910473773 104 | 0.025875 141.26248223486147 105 | 0.026125 140.9931171334518 106 | 0.026375 140.6570803491871 107 | 0.026625 140.25481605243698 108 | 0.026875 139.7868550313521 109 | 0.027125 139.25381349355442 110 | 0.027375 138.656391676876 111 | 0.027625 137.99537227313942 112 | 0.027875 137.27161866951042 113 | 0.028125 136.48607301246966 114 | 0.028375 135.639754099956 115 | 0.028625 134.73375510772038 116 | 0.028875 133.76924115639451 117 | 0.029125 132.74744672622685 118 | 0.029375 131.66967292686212 119 | 0.029625 130.5372846299413 120 | 0.029875 129.35170747267628 121 | 0.030125 128.1144247409048 122 | 0.030375 126.82697414045273 123 | 0.030625 125.49094446593098 124 | 0.030875 124.10797217635863 125 | 0.031125 122.67973788724315 126 | 0.031375 121.20796278895666 127 | 0.031625 119.69440500142363 128 | 0.031875 118.1408558752819 129 | 0.032125 116.54913624979169 130 | 0.032375 114.92109267785054 131 | 0.032625 113.25859362852059 132 | 0.032875 111.56352567749295 133 | 0.033125 109.83778969589886 134 | 0.033375 108.0832970478292 135 | 0.033625 106.30196580684691 136 | 0.033875 104.49571700166406 137 | 0.034125 102.66647090101536 138 | 0.034375 100.81614334758599 139 | 0.034625 98.94664215065038 140 | 0.034875 97.05986354684609 141 | 0.035125 95.15768873824715 142 | 0.035375 93.24198051661345 143 | 0.035625 91.31457998237875 144 | 0.035875 89.37730336659999 145 | 0.036125 87.4319389637275 146 | 0.036375 85.48024418266752 147 | 0.036625 83.52394272320203 148 | 0.036875 81.56472188440007 149 | 0.037125 79.60423001120844 150 | 0.037375 77.64407408494458 151 | 0.037625 75.68581746293376 152 | 0.037875 73.73097777203792 153 | 0.038125 71.78102496031649 154 | 0.038375 69.83737951054157 155 | 0.038625 67.90141081876284 156 | 0.038875 65.97443574058313 157 | 0.039125 64.05771730726627 158 | 0.039375 62.152463613254454 159 | 0.039625 60.259826876127846 160 | 0.039875 58.380902669492464 161 | 0.040125 56.51672932873903 162 | 0.040375 54.66828752907437 163 | 0.040625 52.83650003469164 164 | 0.040875 51.02223161741662 165 | 0.041125 49.22628914264742 166 | 0.041375 47.44942181989536 167 | 0.041625 45.692321614735896 168 | 0.041875 43.95562381849493 169 | 0.042125 42.239907771525395 170 | 0.042375 40.545697735476814 171 | 0.042625 38.873463909524126 172 | 0.042875 37.22362358510763 173 | 0.043125 35.59654243333865 174 | 0.043375 33.9925359188538 175 | 0.043625 32.411870833547766 176 | 0.043875 30.854766943289693 177 | 0.044125 29.32139874042429 178 | 0.044375 27.811897294583876 179 | 0.044625 26.326352194087473 180 | 0.044875 24.86481356998002 181 | 0.045125 23.427294194570806 182 | 0.045375 22.01377164616413 183 | 0.045625 20.624190531536755 184 | 0.045875 19.25846475760962 185 | 0.046125 17.91647984368098 186 | 0.046375 16.59809526553953 187 | 0.046625 15.30314682275491 188 | 0.046875 14.031449020452849 189 | 0.047125 12.782797456919829 190 | 0.047375 11.556971208449758 191 | 0.047625 10.353735202940479 192 | 0.047875 9.172842573871385 193 | 0.048125 8.014036986445126 194 | 0.048375 6.877054927853293 195 | 0.048625 5.761627953830904 196 | 0.048875 4.667484883892529 197 | 0.049125 3.594353937897367 198 | 0.049375 2.5419648068662166 199 | 0.049625 1.5100506512732437 200 | 0.049875 0.49835002035445825 -------------------------------------------------------------------------------- /case_6/rf_pulse.csv: -------------------------------------------------------------------------------- 1 | 0.000125,0.49835002035445825 2 | 0.000375,1.5100506512732437 3 | 0.000625,2.5419648068662166 4 | 0.000875,3.594353937897367 5 | 0.001125,4.667484883892529 6 | 0.001375,5.761627953830904 7 | 0.001625,6.877054927853293 8 | 0.001875,8.014036986445126 9 | 0.002125,9.172842573871385 10 | 0.002375,10.353735202940463 11 | 0.002625,11.556971208449738 12 | 0.002875,12.78279745691981 13 | 0.003125,14.031449020452829 14 | 0.003375,15.30314682275491 15 | 0.003625,16.598095265539516 16 | 0.003875,17.91647984368098 17 | 0.004125,19.2584647576096 18 | 0.004375,20.624190531536755 19 | 0.004625,22.013771646164116 20 | 0.004875,23.427294194570788 21 | 0.005125,24.864813569979994 22 | 0.005375,26.326352194087452 23 | 0.005625,27.811897294583833 24 | 0.005875,29.32139874042426 25 | 0.006125,30.854766943289693 26 | 0.006375,32.411870833547766 27 | 0.006625,33.9925359188538 28 | 0.006875,35.59654243333865 29 | 0.007125,37.22362358510763 30 | 0.007375,38.873463909524126 31 | 0.007625,40.545697735476814 32 | 0.007875,42.239907771525395 33 | 0.008125,43.95562381849493 34 | 0.008375,45.692321614735896 35 | 0.008625,47.44942181989536 36 | 0.008875,49.22628914264742 37 | 0.009125,51.02223161741662 38 | 0.009375,52.83650003469164 39 | 0.009625,54.66828752907435 40 | 0.009875,56.51672932873899 41 | 0.010125,58.38090266949243 42 | 0.010375,60.259826876127825 43 | 0.010625,62.15246361325442 44 | 0.010875,64.05771730726623 45 | 0.011125,65.97443574058312 46 | 0.011375,67.90141081876283 47 | 0.011625,69.83737951054157 48 | 0.011875,71.78102496031647 49 | 0.012125,73.7309777720379 50 | 0.012375,75.68581746293373 51 | 0.012625,77.64407408494455 52 | 0.012875,79.6042300112084 53 | 0.013125,81.56472188440003 54 | 0.013375,83.523942723202 55 | 0.013625,85.48024418266745 56 | 0.013875,87.43193896372746 57 | 0.014125,89.37730336659999 58 | 0.014375,91.31457998237875 59 | 0.014625,93.24198051661345 60 | 0.014875,95.15768873824715 61 | 0.015125,97.05986354684609 62 | 0.015375,98.94664215065038 63 | 0.015625,100.81614334758599 64 | 0.015875,102.66647090101536 65 | 0.016125,104.49571700166406 66 | 0.016375,106.30196580684691 67 | 0.016625,108.0832970478292 68 | 0.016875,109.83778969589886 69 | 0.017125,111.56352567749295 70 | 0.017375,113.25859362852059 71 | 0.017625,114.92109267785054 72 | 0.017875,116.54913624979169 73 | 0.018125,118.14085587528184 74 | 0.018375,119.69440500142362 75 | 0.018625,121.20796278895664 76 | 0.018875,122.67973788724312 77 | 0.019125,124.1079721763586 78 | 0.019375,125.49094446593094 79 | 0.019625,126.8269741404527 80 | 0.019875,128.1144247409048 81 | 0.020125,129.35170747267628 82 | 0.020375,130.5372846299413 83 | 0.020625,131.66967292686212 84 | 0.020875,132.74744672622685 85 | 0.021125,133.76924115639451 86 | 0.021375,134.73375510772038 87 | 0.021625,135.639754099956 88 | 0.021875,136.48607301246966 89 | 0.022125,137.2716186695104 90 | 0.022375,137.9953722731394 91 | 0.022625,138.65639167687598 92 | 0.022875,139.25381349355442 93 | 0.023125,139.7868550313521 94 | 0.023375,140.25481605243698 95 | 0.023625,140.6570803491871 96 | 0.023875,140.9931171334518 97 | 0.024125,141.26248223486147 98 | 0.024375,141.46481910473773 99 | 0.024625,141.599859622714 100 | 0.024875,141.66742470374288 101 | 0.025125,141.66742470374288 102 | 0.025375,141.599859622714 103 | 0.025625,141.46481910473773 104 | 0.025875,141.26248223486147 105 | 0.026125,140.9931171334518 106 | 0.026375,140.6570803491871 107 | 0.026625,140.25481605243698 108 | 0.026875,139.7868550313521 109 | 0.027125,139.25381349355442 110 | 0.027375,138.656391676876 111 | 0.027625,137.99537227313942 112 | 0.027875,137.27161866951042 113 | 0.028125,136.48607301246966 114 | 0.028375,135.639754099956 115 | 0.028625,134.73375510772038 116 | 0.028875,133.76924115639451 117 | 0.029125,132.74744672622685 118 | 0.029375,131.66967292686212 119 | 0.029625,130.5372846299413 120 | 0.029875,129.35170747267628 121 | 0.030125,128.1144247409048 122 | 0.030375,126.82697414045273 123 | 0.030625,125.49094446593098 124 | 0.030875,124.10797217635863 125 | 0.031125,122.67973788724315 126 | 0.031375,121.20796278895666 127 | 0.031625,119.69440500142363 128 | 0.031875,118.1408558752819 129 | 0.032125,116.54913624979169 130 | 0.032375,114.92109267785054 131 | 0.032625,113.25859362852059 132 | 0.032875,111.56352567749295 133 | 0.033125,109.83778969589886 134 | 0.033375,108.0832970478292 135 | 0.033625,106.30196580684691 136 | 0.033875,104.49571700166406 137 | 0.034125,102.66647090101536 138 | 0.034375,100.81614334758599 139 | 0.034625,98.94664215065038 140 | 0.034875,97.05986354684609 141 | 0.035125,95.15768873824715 142 | 0.035375,93.24198051661345 143 | 0.035625,91.31457998237875 144 | 0.035875,89.37730336659999 145 | 0.036125,87.4319389637275 146 | 0.036375,85.48024418266752 147 | 0.036625,83.52394272320203 148 | 0.036875,81.56472188440007 149 | 0.037125,79.60423001120844 150 | 0.037375,77.64407408494458 151 | 0.037625,75.68581746293376 152 | 0.037875,73.73097777203792 153 | 0.038125,71.78102496031649 154 | 0.038375,69.83737951054157 155 | 0.038625,67.90141081876284 156 | 0.038875,65.97443574058313 157 | 0.039125,64.05771730726627 158 | 0.039375,62.152463613254454 159 | 0.039625,60.259826876127846 160 | 0.039875,58.380902669492464 161 | 0.040125,56.51672932873903 162 | 0.040375,54.66828752907437 163 | 0.040625,52.83650003469164 164 | 0.040875,51.02223161741662 165 | 0.041125,49.22628914264742 166 | 0.041375,47.44942181989536 167 | 0.041625,45.692321614735896 168 | 0.041875,43.95562381849493 169 | 0.042125,42.239907771525395 170 | 0.042375,40.545697735476814 171 | 0.042625,38.873463909524126 172 | 0.042875,37.22362358510763 173 | 0.043125,35.59654243333865 174 | 0.043375,33.9925359188538 175 | 0.043625,32.411870833547766 176 | 0.043875,30.854766943289693 177 | 0.044125,29.32139874042429 178 | 0.044375,27.811897294583876 179 | 0.044625,26.326352194087473 180 | 0.044875,24.86481356998002 181 | 0.045125,23.427294194570806 182 | 0.045375,22.01377164616413 183 | 0.045625,20.624190531536755 184 | 0.045875,19.25846475760962 185 | 0.046125,17.91647984368098 186 | 0.046375,16.59809526553953 187 | 0.046625,15.30314682275491 188 | 0.046875,14.031449020452849 189 | 0.047125,12.782797456919829 190 | 0.047375,11.556971208449758 191 | 0.047625,10.353735202940479 192 | 0.047875,9.172842573871385 193 | 0.048125,8.014036986445126 194 | 0.048375,6.877054927853293 195 | 0.048625,5.761627953830904 196 | 0.048875,4.667484883892529 197 | 0.049125,3.594353937897367 198 | 0.049375,2.5419648068662166 199 | 0.049625,1.5100506512732437 200 | 0.049875,0.49835002035445825 -------------------------------------------------------------------------------- /case_6/rf_pulse.txt: -------------------------------------------------------------------------------- 1 | 0.000125 0.49835002035445825 2 | 0.000375 1.5100506512732437 3 | 0.000625 2.5419648068662166 4 | 0.000875 3.594353937897367 5 | 0.001125 4.667484883892529 6 | 0.001375 5.761627953830904 7 | 0.001625 6.877054927853293 8 | 0.001875 8.014036986445126 9 | 0.002125 9.172842573871385 10 | 0.002375 10.353735202940463 11 | 0.002625 11.556971208449738 12 | 0.002875 12.78279745691981 13 | 0.003125 14.031449020452829 14 | 0.003375 15.30314682275491 15 | 0.003625 16.598095265539516 16 | 0.003875 17.91647984368098 17 | 0.004125 19.2584647576096 18 | 0.004375 20.624190531536755 19 | 0.004625 22.013771646164116 20 | 0.004875 23.427294194570788 21 | 0.005125 24.864813569979994 22 | 0.005375 26.326352194087452 23 | 0.005625 27.811897294583833 24 | 0.005875 29.32139874042426 25 | 0.006125 30.854766943289693 26 | 0.006375 32.411870833547766 27 | 0.006625 33.9925359188538 28 | 0.006875 35.59654243333865 29 | 0.007125 37.22362358510763 30 | 0.007375 38.873463909524126 31 | 0.007625 40.545697735476814 32 | 0.007875 42.239907771525395 33 | 0.008125 43.95562381849493 34 | 0.008375 45.692321614735896 35 | 0.008625 47.44942181989536 36 | 0.008875 49.22628914264742 37 | 0.009125 51.02223161741662 38 | 0.009375 52.83650003469164 39 | 0.009625 54.66828752907435 40 | 0.009875 56.51672932873899 41 | 0.010125 58.38090266949243 42 | 0.010375 60.259826876127825 43 | 0.010625 62.15246361325442 44 | 0.010875 64.05771730726623 45 | 0.011125 65.97443574058312 46 | 0.011375 67.90141081876283 47 | 0.011625 69.83737951054157 48 | 0.011875 71.78102496031647 49 | 0.012125 73.7309777720379 50 | 0.012375 75.68581746293373 51 | 0.012625 77.64407408494455 52 | 0.012875 79.6042300112084 53 | 0.013125 81.56472188440003 54 | 0.013375 83.523942723202 55 | 0.013625 85.48024418266745 56 | 0.013875 87.43193896372746 57 | 0.014125 89.37730336659999 58 | 0.014375 91.31457998237875 59 | 0.014625 93.24198051661345 60 | 0.014875 95.15768873824715 61 | 0.015125 97.05986354684609 62 | 0.015375 98.94664215065038 63 | 0.015625 100.81614334758599 64 | 0.015875 102.66647090101536 65 | 0.016125 104.49571700166406 66 | 0.016375 106.30196580684691 67 | 0.016625 108.0832970478292 68 | 0.016875 109.83778969589886 69 | 0.017125 111.56352567749295 70 | 0.017375 113.25859362852059 71 | 0.017625 114.92109267785054 72 | 0.017875 116.54913624979169 73 | 0.018125 118.14085587528184 74 | 0.018375 119.69440500142362 75 | 0.018625 121.20796278895664 76 | 0.018875 122.67973788724312 77 | 0.019125 124.1079721763586 78 | 0.019375 125.49094446593094 79 | 0.019625 126.8269741404527 80 | 0.019875 128.1144247409048 81 | 0.020125 129.35170747267628 82 | 0.020375 130.5372846299413 83 | 0.020625 131.66967292686212 84 | 0.020875 132.74744672622685 85 | 0.021125 133.76924115639451 86 | 0.021375 134.73375510772038 87 | 0.021625 135.639754099956 88 | 0.021875 136.48607301246966 89 | 0.022125 137.2716186695104 90 | 0.022375 137.9953722731394 91 | 0.022625 138.65639167687598 92 | 0.022875 139.25381349355442 93 | 0.023125 139.7868550313521 94 | 0.023375 140.25481605243698 95 | 0.023625 140.6570803491871 96 | 0.023875 140.9931171334518 97 | 0.024125 141.26248223486147 98 | 0.024375 141.46481910473773 99 | 0.024625 141.599859622714 100 | 0.024875 141.66742470374288 101 | 0.025125 141.66742470374288 102 | 0.025375 141.599859622714 103 | 0.025625 141.46481910473773 104 | 0.025875 141.26248223486147 105 | 0.026125 140.9931171334518 106 | 0.026375 140.6570803491871 107 | 0.026625 140.25481605243698 108 | 0.026875 139.7868550313521 109 | 0.027125 139.25381349355442 110 | 0.027375 138.656391676876 111 | 0.027625 137.99537227313942 112 | 0.027875 137.27161866951042 113 | 0.028125 136.48607301246966 114 | 0.028375 135.639754099956 115 | 0.028625 134.73375510772038 116 | 0.028875 133.76924115639451 117 | 0.029125 132.74744672622685 118 | 0.029375 131.66967292686212 119 | 0.029625 130.5372846299413 120 | 0.029875 129.35170747267628 121 | 0.030125 128.1144247409048 122 | 0.030375 126.82697414045273 123 | 0.030625 125.49094446593098 124 | 0.030875 124.10797217635863 125 | 0.031125 122.67973788724315 126 | 0.031375 121.20796278895666 127 | 0.031625 119.69440500142363 128 | 0.031875 118.1408558752819 129 | 0.032125 116.54913624979169 130 | 0.032375 114.92109267785054 131 | 0.032625 113.25859362852059 132 | 0.032875 111.56352567749295 133 | 0.033125 109.83778969589886 134 | 0.033375 108.0832970478292 135 | 0.033625 106.30196580684691 136 | 0.033875 104.49571700166406 137 | 0.034125 102.66647090101536 138 | 0.034375 100.81614334758599 139 | 0.034625 98.94664215065038 140 | 0.034875 97.05986354684609 141 | 0.035125 95.15768873824715 142 | 0.035375 93.24198051661345 143 | 0.035625 91.31457998237875 144 | 0.035875 89.37730336659999 145 | 0.036125 87.4319389637275 146 | 0.036375 85.48024418266752 147 | 0.036625 83.52394272320203 148 | 0.036875 81.56472188440007 149 | 0.037125 79.60423001120844 150 | 0.037375 77.64407408494458 151 | 0.037625 75.68581746293376 152 | 0.037875 73.73097777203792 153 | 0.038125 71.78102496031649 154 | 0.038375 69.83737951054157 155 | 0.038625 67.90141081876284 156 | 0.038875 65.97443574058313 157 | 0.039125 64.05771730726627 158 | 0.039375 62.152463613254454 159 | 0.039625 60.259826876127846 160 | 0.039875 58.380902669492464 161 | 0.040125 56.51672932873903 162 | 0.040375 54.66828752907437 163 | 0.040625 52.83650003469164 164 | 0.040875 51.02223161741662 165 | 0.041125 49.22628914264742 166 | 0.041375 47.44942181989536 167 | 0.041625 45.692321614735896 168 | 0.041875 43.95562381849493 169 | 0.042125 42.239907771525395 170 | 0.042375 40.545697735476814 171 | 0.042625 38.873463909524126 172 | 0.042875 37.22362358510763 173 | 0.043125 35.59654243333865 174 | 0.043375 33.9925359188538 175 | 0.043625 32.411870833547766 176 | 0.043875 30.854766943289693 177 | 0.044125 29.32139874042429 178 | 0.044375 27.811897294583876 179 | 0.044625 26.326352194087473 180 | 0.044875 24.86481356998002 181 | 0.045125 23.427294194570806 182 | 0.045375 22.01377164616413 183 | 0.045625 20.624190531536755 184 | 0.045875 19.25846475760962 185 | 0.046125 17.91647984368098 186 | 0.046375 16.59809526553953 187 | 0.046625 15.30314682275491 188 | 0.046875 14.031449020452849 189 | 0.047125 12.782797456919829 190 | 0.047375 11.556971208449758 191 | 0.047625 10.353735202940479 192 | 0.047875 9.172842573871385 193 | 0.048125 8.014036986445126 194 | 0.048375 6.877054927853293 195 | 0.048625 5.761627953830904 196 | 0.048875 4.667484883892529 197 | 0.049125 3.594353937897367 198 | 0.049375 2.5419648068662166 199 | 0.049625 1.5100506512732437 200 | 0.049875 0.49835002035445825 -------------------------------------------------------------------------------- /case_7/rf_pulse.csv: -------------------------------------------------------------------------------- 1 | 0.000125,0.49835002035445825 2 | 0.000375,1.5100506512732437 3 | 0.000625,2.5419648068662166 4 | 0.000875,3.594353937897367 5 | 0.001125,4.667484883892529 6 | 0.001375,5.761627953830904 7 | 0.001625,6.877054927853293 8 | 0.001875,8.014036986445126 9 | 0.002125,9.172842573871385 10 | 0.002375,10.353735202940463 11 | 0.002625,11.556971208449738 12 | 0.002875,12.78279745691981 13 | 0.003125,14.031449020452829 14 | 0.003375,15.30314682275491 15 | 0.003625,16.598095265539516 16 | 0.003875,17.91647984368098 17 | 0.004125,19.2584647576096 18 | 0.004375,20.624190531536755 19 | 0.004625,22.013771646164116 20 | 0.004875,23.427294194570788 21 | 0.005125,24.864813569979994 22 | 0.005375,26.326352194087452 23 | 0.005625,27.811897294583833 24 | 0.005875,29.32139874042426 25 | 0.006125,30.854766943289693 26 | 0.006375,32.411870833547766 27 | 0.006625,33.9925359188538 28 | 0.006875,35.59654243333865 29 | 0.007125,37.22362358510763 30 | 0.007375,38.873463909524126 31 | 0.007625,40.545697735476814 32 | 0.007875,42.239907771525395 33 | 0.008125,43.95562381849493 34 | 0.008375,45.692321614735896 35 | 0.008625,47.44942181989536 36 | 0.008875,49.22628914264742 37 | 0.009125,51.02223161741662 38 | 0.009375,52.83650003469164 39 | 0.009625,54.66828752907435 40 | 0.009875,56.51672932873899 41 | 0.010125,58.38090266949243 42 | 0.010375,60.259826876127825 43 | 0.010625,62.15246361325442 44 | 0.010875,64.05771730726623 45 | 0.011125,65.97443574058312 46 | 0.011375,67.90141081876283 47 | 0.011625,69.83737951054157 48 | 0.011875,71.78102496031647 49 | 0.012125,73.7309777720379 50 | 0.012375,75.68581746293373 51 | 0.012625,77.64407408494455 52 | 0.012875,79.6042300112084 53 | 0.013125,81.56472188440003 54 | 0.013375,83.523942723202 55 | 0.013625,85.48024418266745 56 | 0.013875,87.43193896372746 57 | 0.014125,89.37730336659999 58 | 0.014375,91.31457998237875 59 | 0.014625,93.24198051661345 60 | 0.014875,95.15768873824715 61 | 0.015125,97.05986354684609 62 | 0.015375,98.94664215065038 63 | 0.015625,100.81614334758599 64 | 0.015875,102.66647090101536 65 | 0.016125,104.49571700166406 66 | 0.016375,106.30196580684691 67 | 0.016625,108.0832970478292 68 | 0.016875,109.83778969589886 69 | 0.017125,111.56352567749295 70 | 0.017375,113.25859362852059 71 | 0.017625,114.92109267785054 72 | 0.017875,116.54913624979169 73 | 0.018125,118.14085587528184 74 | 0.018375,119.69440500142362 75 | 0.018625,121.20796278895664 76 | 0.018875,122.67973788724312 77 | 0.019125,124.1079721763586 78 | 0.019375,125.49094446593094 79 | 0.019625,126.8269741404527 80 | 0.019875,128.1144247409048 81 | 0.020125,129.35170747267628 82 | 0.020375,130.5372846299413 83 | 0.020625,131.66967292686212 84 | 0.020875,132.74744672622685 85 | 0.021125,133.76924115639451 86 | 0.021375,134.73375510772038 87 | 0.021625,135.639754099956 88 | 0.021875,136.48607301246966 89 | 0.022125,137.2716186695104 90 | 0.022375,137.9953722731394 91 | 0.022625,138.65639167687598 92 | 0.022875,139.25381349355442 93 | 0.023125,139.7868550313521 94 | 0.023375,140.25481605243698 95 | 0.023625,140.6570803491871 96 | 0.023875,140.9931171334518 97 | 0.024125,141.26248223486147 98 | 0.024375,141.46481910473773 99 | 0.024625,141.599859622714 100 | 0.024875,141.66742470374288 101 | 0.025125,141.66742470374288 102 | 0.025375,141.599859622714 103 | 0.025625,141.46481910473773 104 | 0.025875,141.26248223486147 105 | 0.026125,140.9931171334518 106 | 0.026375,140.6570803491871 107 | 0.026625,140.25481605243698 108 | 0.026875,139.7868550313521 109 | 0.027125,139.25381349355442 110 | 0.027375,138.656391676876 111 | 0.027625,137.99537227313942 112 | 0.027875,137.27161866951042 113 | 0.028125,136.48607301246966 114 | 0.028375,135.639754099956 115 | 0.028625,134.73375510772038 116 | 0.028875,133.76924115639451 117 | 0.029125,132.74744672622685 118 | 0.029375,131.66967292686212 119 | 0.029625,130.5372846299413 120 | 0.029875,129.35170747267628 121 | 0.030125,128.1144247409048 122 | 0.030375,126.82697414045273 123 | 0.030625,125.49094446593098 124 | 0.030875,124.10797217635863 125 | 0.031125,122.67973788724315 126 | 0.031375,121.20796278895666 127 | 0.031625,119.69440500142363 128 | 0.031875,118.1408558752819 129 | 0.032125,116.54913624979169 130 | 0.032375,114.92109267785054 131 | 0.032625,113.25859362852059 132 | 0.032875,111.56352567749295 133 | 0.033125,109.83778969589886 134 | 0.033375,108.0832970478292 135 | 0.033625,106.30196580684691 136 | 0.033875,104.49571700166406 137 | 0.034125,102.66647090101536 138 | 0.034375,100.81614334758599 139 | 0.034625,98.94664215065038 140 | 0.034875,97.05986354684609 141 | 0.035125,95.15768873824715 142 | 0.035375,93.24198051661345 143 | 0.035625,91.31457998237875 144 | 0.035875,89.37730336659999 145 | 0.036125,87.4319389637275 146 | 0.036375,85.48024418266752 147 | 0.036625,83.52394272320203 148 | 0.036875,81.56472188440007 149 | 0.037125,79.60423001120844 150 | 0.037375,77.64407408494458 151 | 0.037625,75.68581746293376 152 | 0.037875,73.73097777203792 153 | 0.038125,71.78102496031649 154 | 0.038375,69.83737951054157 155 | 0.038625,67.90141081876284 156 | 0.038875,65.97443574058313 157 | 0.039125,64.05771730726627 158 | 0.039375,62.152463613254454 159 | 0.039625,60.259826876127846 160 | 0.039875,58.380902669492464 161 | 0.040125,56.51672932873903 162 | 0.040375,54.66828752907437 163 | 0.040625,52.83650003469164 164 | 0.040875,51.02223161741662 165 | 0.041125,49.22628914264742 166 | 0.041375,47.44942181989536 167 | 0.041625,45.692321614735896 168 | 0.041875,43.95562381849493 169 | 0.042125,42.239907771525395 170 | 0.042375,40.545697735476814 171 | 0.042625,38.873463909524126 172 | 0.042875,37.22362358510763 173 | 0.043125,35.59654243333865 174 | 0.043375,33.9925359188538 175 | 0.043625,32.411870833547766 176 | 0.043875,30.854766943289693 177 | 0.044125,29.32139874042429 178 | 0.044375,27.811897294583876 179 | 0.044625,26.326352194087473 180 | 0.044875,24.86481356998002 181 | 0.045125,23.427294194570806 182 | 0.045375,22.01377164616413 183 | 0.045625,20.624190531536755 184 | 0.045875,19.25846475760962 185 | 0.046125,17.91647984368098 186 | 0.046375,16.59809526553953 187 | 0.046625,15.30314682275491 188 | 0.046875,14.031449020452849 189 | 0.047125,12.782797456919829 190 | 0.047375,11.556971208449758 191 | 0.047625,10.353735202940479 192 | 0.047875,9.172842573871385 193 | 0.048125,8.014036986445126 194 | 0.048375,6.877054927853293 195 | 0.048625,5.761627953830904 196 | 0.048875,4.667484883892529 197 | 0.049125,3.594353937897367 198 | 0.049375,2.5419648068662166 199 | 0.049625,1.5100506512732437 200 | 0.049875,0.49835002035445825 -------------------------------------------------------------------------------- /case_7/rf_pulse.txt: -------------------------------------------------------------------------------- 1 | 0.000125 0.49835002035445825 2 | 0.000375 1.5100506512732437 3 | 0.000625 2.5419648068662166 4 | 0.000875 3.594353937897367 5 | 0.001125 4.667484883892529 6 | 0.001375 5.761627953830904 7 | 0.001625 6.877054927853293 8 | 0.001875 8.014036986445126 9 | 0.002125 9.172842573871385 10 | 0.002375 10.353735202940463 11 | 0.002625 11.556971208449738 12 | 0.002875 12.78279745691981 13 | 0.003125 14.031449020452829 14 | 0.003375 15.30314682275491 15 | 0.003625 16.598095265539516 16 | 0.003875 17.91647984368098 17 | 0.004125 19.2584647576096 18 | 0.004375 20.624190531536755 19 | 0.004625 22.013771646164116 20 | 0.004875 23.427294194570788 21 | 0.005125 24.864813569979994 22 | 0.005375 26.326352194087452 23 | 0.005625 27.811897294583833 24 | 0.005875 29.32139874042426 25 | 0.006125 30.854766943289693 26 | 0.006375 32.411870833547766 27 | 0.006625 33.9925359188538 28 | 0.006875 35.59654243333865 29 | 0.007125 37.22362358510763 30 | 0.007375 38.873463909524126 31 | 0.007625 40.545697735476814 32 | 0.007875 42.239907771525395 33 | 0.008125 43.95562381849493 34 | 0.008375 45.692321614735896 35 | 0.008625 47.44942181989536 36 | 0.008875 49.22628914264742 37 | 0.009125 51.02223161741662 38 | 0.009375 52.83650003469164 39 | 0.009625 54.66828752907435 40 | 0.009875 56.51672932873899 41 | 0.010125 58.38090266949243 42 | 0.010375 60.259826876127825 43 | 0.010625 62.15246361325442 44 | 0.010875 64.05771730726623 45 | 0.011125 65.97443574058312 46 | 0.011375 67.90141081876283 47 | 0.011625 69.83737951054157 48 | 0.011875 71.78102496031647 49 | 0.012125 73.7309777720379 50 | 0.012375 75.68581746293373 51 | 0.012625 77.64407408494455 52 | 0.012875 79.6042300112084 53 | 0.013125 81.56472188440003 54 | 0.013375 83.523942723202 55 | 0.013625 85.48024418266745 56 | 0.013875 87.43193896372746 57 | 0.014125 89.37730336659999 58 | 0.014375 91.31457998237875 59 | 0.014625 93.24198051661345 60 | 0.014875 95.15768873824715 61 | 0.015125 97.05986354684609 62 | 0.015375 98.94664215065038 63 | 0.015625 100.81614334758599 64 | 0.015875 102.66647090101536 65 | 0.016125 104.49571700166406 66 | 0.016375 106.30196580684691 67 | 0.016625 108.0832970478292 68 | 0.016875 109.83778969589886 69 | 0.017125 111.56352567749295 70 | 0.017375 113.25859362852059 71 | 0.017625 114.92109267785054 72 | 0.017875 116.54913624979169 73 | 0.018125 118.14085587528184 74 | 0.018375 119.69440500142362 75 | 0.018625 121.20796278895664 76 | 0.018875 122.67973788724312 77 | 0.019125 124.1079721763586 78 | 0.019375 125.49094446593094 79 | 0.019625 126.8269741404527 80 | 0.019875 128.1144247409048 81 | 0.020125 129.35170747267628 82 | 0.020375 130.5372846299413 83 | 0.020625 131.66967292686212 84 | 0.020875 132.74744672622685 85 | 0.021125 133.76924115639451 86 | 0.021375 134.73375510772038 87 | 0.021625 135.639754099956 88 | 0.021875 136.48607301246966 89 | 0.022125 137.2716186695104 90 | 0.022375 137.9953722731394 91 | 0.022625 138.65639167687598 92 | 0.022875 139.25381349355442 93 | 0.023125 139.7868550313521 94 | 0.023375 140.25481605243698 95 | 0.023625 140.6570803491871 96 | 0.023875 140.9931171334518 97 | 0.024125 141.26248223486147 98 | 0.024375 141.46481910473773 99 | 0.024625 141.599859622714 100 | 0.024875 141.66742470374288 101 | 0.025125 141.66742470374288 102 | 0.025375 141.599859622714 103 | 0.025625 141.46481910473773 104 | 0.025875 141.26248223486147 105 | 0.026125 140.9931171334518 106 | 0.026375 140.6570803491871 107 | 0.026625 140.25481605243698 108 | 0.026875 139.7868550313521 109 | 0.027125 139.25381349355442 110 | 0.027375 138.656391676876 111 | 0.027625 137.99537227313942 112 | 0.027875 137.27161866951042 113 | 0.028125 136.48607301246966 114 | 0.028375 135.639754099956 115 | 0.028625 134.73375510772038 116 | 0.028875 133.76924115639451 117 | 0.029125 132.74744672622685 118 | 0.029375 131.66967292686212 119 | 0.029625 130.5372846299413 120 | 0.029875 129.35170747267628 121 | 0.030125 128.1144247409048 122 | 0.030375 126.82697414045273 123 | 0.030625 125.49094446593098 124 | 0.030875 124.10797217635863 125 | 0.031125 122.67973788724315 126 | 0.031375 121.20796278895666 127 | 0.031625 119.69440500142363 128 | 0.031875 118.1408558752819 129 | 0.032125 116.54913624979169 130 | 0.032375 114.92109267785054 131 | 0.032625 113.25859362852059 132 | 0.032875 111.56352567749295 133 | 0.033125 109.83778969589886 134 | 0.033375 108.0832970478292 135 | 0.033625 106.30196580684691 136 | 0.033875 104.49571700166406 137 | 0.034125 102.66647090101536 138 | 0.034375 100.81614334758599 139 | 0.034625 98.94664215065038 140 | 0.034875 97.05986354684609 141 | 0.035125 95.15768873824715 142 | 0.035375 93.24198051661345 143 | 0.035625 91.31457998237875 144 | 0.035875 89.37730336659999 145 | 0.036125 87.4319389637275 146 | 0.036375 85.48024418266752 147 | 0.036625 83.52394272320203 148 | 0.036875 81.56472188440007 149 | 0.037125 79.60423001120844 150 | 0.037375 77.64407408494458 151 | 0.037625 75.68581746293376 152 | 0.037875 73.73097777203792 153 | 0.038125 71.78102496031649 154 | 0.038375 69.83737951054157 155 | 0.038625 67.90141081876284 156 | 0.038875 65.97443574058313 157 | 0.039125 64.05771730726627 158 | 0.039375 62.152463613254454 159 | 0.039625 60.259826876127846 160 | 0.039875 58.380902669492464 161 | 0.040125 56.51672932873903 162 | 0.040375 54.66828752907437 163 | 0.040625 52.83650003469164 164 | 0.040875 51.02223161741662 165 | 0.041125 49.22628914264742 166 | 0.041375 47.44942181989536 167 | 0.041625 45.692321614735896 168 | 0.041875 43.95562381849493 169 | 0.042125 42.239907771525395 170 | 0.042375 40.545697735476814 171 | 0.042625 38.873463909524126 172 | 0.042875 37.22362358510763 173 | 0.043125 35.59654243333865 174 | 0.043375 33.9925359188538 175 | 0.043625 32.411870833547766 176 | 0.043875 30.854766943289693 177 | 0.044125 29.32139874042429 178 | 0.044375 27.811897294583876 179 | 0.044625 26.326352194087473 180 | 0.044875 24.86481356998002 181 | 0.045125 23.427294194570806 182 | 0.045375 22.01377164616413 183 | 0.045625 20.624190531536755 184 | 0.045875 19.25846475760962 185 | 0.046125 17.91647984368098 186 | 0.046375 16.59809526553953 187 | 0.046625 15.30314682275491 188 | 0.046875 14.031449020452849 189 | 0.047125 12.782797456919829 190 | 0.047375 11.556971208449758 191 | 0.047625 10.353735202940479 192 | 0.047875 9.172842573871385 193 | 0.048125 8.014036986445126 194 | 0.048375 6.877054927853293 195 | 0.048625 5.761627953830904 196 | 0.048875 4.667484883892529 197 | 0.049125 3.594353937897367 198 | 0.049375 2.5419648068662166 199 | 0.049625 1.5100506512732437 200 | 0.049875 0.49835002035445825 -------------------------------------------------------------------------------- /case_5/case_5_create_sequence_pypulseq_v131.py: -------------------------------------------------------------------------------- 1 | # BMSim Challenge: CASE 5 2 | # Script to create the seq-file for the BMSim Challenge CASE 5 3 | # 4 | # https://github.com/pulseq-cest/BMsim_challenge 5 | # 6 | # Tested with pypulseq version 1.3.1post1 and bmctool version 0.6.1 7 | # 8 | # Patrick Schuenke 2023 9 | # patrick.schuenke@ptb.de 10 | 11 | import copy 12 | from pathlib import Path 13 | from types import SimpleNamespace 14 | from scipy.interpolate import interp1d 15 | 16 | import numpy as np 17 | import pypulseq as pp 18 | from bmctool.utils.pulses.calc_power_equivalents import calc_power_equivalent 19 | from bmctool.utils.seq.write import write_seq 20 | 21 | 22 | def make_pulse_from_txt(fpath, system): 23 | """Creates a rf event using the signal from the provided txt-file. 24 | 25 | The txt-file contains the time steps in the first column and the signal 26 | in the second column. The total duration of the pulse is 50 ms and 200 27 | samples are given leading to a dwell time of 250 µs. 28 | 29 | Parameters 30 | ---------- 31 | fpath 32 | Path to the txt-file 33 | system 34 | PyPulseq system object 35 | 36 | Returns 37 | ------- 38 | RF event (SimpleNamespace) 39 | """ 40 | _data = np.loadtxt(fpath) 41 | _t = np.squeeze(_data[:, 0]) 42 | _signal = np.squeeze(_data[:, 1:]) 43 | 44 | _rf = SimpleNamespace() 45 | _rf.type = "rf" 46 | _rf.signal = _signal 47 | _rf.t = _t 48 | _rf.shape_dur = (_t[1] - _t[0]) * _signal.size # dwell * number of samples 49 | _rf.freq_offset = 0 50 | _rf.phase_offset = 0 51 | _rf.delay = 0 52 | _rf.dead_time = system.rf_dead_time 53 | _rf.ringdown_time = system.rf_ringdown_time 54 | 55 | return _rf 56 | 57 | 58 | def resample_pulse( 59 | rf: SimpleNamespace, rf_raster_time: float = 1e-6 60 | ) -> SimpleNamespace: 61 | """Resample rf pulse to specified rf raster time using a nearest neighbor interpolation. 62 | 63 | Parameters 64 | ---------- 65 | rf : SimpleNamespace 66 | PyPulseq RF pulse 67 | rf_raster_time : float, optional 68 | rf raster time [s], by default 1e-6 69 | 70 | Returns 71 | ------- 72 | SimpleNamespace 73 | Resampled RF pulse 74 | """ 75 | # create copy of rf pulse 76 | rf_resampled = copy.deepcopy(rf) 77 | 78 | # calculate new time points for resampled rf pulse 79 | n_sample = int(np.round(rf.shape_dur / rf_raster_time)) 80 | t = (np.arange(1, n_sample + 1) - 0.5) * rf_raster_time 81 | 82 | # calculate piecewise-constant signal with new number of samples 83 | f = interp1d(rf.t, rf.signal, kind="nearest", fill_value="extrapolate") 84 | _signal = f(t) 85 | 86 | # assign new values to rf_resampled 87 | rf_resampled.t = t 88 | rf_resampled.signal = _signal 89 | rf_resampled.raster_time = rf_raster_time 90 | 91 | return rf_resampled 92 | 93 | 94 | # get id of generation file 95 | seqid = Path(__file__).stem.replace("_create_sequence", "") 96 | 97 | # get folder of generation file 98 | folder = Path(__file__).parent 99 | 100 | # define file path of rf pulse 101 | fpath = Path(R"case_5\rf_pulse.txt") 102 | 103 | # define gyromagnetic ratio [Hz/T] 104 | GAMMA_HZ = 42.5764 105 | 106 | # sequence definitions 107 | defs: dict = {} 108 | defs["b1pa"] = 1.78 # B1 peak amplitude [µT] (b1rms calculated below) 109 | defs["b0"] = 3 # B0 [T] 110 | defs["freq"] = defs["b0"] * GAMMA_HZ # Larmor frequency [Hz] 111 | defs["n_pulses"] = 1 # number of pulses # 112 | defs["tp"] = 50e-3 # pulse duration [s] 113 | defs["td"] = 5e-3 # interpulse delay [s] 114 | defs["trec"] = 3.5 # recovery time [s] 115 | defs["trec_m0"] = 3.5 # recovery time before M0 [s] 116 | defs["m0_offset"] = -300 # m0 offset [ppm] 117 | defs["offsets_ppm"] = np.append( 118 | defs["m0_offset"], 119 | np.linspace(-2, 2, 201), 120 | ) # offset vector [ppm] 121 | 122 | defs["num_meas"] = defs["offsets_ppm"].size # number of repetition 123 | defs["tsat"] = ( 124 | defs["n_pulses"] * (defs["tp"] + defs["td"]) - defs["td"] 125 | ) # saturation time [s] 126 | defs["seq_id_string"] = seqid # unique seq id 127 | 128 | seq_filename = defs["seq_id_string"] + ".seq" 129 | 130 | # scanner limits 131 | sys = pp.Opts( 132 | max_grad=80, 133 | grad_unit="mT/m", 134 | max_slew=200, 135 | slew_unit="T/m/s", 136 | rf_ringdown_time=0, 137 | rf_dead_time=0, 138 | rf_raster_time=1e-6, # rf raster time = 1 µs for PyPulseq v1.3.1 139 | gamma=GAMMA_HZ * 1e6, 140 | ) 141 | 142 | # =========== 143 | # PREPARATION 144 | # =========== 145 | 146 | # spoiler 147 | spoil_amp = 0.8 * sys.max_grad # Hz/m 148 | rise_time = 1.0e-3 # spoiler rise time in seconds 149 | flat_time = 4.5e-3 # spoiler flat time in seconds 150 | 151 | gx_spoil, gy_spoil, gz_spoil = [ 152 | pp.make_trapezoid( 153 | channel=c, 154 | system=sys, 155 | amplitude=spoil_amp, 156 | flat_time=flat_time, 157 | rise_time=rise_time, 158 | ) 159 | for c in ["x", "y", "z"] 160 | ] 161 | 162 | # RF pulses 163 | sat_pulse = make_pulse_from_txt(fpath, sys) 164 | 165 | # resample rf pulse to rf raster time of 1 µs 166 | sat_pulse = resample_pulse(sat_pulse, sys.rf_raster_time) 167 | 168 | defs["b1rms"] = calc_power_equivalent( 169 | rf_pulse=sat_pulse, tp=defs["tp"], td=defs["td"], gamma_hz=GAMMA_HZ 170 | ) 171 | 172 | # pseudo ADC event 173 | pseudo_adc = pp.make_adc(num_samples=1, duration=1e-3) 174 | 175 | # delays 176 | td_delay = pp.make_delay(defs["td"]) 177 | trec_delay = pp.make_delay(defs["trec"]) 178 | m0_delay = pp.make_delay(defs["trec_m0"]) 179 | 180 | # Sequence object 181 | seq = pp.Sequence() 182 | 183 | # === 184 | # RUN 185 | # === 186 | 187 | offsets_hz = defs["offsets_ppm"] * defs["freq"] # convert from ppm to Hz 188 | 189 | for m, offset in enumerate(offsets_hz): 190 | # print progress/offset 191 | print( 192 | f"#{m + 1} / {len(offsets_hz)} : offset {offset / defs['freq']:.2f} ppm ({offset:.3f} Hz)" 193 | ) 194 | 195 | # add delay 196 | if offset == defs["m0_offset"] * defs["freq"]: 197 | if defs["trec_m0"] > 0: 198 | seq.add_block(m0_delay) 199 | else: 200 | if defs["trec"] > 0: 201 | seq.add_block(trec_delay) 202 | 203 | # set sat_pulse 204 | sat_pulse.freq_offset = offset 205 | seq.add_block(sat_pulse) 206 | 207 | # add spoiler gradients 208 | seq.add_block(gx_spoil, gy_spoil, gz_spoil) 209 | 210 | # add pseudo ADC event 211 | seq.add_block(pseudo_adc) 212 | 213 | write_seq( 214 | seq=seq, 215 | seq_defs=defs, 216 | filename=str(folder / seq_filename), 217 | author="https://github.com/pulseq-cest/BMsim_challenge", 218 | use_matlab_names=True, 219 | ) 220 | -------------------------------------------------------------------------------- /case_6/case_6_create_sequence_pypulseq_v131.py: -------------------------------------------------------------------------------- 1 | # BMSim Challenge: CASE 6 2 | # Script to create the seq-file for the BMSim Challenge CASE 6 3 | # 4 | # https://github.com/pulseq-cest/BMsim_challenge 5 | # 6 | # Tested with pypulseq version 1.3.1post1 and bmctool version 0.6.1 7 | # 8 | # Patrick Schuenke 2023 9 | # patrick.schuenke@ptb.de 10 | 11 | import copy 12 | from pathlib import Path 13 | from types import SimpleNamespace 14 | from scipy.interpolate import interp1d 15 | 16 | import numpy as np 17 | import pypulseq as pp 18 | from bmctool.utils.pulses.calc_power_equivalents import calc_power_equivalent 19 | from bmctool.utils.seq.write import write_seq 20 | 21 | 22 | def make_pulse_from_txt(fpath, system): 23 | """Creates a rf event using the signal from the provided txt-file. 24 | 25 | The txt-file contains the time steps in the first column and the signal 26 | in the second column. The total duration of the pulse is 50 ms and 200 27 | samples are given leading to a dwell time of 250 µs. 28 | 29 | Parameters 30 | ---------- 31 | fpath 32 | Path to the txt-file 33 | system 34 | PyPulseq system object 35 | 36 | Returns 37 | ------- 38 | RF event (SimpleNamespace) 39 | """ 40 | _data = np.loadtxt(fpath) 41 | _t = np.squeeze(_data[:, 0]) 42 | _signal = np.squeeze(_data[:, 1:]) 43 | 44 | _rf = SimpleNamespace() 45 | _rf.type = "rf" 46 | _rf.signal = _signal 47 | _rf.t = _t 48 | _rf.shape_dur = (_t[1] - _t[0]) * _signal.size # dwell * number of samples 49 | _rf.freq_offset = 0 50 | _rf.phase_offset = 0 51 | _rf.delay = 0 52 | _rf.dead_time = system.rf_dead_time 53 | _rf.ringdown_time = system.rf_ringdown_time 54 | 55 | return _rf 56 | 57 | 58 | def resample_pulse( 59 | rf: SimpleNamespace, rf_raster_time: float = 1e-6 60 | ) -> SimpleNamespace: 61 | """Resample rf pulse to specified rf raster time using a nearest neighbor interpolation. 62 | 63 | Parameters 64 | ---------- 65 | rf : SimpleNamespace 66 | PyPulseq RF pulse 67 | rf_raster_time : float, optional 68 | rf raster time [s], by default 1e-6 69 | 70 | Returns 71 | ------- 72 | SimpleNamespace 73 | Resampled RF pulse 74 | """ 75 | # create copy of rf pulse 76 | rf_resampled = copy.deepcopy(rf) 77 | 78 | # calculate new time points for resampled rf pulse 79 | n_sample = int(np.round(rf.shape_dur / rf_raster_time)) 80 | t = (np.arange(1, n_sample + 1) - 0.5) * rf_raster_time 81 | 82 | # calculate piecewise-constant signal with new number of samples 83 | f = interp1d(rf.t, rf.signal, kind="nearest", fill_value="extrapolate") 84 | _signal = f(t) 85 | 86 | # assign new values to rf_resampled 87 | rf_resampled.t = t 88 | rf_resampled.signal = _signal 89 | rf_resampled.raster_time = rf_raster_time 90 | 91 | return rf_resampled 92 | 93 | 94 | # get id of generation file 95 | seqid = Path(__file__).stem.replace("_create_sequence", "") 96 | 97 | # get folder of generation file 98 | folder = Path(__file__).parent 99 | 100 | # define file path of rf pulse 101 | fpath = Path(R"case_5\rf_pulse.txt") 102 | 103 | # define gyromagnetic ratio [Hz/T] 104 | GAMMA_HZ = 42.5764 105 | 106 | # sequence definitions 107 | defs: dict = {} 108 | defs["b1pa"] = 1.78 # B1 peak amplitude [µT] (b1rms calculated below) 109 | defs["b0"] = 3 # B0 [T] 110 | defs["freq"] = defs["b0"] * GAMMA_HZ # Larmor frequency [Hz] 111 | defs["n_pulses"] = 36 # number of pulses # 112 | defs["tp"] = 50e-3 # pulse duration [s] 113 | defs["td"] = 5e-3 # interpulse delay [s] 114 | defs["trec"] = 3.5 # recovery time [s] 115 | defs["trec_m0"] = 3.5 # recovery time before M0 [s] 116 | defs["m0_offset"] = -300 # m0 offset [ppm] 117 | defs["offsets_ppm"] = np.append( 118 | defs["m0_offset"], 119 | np.linspace(-15, 15, 301), 120 | ) # offset vector [ppm] 121 | 122 | defs["num_meas"] = defs["offsets_ppm"].size # number of repetition 123 | defs["tsat"] = ( 124 | defs["n_pulses"] * (defs["tp"] + defs["td"]) - defs["td"] 125 | ) # saturation time [s] 126 | defs["seq_id_string"] = seqid # unique seq id 127 | 128 | seq_filename = defs["seq_id_string"] + ".seq" 129 | 130 | # scanner limits 131 | sys = pp.Opts( 132 | max_grad=80, 133 | grad_unit="mT/m", 134 | max_slew=200, 135 | slew_unit="T/m/s", 136 | rf_ringdown_time=0, 137 | rf_dead_time=0, 138 | rf_raster_time=1e-6, # rf raster time = 1 µs for PyPulseq v1.3.1 139 | gamma=GAMMA_HZ * 1e6, 140 | ) 141 | 142 | # =========== 143 | # PREPARATION 144 | # =========== 145 | 146 | # spoiler 147 | spoil_amp = 0.8 * sys.max_grad # Hz/m 148 | rise_time = 1.0e-3 # spoiler rise time in seconds 149 | flat_time = 4.5e-3 # spoiler flat time in seconds 150 | 151 | gx_spoil, gy_spoil, gz_spoil = [ 152 | pp.make_trapezoid( 153 | channel=c, 154 | system=sys, 155 | amplitude=spoil_amp, 156 | flat_time=flat_time, 157 | rise_time=rise_time, 158 | ) 159 | for c in ["x", "y", "z"] 160 | ] 161 | 162 | # RF pulses 163 | sat_pulse = make_pulse_from_txt(fpath, sys) 164 | 165 | # resample rf pulse to rf raster time of 1 µs 166 | sat_pulse = resample_pulse(sat_pulse, sys.rf_raster_time) 167 | 168 | defs["b1rms"] = calc_power_equivalent( 169 | rf_pulse=sat_pulse, tp=defs["tp"], td=defs["td"], gamma_hz=GAMMA_HZ 170 | ) 171 | 172 | # pseudo ADC event 173 | pseudo_adc = pp.make_adc(num_samples=1, duration=1e-3) 174 | 175 | # delays 176 | td_delay = pp.make_delay(defs["td"]) 177 | trec_delay = pp.make_delay(defs["trec"]) 178 | m0_delay = pp.make_delay(defs["trec_m0"]) 179 | 180 | # Sequence object 181 | seq = pp.Sequence() 182 | 183 | # === 184 | # RUN 185 | # === 186 | 187 | offsets_hz = defs["offsets_ppm"] * defs["freq"] # convert from ppm to Hz 188 | 189 | for m, offset in enumerate(offsets_hz): 190 | # print progress/offset 191 | print( 192 | f"#{m + 1} / {len(offsets_hz)} : offset {offset / defs['freq']:.2f} ppm ({offset:.3f} Hz)" 193 | ) 194 | 195 | # reset accumulated phase 196 | accum_phase = 0 197 | 198 | # add delay 199 | if offset == defs["m0_offset"] * defs["freq"]: 200 | if defs["trec_m0"] > 0: 201 | seq.add_block(m0_delay) 202 | else: 203 | if defs["trec"] > 0: 204 | seq.add_block(trec_delay) 205 | 206 | # set sat_pulse 207 | sat_pulse.freq_offset = offset 208 | for n in range(defs["n_pulses"]): 209 | sat_pulse.phase_offset = accum_phase % (2 * np.pi) 210 | seq.add_block(sat_pulse) 211 | _dur = np.sum(np.abs(sat_pulse.signal) > 0) * 1e-6 212 | accum_phase = (accum_phase + offset * 2 * np.pi * _dur) % (2 * np.pi) 213 | if n < defs["n_pulses"] - 1: 214 | seq.add_block(td_delay) 215 | 216 | # add spoiler gradients 217 | seq.add_block(gx_spoil, gy_spoil, gz_spoil) 218 | 219 | # add pseudo ADC event 220 | seq.add_block(pseudo_adc) 221 | 222 | write_seq( 223 | seq=seq, 224 | seq_defs=defs, 225 | filename=str(folder / seq_filename), 226 | author="https://github.com/pulseq-cest/BMsim_challenge", 227 | use_matlab_names=True, 228 | ) 229 | -------------------------------------------------------------------------------- /case_7/case_7_create_sequence_pypulseq_v131.py: -------------------------------------------------------------------------------- 1 | # BMSim Challenge: CASE 7 2 | # Script to create the seq-file for the BMSim Challenge CASE 7 3 | # 4 | # https://github.com/pulseq-cest/BMsim_challenge 5 | # 6 | # Tested with pypulseq version 1.3.1post1 and bmctool version 0.6.1 7 | # 8 | # Patrick Schuenke 2023 9 | # patrick.schuenke@ptb.de 10 | 11 | import copy 12 | from pathlib import Path 13 | from types import SimpleNamespace 14 | from scipy.interpolate import interp1d 15 | 16 | import numpy as np 17 | import pypulseq as pp 18 | from bmctool.utils.pulses.calc_power_equivalents import calc_power_equivalent 19 | from bmctool.utils.seq.write import write_seq 20 | 21 | 22 | def make_pulse_from_txt(fpath, system): 23 | """Creates a rf event using the signal from the provided txt-file. 24 | 25 | The txt-file contains the time steps in the first column and the signal 26 | in the second column. The total duration of the pulse is 50 ms and 200 27 | samples are given leading to a dwell time of 250 µs. 28 | 29 | Parameters 30 | ---------- 31 | fpath 32 | Path to the txt-file 33 | system 34 | PyPulseq system object 35 | 36 | Returns 37 | ------- 38 | RF event (SimpleNamespace) 39 | """ 40 | _data = np.loadtxt(fpath) 41 | _t = np.squeeze(_data[:, 0]) 42 | _signal = np.squeeze(_data[:, 1:]) 43 | 44 | _rf = SimpleNamespace() 45 | _rf.type = "rf" 46 | _rf.signal = _signal 47 | _rf.t = _t 48 | _rf.shape_dur = (_t[1] - _t[0]) * _signal.size # dwell * number of samples 49 | _rf.freq_offset = 0 50 | _rf.phase_offset = 0 51 | _rf.delay = 0 52 | _rf.dead_time = system.rf_dead_time 53 | _rf.ringdown_time = system.rf_ringdown_time 54 | 55 | return _rf 56 | 57 | 58 | def resample_pulse( 59 | rf: SimpleNamespace, rf_raster_time: float = 1e-6 60 | ) -> SimpleNamespace: 61 | """Resample rf pulse to specified rf raster time using a nearest neighbor interpolation. 62 | 63 | Parameters 64 | ---------- 65 | rf : SimpleNamespace 66 | PyPulseq RF pulse 67 | rf_raster_time : float, optional 68 | rf raster time [s], by default 1e-6 69 | 70 | Returns 71 | ------- 72 | SimpleNamespace 73 | Resampled RF pulse 74 | """ 75 | # create copy of rf pulse 76 | rf_resampled = copy.deepcopy(rf) 77 | 78 | # calculate new time points for resampled rf pulse 79 | n_sample = int(np.round(rf.shape_dur / rf_raster_time)) 80 | t = (np.arange(1, n_sample + 1) - 0.5) * rf_raster_time 81 | 82 | # calculate piecewise-constant signal with new number of samples 83 | f = interp1d(rf.t, rf.signal, kind="nearest", fill_value="extrapolate") 84 | _signal = f(t) 85 | 86 | # assign new values to rf_resampled 87 | rf_resampled.t = t 88 | rf_resampled.signal = _signal 89 | rf_resampled.raster_time = rf_raster_time 90 | 91 | return rf_resampled 92 | 93 | 94 | # get id of generation file 95 | seqid = Path(__file__).stem.replace("_create_sequence", "") 96 | 97 | # get folder of generation file 98 | folder = Path(__file__).parent 99 | 100 | # define file path of rf pulse 101 | fpath = Path(R"case_5\rf_pulse.txt") 102 | 103 | # define gyromagnetic ratio [Hz/T] 104 | GAMMA_HZ = 42.5764 105 | 106 | # sequence definitions 107 | defs: dict = {} 108 | defs["b1pa"] = 1.78 # B1 peak amplitude [µT] (b1rms calculated below) 109 | defs["b0"] = 3 # B0 [T] 110 | defs["freq"] = defs["b0"] * GAMMA_HZ # Larmor frequency [Hz] 111 | defs["n_pulses"] = 36 # number of pulses # 112 | defs["tp"] = 50e-3 # pulse duration [s] 113 | defs["td"] = 5e-3 # interpulse delay [s] 114 | defs["trec"] = 3.5 # recovery time [s] 115 | defs["trec_m0"] = 3.5 # recovery time before M0 [s] 116 | defs["m0_offset"] = -300 # m0 offset [ppm] 117 | defs["offsets_ppm"] = np.append( 118 | defs["m0_offset"], 119 | np.linspace(-15, 15, 301), 120 | ) # offset vector [ppm] 121 | 122 | defs["num_meas"] = defs["offsets_ppm"].size # number of repetition 123 | defs["tsat"] = ( 124 | defs["n_pulses"] * (defs["tp"] + defs["td"]) - defs["td"] 125 | ) # saturation time [s] 126 | defs["seq_id_string"] = seqid # unique seq id 127 | 128 | seq_filename = defs["seq_id_string"] + ".seq" 129 | 130 | # scanner limits 131 | sys = pp.Opts( 132 | max_grad=80, 133 | grad_unit="mT/m", 134 | max_slew=200, 135 | slew_unit="T/m/s", 136 | rf_ringdown_time=0, 137 | rf_dead_time=0, 138 | rf_raster_time=1e-6, # rf raster time = 1 µs for PyPulseq v1.3.1 139 | gamma=GAMMA_HZ * 1e6, 140 | ) 141 | 142 | # =========== 143 | # PREPARATION 144 | # =========== 145 | 146 | # spoiler 147 | spoil_amp = 0.8 * sys.max_grad # Hz/m 148 | rise_time = 1.0e-3 # spoiler rise time in seconds 149 | flat_time = 4.5e-3 # spoiler flat time in seconds 150 | 151 | gx_spoil, gy_spoil, gz_spoil = [ 152 | pp.make_trapezoid( 153 | channel=c, 154 | system=sys, 155 | amplitude=spoil_amp, 156 | flat_time=flat_time, 157 | rise_time=rise_time, 158 | ) 159 | for c in ["x", "y", "z"] 160 | ] 161 | 162 | # RF pulses 163 | sat_pulse = make_pulse_from_txt(fpath, sys) 164 | 165 | # resample rf pulse to rf raster time of 1 µs 166 | sat_pulse = resample_pulse(sat_pulse, sys.rf_raster_time) 167 | 168 | defs["b1rms"] = calc_power_equivalent( 169 | rf_pulse=sat_pulse, tp=defs["tp"], td=defs["td"], gamma_hz=GAMMA_HZ 170 | ) 171 | 172 | # pseudo ADC event 173 | pseudo_adc = pp.make_adc(num_samples=1, duration=1e-3) 174 | 175 | # delays 176 | td_delay = pp.make_delay(defs["td"]) 177 | trec_delay = pp.make_delay(defs["trec"]) 178 | m0_delay = pp.make_delay(defs["trec_m0"]) 179 | 180 | # Sequence object 181 | seq = pp.Sequence() 182 | 183 | # === 184 | # RUN 185 | # === 186 | 187 | offsets_hz = defs["offsets_ppm"] * defs["freq"] # convert from ppm to Hz 188 | 189 | for m, offset in enumerate(offsets_hz): 190 | # print progress/offset 191 | print( 192 | f"#{m + 1} / {len(offsets_hz)} : offset {offset / defs['freq']:.2f} ppm ({offset:.3f} Hz)" 193 | ) 194 | 195 | # reset accumulated phase 196 | accum_phase = 0 197 | 198 | # add delay 199 | if offset == defs["m0_offset"] * defs["freq"]: 200 | if defs["trec_m0"] > 0: 201 | seq.add_block(m0_delay) 202 | else: 203 | if defs["trec"] > 0: 204 | seq.add_block(trec_delay) 205 | 206 | # set sat_pulse 207 | sat_pulse.freq_offset = offset 208 | for n in range(defs["n_pulses"]): 209 | sat_pulse.phase_offset = accum_phase % (2 * np.pi) 210 | seq.add_block(sat_pulse) 211 | _dur = np.sum(np.abs(sat_pulse.signal) > 0) * 1e-6 212 | accum_phase = (accum_phase + offset * 2 * np.pi * _dur) % (2 * np.pi) 213 | if n < defs["n_pulses"] - 1: 214 | seq.add_block(td_delay) 215 | 216 | # add spoiler gradients 217 | seq.add_block(gx_spoil, gy_spoil, gz_spoil) 218 | 219 | # add pseudo ADC event 220 | seq.add_block(pseudo_adc) 221 | 222 | write_seq( 223 | seq=seq, 224 | seq_defs=defs, 225 | filename=str(folder / seq_filename), 226 | author="https://github.com/pulseq-cest/BMsim_challenge", 227 | use_matlab_names=True, 228 | ) 229 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # == BMsim challenge == 2 | 3 | Welcome to the repository of the Bloch-McConnell simulation (BMsim) study / challenge. 4 | The idea of the project can be summarized as follows: 5 | 6 | 1) Every participant simulates different well-defined cases / scenarios 7 | 2) The simulation results from all participants are [collected online](https://docs.google.com/spreadsheets/d/1JN7VN-f1ktDrJgokb0FlUFwkH0MWYlPA_jSfnQoFOVc/) 8 | 3) An [online evaluation script](https://colab.research.google.com/drive/1csiIjK-fiftdb7OwvJ84gWuv8lLADgv7) enables a live comparison and validation against all other results 9 | 10 | In the first study, we have chosen 3 different preparation schemes consisting of single block/CW pulses and 2 different pool systems resultung in 4 different simulation cases (cases 1 - 4). More infos and a summary of our findings and achievements can be found in the [abstract](ISMRM_Abstract_BMsim.pdf) and [slides](ISMRM_slides.pdf) from the ISMRM 2023. 11 | 12 | The second study (cases 5 - 8) covers more complex cases including shaped pulses and pulse trains. An abstract submission for the ISMRM 2024 is planned. 13 | 14 | ## Simulation results 15 | 16 | To keep the burden for submitting your simulation results as low as possible, we decided to collect the results in a simple 17 | [Google Docs spreadsheet](https://docs.google.com/spreadsheets/d/1JN7VN-f1ktDrJgokb0FlUFwkH0MWYlPA_jSfnQoFOVc/). 18 | 19 | Please feel free to add your name / group in case it's not listed yet and post your results. 20 | 21 | ## Online evaluation script 22 | 23 | To provide a simple way to compare your own simulation results with (a selection of) the results collected in the Google Docs spreadsheet, we set up an [online evaluation script](https://colab.research.google.com/drive/1csiIjK-fiftdb7OwvJ84gWuv8lLADgv7) in form of a iPython Notebook that is hosted on Google colab. 24 | 25 | ## Simulation cases 26 | 27 | ### General settings / assumptions 28 | 29 | 1) fully relaxed initial magnetization (Zi = 1) for every offset (this is equivalent to a very long recovery time t > 10 * T1) 30 | 2) post-preparation delay = 6.5 ms (in the pulseq-file this corresponds to the gradient spoiler duration) 31 | 3) gyromagnetic ratio: 42.5764 MHz/T (see FAQ below) 32 | 4) larmor frequency (3T): 127.7292 MHz/T 33 | 5) Normalization scan at -300 ppm 34 | 35 | ## Second study (cases 5 - 8) 36 | 37 | ### Case 5: 2 pool model, single shaped pulse 38 | 39 | - **pool model**: 2 pool model of creatine as defined in [case_5_2pool_model.yaml](/case_5/case_5_2pool_model.yaml) 40 | - **prep. details**: 41 | - pulse shape: Gaussian 42 | - pulse duration: 50 ms 43 | - number of pulses: 1 44 | - total saturation time: 50 ms 45 | - pulse power (B1rms): 1.9962 µT 46 | - offset list: -2:0.02:2 ppm 47 | 48 | More details about the pool model and preparation scheme can be found in the corresponding [README](/case_5/README.md) 49 | 50 | ### Case 6: 2 pool model, pulsed APTw preparation 51 | 52 | - **pool model**: 2 pool model of creatine as defined in [case_6_2pool_model.yaml](/case_6/case_6_2pool_model.yaml) 53 | - **prep. details**: 54 | - pulse shape: Gaussian 55 | - pulse duration: 50 ms 56 | - number of pulses: 36 57 | - interpulse delay: 5 ms 58 | - number of interpulse delays: 35 59 | - total saturation time: 1.975 s 60 | - pulse power (B1rms): 1.9962 µT 61 | - offset list: -15:0.1:15 ppm 62 | 63 | More details about the pool model and preparation scheme can be found in the corresponding [README](/case_6/README.md) 64 | 65 | ### Case 7: 5 pool model, pulsed APTw preparation 66 | 67 | - **pool model**: 5 pool model of WM as defined in [case_7_5pool_model.yaml](/case_7/case_7_5pool_model.yaml) 68 | - **prep. details**: 69 | - pulse shape: Gaussian 70 | - pulse duration: 50 ms 71 | - number of pulses: 36 72 | - interpulse delay: 5 ms 73 | - number of interpulse delays: 35 74 | - total saturation time: 1.975 s 75 | - pulse power (B1rms): 1.9962 µT 76 | - offset list: -15:0.1:15 ppm 77 | 78 | More details about the pool model and preparation scheme can be found in the corresponding [README](/case_7/README.md) 79 | 80 | ### Case 8: 5 pool model, (modified) WASABI preparation 81 | 82 | - **pool model**: 5 pool model of WM as defined in [case_8_5pool_model.yaml](/case_8/case_8_5pool_model.yaml) 83 | - **prep. details**: 84 | - pulse shape: block 85 | - pulse duration: 5 ms 86 | - number of pulses: 2 87 | - interpulse delay: 100 µs 88 | - number of interpulse delays: 1 89 | - total saturation time: 0.0101 s 90 | - pulse power (peak): 3.7 µT 91 | - offset list: -2:0.05:2 ppm 92 | 93 | More details about the pool model and preparation scheme can be found in the corresponding [README](/case_8/README.md) 94 | 95 | ## First study (cases 1 - 4) 96 | 97 | ### Case 1: 2 pool model, APTw preparation - steady-state 98 | 99 | - **pool model**: 2 pool model of creatine as defined in [case_1_2pool_model.yaml](/case_1/case_1_2pool_model.yaml) 100 | - **prep. details**: 101 | - pulse shape: block 102 | - pulse duration: 15 s 103 | - pulse power: 2 µT 104 | - offset list: -15:0.1:15 ppm 105 | 106 | More details about the pool model and preparation scheme can be found in the corresponding [README](/case_1/README.md) 107 | 108 | ### Case 2: 2 pool model, APTw preparation 109 | 110 | - **pool model**: 2 pool model of creatine as defined in [case_2_2pool_model.yaml](/case_2/case_2_2pool_model.yaml) 111 | - **prep. details**: 112 | - pulse shape: block 113 | - pulse duration: 2 s 114 | - pulse power: 2 µT 115 | - offset list: -15:0.1:15 ppm 116 | 117 | More details about the pool model and preparation scheme can be found in the corresponding [README](/case_2/README.md) 118 | 119 | ### Case 3: 5 pool model, APTw preparation 120 | 121 | - **pool model**: 5 pool model of WM as defined in [case_3_5pool_model.yaml](/case_3/case_3_5pool_model.yaml) 122 | - **prep. details**: 123 | - pulse shape: block 124 | - pulse duration: 2 s 125 | - pulse power: 2 µT 126 | - offset list: -15:0.1:15 ppm 127 | 128 | More details about the pool model and preparation scheme can be found in the corresponding [README](/case_3/README.md) 129 | 130 | ### Case 4: 5 pool model, WASABI preparation 131 | 132 | - **pool model**: 5 pool model of WM as defined in [case_4_5pool_model.yaml](/case_4/case_4_5pool_model.yaml) 133 | - **prep. details**: 134 | - pulse shape: block 135 | - pulse duration: 5 ms 136 | - pulse power: 3.7 µT 137 | - offset list: -2:0.05:2 ppm 138 | 139 | More details about the pool model and preparation scheme can be found in the corresponding [README](/case_4/README.md) 140 | 141 | ## FAQ 142 | 143 | - How did you choose the value of the gyromagnetic ratio? 144 | 145 | The [NIST value of the shielded proton gyromagnetic ratio](https://physics.nist.gov/cgi-bin/cuu/Value?gammapp) is 146 | 2.675153151 x 108 s-1 T-1. Dividing this value by 2 Pi yields 42.576384750950949004433240733872 MHz/T, which results 147 | in the used value of 42.5764 MHz/T when rounded to 4 digits. 148 | 149 | Please make sure to use these values for gamma in your simulations: 150 | 151 | - 42.5764 MHz/T 152 | - 42.5764 x 2 x Pi s-1 T-1 (do **NOT** use the exact NIST value) 153 | 154 | - How do you define the pool size fraction f? 155 | 156 | There are two different options to define the pool size fractions: 157 | 1) define water f=1, and all other fractions relative to water 158 | 2) define M0_i of each pool i and then normalize f_i= M0_i/sum(M0_i) 159 | 160 | The first study showed that all groups participating so far use definition 1. Therefore, we encourage all new participants to use this definition as well. 161 | 162 | - How do you define the MT pool? 163 | 164 | Some simulations use x, y, and z components to describe a Lorentzian MT pool. 165 | Others use only the z-component and assume a Lorentzian lineshape factor there. 166 | The results from the first study showed that these different implementations are **NOT INTERCHANGEABE** right now. Therefore, we suggest treating the MT pool similar to a CEST pool and consider all 3 components. 167 | -------------------------------------------------------------------------------- /case_4/case_4_create_seq.seq: -------------------------------------------------------------------------------- 1 | # Pulseq sequence file 2 | # Created by MATLAB mr toolbox 3 | 4 | # Created for Pulseq-CEST 5 | # https://pulseq-cest.github.io/ 6 | # Created by: Kai Herz 7 | # Created at: 07-Oct-2022 15:27:20 8 | 9 | [VERSION] 10 | major 1 11 | minor 3 12 | revision 1 13 | 14 | [DEFINITIONS] 15 | B0 3 16 | B1cwpe 3.7 17 | M0_offset -300 18 | Trec 3 19 | Trec_M0 12 20 | Tsat 0.005 21 | n_pulses 1 22 | num_meas 82 23 | offsets_ppm -300 -2 -1.95 -1.9 -1.85 -1.8 -1.75 -1.7 -1.65 -1.6 -1.55 -1.5 -1.45 -1.4 -1.35 -1.3 -1.25 -1.2 -1.15 -1.1 -1.05 -1 -0.95 -0.9 -0.85 -0.8 -0.75 -0.7 -0.65 -0.6 -0.55 -0.5 -0.45 -0.4 -0.35 -0.3 -0.25 -0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 1.05 1.1 1.15 1.2 1.25 1.3 1.35 1.4 1.45 1.5 1.55 1.6 1.65 1.7 1.75 1.8 1.85 1.9 1.95 2 24 | seq_id_string case_4_create_seq 25 | tp 0.005 26 | 27 | # Format of blocks: 28 | # # D RF GX GY GZ ADC EXT 29 | [BLOCKS] 30 | 1 1 0 0 0 0 0 0 31 | 2 0 1 0 0 0 0 0 32 | 3 0 0 1 1 1 0 0 33 | 4 0 0 0 0 0 1 0 34 | 5 2 0 0 0 0 0 0 35 | 6 0 2 0 0 0 0 0 36 | 7 0 0 1 1 1 0 0 37 | 8 0 0 0 0 0 1 0 38 | 9 2 0 0 0 0 0 0 39 | 10 0 3 0 0 0 0 0 40 | 11 0 0 1 1 1 0 0 41 | 12 0 0 0 0 0 1 0 42 | 13 2 0 0 0 0 0 0 43 | 14 0 4 0 0 0 0 0 44 | 15 0 0 1 1 1 0 0 45 | 16 0 0 0 0 0 1 0 46 | 17 2 0 0 0 0 0 0 47 | 18 0 5 0 0 0 0 0 48 | 19 0 0 1 1 1 0 0 49 | 20 0 0 0 0 0 1 0 50 | 21 2 0 0 0 0 0 0 51 | 22 0 6 0 0 0 0 0 52 | 23 0 0 1 1 1 0 0 53 | 24 0 0 0 0 0 1 0 54 | 25 2 0 0 0 0 0 0 55 | 26 0 7 0 0 0 0 0 56 | 27 0 0 1 1 1 0 0 57 | 28 0 0 0 0 0 1 0 58 | 29 2 0 0 0 0 0 0 59 | 30 0 8 0 0 0 0 0 60 | 31 0 0 1 1 1 0 0 61 | 32 0 0 0 0 0 1 0 62 | 33 2 0 0 0 0 0 0 63 | 34 0 9 0 0 0 0 0 64 | 35 0 0 1 1 1 0 0 65 | 36 0 0 0 0 0 1 0 66 | 37 2 0 0 0 0 0 0 67 | 38 0 10 0 0 0 0 0 68 | 39 0 0 1 1 1 0 0 69 | 40 0 0 0 0 0 1 0 70 | 41 2 0 0 0 0 0 0 71 | 42 0 11 0 0 0 0 0 72 | 43 0 0 1 1 1 0 0 73 | 44 0 0 0 0 0 1 0 74 | 45 2 0 0 0 0 0 0 75 | 46 0 12 0 0 0 0 0 76 | 47 0 0 1 1 1 0 0 77 | 48 0 0 0 0 0 1 0 78 | 49 2 0 0 0 0 0 0 79 | 50 0 13 0 0 0 0 0 80 | 51 0 0 1 1 1 0 0 81 | 52 0 0 0 0 0 1 0 82 | 53 2 0 0 0 0 0 0 83 | 54 0 14 0 0 0 0 0 84 | 55 0 0 1 1 1 0 0 85 | 56 0 0 0 0 0 1 0 86 | 57 2 0 0 0 0 0 0 87 | 58 0 15 0 0 0 0 0 88 | 59 0 0 1 1 1 0 0 89 | 60 0 0 0 0 0 1 0 90 | 61 2 0 0 0 0 0 0 91 | 62 0 16 0 0 0 0 0 92 | 63 0 0 1 1 1 0 0 93 | 64 0 0 0 0 0 1 0 94 | 65 2 0 0 0 0 0 0 95 | 66 0 17 0 0 0 0 0 96 | 67 0 0 1 1 1 0 0 97 | 68 0 0 0 0 0 1 0 98 | 69 2 0 0 0 0 0 0 99 | 70 0 18 0 0 0 0 0 100 | 71 0 0 1 1 1 0 0 101 | 72 0 0 0 0 0 1 0 102 | 73 2 0 0 0 0 0 0 103 | 74 0 19 0 0 0 0 0 104 | 75 0 0 1 1 1 0 0 105 | 76 0 0 0 0 0 1 0 106 | 77 2 0 0 0 0 0 0 107 | 78 0 20 0 0 0 0 0 108 | 79 0 0 1 1 1 0 0 109 | 80 0 0 0 0 0 1 0 110 | 81 2 0 0 0 0 0 0 111 | 82 0 21 0 0 0 0 0 112 | 83 0 0 1 1 1 0 0 113 | 84 0 0 0 0 0 1 0 114 | 85 2 0 0 0 0 0 0 115 | 86 0 22 0 0 0 0 0 116 | 87 0 0 1 1 1 0 0 117 | 88 0 0 0 0 0 1 0 118 | 89 2 0 0 0 0 0 0 119 | 90 0 23 0 0 0 0 0 120 | 91 0 0 1 1 1 0 0 121 | 92 0 0 0 0 0 1 0 122 | 93 2 0 0 0 0 0 0 123 | 94 0 24 0 0 0 0 0 124 | 95 0 0 1 1 1 0 0 125 | 96 0 0 0 0 0 1 0 126 | 97 2 0 0 0 0 0 0 127 | 98 0 25 0 0 0 0 0 128 | 99 0 0 1 1 1 0 0 129 | 100 0 0 0 0 0 1 0 130 | 101 2 0 0 0 0 0 0 131 | 102 0 26 0 0 0 0 0 132 | 103 0 0 1 1 1 0 0 133 | 104 0 0 0 0 0 1 0 134 | 105 2 0 0 0 0 0 0 135 | 106 0 27 0 0 0 0 0 136 | 107 0 0 1 1 1 0 0 137 | 108 0 0 0 0 0 1 0 138 | 109 2 0 0 0 0 0 0 139 | 110 0 28 0 0 0 0 0 140 | 111 0 0 1 1 1 0 0 141 | 112 0 0 0 0 0 1 0 142 | 113 2 0 0 0 0 0 0 143 | 114 0 29 0 0 0 0 0 144 | 115 0 0 1 1 1 0 0 145 | 116 0 0 0 0 0 1 0 146 | 117 2 0 0 0 0 0 0 147 | 118 0 30 0 0 0 0 0 148 | 119 0 0 1 1 1 0 0 149 | 120 0 0 0 0 0 1 0 150 | 121 2 0 0 0 0 0 0 151 | 122 0 31 0 0 0 0 0 152 | 123 0 0 1 1 1 0 0 153 | 124 0 0 0 0 0 1 0 154 | 125 2 0 0 0 0 0 0 155 | 126 0 32 0 0 0 0 0 156 | 127 0 0 1 1 1 0 0 157 | 128 0 0 0 0 0 1 0 158 | 129 2 0 0 0 0 0 0 159 | 130 0 33 0 0 0 0 0 160 | 131 0 0 1 1 1 0 0 161 | 132 0 0 0 0 0 1 0 162 | 133 2 0 0 0 0 0 0 163 | 134 0 34 0 0 0 0 0 164 | 135 0 0 1 1 1 0 0 165 | 136 0 0 0 0 0 1 0 166 | 137 2 0 0 0 0 0 0 167 | 138 0 35 0 0 0 0 0 168 | 139 0 0 1 1 1 0 0 169 | 140 0 0 0 0 0 1 0 170 | 141 2 0 0 0 0 0 0 171 | 142 0 36 0 0 0 0 0 172 | 143 0 0 1 1 1 0 0 173 | 144 0 0 0 0 0 1 0 174 | 145 2 0 0 0 0 0 0 175 | 146 0 37 0 0 0 0 0 176 | 147 0 0 1 1 1 0 0 177 | 148 0 0 0 0 0 1 0 178 | 149 2 0 0 0 0 0 0 179 | 150 0 38 0 0 0 0 0 180 | 151 0 0 1 1 1 0 0 181 | 152 0 0 0 0 0 1 0 182 | 153 2 0 0 0 0 0 0 183 | 154 0 39 0 0 0 0 0 184 | 155 0 0 1 1 1 0 0 185 | 156 0 0 0 0 0 1 0 186 | 157 2 0 0 0 0 0 0 187 | 158 0 40 0 0 0 0 0 188 | 159 0 0 1 1 1 0 0 189 | 160 0 0 0 0 0 1 0 190 | 161 2 0 0 0 0 0 0 191 | 162 0 41 0 0 0 0 0 192 | 163 0 0 1 1 1 0 0 193 | 164 0 0 0 0 0 1 0 194 | 165 2 0 0 0 0 0 0 195 | 166 0 42 0 0 0 0 0 196 | 167 0 0 1 1 1 0 0 197 | 168 0 0 0 0 0 1 0 198 | 169 2 0 0 0 0 0 0 199 | 170 0 43 0 0 0 0 0 200 | 171 0 0 1 1 1 0 0 201 | 172 0 0 0 0 0 1 0 202 | 173 2 0 0 0 0 0 0 203 | 174 0 44 0 0 0 0 0 204 | 175 0 0 1 1 1 0 0 205 | 176 0 0 0 0 0 1 0 206 | 177 2 0 0 0 0 0 0 207 | 178 0 45 0 0 0 0 0 208 | 179 0 0 1 1 1 0 0 209 | 180 0 0 0 0 0 1 0 210 | 181 2 0 0 0 0 0 0 211 | 182 0 46 0 0 0 0 0 212 | 183 0 0 1 1 1 0 0 213 | 184 0 0 0 0 0 1 0 214 | 185 2 0 0 0 0 0 0 215 | 186 0 47 0 0 0 0 0 216 | 187 0 0 1 1 1 0 0 217 | 188 0 0 0 0 0 1 0 218 | 189 2 0 0 0 0 0 0 219 | 190 0 48 0 0 0 0 0 220 | 191 0 0 1 1 1 0 0 221 | 192 0 0 0 0 0 1 0 222 | 193 2 0 0 0 0 0 0 223 | 194 0 49 0 0 0 0 0 224 | 195 0 0 1 1 1 0 0 225 | 196 0 0 0 0 0 1 0 226 | 197 2 0 0 0 0 0 0 227 | 198 0 50 0 0 0 0 0 228 | 199 0 0 1 1 1 0 0 229 | 200 0 0 0 0 0 1 0 230 | 201 2 0 0 0 0 0 0 231 | 202 0 51 0 0 0 0 0 232 | 203 0 0 1 1 1 0 0 233 | 204 0 0 0 0 0 1 0 234 | 205 2 0 0 0 0 0 0 235 | 206 0 52 0 0 0 0 0 236 | 207 0 0 1 1 1 0 0 237 | 208 0 0 0 0 0 1 0 238 | 209 2 0 0 0 0 0 0 239 | 210 0 53 0 0 0 0 0 240 | 211 0 0 1 1 1 0 0 241 | 212 0 0 0 0 0 1 0 242 | 213 2 0 0 0 0 0 0 243 | 214 0 54 0 0 0 0 0 244 | 215 0 0 1 1 1 0 0 245 | 216 0 0 0 0 0 1 0 246 | 217 2 0 0 0 0 0 0 247 | 218 0 55 0 0 0 0 0 248 | 219 0 0 1 1 1 0 0 249 | 220 0 0 0 0 0 1 0 250 | 221 2 0 0 0 0 0 0 251 | 222 0 56 0 0 0 0 0 252 | 223 0 0 1 1 1 0 0 253 | 224 0 0 0 0 0 1 0 254 | 225 2 0 0 0 0 0 0 255 | 226 0 57 0 0 0 0 0 256 | 227 0 0 1 1 1 0 0 257 | 228 0 0 0 0 0 1 0 258 | 229 2 0 0 0 0 0 0 259 | 230 0 58 0 0 0 0 0 260 | 231 0 0 1 1 1 0 0 261 | 232 0 0 0 0 0 1 0 262 | 233 2 0 0 0 0 0 0 263 | 234 0 59 0 0 0 0 0 264 | 235 0 0 1 1 1 0 0 265 | 236 0 0 0 0 0 1 0 266 | 237 2 0 0 0 0 0 0 267 | 238 0 60 0 0 0 0 0 268 | 239 0 0 1 1 1 0 0 269 | 240 0 0 0 0 0 1 0 270 | 241 2 0 0 0 0 0 0 271 | 242 0 61 0 0 0 0 0 272 | 243 0 0 1 1 1 0 0 273 | 244 0 0 0 0 0 1 0 274 | 245 2 0 0 0 0 0 0 275 | 246 0 62 0 0 0 0 0 276 | 247 0 0 1 1 1 0 0 277 | 248 0 0 0 0 0 1 0 278 | 249 2 0 0 0 0 0 0 279 | 250 0 63 0 0 0 0 0 280 | 251 0 0 1 1 1 0 0 281 | 252 0 0 0 0 0 1 0 282 | 253 2 0 0 0 0 0 0 283 | 254 0 64 0 0 0 0 0 284 | 255 0 0 1 1 1 0 0 285 | 256 0 0 0 0 0 1 0 286 | 257 2 0 0 0 0 0 0 287 | 258 0 65 0 0 0 0 0 288 | 259 0 0 1 1 1 0 0 289 | 260 0 0 0 0 0 1 0 290 | 261 2 0 0 0 0 0 0 291 | 262 0 66 0 0 0 0 0 292 | 263 0 0 1 1 1 0 0 293 | 264 0 0 0 0 0 1 0 294 | 265 2 0 0 0 0 0 0 295 | 266 0 67 0 0 0 0 0 296 | 267 0 0 1 1 1 0 0 297 | 268 0 0 0 0 0 1 0 298 | 269 2 0 0 0 0 0 0 299 | 270 0 68 0 0 0 0 0 300 | 271 0 0 1 1 1 0 0 301 | 272 0 0 0 0 0 1 0 302 | 273 2 0 0 0 0 0 0 303 | 274 0 69 0 0 0 0 0 304 | 275 0 0 1 1 1 0 0 305 | 276 0 0 0 0 0 1 0 306 | 277 2 0 0 0 0 0 0 307 | 278 0 70 0 0 0 0 0 308 | 279 0 0 1 1 1 0 0 309 | 280 0 0 0 0 0 1 0 310 | 281 2 0 0 0 0 0 0 311 | 282 0 71 0 0 0 0 0 312 | 283 0 0 1 1 1 0 0 313 | 284 0 0 0 0 0 1 0 314 | 285 2 0 0 0 0 0 0 315 | 286 0 72 0 0 0 0 0 316 | 287 0 0 1 1 1 0 0 317 | 288 0 0 0 0 0 1 0 318 | 289 2 0 0 0 0 0 0 319 | 290 0 73 0 0 0 0 0 320 | 291 0 0 1 1 1 0 0 321 | 292 0 0 0 0 0 1 0 322 | 293 2 0 0 0 0 0 0 323 | 294 0 74 0 0 0 0 0 324 | 295 0 0 1 1 1 0 0 325 | 296 0 0 0 0 0 1 0 326 | 297 2 0 0 0 0 0 0 327 | 298 0 75 0 0 0 0 0 328 | 299 0 0 1 1 1 0 0 329 | 300 0 0 0 0 0 1 0 330 | 301 2 0 0 0 0 0 0 331 | 302 0 76 0 0 0 0 0 332 | 303 0 0 1 1 1 0 0 333 | 304 0 0 0 0 0 1 0 334 | 305 2 0 0 0 0 0 0 335 | 306 0 77 0 0 0 0 0 336 | 307 0 0 1 1 1 0 0 337 | 308 0 0 0 0 0 1 0 338 | 309 2 0 0 0 0 0 0 339 | 310 0 78 0 0 0 0 0 340 | 311 0 0 1 1 1 0 0 341 | 312 0 0 0 0 0 1 0 342 | 313 2 0 0 0 0 0 0 343 | 314 0 79 0 0 0 0 0 344 | 315 0 0 1 1 1 0 0 345 | 316 0 0 0 0 0 1 0 346 | 317 2 0 0 0 0 0 0 347 | 318 0 80 0 0 0 0 0 348 | 319 0 0 1 1 1 0 0 349 | 320 0 0 0 0 0 1 0 350 | 321 2 0 0 0 0 0 0 351 | 322 0 81 0 0 0 0 0 352 | 323 0 0 1 1 1 0 0 353 | 324 0 0 0 0 0 1 0 354 | 325 2 0 0 0 0 0 0 355 | 326 0 82 0 0 0 0 0 356 | 327 0 0 1 1 1 0 0 357 | 328 0 0 0 0 0 1 0 358 | 359 | # Format of RF events: 360 | # id amplitude mag_id phase_id delay freq phase 361 | # .. Hz .... .... us Hz rad 362 | [RF] 363 | 1 157.533 1 2 100 -38318.8 0 364 | 2 157.533 1 2 100 -255.458 0 365 | 3 157.533 1 2 100 -249.072 0 366 | 4 157.533 1 2 100 -242.685 0 367 | 5 157.533 1 2 100 -236.299 0 368 | 6 157.533 1 2 100 -229.913 0 369 | 7 157.533 1 2 100 -223.526 0 370 | 8 157.533 1 2 100 -217.14 0 371 | 9 157.533 1 2 100 -210.753 0 372 | 10 157.533 1 2 100 -204.367 0 373 | 11 157.533 1 2 100 -197.98 0 374 | 12 157.533 1 2 100 -191.594 0 375 | 13 157.533 1 2 100 -185.207 0 376 | 14 157.533 1 2 100 -178.821 0 377 | 15 157.533 1 2 100 -172.434 0 378 | 16 157.533 1 2 100 -166.048 0 379 | 17 157.533 1 2 100 -159.661 0 380 | 18 157.533 1 2 100 -153.275 0 381 | 19 157.533 1 2 100 -146.889 0 382 | 20 157.533 1 2 100 -140.502 0 383 | 21 157.533 1 2 100 -134.116 0 384 | 22 157.533 1 2 100 -127.729 0 385 | 23 157.533 1 2 100 -121.343 0 386 | 24 157.533 1 2 100 -114.956 0 387 | 25 157.533 1 2 100 -108.57 0 388 | 26 157.533 1 2 100 -102.183 0 389 | 27 157.533 1 2 100 -95.7969 0 390 | 28 157.533 1 2 100 -89.4104 0 391 | 29 157.533 1 2 100 -83.024 0 392 | 30 157.533 1 2 100 -76.6375 0 393 | 31 157.533 1 2 100 -70.2511 0 394 | 32 157.533 1 2 100 -63.8646 0 395 | 33 157.533 1 2 100 -57.4781 0 396 | 34 157.533 1 2 100 -51.0917 0 397 | 35 157.533 1 2 100 -44.7052 0 398 | 36 157.533 1 2 100 -38.3188 0 399 | 37 157.533 1 2 100 -31.9323 0 400 | 38 157.533 1 2 100 -25.5458 0 401 | 39 157.533 1 2 100 -19.1594 0 402 | 40 157.533 1 2 100 -12.7729 0 403 | 41 157.533 1 2 100 -6.38646 0 404 | 42 157.533 1 2 100 0 0 405 | 43 157.533 1 2 100 6.38646 0 406 | 44 157.533 1 2 100 12.7729 0 407 | 45 157.533 1 2 100 19.1594 0 408 | 46 157.533 1 2 100 25.5458 0 409 | 47 157.533 1 2 100 31.9323 0 410 | 48 157.533 1 2 100 38.3188 0 411 | 49 157.533 1 2 100 44.7052 0 412 | 50 157.533 1 2 100 51.0917 0 413 | 51 157.533 1 2 100 57.4781 0 414 | 52 157.533 1 2 100 63.8646 0 415 | 53 157.533 1 2 100 70.2511 0 416 | 54 157.533 1 2 100 76.6375 0 417 | 55 157.533 1 2 100 83.024 0 418 | 56 157.533 1 2 100 89.4104 0 419 | 57 157.533 1 2 100 95.7969 0 420 | 58 157.533 1 2 100 102.183 0 421 | 59 157.533 1 2 100 108.57 0 422 | 60 157.533 1 2 100 114.956 0 423 | 61 157.533 1 2 100 121.343 0 424 | 62 157.533 1 2 100 127.729 0 425 | 63 157.533 1 2 100 134.116 0 426 | 64 157.533 1 2 100 140.502 0 427 | 65 157.533 1 2 100 146.889 0 428 | 66 157.533 1 2 100 153.275 0 429 | 67 157.533 1 2 100 159.661 0 430 | 68 157.533 1 2 100 166.048 0 431 | 69 157.533 1 2 100 172.434 0 432 | 70 157.533 1 2 100 178.821 0 433 | 71 157.533 1 2 100 185.207 0 434 | 72 157.533 1 2 100 191.594 0 435 | 73 157.533 1 2 100 197.98 0 436 | 74 157.533 1 2 100 204.367 0 437 | 75 157.533 1 2 100 210.753 0 438 | 76 157.533 1 2 100 217.14 0 439 | 77 157.533 1 2 100 223.526 0 440 | 78 157.533 1 2 100 229.913 0 441 | 79 157.533 1 2 100 236.299 0 442 | 80 157.533 1 2 100 242.685 0 443 | 81 157.533 1 2 100 249.072 0 444 | 82 157.533 1 2 100 255.458 0 445 | 446 | # Format of trapezoid gradients: 447 | # id amplitude rise flat fall delay 448 | # .. Hz/m us us us us 449 | [TRAP] 450 | 1 1.36243e+06 1000 4500 1000 0 451 | 452 | # Format of ADC events: 453 | # id num dwell delay freq phase 454 | # .. .. ns us Hz rad 455 | [ADC] 456 | 1 1 1000000 0 0 0 457 | 458 | # Format of delays: 459 | # id delay (us) 460 | [DELAYS] 461 | 1 12000000 462 | 2 3000000 463 | 464 | # Sequence Shapes 465 | [SHAPES] 466 | 467 | shape_id 1 468 | num_samples 5030 469 | 1 470 | 0 471 | 0 472 | 4997 473 | -1 474 | 0 475 | 0 476 | 27 477 | 478 | shape_id 2 479 | num_samples 5030 480 | 0 481 | 0 482 | 5028 483 | 484 | -------------------------------------------------------------------------------- /case_8/case_8_pypulseq_v131.seq: -------------------------------------------------------------------------------- 1 | # Pulseq sequence file 2 | # Created by PyPulseq 3 | 4 | # Created for Pulseq-CEST 5 | # https://pulseq-cest.github.io/ 6 | # Created by: https://github.com/pulseq-cest/BMsim_challenge 7 | # Created at: 17-Aug-2023 10:06:58 8 | 9 | [VERSION] 10 | major 1 11 | minor 3 12 | revision 1post1 13 | 14 | [DEFINITIONS] 15 | B0 3 16 | B1pa 3.7 17 | B1rms 3.66317954 18 | FREQ 127.7292 19 | M0_offset -300 20 | Trec 3.0 21 | Trec_M0 12 22 | Tsat 0.0101 23 | n_pulses 2 24 | num_meas 82 25 | offsets_ppm -300 -2 -1.95 -1.9 -1.85 -1.8 -1.75 -1.7 -1.65 -1.6 -1.55 -1.5 -1.45 -1.4 -1.35 -1.3 -1.25 -1.2 -1.15 -1.1 -1.05 -1 -0.95 -0.9 -0.85 -0.8 -0.75 -0.7 -0.65 -0.6 -0.55 -0.5 -0.45 -0.4 -0.35 -0.3 -0.25 -0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 1.05 1.1 1.15 1.2 1.25 1.3 1.35 1.4 1.45 1.5 1.55 1.6 1.65 1.7 1.75 1.8 1.85 1.9 1.95 2 26 | seq_id_string case_8_pypulseq_v131 27 | td 0.0001 28 | tp 0.005 29 | 30 | # Format of blocks: 31 | # # D RF GX GY GZ ADC EXT 32 | [BLOCKS] 33 | 1 1 0 0 0 0 0 0 34 | 2 0 1 0 0 0 0 0 35 | 3 2 0 0 0 0 0 0 36 | 4 0 2 0 0 0 0 0 37 | 5 0 0 1 1 1 0 0 38 | 6 0 0 0 0 0 1 0 39 | 7 3 0 0 0 0 0 0 40 | 8 0 3 0 0 0 0 0 41 | 9 2 0 0 0 0 0 0 42 | 10 0 4 0 0 0 0 0 43 | 11 0 0 1 1 1 0 0 44 | 12 0 0 0 0 0 1 0 45 | 13 3 0 0 0 0 0 0 46 | 14 0 5 0 0 0 0 0 47 | 15 2 0 0 0 0 0 0 48 | 16 0 6 0 0 0 0 0 49 | 17 0 0 1 1 1 0 0 50 | 18 0 0 0 0 0 1 0 51 | 19 3 0 0 0 0 0 0 52 | 20 0 7 0 0 0 0 0 53 | 21 2 0 0 0 0 0 0 54 | 22 0 8 0 0 0 0 0 55 | 23 0 0 1 1 1 0 0 56 | 24 0 0 0 0 0 1 0 57 | 25 3 0 0 0 0 0 0 58 | 26 0 9 0 0 0 0 0 59 | 27 2 0 0 0 0 0 0 60 | 28 0 10 0 0 0 0 0 61 | 29 0 0 1 1 1 0 0 62 | 30 0 0 0 0 0 1 0 63 | 31 3 0 0 0 0 0 0 64 | 32 0 11 0 0 0 0 0 65 | 33 2 0 0 0 0 0 0 66 | 34 0 12 0 0 0 0 0 67 | 35 0 0 1 1 1 0 0 68 | 36 0 0 0 0 0 1 0 69 | 37 3 0 0 0 0 0 0 70 | 38 0 13 0 0 0 0 0 71 | 39 2 0 0 0 0 0 0 72 | 40 0 14 0 0 0 0 0 73 | 41 0 0 1 1 1 0 0 74 | 42 0 0 0 0 0 1 0 75 | 43 3 0 0 0 0 0 0 76 | 44 0 15 0 0 0 0 0 77 | 45 2 0 0 0 0 0 0 78 | 46 0 16 0 0 0 0 0 79 | 47 0 0 1 1 1 0 0 80 | 48 0 0 0 0 0 1 0 81 | 49 3 0 0 0 0 0 0 82 | 50 0 17 0 0 0 0 0 83 | 51 2 0 0 0 0 0 0 84 | 52 0 18 0 0 0 0 0 85 | 53 0 0 1 1 1 0 0 86 | 54 0 0 0 0 0 1 0 87 | 55 3 0 0 0 0 0 0 88 | 56 0 19 0 0 0 0 0 89 | 57 2 0 0 0 0 0 0 90 | 58 0 20 0 0 0 0 0 91 | 59 0 0 1 1 1 0 0 92 | 60 0 0 0 0 0 1 0 93 | 61 3 0 0 0 0 0 0 94 | 62 0 21 0 0 0 0 0 95 | 63 2 0 0 0 0 0 0 96 | 64 0 22 0 0 0 0 0 97 | 65 0 0 1 1 1 0 0 98 | 66 0 0 0 0 0 1 0 99 | 67 3 0 0 0 0 0 0 100 | 68 0 23 0 0 0 0 0 101 | 69 2 0 0 0 0 0 0 102 | 70 0 24 0 0 0 0 0 103 | 71 0 0 1 1 1 0 0 104 | 72 0 0 0 0 0 1 0 105 | 73 3 0 0 0 0 0 0 106 | 74 0 25 0 0 0 0 0 107 | 75 2 0 0 0 0 0 0 108 | 76 0 26 0 0 0 0 0 109 | 77 0 0 1 1 1 0 0 110 | 78 0 0 0 0 0 1 0 111 | 79 3 0 0 0 0 0 0 112 | 80 0 27 0 0 0 0 0 113 | 81 2 0 0 0 0 0 0 114 | 82 0 28 0 0 0 0 0 115 | 83 0 0 1 1 1 0 0 116 | 84 0 0 0 0 0 1 0 117 | 85 3 0 0 0 0 0 0 118 | 86 0 29 0 0 0 0 0 119 | 87 2 0 0 0 0 0 0 120 | 88 0 30 0 0 0 0 0 121 | 89 0 0 1 1 1 0 0 122 | 90 0 0 0 0 0 1 0 123 | 91 3 0 0 0 0 0 0 124 | 92 0 31 0 0 0 0 0 125 | 93 2 0 0 0 0 0 0 126 | 94 0 32 0 0 0 0 0 127 | 95 0 0 1 1 1 0 0 128 | 96 0 0 0 0 0 1 0 129 | 97 3 0 0 0 0 0 0 130 | 98 0 33 0 0 0 0 0 131 | 99 2 0 0 0 0 0 0 132 | 100 0 34 0 0 0 0 0 133 | 101 0 0 1 1 1 0 0 134 | 102 0 0 0 0 0 1 0 135 | 103 3 0 0 0 0 0 0 136 | 104 0 35 0 0 0 0 0 137 | 105 2 0 0 0 0 0 0 138 | 106 0 36 0 0 0 0 0 139 | 107 0 0 1 1 1 0 0 140 | 108 0 0 0 0 0 1 0 141 | 109 3 0 0 0 0 0 0 142 | 110 0 37 0 0 0 0 0 143 | 111 2 0 0 0 0 0 0 144 | 112 0 38 0 0 0 0 0 145 | 113 0 0 1 1 1 0 0 146 | 114 0 0 0 0 0 1 0 147 | 115 3 0 0 0 0 0 0 148 | 116 0 39 0 0 0 0 0 149 | 117 2 0 0 0 0 0 0 150 | 118 0 40 0 0 0 0 0 151 | 119 0 0 1 1 1 0 0 152 | 120 0 0 0 0 0 1 0 153 | 121 3 0 0 0 0 0 0 154 | 122 0 41 0 0 0 0 0 155 | 123 2 0 0 0 0 0 0 156 | 124 0 42 0 0 0 0 0 157 | 125 0 0 1 1 1 0 0 158 | 126 0 0 0 0 0 1 0 159 | 127 3 0 0 0 0 0 0 160 | 128 0 43 0 0 0 0 0 161 | 129 2 0 0 0 0 0 0 162 | 130 0 44 0 0 0 0 0 163 | 131 0 0 1 1 1 0 0 164 | 132 0 0 0 0 0 1 0 165 | 133 3 0 0 0 0 0 0 166 | 134 0 45 0 0 0 0 0 167 | 135 2 0 0 0 0 0 0 168 | 136 0 46 0 0 0 0 0 169 | 137 0 0 1 1 1 0 0 170 | 138 0 0 0 0 0 1 0 171 | 139 3 0 0 0 0 0 0 172 | 140 0 47 0 0 0 0 0 173 | 141 2 0 0 0 0 0 0 174 | 142 0 48 0 0 0 0 0 175 | 143 0 0 1 1 1 0 0 176 | 144 0 0 0 0 0 1 0 177 | 145 3 0 0 0 0 0 0 178 | 146 0 49 0 0 0 0 0 179 | 147 2 0 0 0 0 0 0 180 | 148 0 50 0 0 0 0 0 181 | 149 0 0 1 1 1 0 0 182 | 150 0 0 0 0 0 1 0 183 | 151 3 0 0 0 0 0 0 184 | 152 0 51 0 0 0 0 0 185 | 153 2 0 0 0 0 0 0 186 | 154 0 52 0 0 0 0 0 187 | 155 0 0 1 1 1 0 0 188 | 156 0 0 0 0 0 1 0 189 | 157 3 0 0 0 0 0 0 190 | 158 0 53 0 0 0 0 0 191 | 159 2 0 0 0 0 0 0 192 | 160 0 54 0 0 0 0 0 193 | 161 0 0 1 1 1 0 0 194 | 162 0 0 0 0 0 1 0 195 | 163 3 0 0 0 0 0 0 196 | 164 0 55 0 0 0 0 0 197 | 165 2 0 0 0 0 0 0 198 | 166 0 56 0 0 0 0 0 199 | 167 0 0 1 1 1 0 0 200 | 168 0 0 0 0 0 1 0 201 | 169 3 0 0 0 0 0 0 202 | 170 0 57 0 0 0 0 0 203 | 171 2 0 0 0 0 0 0 204 | 172 0 58 0 0 0 0 0 205 | 173 0 0 1 1 1 0 0 206 | 174 0 0 0 0 0 1 0 207 | 175 3 0 0 0 0 0 0 208 | 176 0 59 0 0 0 0 0 209 | 177 2 0 0 0 0 0 0 210 | 178 0 60 0 0 0 0 0 211 | 179 0 0 1 1 1 0 0 212 | 180 0 0 0 0 0 1 0 213 | 181 3 0 0 0 0 0 0 214 | 182 0 61 0 0 0 0 0 215 | 183 2 0 0 0 0 0 0 216 | 184 0 62 0 0 0 0 0 217 | 185 0 0 1 1 1 0 0 218 | 186 0 0 0 0 0 1 0 219 | 187 3 0 0 0 0 0 0 220 | 188 0 63 0 0 0 0 0 221 | 189 2 0 0 0 0 0 0 222 | 190 0 64 0 0 0 0 0 223 | 191 0 0 1 1 1 0 0 224 | 192 0 0 0 0 0 1 0 225 | 193 3 0 0 0 0 0 0 226 | 194 0 65 0 0 0 0 0 227 | 195 2 0 0 0 0 0 0 228 | 196 0 66 0 0 0 0 0 229 | 197 0 0 1 1 1 0 0 230 | 198 0 0 0 0 0 1 0 231 | 199 3 0 0 0 0 0 0 232 | 200 0 67 0 0 0 0 0 233 | 201 2 0 0 0 0 0 0 234 | 202 0 68 0 0 0 0 0 235 | 203 0 0 1 1 1 0 0 236 | 204 0 0 0 0 0 1 0 237 | 205 3 0 0 0 0 0 0 238 | 206 0 69 0 0 0 0 0 239 | 207 2 0 0 0 0 0 0 240 | 208 0 70 0 0 0 0 0 241 | 209 0 0 1 1 1 0 0 242 | 210 0 0 0 0 0 1 0 243 | 211 3 0 0 0 0 0 0 244 | 212 0 71 0 0 0 0 0 245 | 213 2 0 0 0 0 0 0 246 | 214 0 72 0 0 0 0 0 247 | 215 0 0 1 1 1 0 0 248 | 216 0 0 0 0 0 1 0 249 | 217 3 0 0 0 0 0 0 250 | 218 0 73 0 0 0 0 0 251 | 219 2 0 0 0 0 0 0 252 | 220 0 74 0 0 0 0 0 253 | 221 0 0 1 1 1 0 0 254 | 222 0 0 0 0 0 1 0 255 | 223 3 0 0 0 0 0 0 256 | 224 0 75 0 0 0 0 0 257 | 225 2 0 0 0 0 0 0 258 | 226 0 76 0 0 0 0 0 259 | 227 0 0 1 1 1 0 0 260 | 228 0 0 0 0 0 1 0 261 | 229 3 0 0 0 0 0 0 262 | 230 0 77 0 0 0 0 0 263 | 231 2 0 0 0 0 0 0 264 | 232 0 78 0 0 0 0 0 265 | 233 0 0 1 1 1 0 0 266 | 234 0 0 0 0 0 1 0 267 | 235 3 0 0 0 0 0 0 268 | 236 0 79 0 0 0 0 0 269 | 237 2 0 0 0 0 0 0 270 | 238 0 80 0 0 0 0 0 271 | 239 0 0 1 1 1 0 0 272 | 240 0 0 0 0 0 1 0 273 | 241 3 0 0 0 0 0 0 274 | 242 0 81 0 0 0 0 0 275 | 243 2 0 0 0 0 0 0 276 | 244 0 82 0 0 0 0 0 277 | 245 0 0 1 1 1 0 0 278 | 246 0 0 0 0 0 1 0 279 | 247 3 0 0 0 0 0 0 280 | 248 0 83 0 0 0 0 0 281 | 249 2 0 0 0 0 0 0 282 | 250 0 83 0 0 0 0 0 283 | 251 0 0 1 1 1 0 0 284 | 252 0 0 0 0 0 1 0 285 | 253 3 0 0 0 0 0 0 286 | 254 0 84 0 0 0 0 0 287 | 255 2 0 0 0 0 0 0 288 | 256 0 85 0 0 0 0 0 289 | 257 0 0 1 1 1 0 0 290 | 258 0 0 0 0 0 1 0 291 | 259 3 0 0 0 0 0 0 292 | 260 0 86 0 0 0 0 0 293 | 261 2 0 0 0 0 0 0 294 | 262 0 87 0 0 0 0 0 295 | 263 0 0 1 1 1 0 0 296 | 264 0 0 0 0 0 1 0 297 | 265 3 0 0 0 0 0 0 298 | 266 0 88 0 0 0 0 0 299 | 267 2 0 0 0 0 0 0 300 | 268 0 89 0 0 0 0 0 301 | 269 0 0 1 1 1 0 0 302 | 270 0 0 0 0 0 1 0 303 | 271 3 0 0 0 0 0 0 304 | 272 0 90 0 0 0 0 0 305 | 273 2 0 0 0 0 0 0 306 | 274 0 91 0 0 0 0 0 307 | 275 0 0 1 1 1 0 0 308 | 276 0 0 0 0 0 1 0 309 | 277 3 0 0 0 0 0 0 310 | 278 0 92 0 0 0 0 0 311 | 279 2 0 0 0 0 0 0 312 | 280 0 93 0 0 0 0 0 313 | 281 0 0 1 1 1 0 0 314 | 282 0 0 0 0 0 1 0 315 | 283 3 0 0 0 0 0 0 316 | 284 0 94 0 0 0 0 0 317 | 285 2 0 0 0 0 0 0 318 | 286 0 95 0 0 0 0 0 319 | 287 0 0 1 1 1 0 0 320 | 288 0 0 0 0 0 1 0 321 | 289 3 0 0 0 0 0 0 322 | 290 0 96 0 0 0 0 0 323 | 291 2 0 0 0 0 0 0 324 | 292 0 97 0 0 0 0 0 325 | 293 0 0 1 1 1 0 0 326 | 294 0 0 0 0 0 1 0 327 | 295 3 0 0 0 0 0 0 328 | 296 0 98 0 0 0 0 0 329 | 297 2 0 0 0 0 0 0 330 | 298 0 99 0 0 0 0 0 331 | 299 0 0 1 1 1 0 0 332 | 300 0 0 0 0 0 1 0 333 | 301 3 0 0 0 0 0 0 334 | 302 0 100 0 0 0 0 0 335 | 303 2 0 0 0 0 0 0 336 | 304 0 101 0 0 0 0 0 337 | 305 0 0 1 1 1 0 0 338 | 306 0 0 0 0 0 1 0 339 | 307 3 0 0 0 0 0 0 340 | 308 0 102 0 0 0 0 0 341 | 309 2 0 0 0 0 0 0 342 | 310 0 103 0 0 0 0 0 343 | 311 0 0 1 1 1 0 0 344 | 312 0 0 0 0 0 1 0 345 | 313 3 0 0 0 0 0 0 346 | 314 0 104 0 0 0 0 0 347 | 315 2 0 0 0 0 0 0 348 | 316 0 105 0 0 0 0 0 349 | 317 0 0 1 1 1 0 0 350 | 318 0 0 0 0 0 1 0 351 | 319 3 0 0 0 0 0 0 352 | 320 0 106 0 0 0 0 0 353 | 321 2 0 0 0 0 0 0 354 | 322 0 107 0 0 0 0 0 355 | 323 0 0 1 1 1 0 0 356 | 324 0 0 0 0 0 1 0 357 | 325 3 0 0 0 0 0 0 358 | 326 0 108 0 0 0 0 0 359 | 327 2 0 0 0 0 0 0 360 | 328 0 109 0 0 0 0 0 361 | 329 0 0 1 1 1 0 0 362 | 330 0 0 0 0 0 1 0 363 | 331 3 0 0 0 0 0 0 364 | 332 0 110 0 0 0 0 0 365 | 333 2 0 0 0 0 0 0 366 | 334 0 111 0 0 0 0 0 367 | 335 0 0 1 1 1 0 0 368 | 336 0 0 0 0 0 1 0 369 | 337 3 0 0 0 0 0 0 370 | 338 0 112 0 0 0 0 0 371 | 339 2 0 0 0 0 0 0 372 | 340 0 113 0 0 0 0 0 373 | 341 0 0 1 1 1 0 0 374 | 342 0 0 0 0 0 1 0 375 | 343 3 0 0 0 0 0 0 376 | 344 0 114 0 0 0 0 0 377 | 345 2 0 0 0 0 0 0 378 | 346 0 115 0 0 0 0 0 379 | 347 0 0 1 1 1 0 0 380 | 348 0 0 0 0 0 1 0 381 | 349 3 0 0 0 0 0 0 382 | 350 0 116 0 0 0 0 0 383 | 351 2 0 0 0 0 0 0 384 | 352 0 117 0 0 0 0 0 385 | 353 0 0 1 1 1 0 0 386 | 354 0 0 0 0 0 1 0 387 | 355 3 0 0 0 0 0 0 388 | 356 0 118 0 0 0 0 0 389 | 357 2 0 0 0 0 0 0 390 | 358 0 119 0 0 0 0 0 391 | 359 0 0 1 1 1 0 0 392 | 360 0 0 0 0 0 1 0 393 | 361 3 0 0 0 0 0 0 394 | 362 0 120 0 0 0 0 0 395 | 363 2 0 0 0 0 0 0 396 | 364 0 121 0 0 0 0 0 397 | 365 0 0 1 1 1 0 0 398 | 366 0 0 0 0 0 1 0 399 | 367 3 0 0 0 0 0 0 400 | 368 0 122 0 0 0 0 0 401 | 369 2 0 0 0 0 0 0 402 | 370 0 123 0 0 0 0 0 403 | 371 0 0 1 1 1 0 0 404 | 372 0 0 0 0 0 1 0 405 | 373 3 0 0 0 0 0 0 406 | 374 0 124 0 0 0 0 0 407 | 375 2 0 0 0 0 0 0 408 | 376 0 125 0 0 0 0 0 409 | 377 0 0 1 1 1 0 0 410 | 378 0 0 0 0 0 1 0 411 | 379 3 0 0 0 0 0 0 412 | 380 0 126 0 0 0 0 0 413 | 381 2 0 0 0 0 0 0 414 | 382 0 127 0 0 0 0 0 415 | 383 0 0 1 1 1 0 0 416 | 384 0 0 0 0 0 1 0 417 | 385 3 0 0 0 0 0 0 418 | 386 0 128 0 0 0 0 0 419 | 387 2 0 0 0 0 0 0 420 | 388 0 129 0 0 0 0 0 421 | 389 0 0 1 1 1 0 0 422 | 390 0 0 0 0 0 1 0 423 | 391 3 0 0 0 0 0 0 424 | 392 0 130 0 0 0 0 0 425 | 393 2 0 0 0 0 0 0 426 | 394 0 131 0 0 0 0 0 427 | 395 0 0 1 1 1 0 0 428 | 396 0 0 0 0 0 1 0 429 | 397 3 0 0 0 0 0 0 430 | 398 0 132 0 0 0 0 0 431 | 399 2 0 0 0 0 0 0 432 | 400 0 133 0 0 0 0 0 433 | 401 0 0 1 1 1 0 0 434 | 402 0 0 0 0 0 1 0 435 | 403 3 0 0 0 0 0 0 436 | 404 0 134 0 0 0 0 0 437 | 405 2 0 0 0 0 0 0 438 | 406 0 135 0 0 0 0 0 439 | 407 0 0 1 1 1 0 0 440 | 408 0 0 0 0 0 1 0 441 | 409 3 0 0 0 0 0 0 442 | 410 0 136 0 0 0 0 0 443 | 411 2 0 0 0 0 0 0 444 | 412 0 137 0 0 0 0 0 445 | 413 0 0 1 1 1 0 0 446 | 414 0 0 0 0 0 1 0 447 | 415 3 0 0 0 0 0 0 448 | 416 0 138 0 0 0 0 0 449 | 417 2 0 0 0 0 0 0 450 | 418 0 139 0 0 0 0 0 451 | 419 0 0 1 1 1 0 0 452 | 420 0 0 0 0 0 1 0 453 | 421 3 0 0 0 0 0 0 454 | 422 0 140 0 0 0 0 0 455 | 423 2 0 0 0 0 0 0 456 | 424 0 141 0 0 0 0 0 457 | 425 0 0 1 1 1 0 0 458 | 426 0 0 0 0 0 1 0 459 | 427 3 0 0 0 0 0 0 460 | 428 0 142 0 0 0 0 0 461 | 429 2 0 0 0 0 0 0 462 | 430 0 143 0 0 0 0 0 463 | 431 0 0 1 1 1 0 0 464 | 432 0 0 0 0 0 1 0 465 | 433 3 0 0 0 0 0 0 466 | 434 0 144 0 0 0 0 0 467 | 435 2 0 0 0 0 0 0 468 | 436 0 145 0 0 0 0 0 469 | 437 0 0 1 1 1 0 0 470 | 438 0 0 0 0 0 1 0 471 | 439 3 0 0 0 0 0 0 472 | 440 0 146 0 0 0 0 0 473 | 441 2 0 0 0 0 0 0 474 | 442 0 147 0 0 0 0 0 475 | 443 0 0 1 1 1 0 0 476 | 444 0 0 0 0 0 1 0 477 | 445 3 0 0 0 0 0 0 478 | 446 0 148 0 0 0 0 0 479 | 447 2 0 0 0 0 0 0 480 | 448 0 149 0 0 0 0 0 481 | 449 0 0 1 1 1 0 0 482 | 450 0 0 0 0 0 1 0 483 | 451 3 0 0 0 0 0 0 484 | 452 0 150 0 0 0 0 0 485 | 453 2 0 0 0 0 0 0 486 | 454 0 151 0 0 0 0 0 487 | 455 0 0 1 1 1 0 0 488 | 456 0 0 0 0 0 1 0 489 | 457 3 0 0 0 0 0 0 490 | 458 0 152 0 0 0 0 0 491 | 459 2 0 0 0 0 0 0 492 | 460 0 153 0 0 0 0 0 493 | 461 0 0 1 1 1 0 0 494 | 462 0 0 0 0 0 1 0 495 | 463 3 0 0 0 0 0 0 496 | 464 0 154 0 0 0 0 0 497 | 465 2 0 0 0 0 0 0 498 | 466 0 155 0 0 0 0 0 499 | 467 0 0 1 1 1 0 0 500 | 468 0 0 0 0 0 1 0 501 | 469 3 0 0 0 0 0 0 502 | 470 0 156 0 0 0 0 0 503 | 471 2 0 0 0 0 0 0 504 | 472 0 157 0 0 0 0 0 505 | 473 0 0 1 1 1 0 0 506 | 474 0 0 0 0 0 1 0 507 | 475 3 0 0 0 0 0 0 508 | 476 0 158 0 0 0 0 0 509 | 477 2 0 0 0 0 0 0 510 | 478 0 159 0 0 0 0 0 511 | 479 0 0 1 1 1 0 0 512 | 480 0 0 0 0 0 1 0 513 | 481 3 0 0 0 0 0 0 514 | 482 0 160 0 0 0 0 0 515 | 483 2 0 0 0 0 0 0 516 | 484 0 161 0 0 0 0 0 517 | 485 0 0 1 1 1 0 0 518 | 486 0 0 0 0 0 1 0 519 | 487 3 0 0 0 0 0 0 520 | 488 0 162 0 0 0 0 0 521 | 489 2 0 0 0 0 0 0 522 | 490 0 163 0 0 0 0 0 523 | 491 0 0 1 1 1 0 0 524 | 492 0 0 0 0 0 1 0 525 | 526 | # Format of RF events: 527 | # id amplitude mag_id phase_id delay freq phase 528 | # .. Hz .... .... us Hz rad 529 | [RF] 530 | 1 157.533 1 2 0 -38318.8 0 531 | 2 157.533 1 2 0 -38318.8 2.55223 532 | 3 157.533 1 2 0 -255.458 0 533 | 4 157.533 1 2 0 -255.458 4.54091 534 | 5 157.533 1 2 0 -249.072 0 535 | 6 157.533 1 2 0 -249.072 4.74154 536 | 7 157.533 1 2 0 -242.685 0 537 | 8 157.533 1 2 0 -242.685 4.94218 538 | 9 157.533 1 2 0 -236.299 0 539 | 10 157.533 1 2 0 -236.299 5.14282 540 | 11 157.533 1 2 0 -229.913 0 541 | 12 157.533 1 2 0 -229.913 5.34345 542 | 13 157.533 1 2 0 -223.526 0 543 | 14 157.533 1 2 0 -223.526 5.54409 544 | 15 157.533 1 2 0 -217.14 0 545 | 16 157.533 1 2 0 -217.14 5.74473 546 | 17 157.533 1 2 0 -210.753 0 547 | 18 157.533 1 2 0 -210.753 5.94536 548 | 19 157.533 1 2 0 -204.367 0 549 | 20 157.533 1 2 0 -204.367 6.146 550 | 21 157.533 1 2 0 -197.98 0 551 | 22 157.533 1 2 0 -197.98 0.063452 552 | 23 157.533 1 2 0 -191.594 0 553 | 24 157.533 1 2 0 -191.594 0.264089 554 | 25 157.533 1 2 0 -185.207 0 555 | 26 157.533 1 2 0 -185.207 0.464725 556 | 27 157.533 1 2 0 -178.821 0 557 | 28 157.533 1 2 0 -178.821 0.665362 558 | 29 157.533 1 2 0 -172.434 0 559 | 30 157.533 1 2 0 -172.434 0.865998 560 | 31 157.533 1 2 0 -166.048 0 561 | 32 157.533 1 2 0 -166.048 1.06663 562 | 33 157.533 1 2 0 -159.661 0 563 | 34 157.533 1 2 0 -159.661 1.26727 564 | 35 157.533 1 2 0 -153.275 0 565 | 36 157.533 1 2 0 -153.275 1.46791 566 | 37 157.533 1 2 0 -146.889 0 567 | 38 157.533 1 2 0 -146.889 1.66854 568 | 39 157.533 1 2 0 -140.502 0 569 | 40 157.533 1 2 0 -140.502 1.86918 570 | 41 157.533 1 2 0 -134.116 0 571 | 42 157.533 1 2 0 -134.116 2.06982 572 | 43 157.533 1 2 0 -127.729 0 573 | 44 157.533 1 2 0 -127.729 2.27045 574 | 45 157.533 1 2 0 -121.343 0 575 | 46 157.533 1 2 0 -121.343 2.47109 576 | 47 157.533 1 2 0 -114.956 0 577 | 48 157.533 1 2 0 -114.956 2.67173 578 | 49 157.533 1 2 0 -108.57 0 579 | 50 157.533 1 2 0 -108.57 2.87236 580 | 51 157.533 1 2 0 -102.183 0 581 | 52 157.533 1 2 0 -102.183 3.073 582 | 53 157.533 1 2 0 -95.7969 0 583 | 54 157.533 1 2 0 -95.7969 3.27364 584 | 55 157.533 1 2 0 -89.4104 0 585 | 56 157.533 1 2 0 -89.4104 3.47427 586 | 57 157.533 1 2 0 -83.024 0 587 | 58 157.533 1 2 0 -83.024 3.67491 588 | 59 157.533 1 2 0 -76.6375 0 589 | 60 157.533 1 2 0 -76.6375 3.87555 590 | 61 157.533 1 2 0 -70.2511 0 591 | 62 157.533 1 2 0 -70.2511 4.07618 592 | 63 157.533 1 2 0 -63.8646 0 593 | 64 157.533 1 2 0 -63.8646 4.27682 594 | 65 157.533 1 2 0 -57.4781 0 595 | 66 157.533 1 2 0 -57.4781 4.47746 596 | 67 157.533 1 2 0 -51.0917 0 597 | 68 157.533 1 2 0 -51.0917 4.67809 598 | 69 157.533 1 2 0 -44.7052 0 599 | 70 157.533 1 2 0 -44.7052 4.87873 600 | 71 157.533 1 2 0 -38.3188 0 601 | 72 157.533 1 2 0 -38.3188 5.07937 602 | 73 157.533 1 2 0 -31.9323 0 603 | 74 157.533 1 2 0 -31.9323 5.28 604 | 75 157.533 1 2 0 -25.5458 0 605 | 76 157.533 1 2 0 -25.5458 5.48064 606 | 77 157.533 1 2 0 -19.1594 0 607 | 78 157.533 1 2 0 -19.1594 5.68128 608 | 79 157.533 1 2 0 -12.7729 0 609 | 80 157.533 1 2 0 -12.7729 5.88191 610 | 81 157.533 1 2 0 -6.38646 0 611 | 82 157.533 1 2 0 -6.38646 6.08255 612 | 83 157.533 1 2 0 0 0 613 | 84 157.533 1 2 0 6.38646 0 614 | 85 157.533 1 2 0 6.38646 0.200637 615 | 86 157.533 1 2 0 12.7729 0 616 | 87 157.533 1 2 0 12.7729 0.401273 617 | 88 157.533 1 2 0 19.1594 0 618 | 89 157.533 1 2 0 19.1594 0.60191 619 | 90 157.533 1 2 0 25.5458 0 620 | 91 157.533 1 2 0 25.5458 0.802546 621 | 92 157.533 1 2 0 31.9323 0 622 | 93 157.533 1 2 0 31.9323 1.00318 623 | 94 157.533 1 2 0 38.3188 0 624 | 95 157.533 1 2 0 38.3188 1.20382 625 | 96 157.533 1 2 0 44.7052 0 626 | 97 157.533 1 2 0 44.7052 1.40446 627 | 98 157.533 1 2 0 51.0917 0 628 | 99 157.533 1 2 0 51.0917 1.60509 629 | 100 157.533 1 2 0 57.4781 0 630 | 101 157.533 1 2 0 57.4781 1.80573 631 | 102 157.533 1 2 0 63.8646 0 632 | 103 157.533 1 2 0 63.8646 2.00637 633 | 104 157.533 1 2 0 70.2511 0 634 | 105 157.533 1 2 0 70.2511 2.207 635 | 106 157.533 1 2 0 76.6375 0 636 | 107 157.533 1 2 0 76.6375 2.40764 637 | 108 157.533 1 2 0 83.024 0 638 | 109 157.533 1 2 0 83.024 2.60828 639 | 110 157.533 1 2 0 89.4104 0 640 | 111 157.533 1 2 0 89.4104 2.80891 641 | 112 157.533 1 2 0 95.7969 0 642 | 113 157.533 1 2 0 95.7969 3.00955 643 | 114 157.533 1 2 0 102.183 0 644 | 115 157.533 1 2 0 102.183 3.21018 645 | 116 157.533 1 2 0 108.57 0 646 | 117 157.533 1 2 0 108.57 3.41082 647 | 118 157.533 1 2 0 114.956 0 648 | 119 157.533 1 2 0 114.956 3.61146 649 | 120 157.533 1 2 0 121.343 0 650 | 121 157.533 1 2 0 121.343 3.81209 651 | 122 157.533 1 2 0 127.729 0 652 | 123 157.533 1 2 0 127.729 4.01273 653 | 124 157.533 1 2 0 134.116 0 654 | 125 157.533 1 2 0 134.116 4.21337 655 | 126 157.533 1 2 0 140.502 0 656 | 127 157.533 1 2 0 140.502 4.414 657 | 128 157.533 1 2 0 146.889 0 658 | 129 157.533 1 2 0 146.889 4.61464 659 | 130 157.533 1 2 0 153.275 0 660 | 131 157.533 1 2 0 153.275 4.81528 661 | 132 157.533 1 2 0 159.661 0 662 | 133 157.533 1 2 0 159.661 5.01591 663 | 134 157.533 1 2 0 166.048 0 664 | 135 157.533 1 2 0 166.048 5.21655 665 | 136 157.533 1 2 0 172.434 0 666 | 137 157.533 1 2 0 172.434 5.41719 667 | 138 157.533 1 2 0 178.821 0 668 | 139 157.533 1 2 0 178.821 5.61782 669 | 140 157.533 1 2 0 185.207 0 670 | 141 157.533 1 2 0 185.207 5.81846 671 | 142 157.533 1 2 0 191.594 0 672 | 143 157.533 1 2 0 191.594 6.0191 673 | 144 157.533 1 2 0 197.98 0 674 | 145 157.533 1 2 0 197.98 6.21973 675 | 146 157.533 1 2 0 204.367 0 676 | 147 157.533 1 2 0 204.367 0.137185 677 | 148 157.533 1 2 0 210.753 0 678 | 149 157.533 1 2 0 210.753 0.337821 679 | 150 157.533 1 2 0 217.14 0 680 | 151 157.533 1 2 0 217.14 0.538458 681 | 152 157.533 1 2 0 223.526 0 682 | 153 157.533 1 2 0 223.526 0.739094 683 | 154 157.533 1 2 0 229.913 0 684 | 155 157.533 1 2 0 229.913 0.939731 685 | 156 157.533 1 2 0 236.299 0 686 | 157 157.533 1 2 0 236.299 1.14037 687 | 158 157.533 1 2 0 242.685 0 688 | 159 157.533 1 2 0 242.685 1.341 689 | 160 157.533 1 2 0 249.072 0 690 | 161 157.533 1 2 0 249.072 1.54164 691 | 162 157.533 1 2 0 255.458 0 692 | 163 157.533 1 2 0 255.458 1.74228 693 | 694 | # Format of trapezoid gradients: 695 | # id amplitude rise flat fall delay 696 | # .. Hz/m us us us us 697 | [TRAP] 698 | 1 2.72489e+06 1000 4500 1000 0 699 | 700 | # Format of ADC events: 701 | # id num dwell delay freq phase 702 | # .. .. ns us Hz rad 703 | [ADC] 704 | 1 1 1000000 0 0 0 705 | 706 | # Format of delays: 707 | # id delay (us) 708 | [DELAYS] 709 | 1 12000000 710 | 2 100 711 | 3 3000000 712 | 713 | # Sequence Shapes 714 | [SHAPES] 715 | 716 | shape_id 1 717 | num_samples 5000 718 | 1 719 | 0 720 | 0 721 | 4997 722 | 723 | shape_id 2 724 | num_samples 5000 725 | 0 726 | 0 727 | 4998 728 | 729 | -------------------------------------------------------------------------------- /case_8/case_8_pypulseq_v140.seq: -------------------------------------------------------------------------------- 1 | # Pulseq sequence file 2 | # Created by PyPulseq 3 | 4 | # Created for Pulseq-CEST 5 | # https://pulseq-cest.github.io/ 6 | # Created by: https://github.com/pulseq-cest/BMsim_challenge 7 | # Created at: 17-Aug-2023 14:55:37 8 | 9 | [VERSION] 10 | major 1 11 | minor 4 12 | revision 0 13 | 14 | [DEFINITIONS] 15 | AdcRasterTime 1e-07 16 | B0 3 17 | B1pa 3.7 18 | B1rms 3.66354591 19 | BlockDurationRaster 1e-05 20 | FREQ 127.7292 21 | GradientRasterTime 1e-05 22 | M0_offset -300 23 | RadiofrequencyRasterTime 1e-06 24 | Trec 3.0 25 | Trec_M0 12 26 | Tsat 0.0101 27 | n_pulses 2 28 | num_meas 82 29 | offsets_ppm -300 -2 -1.95 -1.9 -1.85 -1.8 -1.75 -1.7 -1.65 -1.6 -1.55 -1.5 -1.45 -1.4 -1.35 -1.3 -1.25 -1.2 -1.15 -1.1 -1.05 -1 -0.95 -0.9 -0.85 -0.8 -0.75 -0.7 -0.65 -0.6 -0.55 -0.5 -0.45 -0.4 -0.35 -0.3 -0.25 -0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 1.05 1.1 1.15 1.2 1.25 1.3 1.35 1.4 1.45 1.5 1.55 1.6 1.65 1.7 1.75 1.8 1.85 1.9 1.95 2 30 | seq_id_string case_8_pypulseq_v140 31 | td 0.0001 32 | tp 0.005 33 | 34 | # Format of blocks: 35 | # NUM DUR RF GX GY GZ ADC EXT 36 | [BLOCKS] 37 | 1 1200000 0 0 0 0 0 0 38 | 2 500 1 0 0 0 0 0 39 | 3 10 0 0 0 0 0 0 40 | 4 500 2 0 0 0 0 0 41 | 5 650 0 1 1 1 0 0 42 | 6 100 0 0 0 0 1 0 43 | 7 300000 0 0 0 0 0 0 44 | 8 500 3 0 0 0 0 0 45 | 9 10 0 0 0 0 0 0 46 | 10 500 4 0 0 0 0 0 47 | 11 650 0 1 1 1 0 0 48 | 12 100 0 0 0 0 1 0 49 | 13 300000 0 0 0 0 0 0 50 | 14 500 5 0 0 0 0 0 51 | 15 10 0 0 0 0 0 0 52 | 16 500 6 0 0 0 0 0 53 | 17 650 0 1 1 1 0 0 54 | 18 100 0 0 0 0 1 0 55 | 19 300000 0 0 0 0 0 0 56 | 20 500 7 0 0 0 0 0 57 | 21 10 0 0 0 0 0 0 58 | 22 500 8 0 0 0 0 0 59 | 23 650 0 1 1 1 0 0 60 | 24 100 0 0 0 0 1 0 61 | 25 300000 0 0 0 0 0 0 62 | 26 500 9 0 0 0 0 0 63 | 27 10 0 0 0 0 0 0 64 | 28 500 10 0 0 0 0 0 65 | 29 650 0 1 1 1 0 0 66 | 30 100 0 0 0 0 1 0 67 | 31 300000 0 0 0 0 0 0 68 | 32 500 11 0 0 0 0 0 69 | 33 10 0 0 0 0 0 0 70 | 34 500 12 0 0 0 0 0 71 | 35 650 0 1 1 1 0 0 72 | 36 100 0 0 0 0 1 0 73 | 37 300000 0 0 0 0 0 0 74 | 38 500 13 0 0 0 0 0 75 | 39 10 0 0 0 0 0 0 76 | 40 500 14 0 0 0 0 0 77 | 41 650 0 1 1 1 0 0 78 | 42 100 0 0 0 0 1 0 79 | 43 300000 0 0 0 0 0 0 80 | 44 500 15 0 0 0 0 0 81 | 45 10 0 0 0 0 0 0 82 | 46 500 16 0 0 0 0 0 83 | 47 650 0 1 1 1 0 0 84 | 48 100 0 0 0 0 1 0 85 | 49 300000 0 0 0 0 0 0 86 | 50 500 17 0 0 0 0 0 87 | 51 10 0 0 0 0 0 0 88 | 52 500 18 0 0 0 0 0 89 | 53 650 0 1 1 1 0 0 90 | 54 100 0 0 0 0 1 0 91 | 55 300000 0 0 0 0 0 0 92 | 56 500 19 0 0 0 0 0 93 | 57 10 0 0 0 0 0 0 94 | 58 500 20 0 0 0 0 0 95 | 59 650 0 1 1 1 0 0 96 | 60 100 0 0 0 0 1 0 97 | 61 300000 0 0 0 0 0 0 98 | 62 500 21 0 0 0 0 0 99 | 63 10 0 0 0 0 0 0 100 | 64 500 22 0 0 0 0 0 101 | 65 650 0 1 1 1 0 0 102 | 66 100 0 0 0 0 1 0 103 | 67 300000 0 0 0 0 0 0 104 | 68 500 23 0 0 0 0 0 105 | 69 10 0 0 0 0 0 0 106 | 70 500 24 0 0 0 0 0 107 | 71 650 0 1 1 1 0 0 108 | 72 100 0 0 0 0 1 0 109 | 73 300000 0 0 0 0 0 0 110 | 74 500 25 0 0 0 0 0 111 | 75 10 0 0 0 0 0 0 112 | 76 500 26 0 0 0 0 0 113 | 77 650 0 1 1 1 0 0 114 | 78 100 0 0 0 0 1 0 115 | 79 300000 0 0 0 0 0 0 116 | 80 500 27 0 0 0 0 0 117 | 81 10 0 0 0 0 0 0 118 | 82 500 28 0 0 0 0 0 119 | 83 650 0 1 1 1 0 0 120 | 84 100 0 0 0 0 1 0 121 | 85 300000 0 0 0 0 0 0 122 | 86 500 29 0 0 0 0 0 123 | 87 10 0 0 0 0 0 0 124 | 88 500 30 0 0 0 0 0 125 | 89 650 0 1 1 1 0 0 126 | 90 100 0 0 0 0 1 0 127 | 91 300000 0 0 0 0 0 0 128 | 92 500 31 0 0 0 0 0 129 | 93 10 0 0 0 0 0 0 130 | 94 500 32 0 0 0 0 0 131 | 95 650 0 1 1 1 0 0 132 | 96 100 0 0 0 0 1 0 133 | 97 300000 0 0 0 0 0 0 134 | 98 500 33 0 0 0 0 0 135 | 99 10 0 0 0 0 0 0 136 | 100 500 34 0 0 0 0 0 137 | 101 650 0 1 1 1 0 0 138 | 102 100 0 0 0 0 1 0 139 | 103 300000 0 0 0 0 0 0 140 | 104 500 35 0 0 0 0 0 141 | 105 10 0 0 0 0 0 0 142 | 106 500 36 0 0 0 0 0 143 | 107 650 0 1 1 1 0 0 144 | 108 100 0 0 0 0 1 0 145 | 109 300000 0 0 0 0 0 0 146 | 110 500 37 0 0 0 0 0 147 | 111 10 0 0 0 0 0 0 148 | 112 500 38 0 0 0 0 0 149 | 113 650 0 1 1 1 0 0 150 | 114 100 0 0 0 0 1 0 151 | 115 300000 0 0 0 0 0 0 152 | 116 500 39 0 0 0 0 0 153 | 117 10 0 0 0 0 0 0 154 | 118 500 40 0 0 0 0 0 155 | 119 650 0 1 1 1 0 0 156 | 120 100 0 0 0 0 1 0 157 | 121 300000 0 0 0 0 0 0 158 | 122 500 41 0 0 0 0 0 159 | 123 10 0 0 0 0 0 0 160 | 124 500 42 0 0 0 0 0 161 | 125 650 0 1 1 1 0 0 162 | 126 100 0 0 0 0 1 0 163 | 127 300000 0 0 0 0 0 0 164 | 128 500 43 0 0 0 0 0 165 | 129 10 0 0 0 0 0 0 166 | 130 500 44 0 0 0 0 0 167 | 131 650 0 1 1 1 0 0 168 | 132 100 0 0 0 0 1 0 169 | 133 300000 0 0 0 0 0 0 170 | 134 500 45 0 0 0 0 0 171 | 135 10 0 0 0 0 0 0 172 | 136 500 46 0 0 0 0 0 173 | 137 650 0 1 1 1 0 0 174 | 138 100 0 0 0 0 1 0 175 | 139 300000 0 0 0 0 0 0 176 | 140 500 47 0 0 0 0 0 177 | 141 10 0 0 0 0 0 0 178 | 142 500 48 0 0 0 0 0 179 | 143 650 0 1 1 1 0 0 180 | 144 100 0 0 0 0 1 0 181 | 145 300000 0 0 0 0 0 0 182 | 146 500 49 0 0 0 0 0 183 | 147 10 0 0 0 0 0 0 184 | 148 500 50 0 0 0 0 0 185 | 149 650 0 1 1 1 0 0 186 | 150 100 0 0 0 0 1 0 187 | 151 300000 0 0 0 0 0 0 188 | 152 500 51 0 0 0 0 0 189 | 153 10 0 0 0 0 0 0 190 | 154 500 52 0 0 0 0 0 191 | 155 650 0 1 1 1 0 0 192 | 156 100 0 0 0 0 1 0 193 | 157 300000 0 0 0 0 0 0 194 | 158 500 53 0 0 0 0 0 195 | 159 10 0 0 0 0 0 0 196 | 160 500 54 0 0 0 0 0 197 | 161 650 0 1 1 1 0 0 198 | 162 100 0 0 0 0 1 0 199 | 163 300000 0 0 0 0 0 0 200 | 164 500 55 0 0 0 0 0 201 | 165 10 0 0 0 0 0 0 202 | 166 500 56 0 0 0 0 0 203 | 167 650 0 1 1 1 0 0 204 | 168 100 0 0 0 0 1 0 205 | 169 300000 0 0 0 0 0 0 206 | 170 500 57 0 0 0 0 0 207 | 171 10 0 0 0 0 0 0 208 | 172 500 58 0 0 0 0 0 209 | 173 650 0 1 1 1 0 0 210 | 174 100 0 0 0 0 1 0 211 | 175 300000 0 0 0 0 0 0 212 | 176 500 59 0 0 0 0 0 213 | 177 10 0 0 0 0 0 0 214 | 178 500 60 0 0 0 0 0 215 | 179 650 0 1 1 1 0 0 216 | 180 100 0 0 0 0 1 0 217 | 181 300000 0 0 0 0 0 0 218 | 182 500 61 0 0 0 0 0 219 | 183 10 0 0 0 0 0 0 220 | 184 500 62 0 0 0 0 0 221 | 185 650 0 1 1 1 0 0 222 | 186 100 0 0 0 0 1 0 223 | 187 300000 0 0 0 0 0 0 224 | 188 500 63 0 0 0 0 0 225 | 189 10 0 0 0 0 0 0 226 | 190 500 64 0 0 0 0 0 227 | 191 650 0 1 1 1 0 0 228 | 192 100 0 0 0 0 1 0 229 | 193 300000 0 0 0 0 0 0 230 | 194 500 65 0 0 0 0 0 231 | 195 10 0 0 0 0 0 0 232 | 196 500 66 0 0 0 0 0 233 | 197 650 0 1 1 1 0 0 234 | 198 100 0 0 0 0 1 0 235 | 199 300000 0 0 0 0 0 0 236 | 200 500 67 0 0 0 0 0 237 | 201 10 0 0 0 0 0 0 238 | 202 500 68 0 0 0 0 0 239 | 203 650 0 1 1 1 0 0 240 | 204 100 0 0 0 0 1 0 241 | 205 300000 0 0 0 0 0 0 242 | 206 500 69 0 0 0 0 0 243 | 207 10 0 0 0 0 0 0 244 | 208 500 70 0 0 0 0 0 245 | 209 650 0 1 1 1 0 0 246 | 210 100 0 0 0 0 1 0 247 | 211 300000 0 0 0 0 0 0 248 | 212 500 71 0 0 0 0 0 249 | 213 10 0 0 0 0 0 0 250 | 214 500 72 0 0 0 0 0 251 | 215 650 0 1 1 1 0 0 252 | 216 100 0 0 0 0 1 0 253 | 217 300000 0 0 0 0 0 0 254 | 218 500 73 0 0 0 0 0 255 | 219 10 0 0 0 0 0 0 256 | 220 500 74 0 0 0 0 0 257 | 221 650 0 1 1 1 0 0 258 | 222 100 0 0 0 0 1 0 259 | 223 300000 0 0 0 0 0 0 260 | 224 500 75 0 0 0 0 0 261 | 225 10 0 0 0 0 0 0 262 | 226 500 76 0 0 0 0 0 263 | 227 650 0 1 1 1 0 0 264 | 228 100 0 0 0 0 1 0 265 | 229 300000 0 0 0 0 0 0 266 | 230 500 77 0 0 0 0 0 267 | 231 10 0 0 0 0 0 0 268 | 232 500 78 0 0 0 0 0 269 | 233 650 0 1 1 1 0 0 270 | 234 100 0 0 0 0 1 0 271 | 235 300000 0 0 0 0 0 0 272 | 236 500 79 0 0 0 0 0 273 | 237 10 0 0 0 0 0 0 274 | 238 500 80 0 0 0 0 0 275 | 239 650 0 1 1 1 0 0 276 | 240 100 0 0 0 0 1 0 277 | 241 300000 0 0 0 0 0 0 278 | 242 500 81 0 0 0 0 0 279 | 243 10 0 0 0 0 0 0 280 | 244 500 82 0 0 0 0 0 281 | 245 650 0 1 1 1 0 0 282 | 246 100 0 0 0 0 1 0 283 | 247 300000 0 0 0 0 0 0 284 | 248 500 83 0 0 0 0 0 285 | 249 10 0 0 0 0 0 0 286 | 250 500 83 0 0 0 0 0 287 | 251 650 0 1 1 1 0 0 288 | 252 100 0 0 0 0 1 0 289 | 253 300000 0 0 0 0 0 0 290 | 254 500 84 0 0 0 0 0 291 | 255 10 0 0 0 0 0 0 292 | 256 500 85 0 0 0 0 0 293 | 257 650 0 1 1 1 0 0 294 | 258 100 0 0 0 0 1 0 295 | 259 300000 0 0 0 0 0 0 296 | 260 500 86 0 0 0 0 0 297 | 261 10 0 0 0 0 0 0 298 | 262 500 87 0 0 0 0 0 299 | 263 650 0 1 1 1 0 0 300 | 264 100 0 0 0 0 1 0 301 | 265 300000 0 0 0 0 0 0 302 | 266 500 88 0 0 0 0 0 303 | 267 10 0 0 0 0 0 0 304 | 268 500 89 0 0 0 0 0 305 | 269 650 0 1 1 1 0 0 306 | 270 100 0 0 0 0 1 0 307 | 271 300000 0 0 0 0 0 0 308 | 272 500 90 0 0 0 0 0 309 | 273 10 0 0 0 0 0 0 310 | 274 500 91 0 0 0 0 0 311 | 275 650 0 1 1 1 0 0 312 | 276 100 0 0 0 0 1 0 313 | 277 300000 0 0 0 0 0 0 314 | 278 500 92 0 0 0 0 0 315 | 279 10 0 0 0 0 0 0 316 | 280 500 93 0 0 0 0 0 317 | 281 650 0 1 1 1 0 0 318 | 282 100 0 0 0 0 1 0 319 | 283 300000 0 0 0 0 0 0 320 | 284 500 94 0 0 0 0 0 321 | 285 10 0 0 0 0 0 0 322 | 286 500 95 0 0 0 0 0 323 | 287 650 0 1 1 1 0 0 324 | 288 100 0 0 0 0 1 0 325 | 289 300000 0 0 0 0 0 0 326 | 290 500 96 0 0 0 0 0 327 | 291 10 0 0 0 0 0 0 328 | 292 500 97 0 0 0 0 0 329 | 293 650 0 1 1 1 0 0 330 | 294 100 0 0 0 0 1 0 331 | 295 300000 0 0 0 0 0 0 332 | 296 500 98 0 0 0 0 0 333 | 297 10 0 0 0 0 0 0 334 | 298 500 99 0 0 0 0 0 335 | 299 650 0 1 1 1 0 0 336 | 300 100 0 0 0 0 1 0 337 | 301 300000 0 0 0 0 0 0 338 | 302 500 100 0 0 0 0 0 339 | 303 10 0 0 0 0 0 0 340 | 304 500 101 0 0 0 0 0 341 | 305 650 0 1 1 1 0 0 342 | 306 100 0 0 0 0 1 0 343 | 307 300000 0 0 0 0 0 0 344 | 308 500 102 0 0 0 0 0 345 | 309 10 0 0 0 0 0 0 346 | 310 500 103 0 0 0 0 0 347 | 311 650 0 1 1 1 0 0 348 | 312 100 0 0 0 0 1 0 349 | 313 300000 0 0 0 0 0 0 350 | 314 500 104 0 0 0 0 0 351 | 315 10 0 0 0 0 0 0 352 | 316 500 105 0 0 0 0 0 353 | 317 650 0 1 1 1 0 0 354 | 318 100 0 0 0 0 1 0 355 | 319 300000 0 0 0 0 0 0 356 | 320 500 106 0 0 0 0 0 357 | 321 10 0 0 0 0 0 0 358 | 322 500 107 0 0 0 0 0 359 | 323 650 0 1 1 1 0 0 360 | 324 100 0 0 0 0 1 0 361 | 325 300000 0 0 0 0 0 0 362 | 326 500 108 0 0 0 0 0 363 | 327 10 0 0 0 0 0 0 364 | 328 500 109 0 0 0 0 0 365 | 329 650 0 1 1 1 0 0 366 | 330 100 0 0 0 0 1 0 367 | 331 300000 0 0 0 0 0 0 368 | 332 500 110 0 0 0 0 0 369 | 333 10 0 0 0 0 0 0 370 | 334 500 111 0 0 0 0 0 371 | 335 650 0 1 1 1 0 0 372 | 336 100 0 0 0 0 1 0 373 | 337 300000 0 0 0 0 0 0 374 | 338 500 112 0 0 0 0 0 375 | 339 10 0 0 0 0 0 0 376 | 340 500 113 0 0 0 0 0 377 | 341 650 0 1 1 1 0 0 378 | 342 100 0 0 0 0 1 0 379 | 343 300000 0 0 0 0 0 0 380 | 344 500 114 0 0 0 0 0 381 | 345 10 0 0 0 0 0 0 382 | 346 500 115 0 0 0 0 0 383 | 347 650 0 1 1 1 0 0 384 | 348 100 0 0 0 0 1 0 385 | 349 300000 0 0 0 0 0 0 386 | 350 500 116 0 0 0 0 0 387 | 351 10 0 0 0 0 0 0 388 | 352 500 117 0 0 0 0 0 389 | 353 650 0 1 1 1 0 0 390 | 354 100 0 0 0 0 1 0 391 | 355 300000 0 0 0 0 0 0 392 | 356 500 118 0 0 0 0 0 393 | 357 10 0 0 0 0 0 0 394 | 358 500 119 0 0 0 0 0 395 | 359 650 0 1 1 1 0 0 396 | 360 100 0 0 0 0 1 0 397 | 361 300000 0 0 0 0 0 0 398 | 362 500 120 0 0 0 0 0 399 | 363 10 0 0 0 0 0 0 400 | 364 500 121 0 0 0 0 0 401 | 365 650 0 1 1 1 0 0 402 | 366 100 0 0 0 0 1 0 403 | 367 300000 0 0 0 0 0 0 404 | 368 500 122 0 0 0 0 0 405 | 369 10 0 0 0 0 0 0 406 | 370 500 123 0 0 0 0 0 407 | 371 650 0 1 1 1 0 0 408 | 372 100 0 0 0 0 1 0 409 | 373 300000 0 0 0 0 0 0 410 | 374 500 124 0 0 0 0 0 411 | 375 10 0 0 0 0 0 0 412 | 376 500 125 0 0 0 0 0 413 | 377 650 0 1 1 1 0 0 414 | 378 100 0 0 0 0 1 0 415 | 379 300000 0 0 0 0 0 0 416 | 380 500 126 0 0 0 0 0 417 | 381 10 0 0 0 0 0 0 418 | 382 500 127 0 0 0 0 0 419 | 383 650 0 1 1 1 0 0 420 | 384 100 0 0 0 0 1 0 421 | 385 300000 0 0 0 0 0 0 422 | 386 500 128 0 0 0 0 0 423 | 387 10 0 0 0 0 0 0 424 | 388 500 129 0 0 0 0 0 425 | 389 650 0 1 1 1 0 0 426 | 390 100 0 0 0 0 1 0 427 | 391 300000 0 0 0 0 0 0 428 | 392 500 130 0 0 0 0 0 429 | 393 10 0 0 0 0 0 0 430 | 394 500 131 0 0 0 0 0 431 | 395 650 0 1 1 1 0 0 432 | 396 100 0 0 0 0 1 0 433 | 397 300000 0 0 0 0 0 0 434 | 398 500 132 0 0 0 0 0 435 | 399 10 0 0 0 0 0 0 436 | 400 500 133 0 0 0 0 0 437 | 401 650 0 1 1 1 0 0 438 | 402 100 0 0 0 0 1 0 439 | 403 300000 0 0 0 0 0 0 440 | 404 500 134 0 0 0 0 0 441 | 405 10 0 0 0 0 0 0 442 | 406 500 135 0 0 0 0 0 443 | 407 650 0 1 1 1 0 0 444 | 408 100 0 0 0 0 1 0 445 | 409 300000 0 0 0 0 0 0 446 | 410 500 136 0 0 0 0 0 447 | 411 10 0 0 0 0 0 0 448 | 412 500 137 0 0 0 0 0 449 | 413 650 0 1 1 1 0 0 450 | 414 100 0 0 0 0 1 0 451 | 415 300000 0 0 0 0 0 0 452 | 416 500 138 0 0 0 0 0 453 | 417 10 0 0 0 0 0 0 454 | 418 500 139 0 0 0 0 0 455 | 419 650 0 1 1 1 0 0 456 | 420 100 0 0 0 0 1 0 457 | 421 300000 0 0 0 0 0 0 458 | 422 500 140 0 0 0 0 0 459 | 423 10 0 0 0 0 0 0 460 | 424 500 141 0 0 0 0 0 461 | 425 650 0 1 1 1 0 0 462 | 426 100 0 0 0 0 1 0 463 | 427 300000 0 0 0 0 0 0 464 | 428 500 142 0 0 0 0 0 465 | 429 10 0 0 0 0 0 0 466 | 430 500 143 0 0 0 0 0 467 | 431 650 0 1 1 1 0 0 468 | 432 100 0 0 0 0 1 0 469 | 433 300000 0 0 0 0 0 0 470 | 434 500 144 0 0 0 0 0 471 | 435 10 0 0 0 0 0 0 472 | 436 500 145 0 0 0 0 0 473 | 437 650 0 1 1 1 0 0 474 | 438 100 0 0 0 0 1 0 475 | 439 300000 0 0 0 0 0 0 476 | 440 500 146 0 0 0 0 0 477 | 441 10 0 0 0 0 0 0 478 | 442 500 147 0 0 0 0 0 479 | 443 650 0 1 1 1 0 0 480 | 444 100 0 0 0 0 1 0 481 | 445 300000 0 0 0 0 0 0 482 | 446 500 148 0 0 0 0 0 483 | 447 10 0 0 0 0 0 0 484 | 448 500 149 0 0 0 0 0 485 | 449 650 0 1 1 1 0 0 486 | 450 100 0 0 0 0 1 0 487 | 451 300000 0 0 0 0 0 0 488 | 452 500 150 0 0 0 0 0 489 | 453 10 0 0 0 0 0 0 490 | 454 500 151 0 0 0 0 0 491 | 455 650 0 1 1 1 0 0 492 | 456 100 0 0 0 0 1 0 493 | 457 300000 0 0 0 0 0 0 494 | 458 500 152 0 0 0 0 0 495 | 459 10 0 0 0 0 0 0 496 | 460 500 153 0 0 0 0 0 497 | 461 650 0 1 1 1 0 0 498 | 462 100 0 0 0 0 1 0 499 | 463 300000 0 0 0 0 0 0 500 | 464 500 154 0 0 0 0 0 501 | 465 10 0 0 0 0 0 0 502 | 466 500 155 0 0 0 0 0 503 | 467 650 0 1 1 1 0 0 504 | 468 100 0 0 0 0 1 0 505 | 469 300000 0 0 0 0 0 0 506 | 470 500 156 0 0 0 0 0 507 | 471 10 0 0 0 0 0 0 508 | 472 500 157 0 0 0 0 0 509 | 473 650 0 1 1 1 0 0 510 | 474 100 0 0 0 0 1 0 511 | 475 300000 0 0 0 0 0 0 512 | 476 500 158 0 0 0 0 0 513 | 477 10 0 0 0 0 0 0 514 | 478 500 159 0 0 0 0 0 515 | 479 650 0 1 1 1 0 0 516 | 480 100 0 0 0 0 1 0 517 | 481 300000 0 0 0 0 0 0 518 | 482 500 160 0 0 0 0 0 519 | 483 10 0 0 0 0 0 0 520 | 484 500 161 0 0 0 0 0 521 | 485 650 0 1 1 1 0 0 522 | 486 100 0 0 0 0 1 0 523 | 487 300000 0 0 0 0 0 0 524 | 488 500 162 0 0 0 0 0 525 | 489 10 0 0 0 0 0 0 526 | 490 500 163 0 0 0 0 0 527 | 491 650 0 1 1 1 0 0 528 | 492 100 0 0 0 0 1 0 529 | 530 | # Format of RF events: 531 | # id amplitude mag_id phase_id time_shape_id delay freq phase 532 | # .. Hz .... .... .... us Hz rad 533 | [RF] 534 | 1 157.533 1 2 3 0 -38318.8 0 535 | 2 157.533 1 2 3 0 -38318.8 2.55223 536 | 3 157.533 1 2 3 0 -255.458 0 537 | 4 157.533 1 2 3 0 -255.458 4.54091 538 | 5 157.533 1 2 3 0 -249.072 0 539 | 6 157.533 1 2 3 0 -249.072 4.74154 540 | 7 157.533 1 2 3 0 -242.685 0 541 | 8 157.533 1 2 3 0 -242.685 4.94218 542 | 9 157.533 1 2 3 0 -236.299 0 543 | 10 157.533 1 2 3 0 -236.299 5.14282 544 | 11 157.533 1 2 3 0 -229.913 0 545 | 12 157.533 1 2 3 0 -229.913 5.34345 546 | 13 157.533 1 2 3 0 -223.526 0 547 | 14 157.533 1 2 3 0 -223.526 5.54409 548 | 15 157.533 1 2 3 0 -217.14 0 549 | 16 157.533 1 2 3 0 -217.14 5.74473 550 | 17 157.533 1 2 3 0 -210.753 0 551 | 18 157.533 1 2 3 0 -210.753 5.94536 552 | 19 157.533 1 2 3 0 -204.367 0 553 | 20 157.533 1 2 3 0 -204.367 6.146 554 | 21 157.533 1 2 3 0 -197.98 0 555 | 22 157.533 1 2 3 0 -197.98 0.063452 556 | 23 157.533 1 2 3 0 -191.594 0 557 | 24 157.533 1 2 3 0 -191.594 0.264089 558 | 25 157.533 1 2 3 0 -185.207 0 559 | 26 157.533 1 2 3 0 -185.207 0.464725 560 | 27 157.533 1 2 3 0 -178.821 0 561 | 28 157.533 1 2 3 0 -178.821 0.665362 562 | 29 157.533 1 2 3 0 -172.434 0 563 | 30 157.533 1 2 3 0 -172.434 0.865998 564 | 31 157.533 1 2 3 0 -166.048 0 565 | 32 157.533 1 2 3 0 -166.048 1.06663 566 | 33 157.533 1 2 3 0 -159.661 0 567 | 34 157.533 1 2 3 0 -159.661 1.26727 568 | 35 157.533 1 2 3 0 -153.275 0 569 | 36 157.533 1 2 3 0 -153.275 1.46791 570 | 37 157.533 1 2 3 0 -146.889 0 571 | 38 157.533 1 2 3 0 -146.889 1.66854 572 | 39 157.533 1 2 3 0 -140.502 0 573 | 40 157.533 1 2 3 0 -140.502 1.86918 574 | 41 157.533 1 2 3 0 -134.116 0 575 | 42 157.533 1 2 3 0 -134.116 2.06982 576 | 43 157.533 1 2 3 0 -127.729 0 577 | 44 157.533 1 2 3 0 -127.729 2.27045 578 | 45 157.533 1 2 3 0 -121.343 0 579 | 46 157.533 1 2 3 0 -121.343 2.47109 580 | 47 157.533 1 2 3 0 -114.956 0 581 | 48 157.533 1 2 3 0 -114.956 2.67173 582 | 49 157.533 1 2 3 0 -108.57 0 583 | 50 157.533 1 2 3 0 -108.57 2.87236 584 | 51 157.533 1 2 3 0 -102.183 0 585 | 52 157.533 1 2 3 0 -102.183 3.073 586 | 53 157.533 1 2 3 0 -95.7969 0 587 | 54 157.533 1 2 3 0 -95.7969 3.27364 588 | 55 157.533 1 2 3 0 -89.4104 0 589 | 56 157.533 1 2 3 0 -89.4104 3.47427 590 | 57 157.533 1 2 3 0 -83.024 0 591 | 58 157.533 1 2 3 0 -83.024 3.67491 592 | 59 157.533 1 2 3 0 -76.6375 0 593 | 60 157.533 1 2 3 0 -76.6375 3.87555 594 | 61 157.533 1 2 3 0 -70.2511 0 595 | 62 157.533 1 2 3 0 -70.2511 4.07618 596 | 63 157.533 1 2 3 0 -63.8646 0 597 | 64 157.533 1 2 3 0 -63.8646 4.27682 598 | 65 157.533 1 2 3 0 -57.4781 0 599 | 66 157.533 1 2 3 0 -57.4781 4.47746 600 | 67 157.533 1 2 3 0 -51.0917 0 601 | 68 157.533 1 2 3 0 -51.0917 4.67809 602 | 69 157.533 1 2 3 0 -44.7052 0 603 | 70 157.533 1 2 3 0 -44.7052 4.87873 604 | 71 157.533 1 2 3 0 -38.3188 0 605 | 72 157.533 1 2 3 0 -38.3188 5.07937 606 | 73 157.533 1 2 3 0 -31.9323 0 607 | 74 157.533 1 2 3 0 -31.9323 5.28 608 | 75 157.533 1 2 3 0 -25.5458 0 609 | 76 157.533 1 2 3 0 -25.5458 5.48064 610 | 77 157.533 1 2 3 0 -19.1594 0 611 | 78 157.533 1 2 3 0 -19.1594 5.68128 612 | 79 157.533 1 2 3 0 -12.7729 0 613 | 80 157.533 1 2 3 0 -12.7729 5.88191 614 | 81 157.533 1 2 3 0 -6.38646 0 615 | 82 157.533 1 2 3 0 -6.38646 6.08255 616 | 83 157.533 1 2 3 0 0 0 617 | 84 157.533 1 2 3 0 6.38646 0 618 | 85 157.533 1 2 3 0 6.38646 0.200637 619 | 86 157.533 1 2 3 0 12.7729 0 620 | 87 157.533 1 2 3 0 12.7729 0.401273 621 | 88 157.533 1 2 3 0 19.1594 0 622 | 89 157.533 1 2 3 0 19.1594 0.60191 623 | 90 157.533 1 2 3 0 25.5458 0 624 | 91 157.533 1 2 3 0 25.5458 0.802546 625 | 92 157.533 1 2 3 0 31.9323 0 626 | 93 157.533 1 2 3 0 31.9323 1.00318 627 | 94 157.533 1 2 3 0 38.3188 0 628 | 95 157.533 1 2 3 0 38.3188 1.20382 629 | 96 157.533 1 2 3 0 44.7052 0 630 | 97 157.533 1 2 3 0 44.7052 1.40446 631 | 98 157.533 1 2 3 0 51.0917 0 632 | 99 157.533 1 2 3 0 51.0917 1.60509 633 | 100 157.533 1 2 3 0 57.4781 0 634 | 101 157.533 1 2 3 0 57.4781 1.80573 635 | 102 157.533 1 2 3 0 63.8646 0 636 | 103 157.533 1 2 3 0 63.8646 2.00637 637 | 104 157.533 1 2 3 0 70.2511 0 638 | 105 157.533 1 2 3 0 70.2511 2.207 639 | 106 157.533 1 2 3 0 76.6375 0 640 | 107 157.533 1 2 3 0 76.6375 2.40764 641 | 108 157.533 1 2 3 0 83.024 0 642 | 109 157.533 1 2 3 0 83.024 2.60828 643 | 110 157.533 1 2 3 0 89.4104 0 644 | 111 157.533 1 2 3 0 89.4104 2.80891 645 | 112 157.533 1 2 3 0 95.7969 0 646 | 113 157.533 1 2 3 0 95.7969 3.00955 647 | 114 157.533 1 2 3 0 102.183 0 648 | 115 157.533 1 2 3 0 102.183 3.21018 649 | 116 157.533 1 2 3 0 108.57 0 650 | 117 157.533 1 2 3 0 108.57 3.41082 651 | 118 157.533 1 2 3 0 114.956 0 652 | 119 157.533 1 2 3 0 114.956 3.61146 653 | 120 157.533 1 2 3 0 121.343 0 654 | 121 157.533 1 2 3 0 121.343 3.81209 655 | 122 157.533 1 2 3 0 127.729 0 656 | 123 157.533 1 2 3 0 127.729 4.01273 657 | 124 157.533 1 2 3 0 134.116 0 658 | 125 157.533 1 2 3 0 134.116 4.21337 659 | 126 157.533 1 2 3 0 140.502 0 660 | 127 157.533 1 2 3 0 140.502 4.414 661 | 128 157.533 1 2 3 0 146.889 0 662 | 129 157.533 1 2 3 0 146.889 4.61464 663 | 130 157.533 1 2 3 0 153.275 0 664 | 131 157.533 1 2 3 0 153.275 4.81528 665 | 132 157.533 1 2 3 0 159.661 0 666 | 133 157.533 1 2 3 0 159.661 5.01591 667 | 134 157.533 1 2 3 0 166.048 0 668 | 135 157.533 1 2 3 0 166.048 5.21655 669 | 136 157.533 1 2 3 0 172.434 0 670 | 137 157.533 1 2 3 0 172.434 5.41719 671 | 138 157.533 1 2 3 0 178.821 0 672 | 139 157.533 1 2 3 0 178.821 5.61782 673 | 140 157.533 1 2 3 0 185.207 0 674 | 141 157.533 1 2 3 0 185.207 5.81846 675 | 142 157.533 1 2 3 0 191.594 0 676 | 143 157.533 1 2 3 0 191.594 6.0191 677 | 144 157.533 1 2 3 0 197.98 0 678 | 145 157.533 1 2 3 0 197.98 6.21973 679 | 146 157.533 1 2 3 0 204.367 0 680 | 147 157.533 1 2 3 0 204.367 0.137185 681 | 148 157.533 1 2 3 0 210.753 0 682 | 149 157.533 1 2 3 0 210.753 0.337821 683 | 150 157.533 1 2 3 0 217.14 0 684 | 151 157.533 1 2 3 0 217.14 0.538458 685 | 152 157.533 1 2 3 0 223.526 0 686 | 153 157.533 1 2 3 0 223.526 0.739094 687 | 154 157.533 1 2 3 0 229.913 0 688 | 155 157.533 1 2 3 0 229.913 0.939731 689 | 156 157.533 1 2 3 0 236.299 0 690 | 157 157.533 1 2 3 0 236.299 1.14037 691 | 158 157.533 1 2 3 0 242.685 0 692 | 159 157.533 1 2 3 0 242.685 1.341 693 | 160 157.533 1 2 3 0 249.072 0 694 | 161 157.533 1 2 3 0 249.072 1.54164 695 | 162 157.533 1 2 3 0 255.458 0 696 | 163 157.533 1 2 3 0 255.458 1.74228 697 | 698 | # Format of trapezoid gradients: 699 | # id amplitude rise flat fall delay 700 | # .. Hz/m us us us us 701 | [TRAP] 702 | 1 2.72489e+06 1000 4500 1000 0 703 | 704 | # Format of ADC events: 705 | # id num dwell delay freq phase 706 | # .. .. ns us Hz rad 707 | [ADC] 708 | 1 1 1000000 0 0 0 709 | 710 | # Sequence Shapes 711 | [SHAPES] 712 | 713 | shape_id 1 714 | num_samples 2 715 | 1 716 | 1 717 | 718 | shape_id 2 719 | num_samples 2 720 | 0 721 | 0 722 | 723 | shape_id 3 724 | num_samples 2 725 | 0 726 | 5000 727 | 728 | 729 | [SIGNATURE] 730 | # This is the hash of the Pulseq file, calculated right before the [SIGNATURE] section was added 731 | # It can be reproduced/verified with md5sum if the file trimmed to the position right above [SIGNATURE] 732 | # The new line character preceding [SIGNATURE] BELONGS to the signature (and needs to be stripped away for recalculating/verification) 733 | Type md5 734 | Hash 22e3fb0faa7d4d342a3c6e084e09c909 735 | --------------------------------------------------------------------------------