diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000..22d5733 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,5 @@ +[codespell] +skip = .git,*.pdf,*.svg +# some abbreviated citations etc +ignore-regex = Reson Med +ignore-words-list = te,fo,nd diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000..3ebbf55 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,22 @@ +--- +name: Codespell + +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Codespell + uses: codespell-project/actions-codespell@v2 diff --git a/01_from_FID_to_PRESS/seq/s04_SE_withBackGrad.m b/01_from_FID_to_PRESS/seq/s04_SE_withBackGrad.m index 7385ec3..98bb5f8 100644 --- a/01_from_FID_to_PRESS/seq/s04_SE_withBackGrad.m +++ b/01_from_FID_to_PRESS/seq/s04_SE_withBackGrad.m @@ -70,6 +70,6 @@ hold on; plot(t_adc,ktraj_adc(1,:),'.'); % and sampling points on the kx-axis % calculate real TE and TR, etc -% reported TR will be slighlty higher for Nrep=1 becuse it uses TA instead +% reported TR will be slightly higher for Nrep=1 because it uses TA instead rep = seq.testReport; fprintf([rep{:}]); diff --git a/11_from_GRE_to_EPI/recon/r02_2DEPI.m b/11_from_GRE_to_EPI/recon/r02_2DEPI.m index a3fb0cf..5c7b705 100644 --- a/11_from_GRE_to_EPI/recon/r02_2DEPI.m +++ b/11_from_GRE_to_EPI/recon/r02_2DEPI.m @@ -38,8 +38,8 @@ rawdata = double(twix_obj.image.unsorted()); end -%% if necessary re-tune the trajectory delay to supress ghosting -traj_recon_delay=0.0e-6;%3.23e-6;%-1e-6;%3.90e-6;%-1.03e-6; % adjust this parameter to supress ghosting (negative allowed) (our trio -1.0e-6, prisma +3.9e-6; avanto +3.88) +%% if necessary re-tune the trajectory delay to suppress ghosting +traj_recon_delay=0.0e-6;%3.23e-6;%-1e-6;%3.90e-6;%-1.03e-6; % adjust this parameter to suppress ghosting (negative allowed) (our trio -1.0e-6, prisma +3.9e-6; avanto +3.88) [ktraj_adc, t_adc, ktraj, t_ktraj, t_excitation, t_refocusing] = seq.calculateKspacePP('trajectory_delay', traj_recon_delay); %[ktraj_adc, ktraj, t_excitation, t_refocusing, t_adc] = seq.calculateKspace('trajectory_delay', traj_recon_delay); %ktraj_adc_nodelay=seq.calculateKspace('trajectory_delay', 10e-6); diff --git a/11_from_GRE_to_EPI/seq/s05_EchoPlanarImaging.m b/11_from_GRE_to_EPI/seq/s05_EchoPlanarImaging.m index 166b352..844e389 100644 --- a/11_from_GRE_to_EPI/seq/s05_EchoPlanarImaging.m +++ b/11_from_GRE_to_EPI/seq/s05_EchoPlanarImaging.m @@ -11,7 +11,7 @@ %TR=21e-3; % ignore TR, go as fast as possible %TE=60e-3; % ignore TE, go as fast as possible % TODO: run this EPI sequence with and without PE, to calibrate the delay -% TODO: change MaxGrad/MaxSlew/roDuration to see what happends to the +% TODO: change MaxGrad/MaxSlew/roDuration to see what happens to the % stimulation (e.g. 80/200/500) % more in-depth parameters @@ -34,7 +34,7 @@ blip_dur = ceil(2*sqrt(deltak/sys.maxSlew)/sys.gradRasterTime/2)*sys.gradRasterTime*2; % we round-up the duration to 2x the gradient raster time gyBlip = mr.makeTrapezoid('y',sys,'Area',-deltak,'Duration',blip_dur); % we use negative blips to save one k-space line on our way towards the k-space center -% readout gradient is a truncated trapezoid with dead times at the beginnig +% readout gradient is a truncated trapezoid with dead times at the beginning % and at the end, each equal to a half of blip_dur % the area between the blips should be equal to kWidth % we do a two-step calculation: we first increase the area assuming maximum diff --git a/11_from_GRE_to_EPI/seq/s06_EPI_SingleTraj.m b/11_from_GRE_to_EPI/seq/s06_EPI_SingleTraj.m index 9382900..3094bd3 100644 --- a/11_from_GRE_to_EPI/seq/s06_EPI_SingleTraj.m +++ b/11_from_GRE_to_EPI/seq/s06_EPI_SingleTraj.m @@ -34,7 +34,7 @@ blip_dur = ceil(2*sqrt(deltak/sys.maxSlew)/sys.gradRasterTime/2)*sys.gradRasterTime*2; % we round-up the duration to 2x the gradient raster time gyBlip = mr.makeTrapezoid('y',sys,'Area',-deltak,'Duration',blip_dur); % we use negative blips to save one k-space line on our way towards the k-space center -% readout gradient is a truncated trapezoid with dead times at the beginnig +% readout gradient is a truncated trapezoid with dead times at the beginning % and at the end, each equal to a half of blip_dur % the area between the blips should be equal to kWidth % we do a two-step calculation: we first increase the area assuming maximum diff --git a/12_Radial_and_nonCartesian/recon/r02_2D_iRadon.m b/12_Radial_and_nonCartesian/recon/r02_2D_iRadon.m index 1af7c1d..45e1698 100644 --- a/12_Radial_and_nonCartesian/recon/r02_2D_iRadon.m +++ b/12_Radial_and_nonCartesian/recon/r02_2D_iRadon.m @@ -86,7 +86,7 @@ [~,p2]=min(abs(mod(prg_angle-prg_angle(p1)+2*pi,2*pi)-pi)); % look for the projection closest to the opposite to p1 figure;plot(abs(data_fft1c(1:end,p1,1)));hold on;plot(abs(data_fft1c(end:-1:1,p2,1))); title('comparing opposite projections'); -%% the actuall iRadon transform +%% the actual iRadon transform theta=270-prg_angle/pi*180; for c=1:channels % the classical (absolute value) transform diff --git a/12_Radial_and_nonCartesian/recon/r04_radial_delay_calculation.m b/12_Radial_and_nonCartesian/recon/r04_radial_delay_calculation.m index 126d68f..e46c9f0 100644 --- a/12_Radial_and_nonCartesian/recon/r04_radial_delay_calculation.m +++ b/12_Radial_and_nonCartesian/recon/r04_radial_delay_calculation.m @@ -81,7 +81,7 @@ figure; imagesc(angle(cmplx_diff_no_channels)); -%% pick the pure X and pure Y differences, plot them and extimate the slope +%% pick the pure X and pure Y differences, plot them and estimate the slope if length(i_pure2)<2 [~,p2]=min(abs(mod(prg_angle-prg_angle(1)+2*pi,2*pi)-pi)); % look for the projection closest to the opposite to the 1st i_pure1=[1 p2]; diff --git a/12_Radial_and_nonCartesian/seq/s01_CartesianSE.m b/12_Radial_and_nonCartesian/seq/s01_CartesianSE.m index ef72e82..0bd40eb 100644 --- a/12_Radial_and_nonCartesian/seq/s01_CartesianSE.m +++ b/12_Radial_and_nonCartesian/seq/s01_CartesianSE.m @@ -6,7 +6,7 @@ rfDur1=3e-3; rfDur2=1e-3; TR=150e-3; -TE=54e-3; % 20ms still works with the chosen parameters & sysyem props +TE=54e-3; % 20ms still works with the chosen parameters & system props spA=1000; % spoiler area in 1/m (=Hz/m*s) % MZ: need 5000 for my oil phantom sliceThickness=3e-3; % slice diff --git a/12_Radial_and_nonCartesian/seq/s05_FastRadialGradientEcho.m b/12_Radial_and_nonCartesian/seq/s05_FastRadialGradientEcho.m index d5d5f8a..b2fc326 100644 --- a/12_Radial_and_nonCartesian/seq/s05_FastRadialGradientEcho.m +++ b/12_Radial_and_nonCartesian/seq/s05_FastRadialGradientEcho.m @@ -34,7 +34,7 @@ deltak=1/fov; gx = mr.makeTrapezoid('x','Amplitude',Nx*deltak/ro_dur,'FlatTime',ceil(ro_dur/sys.gradRasterTime)*sys.gradRasterTime,'system',sys); adc = mr.makeAdc(Nx*ro_os,'Duration',ro_dur,'Delay',gx.riseTime,'system',sys); -gxPre = mr.makeTrapezoid('x','Area',-gx.amplitude*(ro_dur/Nx/ro_os*(Nx*ro_os/2-0.5)+0.5*gx.riseTime),'system',sys); % 0.5 is necessary to acount for the Siemens sampling in the center of the dwell periods +gxPre = mr.makeTrapezoid('x','Area',-gx.amplitude*(ro_dur/Nx/ro_os*(Nx*ro_os/2-0.5)+0.5*gx.riseTime),'system',sys); % 0.5 is necessary to account for the Siemens sampling in the center of the dwell periods % start gxPre at least right after the RF pulse and when possible end it at the same time as the end of the slice refocusing gradient [gxPre,~,~]=mr.align('right', gxPre, 'right', gzComb, 'left', mr.makeDelay(mr.calcDuration(rf)+mr.calcDuration(gxPre))); diff --git a/12_Radial_and_nonCartesian/seq/s06_Spiral.m b/12_Radial_and_nonCartesian/seq/s06_Spiral.m index c90f7ad..26d31fe 100644 --- a/12_Radial_and_nonCartesian/seq/s06_Spiral.m +++ b/12_Radial_and_nonCartesian/seq/s06_Spiral.m @@ -31,7 +31,7 @@ kRadius = round(Nx/2); kSamples=round(2*pi*kRadius)*Oversampling; -% calculate a raw Archimedian spiral trajectory +% calculate a raw Archimedean spiral trajectory clear ka; ka(kRadius*kSamples+1)=1i; % init as complex for c=0:kRadius*kSamples @@ -84,7 +84,7 @@ adcSegments=round(adcSamplesDesired/adcSamplesPerSegment); adcSamples=adcSegments*adcSamplesPerSegment; adcDwell=round(adcTime/adcSamples/100e-9)*100e-9; % on Siemens adcDwell needs to be aligned to 100ns (if my memory serves me right) -adcSegmentDuration=adcSamplesPerSegment*adcDwell; % with the 100 samples above and the 100ns alignment we automatically fullfill the segment alignment requirement +adcSegmentDuration=adcSamplesPerSegment*adcDwell; % with the 100 samples above and the 100ns alignment we automatically fulfill the segment alignment requirement if mod(adcSegmentDuration, sys.gradRasterTime)>eps error('ADC segmentation model results in incorrect segment duration'); end @@ -94,7 +94,7 @@ adc = mr.makeAdc(adcSamples,'Dwell',adcDwell,'Delay',mr.calcDuration(gzReph));%lims.adcDeadTime); % extend spiral_grad_shape by repeating the last sample -% this is needed to accomodate for the ADC tuning delay +% this is needed to accommodate for the ADC tuning delay spiral_grad_shape = [spiral_grad_shape spiral_grad_shape(:,end)]; % readout grad @@ -110,7 +110,7 @@ % extends past the end of the trajectory (these points will have to be % discarded in the reconstruction, which is no problem). However, the % ramp-down parts and the Z-spoiler now have to be added to the readout -% block otherwise there will be a gap inbetween +% block otherwise there will be a gap between % gz_spoil.delay=mr.calcDuration(gx); % gx_spoil.delay=gz_spoil.delay; % gy_spoil.delay=gz_spoil.delay;