diff --git a/create_freq_specs.m b/create_freq_specs.m index 9cf5997..088c618 100644 --- a/create_freq_specs.m +++ b/create_freq_specs.m @@ -1,8 +1,8 @@ -function [fspec, a_angs, d] = create_freq_specs(mets) +function [fspec, a_angs, d] = create_freq_specs(mets, fmid) % CREATE_FREQ_SPECS - Helper function for creating spectral-spatial % frequency specifications % -% [fspec, a_angs, d] = create_freq_specs(mets); +% [fspec, a_angs, d] = create_freq_specs(mets, fmid); % % INPUT % mets - structure containing: @@ -10,6 +10,7 @@ % mets(i).df - bandwidth of bands (Hz) % mets(i).ang - flip angle of bands (degress) % mets(i).d - ripple of bands (Mxy, default = .01) +% fmid [optional] - center frequency spec around fmid % % OUTPUT % spec, a_angs, d - inputs for ss_design() @@ -41,6 +42,9 @@ end end -% by default, center frequency specification -fmid = (mets(1).f+mets(end).f)/2; +if nargin < 2 || isempty(fmid) + % by default, center frequency specification + fmid = (min(fspec)+max(fspec))/2; +end + fspec = fspec - fmid; diff --git a/examples/demo_C13_singleband.m b/examples/demo_C13_singleband.m index 805c843..bb41ec5 100644 --- a/examples/demo_C13_singleband.m +++ b/examples/demo_C13_singleband.m @@ -105,3 +105,49 @@ ss_design(z_thk, z_tb, [z_d1 z_d2], fspec, a_angs, d, ptype, ... z_ftype, s_ftype, ss_type, fctr); set(gcf,'Name', '[1-13C]lac only for 14T animal system'); + +fprintf(1,'Hit any key to continue:\n'); +pause; + + +%% lactate-only pulse +fprintf(1, '\nFor studies including copolarized 13C-urea or a 13C-urea phantom\n'); +fprintf(1, 'Here''s a C13 single-band excitation pulse to excite only [1-13C]lactate\n'); +fprintf(1, 'while not exciting pyruvate, alanine and pyruvate-hydrate AND urea, for a 3T clinical system\n\n'); + +clear all; ss_opt([]); ss_globals; % Reset all options + +% GENERAL PULSE PARAMETERS +ss_type = 'EP Whole'; +ptype = 'ex'; % excitation pulse +opt = ss_opt({'Nucleus', 'Carbon', ... + 'Max Duration', 25e-3, ... + 'Spect Correct', 1}); + +% SPECTRAL PULSE PARAMETERS - large pass/stop bands chosen for wide +% supression regions +B0 = 3e4; % G +df = 0.5e-6 * B0 * SS_GAMMA; % 0.5 ppm = gamma_C13 * B0 * 0.5e-6 +% metabolite frequency (Hz) freq bandwidth (Hz) flip angle (deg) +mets(1).name = 'urea'; mets(1).f = -470; mets(1).df = 2*df; mets(1).ang = 0; +mets(2).name = 'pyr'; mets(2).f = -230; mets(2).df = 2*df; mets(2).ang = 0; +mets(3).name = 'ala'; mets(3).f = -45; mets(3).df = 3*df; mets(3).ang = 0; +mets(4).name = 'pyrh'; mets(4).f = 40; mets(4).df = 2*df; mets(4).ang = 0; +mets(5).name = 'lac'; mets(5).f = 165; mets(5).df = 2*df; mets(5).ang = 90; + +% create vectors of angles, ripples, and band edges for input to pulse design +[fspec, a_angs, d] = create_freq_specs(mets); +fctr = 0; % force pulse design to optimize for center of frequency specification +s_ftype = 'min'; % minimum-phase spectral filter + +% SPATIAL PULSE PARAMETERS +z_thk = 1; % thickness (cm) +z_tb = 4; % time-bandwidth, proportional to profile sharpness +z_ftype='ls'; % least-squares filter design +z_d1 = 0.01; z_d2 = 0.01; % slice profile pass and stop-band ripples, respectively + +% DESIGN THE PULSE! +[g,rf,fs,z,f,mxy] = ... + ss_design(z_thk, z_tb, [z_d1 z_d2], fspec, a_angs, d, ptype, ... + z_ftype, s_ftype, ss_type, fctr); +set(gcf,'Name', '[1-13C]lac only for 3T clinical system, avoiding urea');