diff --git a/FID-A_Documentation/FID-A_Manual.pdf b/FID-A_Documentation/FID-A_Manual.pdf index 5e1807a..1acb707 100644 Binary files a/FID-A_Documentation/FID-A_Manual.pdf and b/FID-A_Documentation/FID-A_Manual.pdf differ diff --git a/exampleRunScripts/run_megapressproc.m b/exampleRunScripts/run_megapressproc.m index bae1edd..a260074 100755 --- a/exampleRunScripts/run_megapressproc.m +++ b/exampleRunScripts/run_megapressproc.m @@ -14,10 +14,15 @@ % filestring = String variable for the name of the directory containing % the water suppressed .dat file. Water unsuppressed % .dat file should be contained in [filestring '_w/']; +% coilcombos = (Optional). A structure obtained by running the +% op_getcoilcombos function. This allows the user to +% specify the coil phases and amplitudes as an input, +% rather calculating these from the input data by default. % avgAlignDomain = (Optional) Perform the spectral registration (drift correction) using % the full spectrum ('t'), or only a limited frequency % range ('f'). Default is 'f'. -% alignSS = 0 - Do not align the edit-on and edit-off subspectra. +% alignSS = (Optional) +% 0 - Do not align the edit-on and edit-off subspectra (default). % 2 - Perform manual alignment of edit-on and edit-off subspectra. % % OUTPUTS: diff --git a/inputOutput/io_readlcmraw.m b/inputOutput/io_readlcmraw.m index 47e8293..36d891c 100644 --- a/inputOutput/io_readlcmraw.m +++ b/inputOutput/io_readlcmraw.m @@ -5,7 +5,7 @@ % out=io_readlcmraw(filename,type); % % DESCRIPTION: -% Reads LCModel .RAW format into the FID-A data structure format in MATLAB. +% Reads LCModel raw data format into the FID-A data structure format in MATLAB. % % INPUTS: % filename = filename of LCModel raw file. diff --git a/inputOutput/io_readlcmraw_dotraw.m b/inputOutput/io_readlcmraw_dotraw.m index 066d8a5..fb0086e 100644 --- a/inputOutput/io_readlcmraw_dotraw.m +++ b/inputOutput/io_readlcmraw_dotraw.m @@ -5,7 +5,7 @@ % out=io_readlcmraw_dotraw(filename); % % DESCRIPTION: -% Reads LCModel .raw model spectrum file into the FID-A data structure format in MATLAB. +% Reads LCModel .RAW model spectrum file into the FID-A data structure format in MATLAB. % % INPUTS: % filename = filename of LCModel raw file. diff --git a/simulationTools/sim_gradSpoil.m b/simulationTools/sim_gradSpoil.m index 46fcfd5..b94590c 100644 --- a/simulationTools/sim_gradSpoil.m +++ b/simulationTools/sim_gradSpoil.m @@ -5,7 +5,8 @@ % d_out = sim_gradSpoil(d_in,H,gradVect,dur,posVect) % % DESCRIPTION: -% This function simulates the effect of a spoiler gradient. +% This function simulates the effect of a rectangular spoiler gradient +% with a given amplitude, direction and duration. % % INPUTS: % d_in = input density matrix structure. diff --git a/simulationTools/sim_onepulse_shaped.m b/simulationTools/sim_onepulse_shaped.m index de2a28f..385d6d1 100644 --- a/simulationTools/sim_onepulse_shaped.m +++ b/simulationTools/sim_onepulse_shaped.m @@ -7,7 +7,7 @@ % DESCRIPTION: % %This function simulates the effect of a frequency selective or slice % selective excitation, followed immediately by the acquisition window. -% This is mainly an excercise to see if I can get slice selective +% This is mainly an exercise to see if I can get slice selective % excitation working. % % Note that when simulating a frequency selective pulse, it is okay to @@ -23,7 +23,7 @@ % sys = spin system definition structure % RF = radiofrequency pulse array [N x 3]. Phase, Amplitude, Duration. % tp = RF pulse duration in [ms] -% phCyc = Phase of excitation rf pulse. +% phCyc = Phase of excitation rf pulse in [degrees]. % dfdx = if simulating a frequency selective pulse, this argument % should be the frequency offset [Hz]. If simulating a slice % selective pulse, this argument should be the position offset [cm]. diff --git a/simulationTools/sim_shapedRF.m b/simulationTools/sim_shapedRF.m index 213e1c1..c0ecf55 100644 --- a/simulationTools/sim_shapedRF.m +++ b/simulationTools/sim_shapedRF.m @@ -7,7 +7,7 @@ % % DESCRIPTION: % This function simulates the effect of a shaped rf pulse on the density -% matrix. The temporal shape of the refocussing pulses is modelled as a +% matrix. The temporal shape of the refocusing pulses is modelled as a % series of N instantaneous rotations about the effective RF field, where N % is the number of time points in the RF waveform. The instantaneous % effective RF field can be an arbitrary vector, and can be represented in diff --git a/simulationTools/sim_steam_gradSim.m b/simulationTools/sim_steam_gradSim.m index 3149912..d235f6e 100644 --- a/simulationTools/sim_steam_gradSim.m +++ b/simulationTools/sim_steam_gradSim.m @@ -17,39 +17,43 @@ % N = Number of 'phase cycles' % *********INPUT VARIABLES*********** -spinsys='Lac'; %Spin system. -TE=0.020; %Echo time. -TM=0.005; %Mixing time. -N=32; %Number of 'phase cycles' +spinsys='Lac'; %Spin system. +TE=0.020; %Echo time. +TM=0.005; %Mixing time. +N=32; %Number of 'phase cycles' +n=2048; %Number of spectral points +sw=2000; %Spectral width +B0=3; %Magnetic Field Strength +lw=2; %Linewidth % *********************************** eval(['load ' spinsys]); -eval(['J=j' spinsys ';']); -eval(['shifts=shifts' spinsys ';']); +eval(['J=sys' spinsys '.J;']); +eval(['shifts=sys' spinsys '.shifts;']); sys.J=J; sys.shifts=shifts; -steam=sim_steam(2048,2000,3,2,sys,TE,TM,0); +steam=sim_steam(n,sw,B0,lw,sys,TE,TM,0); figure; hold; -plot(steam.ppm,steam.specs); +plot(steam.ppm,real(steam.specs)); for spoil=360/N:360/N:(360)-(360/N) - steam_temp=sim_steam(2048,2000,3,2,sys,TE,TM,spoil); - plot(steam_temp.ppm,steam_temp.specs); + steam_temp=sim_steam(n,sw,B0,lw,sys,TE,TM,spoil); + %plot(steam_temp.ppm,steam_temp.specs); steam=op_addScans(steam,steam_temp); end steam=op_ampScale(steam,1/N); -press=sim_press(2048,2000,3,2,sys,TE/2,TE/2); +press=sim_press(n,sw,B0,lw,sys,TE/2,TE/2); figure; -plot(steam.ppm,steam.specs,press.ppm,press.specs); +plot(steam.ppm,real(steam.specs),press.ppm,real(press.specs)); set(gca,'XDir','reverse'); xlim([1 5]); -%legend('press','steam'); +legend('press','steam');