Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[codespell]
skip = .git,*.pdf,*.svg
# some abbreviated citations etc
ignore-regex = Reson Med
ignore-words-list = te,fo,nd
22 changes: 22 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion 01_from_FID_to_PRESS/seq/s04_SE_withBackGrad.m
Original file line number Diff line number Diff line change
Expand Up @@ -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{:}]);
4 changes: 2 additions & 2 deletions 11_from_GRE_to_EPI/recon/r02_2DEPI.m
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions 11_from_GRE_to_EPI/seq/s05_EchoPlanarImaging.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion 11_from_GRE_to_EPI/seq/s06_EPI_SingleTraj.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion 12_Radial_and_nonCartesian/recon/r02_2D_iRadon.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion 12_Radial_and_nonCartesian/seq/s01_CartesianSE.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)));

Expand Down
8 changes: 4 additions & 4 deletions 12_Radial_and_nonCartesian/seq/s06_Spiral.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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;
Expand Down