PCA denoising and Wiener deconvolution of 3D CSI data to enhance SNR and inprove point spread function

Figures for manuscript

Author: M. Froeling, PhD.

Initialization

<<QMRITools`
SetDirectory[NotebookDirectory[]];

head=Sequence[Bold,Black,24,FontFamily->"Helvetica"];
lab=Sequence[Black,Bold,18];

SystemOpen[Directory[]];

Figures of main text

Figure 1*: PCA Denoise

specP=;
patch=;
{m,n}=MinMax[Dimensions[patch]];
eig=(Diagonal[SingularValueDecomposition[patch][[2]]]^2)/n;

f11=Row[{
Show[
Graphics3D[{Transparent,EdgeForm[{Dashed,Opacity[.5]}],Cuboid[{0,0,0},{16,16,16}]},Boxed->False,Lighting->"Neutral",ImageSize->250,SphericalRegion->True],
Graphics3D[{Red,Flatten@Table[Cuboid[{i,j,k},{i,j,k}+1],{i,8,12},{j,2,6},{k,6,10}]}],

Graphics3D[{Opacity[.5],Flatten@Table[Line[{{16,i,0},{16,i,16}}],{i,0,16}]}],
Graphics3D[{Opacity[.5],Flatten@Table[Line[{{16,0,i},{16,16,i}}],{i,0,16}]}],

Graphics3D[{Opacity[.5],Flatten@Table[Line[{{i,0,0},{i,0,16}}],{i,0,16}]}],
Graphics3D[{Opacity[.5],Flatten@Table[Line[{{0,0,i},{16,0,i}}],{i,0,16}]}],

Graphics3D[{Opacity[.5],Flatten@Table[Line[{{i,0,16},{i,16,16}}],{i,0,16}]}],
Graphics3D[{Opacity[.5],Flatten@Table[Line[{{0,i,16},{16,i,16}}],{i,0,16}]}]
],

Style[" -> ",Bold,40],

Grid[{{
"",Graphics[{Thick,Line[Transpose@{Range[Length[specP]],specP}]},AspectRatio->0.2,ImageSize->220]
},{
"",
Row[{
Graphics[{Thick,Black,Arrowheads[.2],Arrow[{{5,1},{0,0}}]},ImageSize->60],"        ",
Graphics[{Thick,Black,Arrowheads[.2],Arrow[{{0,1},{5,0}}]},ImageSize->60]
}]
},{
Column[{
Graphics[{Thick,Black,Arrowheads[.5],Arrow[{{0,0},{1,1.5}}]},ImageSize->30],
Graphics3D[{Red,Flatten@Table[Cuboid[{i,j,k},{i,j,k}+1],{i,8,12},{j,2,6},{k,6,10}]},Boxed->False,Lighting->"Neutral",ImageSize->75],
Graphics[{Thick,Black,Arrowheads[.5],Arrow[{{0,0},{1,-1.5}}]},ImageSize->30]
},Alignment->Right],
ArrayPlot[Table[If[i==1,If[j<=10,1,3],If[j==1,2,0]],{i,1,15},{j,1,20}],Frame->False,Mesh->All,MeshStyle->Black,ColorRules->{1->Lighter@Red,3->Lighter@Purple,2->Gray},ImageSize->250,
PlotLabel->Row[{Style["Re",Red,Bold,15],"                                              ",Style["Im",Bold,Purple,15]}]]
}
},Alignment->{Center,Bottom}]
}];

size=120;
f22=Grid[{
{"","",Style["M",Bold,30],Style["=",Bold,Large],Style["U",Bold,30],Style["X",Bold,Large],Style["Σ",Bold,30],Style["X",Bold,Large],Style["(SuperStar[V])",Bold,30]
},{
Graphics3D[{Red,Flatten@Table[Cuboid[{i,j,k},{i,j,k}+1],{i,8,12},{j,2,6},{k,6,10}]},Boxed->False,Lighting->"Neutral",ImageSize->0.75 size],
Style["->",Bold,30],
ArrayPlot[Table[If[i==1,If[j<=10,1,3],If[j==1,2,0]],{i,1,15},{j,1,20}],Frame->False,Mesh->All,MeshStyle->Black,ColorRules->{1->Lighter@Red,3->Lighter@Purple,2->Gray},ImageSize->size]
,Style["=",Bold,Large],
ArrayPlot[Table[If[OddQ[j],1,0],{i,1,15},{j,1,15}],Frame->False,Mesh->All,MeshStyle->Black,ColorRules->{1->Lighter@Lighter@Lighter@Yellow},ImageSize->0.75size],
Style["X",Bold,Large],
ArrayPlot[Table[If[i==j,2,0],{i,1,15},{j,1,20}],Frame->False,Mesh->All,MeshStyle->Black,ColorRules->{1->White,2->Lighter@Lighter@Red},ImageSize->size],
Style["X",Bold,Large],
ArrayPlot[Table[If[OddQ[i],1,0],{i,1,20},{j,1,20}],Frame->False,Mesh->All,MeshStyle->Black,ColorRules->{1->Lighter@Lighter@Lighter@Green},ImageSize->size]
}}
,Alignment->{Center,Center}];

size=150;
f23=Row[{
ArrayPlot[Table[If[i==j,2,0],{i,1,15},{j,1,20}],Frame->False,Mesh->All,MeshStyle->Black,ColorRules->{1->White,2->Lighter@Lighter@Red},ImageSize->100,PlotLabel->Style["Σ",Bold,Black,30,FontFamily->"Courier"]],
Style[" -> ",Bold,40],
Show[
Histogram[Rescale[eig],{.001},PlotRange->{{0,.025},{0,14}},ChartStyle->Directive[{LightGray,EdgeForm[Gray]}],AxesStyle->Directive[{Thick,Black}],Ticks->None,ImageSize->size,AspectRatio->1,PlotLabel->Style["Set to 0",lab]],
Plot[PDF[MarchenkoPasturDistribution[N[m/n],0.1],x+0.0025]/7.5//Evaluate,{x,0,0.025},PlotStyle->Directive[{Thick,Red}],Axes->False,ExclusionsStyle->Directive[{Thick,Red}],PlotPoints->500]
],
Histogram[{0},{.001},PlotRange->{{0.01,.025},Full},ChartStyle->Black,AxesStyle->Directive[{Thickness[.1],Dashed,Black}],Ticks->None,ImageSize->{0.23size,Automatic},Axes->{True,False},AspectRatio->5,PlotLabel->Style["",Bold,Black]],
Histogram[Join[Rescale[eig],{0.98,0.985,0.985,0.985,0.99,0.99}],{.001},PlotRange->{{0.975,1.005},{0,25}},ChartStyle->Red,Axes->{True,False},AxesStyle->Directive[{Thick,Black}],Ticks->None,ImageSize->size,AspectRatio->1,PlotLabel->Style["Keep values",lab]],
Style[" -> ",Bold,40],
ArrayPlot[Table[If[i==j,If[i<5,2,1],0],{i,1,15},{j,1,20}],Frame->False,Mesh->All,MeshStyle->Black,ColorRules->{1->Lighter@LightGray,2->Red},ImageSize->100,PlotLabel->Style["Σ'",Bold,Black,30,FontFamily->"Courier"]]
}];

size=120;
f24=Grid[{
{Style["U",Bold,30],Style["X",Bold,Large],Style["Σ'",Bold,30],Style["X",Bold,Large],Style["(SuperStar[V])",Bold,30],Style["=",Bold,Large],Style["M'",Bold,30],"",""
},{
ArrayPlot[Table[If[OddQ[j],1,0],{i,1,15},{j,1,15}],Frame->False,Mesh->All,MeshStyle->Black,ColorRules->{1->Lighter@Lighter@Lighter@Yellow},ImageSize->0.75size],
Style["X",Bold,Large],
ArrayPlot[Table[If[i==j,If[i<5,2,1],0],{i,1,15},{j,1,20}],Frame->False,Mesh->All,MeshStyle->Black,ColorRules->{1->Lighter@LightGray,2->Red},ImageSize->size],
Style["X",Bold,Large],
ArrayPlot[Table[If[OddQ[i],1,0],{i,1,20},{j,1,20}],Frame->False,Mesh->All,MeshStyle->Black,ColorRules->{1->Lighter@Lighter@Lighter@Green},ImageSize->size],
Style["=",Bold,Large],
ArrayPlot[Table[If[i==1,If[j<=10,1,3],If[j==1,2,0]],{i,1,15},{j,1,20}],Frame->False,Mesh->All,MeshStyle->Black,ColorRules->{1->Lighter@Orange,3->Lighter@Lighter@Blue,2->Gray},ImageSize->size],
Style["->",Bold,30],
Graphics3D[{Orange,Flatten@Table[Cuboid[{i,j,k},{i,j,k}+1],{i,8,12},{j,2,6},{k,6,10}]},Boxed->False,Lighting->"Neutral",ImageSize->0.75size]
}}
,Alignment->{Center,Center}];

imagePCA=Column[{
Style["A. Get patch from data and convert to matrix M",head],f11,"","",
Style["B. Perform singular value decomposition",head],"",f22,"","",
Style["C. Select eigenvalues outside Marchenko-Pastur distribution",head],"",f23,"","",
Style["D. Reconstruct patch from matrix M'",head],"",f24
},Alignment->Center];

Figure 2*: Deconvolution

diskF=;
diskf=AddNoise[FourierRescaleData[diskF,{16,16}],.1,NoiseType->"Complex"];
ham=MakeHammingFilter[{16,16}];
diskfH=Rescale[Abs@FourierShifted[ArrayPad[4ham InverseFourierShifted[diskf],{{8,8},{8,8}}]]];

f31=Row[{
ArrayPlot[1-Abs[diskf],Frame->False,ImageSize->150,PlotLabel->Style["Original data",lab]],
Column[{Style["(ℱ^(-1))",40,Bold],Style[" -> ",60,Bold]},Alignment->Center],
ArrayPlot[1-Rescale[Log@Abs@InverseFourierShifted[diskf]],Frame->False,ImageSize->150,PlotLabel->Style["k-space",lab]],
Column[{Style["×",40,Bold]},Alignment->Center],
ArrayPlot[ham,Frame->False,ImageSize->150,PlotLabel->Style["Hamming filter",lab],ColorFunction->"Rainbow"],
Column[{Style["ℱ",40,Bold],Style[" -> ",60,Bold]},Alignment->Center],
ArrayPlot[1-FourierShifted[ham InverseFourierShifted[diskf]],Frame->False,ImageSize->150,PlotLabel->Style["Filtered data",lab]]
}];

f32=Row[{
ArrayPlot[1-FourierShifted[ham InverseFourierShifted[diskf]],Frame->False,ImageSize->125,PlotLabel->Style["Filtered data",lab]],
Column[{Style["(ℱ^(-1))",40,Bold],Style["->",60,Bold]},Alignment->Center],
Show[
ArrayPlot[1-ArrayPad[Rescale[Log[Abs@InverseFourierShifted[diskf]]],{{8,8},{8,8}}],Frame->False,ImageSize->190,PlotLabel->Style["Zero pad",lab]],
Graphics[{EdgeForm[Red],Transparent,Rectangle[{8,8},{24,24}]}]
],
Column[{Style["ℱ",40,Bold],Style["->",60,Bold]},Alignment->Center],
ArrayPlot[1-0.9diskfH,Frame->False,ImageSize->190,PlotLabel->Style["Magnitude: M",lab]],
ArrayPlot[Table[(i+j)/16,{i,1,16},{j,1,16}],Frame->False,ImageSize->190,PlotLabel->Style["Phase: φ",lab]]
}];

f33=Row[{
Show[
ArrayPlot[hamp=ArrayPad[ham,{{8,8},{8,8}}],Frame->False,ImageSize->150,PlotLabel->Style["Zero pad filter",lab],ColorFunction->"Rainbow"],
Graphics[{EdgeForm[Red],Transparent,Rectangle[{8,8},{24,24}]}]
],
Column[{Style["ℱ",40,Bold],Style["->",60,Bold]},Alignment->Center],
Column[{"",Style["(",40,Bold]}],
ArrayPlot[ps=Abs@FourierShift@FourierShifted[hamp],Frame->False,ImageSize->150,PlotLabel->Style["Magnitude PS",lab],ColorFunction->"Rainbow"],
Column[{"",Style["(( * )^(-1))",40,Bold]},Alignment->Center],
ArrayPlot[(1-0.9diskfH),Frame->False,ImageSize->150,PlotLabel->Style["M",lab]],
Column[{"",Style[")",40,Bold]}],
Column[{Style[" ",40,Bold],Style["->",60,Bold]},Alignment->Center],
ArrayPlot[1-(dec=ListDeconvolve[ps,Abs@diskfH,Method->{"Wiener",0.1}]),Frame->False,ImageSize->150,PlotLabel->Style["Deconv. mag.: (SuperStar[M])",lab]]
}];

f34=Row[{
ArrayPlot[1-dec,Frame->False,ImageSize->175,PlotLabel->Style["Re-add phase \n (SuperStar[M]) × \!\(\*SuperscriptBox[\(e\), \(\(-I\)\\ φ\)]\)",lab]],
Column[{Style[" (ℱ^(-1)) ",40,Bold],Style[" -> ",60,Bold]},Alignment->Center],
Show[
ArrayPlot[1-Rescale@Log@Abs@InverseFourierShifted[dec],Frame->False,ImageSize->175,PlotLabel->Style["\nTruncate k-space",lab]],
Graphics[{EdgeForm[Red],Transparent,Rectangle[{8,8},{24,24}]}]
],
Column[{Style[" ℱ ",40,Bold],Style[" -> ",60,Bold]},Alignment->Center],
Column[{Show[
ArrayPlot[1-Abs@FourierRescaleData[dec,{16,16}],Frame->False,ImageSize->125,PlotLabel->Style["Final image",lab]],
Graphics[{Red,Line[{{0,7.5},{16,7.5}}]}]
],
ListLinePlot[Abs@FourierRescaleData[dec,{16,16}][[8]],PlotStyle->Thick,PlotRange->{{0,17},{-0.1,1.}},ImageSize->130,AxesStyle->Directive[{Thick,Black}],LabelStyle->Directive[Black,Bold,14],ColorFunction->Function[{x,y},ColorData["Rainbow"][y]],ColorFunctionScaling->False,Axes->{True,False},PlotLabel->" \n "]
},Spacings->-1]
,"    ",
Column[{Show[
ArrayPlot[1-FourierShifted[ham InverseFourierShifted[diskf]],Frame->False,ImageSize->125,PlotLabel->Style["Filtered data",lab]],
Graphics[{Red,Line[{{0,7.5},{16,7.5}}]}]
],
ListLinePlot[Abs[FourierShifted[ham InverseFourierShifted[diskf]]][[8]],PlotStyle->Thick,PlotRange->{{0,17},{-0.1,1}},ImageSize->130,AxesStyle->Directive[{Thick,Black}],LabelStyle->Directive[Black,Bold,14],ColorFunction->Function[{x,y},ColorData["Rainbow"][y]],ColorFunctionScaling->False,Axes->{True,False},PlotLabel->" \n "]
},Spacings->-1]
}];

imageDec=Column[{
Style["A. Hamming filter the data",head],"",f31,"","",
Style["B. Zero pad the data and reconstruct the magnitued and phase",head],"",f32"","",
Style["C. Wiener deconvolution of M with the absolute point spread function",head],"",f33,"","",
Style["D. Re-add the phase and downsample data to original resolution",head],"",f34
},Alignment->Center];

Figure 3*: Simulate Data

nsamp=256;bw=5000;dw=1./bw;field=7;nuc="31P";gyro=GetGyro[field,nuc];

diskF=;
diskf=Abs@FourierRescaleData[diskF,{16,16}];
diskM=;
specOrig=;
{nsaE,nsaH}=;
{datE,datH}=;
{specE,specH}=;

tab=Grid[Map[If[StringQ[#],Style[#,Bold,14],If[IntegerQ[#],Style[#,14],Style[NumberForm[#,{1,1}],14]]]&,
{{"Met.","Amp."," SNR\n6 NSA"},{"PE",17,0.3},{"PC",30,0.6},{"Piex",39,0.8},{"Piin",78,1.6},{"GPE",0,0.0},{"GPC",64,1.3},{"PCr",1000,20.0},{"ATP-γ",231,4.6},{"ATP-α",290,5.8},{"ATP-β",210,4.2},{"NAD",18,0.4},{"UDPG",20,0.4}}
,{2}],Spacings->{1,0.5},Alignment->Right,Dividers->{{False,True,True},{False,True}}];

size=160;
f11=Row[{
ArrayPlot[1-diskF,Frame->False,ImageSize->size,PlotLabel->Style["160 x 160",lab]],
Column[{Style["(ℱ^(-1))",40,Bold],Style[" -> ",60,Bold]},Alignment->Center],
Show[
ArrayPlot[1-Rescale[Log[Abs@InverseFourierShifted[diskF]]],Frame->False,ImageSize->size,PlotLabel->Style["Truncate k-space",lab]],
Graphics[{EdgeForm[Red],Transparent,Rectangle[{71,71},{89,89}]}]
],
Column[{Style["",40,Bold],Style[" -> ",60,Bold]},Alignment->Center],
ArrayPlot[1-Rescale[Log[Abs@InverseFourierShifted[diskf]]],Frame->False,ImageSize->size,PlotLabel->Style["k-space",lab]],
Column[{Style["ℱ",40,Bold],Style[" -> ",60,Bold]},Alignment->Center],
ArrayPlot[1-Rescale[Abs@diskf],Frame->False,ImageSize->size,PlotLabel->Style["16 x 16",lab]]
}];

f12=Grid[{
Style[#,Bold,Black,18,FontFamily->"Helvetica"]&/@{"High resolution","","Low resolution"},
{Row[{
Show[
ListPlot3D[diskF,PlotRange->{{0,161},{0,161},{-0.1,1.250}},Mesh->False,Lighting->"Neutral",ColorFunction->Function[{x,y,z},ColorData["Rainbow"][z]],ColorFunctionScaling->False,
ImageSize->230,Boxed->False,AxesStyle->Directive[{Thick,Black}],LabelStyle->Directive[Black,Bold,14],Axes->{True,True,False},AxesOrigin->{161,0,0},SphericalRegion->False],
Graphics3D[{Opacity[.3],InfinitePlane[{80,80,0},{{1,0,0},{0,0,1}}]}],Background->Transparent],
Column[{Style["",40,Bold],Style["->",60,Bold]},Alignment->Center],
ListLinePlot[diskF[[80]],PlotStyle->Thick,PlotRange->{{0,161},{-0.1,1.125}},ImageSize->175,AxesStyle->Directive[{Thick,Black}],LabelStyle->Directive[Black,Bold,14],
ColorFunction->Function[{x,y},ColorData["Rainbow"][y]],ColorFunctionScaling->False,Axes->{True,False},PlotLabel->" \n "]
}],
"     ",
Row[{
Column[{Style["",40,Bold],Style[" ",60,Bold]},Alignment->Center],
Show[
ListPlot3D[diskf,PlotRange->{{0,17},{0,17},{-0.1,1.250}},Mesh->False,Lighting->"Neutral",ColorFunction->Function[{x,y,z},ColorData["Rainbow"][z]],ColorFunctionScaling->False,
ImageSize->230,Boxed->False,AxesStyle->Directive[{Thick,Black}],LabelStyle->Directive[Black,Bold,14],Axes->{True,True,False},AxesOrigin->{17,0,0},SphericalRegion->False],
Graphics3D[{Opacity[.3],InfinitePlane[{9,9,0},{{1,0,0},{0,0,1}}]}]
],
Column[{Style["",40,Bold],Style["->",60,Bold]},Alignment->Center],
ListLinePlot[Abs@diskf[[9]],PlotStyle->Thick,PlotRange->{{0,17},{-0.1,1.125}},ImageSize->175,AxesStyle->Directive[{Thick,Black}],LabelStyle->Directive[Black,Bold,14],
ColorFunction->Function[{x,y},ColorData["Rainbow"][y]],ColorFunctionScaling->False,Axes->{True,False},PlotLabel->" \n "]
}]
}},Spacings->{Automatic,{0,-0.5}}
];

f13=Row[{
ListContourPlot3D[GaussianFilter[diskM,4],Contours->{.8},Mesh->False,Axes->False,Lighting->"Neutral",ContourStyle->Gray,ImageSize->220,PlotLabel->Style["3D phantom",lab],SphericalRegion->False],
Column[{Style["",40,Bold],Style["->",60,Bold]},Alignment->Center],
PlotSpectra[ApodizePadSpectra[specOrig],{dw,gyro},PlotRange->{{10,-20},Full},AspectRatio->0.4,ImageSize->550,GridLineSpacing->5,Method->"ReIm",PlotLabel->Style["Simulated spectrum at each voxel location",lab],PlotColor->{{Thick,Red},{Thick,Black}}],
(*"   ",
tab*)
}];

size=160;
f14=Grid[{
{
ListPlot3D[Total[nsaE][[6]],PlotRange->{{0,17},{0,17},{0,26}},Mesh->False,Lighting->"Neutral",ColorFunction->Function[{x,y,z},ColorData["Rainbow"][z/36]],ColorFunctionScaling->False,SphericalRegion->False,
ImageSize->200,Boxed->False,AxesStyle->Directive[{Thick,Black}],LabelStyle->Directive[Black,Bold,14],PlotLabel->"Equal k-space\nNSA: 6\nk-space points: "<>ToString[Total[Flatten[nsaE]]],AxesOrigin->{17,0,0},Axes->{True,True,False}],
Column[{Style["",40,Bold],Style["->",60,Bold]},Alignment->Center],
ArrayPlot[1-Rescale[Log@Abs[InverseFourierShifted[datE]]],Frame->False,ImageSize->size,PlotLabel->Style["k-space",lab]],
ArrayPlot[(p=1-Rescale[Abs[datE]];p[[9,9]]=Red;p),Frame->False,ImageSize->size,PlotLabel->Style["Mean of Mag.",lab]],
Column[{Style["",40,Bold],Style["->",60,Bold]},Alignment->Center],
PlotSpectra[ApodizePadSpectra@specE,{dw,gyro},PlotRange->{{10,-20},{-400,800}},AspectRatio->0.4,ImageSize->400,GridLineSpacing->5,Method->"ReIm",PlotLabel->"Spectrum of red voxel - Equal k-space",PlotColor->{{Thick,Red},{Thick,Black}}]
},
{""},
{""},
{
ListPlot3D[Total[nsaH][[6]],PlotRange->{{0,17},{0,17},{0,36}},Mesh->False,Lighting->"Neutral",ColorFunction->Function[{x,y,z},ColorData["Rainbow"][z/36]],ColorFunctionScaling->False,SphericalRegion->False,
ImageSize->200,Boxed->False,AxesStyle->Directive[{Thick,Black}],LabelStyle->Directive[Black,Bold,14],PlotLabel->"Hamming k-space\nNSA: 35\nk-space points: "<>ToString[Total[Flatten[nsaH]]],AxesOrigin->{17,0,0},Axes->{True,True,False}],
Column[{Style["",40,Bold],Style["->",60,Bold]},Alignment->Center],
ArrayPlot[1-Rescale[Log@Abs[InverseFourierShifted[datH]]],Frame->False,ImageSize->size,PlotLabel->Style["k-space",lab]],
ArrayPlot[(p=1-Rescale[Abs[datH]];p[[9,9]]=Red;p),Frame->False,ImageSize->size,PlotLabel->Style["Mean of Mag.",lab]],
Column[{Style["",40,Bold],Style["->",60,Bold]},Alignment->Center],
PlotSpectra[ApodizePadSpectra@specH,{dw,gyro},PlotRange->{{10,-20},{-400,800}},AspectRatio->0.4,ImageSize->400,GridLineSpacing->5,Method->"ReIm",PlotLabel->"Spectrum of red voxel - Hamming k-space",PlotColor->{{Thick,Red},{Thick,Black}}]
}
}];

imageSim=Column[{
Style["A. Simulation of high resolution 3D phantom",head],"",f13,"","",
Style["B. Downsampling of data",head],"",f11,"","",
Style["C. Data profile of high and low resolution data",head],"",f12(*,"","",
Style["D. Simulation of equal and Hamming weighted k-space acquistion",head],"",f14*)
},Alignment->Center];

Figure 4*: Processing Results

sel={1,3,(*3,*)6(*,8,10*)};
datI=Rescale[][[sel]];
nsamp=256;bw=5000;dw=1./bw;field=7;nuc="31P";gyro=GetGyro[field,nuc];
{spec1,spec2}={,};
std=
snr1=ReplacePart[(" - SNR = "<>ToString[#])&/@Round[(Sqrt[2](Max[Abs[#]]&/@spec1)/std)][[sel]],1->""]
snr2=ReplacePart[(" - SNR = "<>ToString[#])&/@Round[(Sqrt[2](Max[Abs[#]]&/@spec2)/std)][[sel]],1->""]

spec1a=ApodizePadSpectra[PhaseCorrectSpectra[#]]&/@spec1[[sel]];
spec2a=ApodizePadSpectra[PhaseCorrectSpectra[#]]&/@spec2[[sel]];
{spec1,spec2}=Transpose[NormalizeSpectra/@Transpose[{spec1a,spec2a}]];

n=Length[datI];

sc1=Max[Abs[#]]&/@spec1
sc2=Max[Abs[#]]&/@spec2
Round[100sc2/sc1]

labs1=TextCell[Style[#,head],TextAlignment->Top]&/@PadRight[{"A.","B.","C.","D.","E.","F.","G.","H."},n,""];
labs2=Rotate[Style[#,head],90Degree]&/@PadRight[{"Noise Free","Sim-E"," Sim-E\n    HA","    Sim-E\nHA+DC+DN","    Sim-E\nHA+DN+DC","    Sim-E\nDN+HA+DC","Noise Free","Sim-H","Sim-H\nDC+DN","Sim-H\nDN+DC"}[[sel]],n,""];
arrow=ConstantArray[Style["->",40,Bold],n];
blank=ConstantArray[Style["  ",40,Bold],n];

f41=ArrayPlot[(p=1-Abs[#];p[[9,9]]=Darker@Red;p[[6,9]]=Darker@Green;p),Frame->False,ImageSize->175,PlotRange->{0,1}]&/@datI;

f42 = Row[{
Show[
ListPlot3D[#,PlotRange->{{0,17},{0,17},{-0.1,1.1}},Mesh->False,Lighting->"Neutral",ColorFunction->Function[{x,y,z},ColorData["Rainbow"][z]],ColorFunctionScaling->False,
ImageSize->200,Boxed->False,AxesStyle->Directive[{Thick,Black}],LabelStyle->Directive[Black,Bold,14],Axes->{True,True,False},AxesOrigin->{17,0,0},SphericalRegion->False],
Graphics3D[{Opacity[.3],InfinitePlane[{9,9,0},{{1,0,0},{0,0,1}}]}]
],
ListLinePlot[#[[9]],PlotStyle->Thick,PlotRange->{{0,17},{-0.1,1.}},ImageSize->200,AxesStyle->Directive[{Thick,Black}],LabelStyle->Directive[Black,Bold,14],
ColorFunction->Function[{x,y},ColorData["Rainbow"][y]],ColorFunctionScaling->False,Axes->{True,False},AspectRatio->.5,GridLines->{None,{.25,.5,.75,1.}},GridLinesStyle->Directive[Thick,LightGray]]
},"   "]&/@(datI);

f43=Show[PlotSpectra[spec1[[#]]/1000,{dw,gyro},PlotRange->{{10,-20},{-200,1000}/1000},AspectRatio->.4,ImageSize->350,GridLineSpacing->5,Method->"Re",
PlotLabel->"Red voxel"<>snr1[[#]],PlotColor->{{Thick,Darker@Darker@Red}}],
Frame->{{True,False},{True,False}}]&/@Range[n];

f44=Show[PlotSpectra[spec2[[#]]/1000,{dw,gyro},PlotRange->{{10,-20},{-200,1000}/1000},AspectRatio->.4,ImageSize->350,GridLineSpacing->5,Method->"Re",
PlotLabel->"Green voxel"<>snr2[[#]],PlotColor->{{Thick,Darker@Darker@Green}}],
Frame->{{True,False},{True,False}}]&/@Range[n];

imageProces=Grid[Transpose@{Column[#,Alignment->Center]&/@Thread[{
(Grid[{#},Alignment->{Center,Automatic,{{1,1}->Top,{2,1}->Top,{3,1}->Top,{4,1}->Top}}]&/@Thread[{labs1,labs2,f41,arrow,f42}]),
{"","",""},
(Grid[{#}]&/@Thread[{f43,blank,f44}])
}]},Dividers -> {None,{False,{Thickness[2]},False}},Spacings->{0,2}];

Figure 5*: Deconvolution

dataPlot2D=/1000;
l1=l2=l3=81;

labs=Rotate[Style[#,Black,Bold,18],90 Degree]&/@{"Raw data","HA","HA+DC"};

ims=Transpose[{ArrayPlot[Re[#[[1]]],ColorFunction->Function[{z},ColorData["Rainbow"][(z+.150)/1.150]],ColorFunctionScaling->False,Frame->False,ImageSize->150(*,PlotLabel->Style[lab,Bold,Black,16]*),Epilog->{Thick, Dashed,#[[2]],Line[{{0,l1},{160,l1}}]},PlotLabel->"Real Signal",LabelStyle->Directive[Bold, 13, Black]]&/@
Thread[{dataPlot2D[[{4,5,6}]],{Red,Black,Darker@Green}}],
ArrayPlot[Im[#[[1]]],ColorFunction->Function[{z},ColorData["Rainbow"][(z+.150)/1.150]],ColorFunctionScaling->False,Frame->False,ImageSize->150(*,PlotLabel->Style[lab,Bold,Black,16]*),Epilog->{Thick, Dashed,#[[2]],Line[{{0,l1},{160,l1}}]},PlotLabel->"Imaginary Signal",LabelStyle->Directive[Bold, 13, Black]]&/@Thread[{dataPlot2D[[{4,5,6}]],{Red,Black,Darker@Green}}]}];

imLab=Column[Row[Flatten[#],"  "]&/@Thread[{labs,ims}]];

leg=LineLegend[{Directive[Gray,AbsoluteThickness[2],Dashed],Directive[Red,AbsoluteThickness[2]],Directive[Black,AbsoluteThickness[2]],Directive[Darker@Green,AbsoluteThickness[2]]},Style[#,Bold,Black,12]&/@{"Acutal size","Raw data","HA","HA+DC"},LegendLayout->"Row"];

graphs=Column[{
ListLinePlot[MapIndexed[{0.2#2[[1]],#1}&,#]&/@Re@dataPlot2D[[{1,4,5,6},All,l2]],AspectRatio->0.5,PlotLabel->"Real Signal",LabelStyle->Directive[Bold, 13, Black],
PlotStyle->{Directive[{Gray,Thick,Dashed}],Directive[{Red,Thick,Dashing[None]}],Directive[{Black,Thick,Dashing[None]}],Directive[{Darker@Green,Thick,Dashing[None]}]},
PlotRange->{Automatic,{-250,1100}/1000},ImageSize->400,FrameStyle->Directive[{Thick,Black}],LabelStyle->Directive[Black,Bold,14],
Frame->{{True,False},{True,False}},FrameLabel->{"size [cm]",None},AspectRatio->.5,GridLines->{None,{.25,.5,.75,1.}},GridLinesStyle->Directive[Thick,LightGray]]
,
ListLinePlot[MapIndexed[{0.2#2[[1]],#1}&,#]&/@Im@dataPlot2D[[{1,4,5,6},All,l2]],AspectRatio->0.5,PlotLabel->"Imaginary Signal",LabelStyle->Directive[Bold, 13, Black],
PlotStyle->{Directive[{Gray,Thick,Dashed}],Directive[{Red,Thick,Dashing[None]}],Directive[{Black,Thick,Dashing[None]}],Directive[{Darker@Green,Thick,Dashing[None]}]},
PlotRange->{Automatic,{-250,1100}/1000},ImageSize->400,FrameStyle->Directive[{Thick,Black}],LabelStyle->Directive[Black,Bold,14],
Frame->{{True,False},{True,False}},FrameLabel->{"size [cm]",None},AspectRatio->.5,GridLines->{None,{.25,.5,.75,1.}},GridLinesStyle->Directive[Thick,LightGray]],
leg
},Alignment->Center];

imageDecon=Row[{imLab,graphs},"       "]

Figure 6*: Real data

sel={1,2,5(*,6,8*)};
datR=Rescale[][[sel]];
nsamp=256;bw=5000;dw=1./bw;te=0.49/1000;field=7;nuc="31P";gyro=GetGyro[field,nuc];

{specR1,specR2}={,};
std=
snr1=(" - SNR = "<>ToString[#])&/@Round[(Sqrt[2](Max[Abs[#]]&/@specR1)/std)][[sel]]
snr2=(" - SNR = "<>ToString[#])&/@Round[(Sqrt[2](Max[Abs[#]]&/@specR2)/std)][[sel]]

specR1a=PhaseCorrectSpectra@ApodizePadSpectra[PhaseCorrectSpectra[#,dw,te,gyro,{10,-20}]]&/@specR1[[sel]];
specR2a=PhaseCorrectSpectra@ApodizePadSpectra[PhaseCorrectSpectra[#,dw,te,gyro,{10,-20}]]&/@specR2[[sel]];
{specR1,specR2}=Transpose[NormalizeSpectra/@Transpose[{specR1a,specR2a}]];

sc1=Max[Abs[#]]&/@specR1
sc2=Max[Abs[#]]&/@specR2
Round[100sc2/sc1]

n=Length[datR];

labs1=TextCell[Style[#,head],TextAlignment->Top]&/@PadRight[{"A.","B.","C.","D.","E.","F.","G.","H."},n,""];
labs2=Rotate[Style[#,head],90Degree]&/@PadRight[{"Data-E"," Data-E\n    HA","    Data-E\nHA+DC+DN","    Data-E\nHA+DN+DC","    Data-E\nDN+HA+DC","Data-H","Data-H\nDC+DN","Data-H\nDN+DC"}[[sel]],n,""];
arrow=ConstantArray[Style["->",40,Bold],n];
blank=ConstantArray[Style["  ",40,Bold],n];

f61=ArrayPlot[(p=1-Rescale[Abs[#]];p[[7,16]]=Darker@Red;p[[5,5]]=Darker@Green;p),Frame->False,ImageSize->280]&/@datR;

f62 = Row[{
Show[
ListPlot3D[#,PlotRange->{{0,21},{0,13},{-0.1,1.1}},Mesh->False,Lighting->"Neutral",ColorFunction->Function[{x,y,z},ColorData["Rainbow"][z]],ColorFunctionScaling->False,
ImageSize->200,Boxed->False,AxesStyle->Directive[{Thick,Black}],LabelStyle->Directive[Black,Bold,14],Axes->{True,True,False},AxesOrigin->{21,0,0},SphericalRegion->False,BoxRatios->{1,0.65,0.5}],
Graphics3D[{Opacity[.3],InfinitePlane[{6,6,0},{{1,0,0},{0,0,1}}]}]
],
ListLinePlot[#[[5]],PlotStyle->Thick,PlotRange->{{0,21},{-0.1,0.75}},ImageSize->200,AxesStyle->Directive[{Thick,Black}],LabelStyle->Directive[Black,Bold,14],
ColorFunction->Function[{x,y},ColorData["Rainbow"][y]],ColorFunctionScaling->False,Axes->{True,False},AspectRatio->.5,GridLines->{None,{0.175,0.35,0.525,0.7}},GridLinesStyle->Directive[Thick,LightGray]]
},"   "]&/@(datR);

f63=Show[PlotSpectra[specR1[[#]]/1000,{dw,gyro},PlotRange->{{10,-20},{-200,1050}/1000},AspectRatio->.4,ImageSize->400,GridLineSpacing->5,Method->"Re",
PlotLabel->"Red voxel"<>snr1[[#]],PlotColor->{{Thick,Darker@Darker@Red}}],
Frame->{{True,False},{True,False}}]&/@Range[n];

f64=Show[PlotSpectra[specR2[[#]]/1000,{dw,gyro},PlotRange->{{10,-20},{-200,1050}/1000},AspectRatio->.4,ImageSize->400,GridLineSpacing->5,Method->"Re",
PlotLabel->"Green voxel"<>snr2[[#]],PlotColor->{{Thick,Darker@Darker@Green}}],
Frame->{{True,False},{True,False}}]&/@Range[n];

imageData=Grid[Transpose@{Column[#,Alignment->Center]&/@Thread[{
(Grid[{#},Alignment->{Center,Automatic,{{1,1}->Top,{2,1}->Top,{3,1}->Top,{4,1}->Top}}]&/@Thread[{labs1,labs2,f61,arrow,f62}]),
{"","",""},
(Grid[{#}]&/@Thread[{f63,blank,f64}])
}]},Dividers -> {None,{False,{Thickness[2]},False}},Spacings->{0,2}];

Figure 7* Roemer: fit data

(*low snr*)
nsamp=256;bw=5000;dw=1./bw;field=7;nuc="31P";gyro=GetGyro[field,nuc];

specPlot= NormalizeSpectra[#]&/@;
fitPlot= NormalizeSpectra[#]&/@;

labs={"Data-E","Data-E: HA","Data-E: DN+HA+DC","Data-H","Data-H: DN+DC"};
f72=Grid[Partition[Insert[Table[
Column[{
ins=Show[
PlotSpectra[specPlot[[i]],{dw,gyro},Method->"Re",AspectRatio->0.7,ImageSize->135,GridLineSpacing->80,PlotColor->Directive[{Thickness[.02],Black}],PlotRange->{{6,2},{-0.05,0.15}Max[Abs[specPlot]]}(*,PlotLabel->labs[[i]]*)],
PlotSpectra[fitPlot[[i]],{dw,gyro},Method->"Re",AspectRatio->.35,ImageSize->110,GridLineSpacing->80,PlotColor->Directive[{Thickness[.01],Red}],PlotRange->{{10,-20},Full}]
,Background->White
];
Show[
PlotSpectra[specPlot[[i]],{dw,gyro},Method->"Re",AspectRatio->0.7,ImageSize->300,GridLineSpacing->5,PlotColor->Directive[{Thickness[.008],Black}],PlotRange->{{10,-20},{-0.15,1.1}Max[Abs[specPlot]]},PlotLabel->labs[[i]]],
PlotSpectra[fitPlot[[i]],{dw,gyro},Method->"Re",AspectRatio->.35,ImageSize->300,GridLineSpacing->5,PlotColor->Directive[{Thickness[.006],Red}],PlotRange->{{10,-20},Full}],Epilog->Inset[ins,{12,650}]
],
err=specPlot[[i]]-fitPlot[[i]];
PlotSpectra[err,{dw,gyro},Method->"Re",PlotColor->{Directive[{Thickness[.007],Black}],Directive[{Thickness[.006],Black}]},AspectRatio->.15,ImageSize->320,GridLineSpacing->5,PlotRange->{{10,-20},{-0.15,0.15}Max[Abs[specPlot]]},PlotLabel->"Residual error ("<>ToString[NumberForm[Round[Re[Mean[err/10]],.1],{2,1}]]<>" ± "<>ToString[NumberForm[Round[StandardDeviation[err/10],.1],{2,1}]]<>" % )"]
},Alignment->Center]
,{i,1,5}],LineLegend[Directive[{Thick,#}]&/@{Black,Red},Style[#,Bold,16]&/@{"Measured Spectra","Fitted Spectra"}],4],3],Spacings->{2,2}];

imageDataFit=Column[{
Style["Singe spectrum fit and fit residuals",head],
f72
},Alignment->Center,Spacings->1]

Figure 8: Fitting

raw=[[All,2;;]];
atp={MedianNoZero[#[[{8,9,10}]]]}&/@raw;
pi={Total[#[[{3,4}]]]}&/@raw;
raw2=Transpose[Flatten[(Transpose/@{raw[[All,1;;2]],pi,raw[[All,5;;7]],atp,raw[[All,11;;]]}),1]];
plotR2=(
dat=#;
ref=Ceiling[dat[[7]]];
100DevideNoZero[#,ref]&/@dat
)&/@raw2;

mask=Mask[Total@Total@plotR2,{2500,5000}];

vals=Map[(
dd=#;
vals=GetMaskData[dd,mask];
val=Round[Flatten@{MedianNoZero[vals],StandardDeviation[vals],Quantile[vals,{.05,.95}]},.1];
out=(st=ToString[#]; If[StringTake[st,-1]===".",st<>"0",st])&/@val;
out[[1]]<>" ("<>out[[3]]<>" - "<>out[[4]]<>") %"
)&,plotR2,{2}];

names2={"PE","PC","Pi","GPE","GPC","PCr","ATP","NAD","UDPG"};
ran={25,25,100,30,75,700,100,60,25};
labs={"","Data-E",(*"Data-E: HA",*)"Data-E: DN+HA+DC","Data-H","Data-H: DN+DC",""};

leg=Grid[{
{Rotate[Show[ColorData["SunsetColors","Image"],ImageSize->90,Frame->True,FrameTicks->False,AspectRatio->.2],90Degree],Style[#,lab]},
{SpanFromAbove,Style[0,lab]}
},Alignment->{{Left,Left},{Top,Bottom}}]&/@ran;

sel={(*1,*)2,3,5,6,8(*,9*)};
imageFit=Grid[Prepend[
Transpose[
Append[Prepend[
Table[MapThread[ArrayPlot[#1,PlotRange->{0,#2},ColorFunction->"SunsetColors",Frame->False,ImageSize->200,PlotLabel->#4,LabelStyle->Directive[Bold, Black, 13]]&,{plotR2[[i,sel,6]],ran[[sel]],names2[[sel]],vals[[i,sel]]}],{i,{1,(*2,*)3,4,5}}]
,Rotate[Style[#,Bold,Black,18,FontFamily->"Helvetica"],90Degree]&/@names2[[sel]]],leg[[sel]]]
]
,Style[#,Bold,Black,18,FontFamily->"Helvetica"]&/@labs]
,Spacings->{2,1.5},Alignment->{{Center, Center,Center,Center,Center,Center,Left},Center}];

Figures of Appendix

Figure A1*: k-space simulation

nsamp=256;bw=5000;dw=1./bw;field=7;nuc="31P";gyro=GetGyro[field,nuc];

diskF=;
diskf=Abs@FourierRescaleData[diskF,{16,16}];
diskM=;
specOrig=;
{nsaE,nsaH}=;
{datE,datH}=;
{specE,specH}=;

size=160;
f14=Grid[{
{
ListPlot3D[Total[nsaE][[6]],PlotRange->{{0,17},{0,17},{0,26}},Mesh->False,Lighting->"Neutral",ColorFunction->Function[{x,y,z},ColorData["Rainbow"][z/36]],ColorFunctionScaling->False,SphericalRegion->False,
ImageSize->200,Boxed->False,AxesStyle->Directive[{Thick,Black}],LabelStyle->Directive[Black,Bold,14],PlotLabel->"Equal k-space\nNSA: 6\nk-space points: "<>ToString[Total[Flatten[nsaE]]],AxesOrigin->{17,0,0},Axes->{True,True,False}],
Column[{Style["",40,Bold],Style["->",60,Bold]},Alignment->Center],
ArrayPlot[1-Rescale[Log@Abs[InverseFourierShifted[datE]]],Frame->False,ImageSize->size,PlotLabel->Style["k-space",lab]],
ArrayPlot[(p=1-Rescale[Abs[datE]];p[[9,9]]=Red;p),Frame->False,ImageSize->size,PlotLabel->Style["Mean of Mag.",lab]],
Column[{Style["",40,Bold],Style["->",60,Bold]},Alignment->Center],
PlotSpectra[NormalizeSpectra@ApodizePadSpectra@specE,{dw,gyro},PlotRange->{{10,-20},{-550,1100}},AspectRatio->0.4,ImageSize->400,GridLineSpacing->5,Method->"ReIm",PlotLabel->"Spectrum of red voxel - Equal k-space",PlotColor->{{Thick,Red},{Thick,Black}}]
},
{""},
{""},
{
ListPlot3D[Total[nsaH][[6]],PlotRange->{{0,17},{0,17},{0,36}},Mesh->False,Lighting->"Neutral",ColorFunction->Function[{x,y,z},ColorData["Rainbow"][z/36]],ColorFunctionScaling->False,SphericalRegion->False,
ImageSize->200,Boxed->False,AxesStyle->Directive[{Thick,Black}],LabelStyle->Directive[Black,Bold,14],PlotLabel->"Hamming k-space\nNSA: 35\nk-space points: "<>ToString[Total[Flatten[nsaH]]],AxesOrigin->{17,0,0},Axes->{True,True,False}],
Column[{Style["",40,Bold],Style["->",60,Bold]},Alignment->Center],
ArrayPlot[1-Rescale[Log@Abs[InverseFourierShifted[datH]]],Frame->False,ImageSize->size,PlotLabel->Style["k-space",lab]],
ArrayPlot[(p=1-Rescale[Abs[datH]];p[[9,9]]=Red;p),Frame->False,ImageSize->size,PlotLabel->Style["Mean of Mag.",lab]],
Column[{Style["",40,Bold],Style["->",60,Bold]},Alignment->Center],
PlotSpectra[NormalizeSpectra@ApodizePadSpectra@specH,{dw,gyro},PlotRange->{{10,-20},{-550,1100}},AspectRatio->0.4,ImageSize->400,GridLineSpacing->5,Method->"ReIm",PlotLabel->"Spectrum of red voxel - Hamming k-space",PlotColor->{{Thick,Red},{Thick,Black}}]
}
}];

imageSimKspace=Column[{
Style["Simulation of equal and Hamming weighted k-space acquistion",head],"",f14
},Alignment->Center];

Figure A2*: Sim Processing Results All

sel={2,3,4,5,6,8,9,10};
datI=Rescale[][[sel]];
nsamp=256;bw=5000;dw=1./bw;field=7;nuc="31P";gyro=GetGyro[field,nuc];
{spec1,spec2}={,};
std=
snr1=ReplacePart[(" - SNR = "<>ToString[#])&/@Round[(Sqrt[2](Max[Abs[#]]&/@spec1)/std)][[sel]],1->""]
snr2=ReplacePart[(" - SNR = "<>ToString[#])&/@Round[(Sqrt[2](Max[Abs[#]]&/@spec2)/std)][[sel]],1->""]

spec1a=PhaseCorrectSpectra@ApodizePadSpectra[PhaseCorrectSpectra[#]]&/@spec1[[sel]];
spec2a=PhaseCorrectSpectra@ApodizePadSpectra[PhaseCorrectSpectra[#]]&/@spec2[[sel]];
{spec1,spec2}=Transpose[NormalizeSpectra/@Transpose[{spec1a,spec2a}]];

n=Length[datI];

sc1=Max[Abs[#]]&/@spec1
sc2=Max[Abs[#]]&/@spec2
Round[100sc2/sc1]

labs1=TextCell[Style[#,head],TextAlignment->Top]&/@PadRight[{"A.","B.","C.","D.","E.","F.","G.","H."},n,""];
labs2=Rotate[Style[#,head],90Degree]&/@PadRight[{"Sim-E"," Sim-E\n    HA","    Sim-E\nHA+DC+DN","    Sim-E\nHA+DN+DC","    Sim-E\nDN+HA+DC","Sim-H","Sim-H\nDC+DN","Sim-H\nDN+DC"},n,""];
arrow=ConstantArray[Style["->",40,Bold],n];
blank=ConstantArray[Style["  ",40,Bold],n];

f41=ArrayPlot[(p=1-Abs[#];p[[9,9]]=Darker@Red;p[[6,9]]=Darker@Green;p),Frame->False,ImageSize->175,PlotRange->{0,1}]&/@datI;

f42 = Column[{
Show[
ListPlot3D[#,PlotRange->{{0,17},{0,17},{-0.1,1.1}},Mesh->False,Lighting->"Neutral",ColorFunction->Function[{x,y,z},ColorData["Rainbow"][z]],ColorFunctionScaling->False,
ImageSize->130,Boxed->False,AxesStyle->Directive[{Thick,Black}],LabelStyle->Directive[Black,Bold,14],Axes->{True,True,False},AxesOrigin->{17,0,0},SphericalRegion->False],
Graphics3D[{Opacity[.3],InfinitePlane[{9,9,0},{{1,0,0},{0,0,1}}]}]
],
ListLinePlot[#[[9]],PlotStyle->Thick,PlotRange->{{0,17},{-0.1,1.}},ImageSize->130,AxesStyle->Directive[{Thick,Black}],LabelStyle->Directive[Black,Bold,14],
ColorFunction->Function[{x,y},ColorData["Rainbow"][y]],ColorFunctionScaling->False,Axes->{True,False},AspectRatio->.5,GridLines->{None,{.25,.5,.75,1.}},GridLinesStyle->Directive[Thick,LightGray]]
},Alignment->Center]&/@(datI);

f43=Show[PlotSpectra[spec1[[#]]/1000,{dw,gyro},PlotRange->{{10,-20},{-200,1050}/1000},AspectRatio->.4,ImageSize->350,GridLineSpacing->5,Method->"Re",
PlotLabel->"Red voxel"<>snr1[[#]],PlotColor->{{Thick,Darker@Darker@Red}}],Frame->{{True,False},{True,False}}]&/@Range[n];

f44=Show[PlotSpectra[spec2[[#]]/1000,{dw,gyro},PlotRange->{{10,-20},{-200,1050}/1000},AspectRatio->.4,ImageSize->350,GridLineSpacing->5,Method->"Re",
PlotLabel->"Green voxel"<>snr2[[#]],PlotColor->{{Thick,Darker@Darker@Green}}],Frame->{{True,False},{True,False}}]&/@Range[n];

imageProcesAll=Grid[Thread[{labs1,labs2,f41,arrow,f42,blank,f43,blank,f44}],
Alignment->{Center,Automatic,{{1,1}->Top,{2,1}->Top,{3,1}->Top,{4,1}->Top,{5,1}->Top,{6,1}->Top,{7,1}->Top,{8,1}->Top}},
Spacings->{0.5,1},Dividers -> {None,{False,{Thickness[2]},False}}]

Figure A3*: Regularization

{regs,fwhm,relR,relI}=;

imagReg=Column[{Row[{
ListLinePlot[Transpose[{regs,fwhm[[3;;]]-10}],
GridLines->{{regs[[6]]},{{fwhm[[2]],Red},fwhm[[8]]-10}},PlotRange->{Full,{0,1.2fwhm[[2]]}},
Frame->{{True,False},{True,False}},GridLinesStyle->Directive[Gray, Dashed, Thick],
FrameStyle->Directive[{Thick,Black}],LabelStyle->Directive[Bold, 12, Black],ImageSize->300,
FrameLabel->{"Regularization factor","Percent increase [%]"},PlotLabel->"Increase of voxel size\n Lower is better"
],
ListLinePlot[Transpose[{regs,relR[[3;;]]}],
GridLines->{{regs[[6]]},{{relR[[2]],Red},relR[[8]]}},PlotRange->{Full,{0,1.2relR[[2]]}},
Frame->{{True,False},{True,False}},GridLinesStyle->Directive[Gray, Dashed, Thick],
FrameStyle->Directive[{Thick,Black}],LabelStyle->Directive[Bold, 12, Black],ImageSize->300,
FrameLabel->{"Regularization factor","Percent decrease [%]"},PlotLabel->"Decrese Gibbs ringing - Real\n Higher is better"
],
ListLinePlot[Transpose[{regs,relI[[3;;]]}],
GridLines->{{regs[[6]]},{{relI[[2]],Red},relI[[8]]}},PlotRange->{Full,{0,1.2relI[[2]]}},
Frame->{{True,False},{True,False}},GridLinesStyle->Directive[Gray, Dashed, Thick],
FrameStyle->Directive[{Thick,Black}],LabelStyle->Directive[Bold, 12, Black],ImageSize->300,
FrameLabel->{"Regularization factor","Percent decrease [%]"},PlotLabel->"Decrease Gibbs ringing - Imaginary\n Higher is better"
]
},"          "],
Row[{LineLegend[{Directive[Thick, Red, Dashed]},{Style["Result after Hamming filter",Bold, Black,13]}],
LineLegend[{Directive[Thick, Gray, Dashed]},{Style["Chosen regularization factor of 0.01",Bold, Black,13]}]},"         "]
},Alignment->Center]

Figure A4*: SNR maps

snrSim=;
snrReal=;

snrA=MapThread[ArrayPlot[#1[[2;;]],PlotRange->{0,#2},ColorFunction->"SunsetColors",Frame->False,ImageSize->300,PlotLabel->Style[#3,24],PlotLegends->BarLegend[{"SunsetColors",{0,#2}},LegendMarkerSize->250],LabelStyle->Directive[Bold,Black,16]]&,{snrSim,{100,400,100,400},{"Sim-E","Sim-E: DN+HA+DC","Sim-H","Sim-H: DN+DC"}}];

snrB=MapThread[ArrayPlot[#1,PlotRange->{0,#2},ColorFunction->"SunsetColors",Frame->False,ImageSize->475,PlotLabel->Style[#3,24],PlotLegends->BarLegend[{"SunsetColors",{0,#2}},LegendMarkerSize->250],LabelStyle->Directive[Bold,Black,16]]&,{snrReal,{100,250,100,250},{"Data-E","Data-E: DN+HA+DC","Data-H","Data-H: DN+DC"}}];

imageSNR=Grid[Transpose@{snrA,snrB}, Spacings->{3,1}];

Figure A5* Roemer All Real data

sel=All;
datR=Rescale[][[sel]];
nsamp=256;bw=5000;dw=1./bw;te=0.48/1000;field=7;nuc="31P";gyro=GetGyro[field,nuc];

{specR1,specR2}={,};
std=
snr1=(" - SNR = "<>ToString[#])&/@Round[(Sqrt[2](Max[Abs[#]]&/@specR1)/std)][[sel]]
snr2=(" - SNR = "<>ToString[#])&/@Round[(Sqrt[2](Max[Abs[#]]&/@specR2)/std)][[sel]]

specR1a=PhaseCorrectSpectra@ApodizePadSpectra[PhaseCorrectSpectra[#,dw,te,gyro,{10,-20}]]&/@specR1[[sel]];
specR2a=PhaseCorrectSpectra@ApodizePadSpectra[PhaseCorrectSpectra[#,dw,te,gyro,{10,-20}]]&/@specR2[[sel]];
{specR1,specR2}=Transpose[NormalizeSpectra/@Transpose[{specR1a,specR2a}]];

sc1=Max[Abs[#]]&/@specR1
sc2=Max[Abs[#]]&/@specR2
Round[100sc2/sc1]

n=Length[datR];

labs1=TextCell[Style[#,head],TextAlignment->Top]&/@PadRight[{"A.","B.","C.","D.","E.","F.","G.","H."},n,""];
labs2=Rotate[Style[#,head],90Degree]&/@PadRight[{"Data-E"," Data-E\n    HA","    Data-E\nHA+DC+DN","    Data-E\nHA+DN+DC","    Data-E\nDN+HA+DC","Data-H","Data-H\nDC+DN","Data-H\nDN+DC"},n,""];
arrow=ConstantArray[Style["->",40,Bold],n];
blank=ConstantArray[Style["  ",40,Bold],n];

f61=ArrayPlot[(p=1-Rescale[Abs[#]];p[[9,13]]=Darker@Red;p[[5,5]]=Darker@Green;p),Frame->False,ImageSize->280]&/@datR;

f62 = Column[{
Show[
ListPlot3D[#,PlotRange->{{0,21},{0,13},{-0.1,1.1}},Mesh->False,Lighting->"Neutral",ColorFunction->Function[{x,y,z},ColorData["Rainbow"][z]],ColorFunctionScaling->False,
ImageSize->130,Boxed->False,AxesStyle->Directive[{Thick,Black}],LabelStyle->Directive[Black,Bold,14],Axes->{True,True,False},AxesOrigin->{21,0,0},SphericalRegion->False,BoxRatios->{1,0.65,0.5}],
Graphics3D[{Opacity[.3],InfinitePlane[{6,6,0},{{1,0,0},{0,0,1}}]}]
],
ListLinePlot[#[[5]],PlotStyle->Thick,PlotRange->{{0,21},{-0.1,0.75}},ImageSize->130,AxesStyle->Directive[{Thick,Black}],LabelStyle->Directive[Black,Bold,14],
ColorFunction->Function[{x,y},ColorData["Rainbow"][y]],ColorFunctionScaling->False,Axes->{True,False},AspectRatio->.5,GridLines->{None,{0.175,0.35,0.525,0.7}},GridLinesStyle->Directive[Thick,LightGray]]
},Alignment->Center]&/@(datR);

f63=Show[PlotSpectra[specR1[[#]]/1000,{dw,gyro},PlotRange->{{10,-20},{-200,1050}/1000},AspectRatio->.4,ImageSize->350,GridLineSpacing->5,Method->"Re",
PlotLabel->"Red voxel"<>snr1[[#]],PlotColor->{{Thick,Darker@Darker@Red}}],
Frame->{{True,False},{True,False}}]&/@Range[n];

f64=Show[PlotSpectra[specR2[[#]]/1000,{dw,gyro},PlotRange->{{10,-20},{-200,1050}/1000},AspectRatio->.4,ImageSize->350,GridLineSpacing->5,Method->"Re",
PlotLabel->"Green voxel"<>snr2[[#]],PlotColor->{{Thick,Darker@Darker@Green}}],
Frame->{{True,False},{True,False}}]&/@Range[n];

imageDataAll=Grid[Thread[{labs1,labs2,f61,arrow,f62,blank,f63,blank,f64}],
Alignment->{Center,Automatic,{{1,1}->Top,{2,1}->Top,{3,1}->Top,{4,1}->Top,{5,1}->Top,{6,1}->Top,{7,1}->Top,{8,1}->Top}},
Spacings->{0,1},Dividers -> {None,{False,{Thickness[2]},False}}];

Figure A6* WSVD All Real data

sel=All;
datR=Rescale[];
nsamp=256;bw=5000;dw=1./bw;te=0.48/1000;field=7;nuc="31P";gyro=GetGyro[field,nuc];

{specR1,specR2}={,};
std=
snr1=(" - SNR = "<>ToString[#])&/@Round[(Sqrt[2](Max[Abs[#]]&/@specR1)/std)][[sel]]
snr2=(" - SNR = "<>ToString[#])&/@Round[(Sqrt[2](Max[Abs[#]]&/@specR2)/std)][[sel]]

specR1a=PhaseCorrectSpectra@ApodizePadSpectra[PhaseCorrectSpectra[#,dw,te,gyro,{10,-20}]]&/@specR1[[sel]];
specR2a=PhaseCorrectSpectra@ApodizePadSpectra[PhaseCorrectSpectra[#,dw,te,gyro,{10,-20}]]&/@specR2[[sel]];
{specR1,specR2}=Transpose[NormalizeSpectra/@Transpose[{specR1a,specR2a}]];

sc1=Max[Abs[#]]&/@specR1
sc2=Max[Abs[#]]&/@specR2
Round[100sc2/sc1]

n=Length[datR];

labs1=TextCell[Style[#,head],TextAlignment->Top]&/@PadRight[{"A.","B.","C.","D.","E.","F.","G.","H."},n,""];
labs2=Rotate[Style[#,head],90Degree]&/@PadRight[{"Data-E"," Data-E\n    HA","    Data-E\nHA+DC+DN","    Data-E\nHA+DN+DC","    Data-E\nDN+HA+DC","Data-H","Data-H\nDC+DN","Data-H\nDN+DC"},n,""];
arrow=ConstantArray[Style["->",40,Bold],n];
blank=ConstantArray[Style["  ",40,Bold],n];

f61=ArrayPlot[(p=1-Rescale[Abs[#]];p[[9,13]]=Darker@Red;p[[5,5]]=Darker@Green;p),Frame->False,ImageSize->280]&/@datR;

f62 = Column[{
Show[
ListPlot3D[#,PlotRange->{{0,21},{0,13},{-0.1,1.1}},Mesh->False,Lighting->"Neutral",ColorFunction->Function[{x,y,z},ColorData["Rainbow"][z]],ColorFunctionScaling->False,
ImageSize->130,Boxed->False,AxesStyle->Directive[{Thick,Black}],LabelStyle->Directive[Black,Bold,14],Axes->{True,True,False},AxesOrigin->{21,0,0},SphericalRegion->False,BoxRatios->{1,0.65,0.5}],
Graphics3D[{Opacity[.3],InfinitePlane[{6,6,0},{{1,0,0},{0,0,1}}]}]
],
ListLinePlot[#[[5]],PlotStyle->Thick,PlotRange->{{0,21},{-0.1,0.75}},ImageSize->130,AxesStyle->Directive[{Thick,Black}],LabelStyle->Directive[Black,Bold,14],
ColorFunction->Function[{x,y},ColorData["Rainbow"][y]],ColorFunctionScaling->False,Axes->{True,False},AspectRatio->.5,GridLines->{None,{0.175,0.35,0.525,0.7}},GridLinesStyle->Directive[Thick,LightGray]]
},Alignment->Center]&/@(datR);

f63=Show[PlotSpectra[specR1[[#]]/1000,{dw,gyro},PlotRange->{{10,-20},{-200,1050}/1000},AspectRatio->.4,ImageSize->350,GridLineSpacing->5,Method->"Re",
PlotLabel->"Red voxel"<>snr1[[#]],PlotColor->{{Thick,Darker@Darker@Red}}],
Frame->{{True,False},{True,False}}]&/@Range[n];

f64=Show[PlotSpectra[specR2[[#]]/1000,{dw,gyro},PlotRange->{{10,-20},{-200,1050}/1000},AspectRatio->.4,ImageSize->350,GridLineSpacing->5,Method->"Re",
PlotLabel->"Green voxel"<>snr2[[#]],PlotColor->{{Thick,Darker@Darker@Green}}],
Frame->{{True,False},{True,False}}]&/@Range[n];

imageDataWSVD=Grid[Thread[{labs1,labs2,f61,arrow,f62,blank,f63,blank,f64}],
Alignment->{Center,Automatic,{{1,1}->Top,{2,1}->Top,{3,1}->Top,{4,1}->Top,{5,1}->Top,{6,1}->Top,{7,1}->Top,{8,1}->Top}},
Spacings->{0,1},Dividers -> {None,{False,{Thickness[2]},False}}];

Figure A7* WSVD: CSI real data

nsamp=256;bw=5000;dw=1./bw;field=7;nuc="31P";gyro=GetGyro[field,nuc];

specPlot=NormalizeSpectra[#]&/@;
fitPlot=NormalizeSpectra[#]&/@;
labs={"Data-E","Data-E: HA","Data-E: DN+HA+DC","Data-H","Data-H: DN+DC"};

f72=Grid[Partition[Insert[Table[
Column[{
ins=Show[
PlotSpectra[specPlot[[i]],{dw,gyro},Method->"Re",AspectRatio->0.7,ImageSize->135,GridLineSpacing->80,PlotColor->Directive[{Thickness[.02],Black}],PlotRange->{{6,2},{-0.05,0.15}Max[Abs[specPlot]]}(*,PlotLabel->labs[[i]]*)],
PlotSpectra[fitPlot[[i]],{dw,gyro},Method->"Re",AspectRatio->.35,ImageSize->110,GridLineSpacing->80,PlotColor->Directive[{Thickness[.01],Red}],PlotRange->{{10,-20},Full}]
,Background->White
];
Show[
PlotSpectra[specPlot[[i]],{dw,gyro},Method->"Re",AspectRatio->0.7,ImageSize->300,GridLineSpacing->5,PlotColor->Directive[{Thickness[.008],Black}],PlotRange->{{10,-20},{-0.15,1.1}Max[Abs[specPlot]]},PlotLabel->labs[[i]]],
PlotSpectra[fitPlot[[i]],{dw,gyro},Method->"Re",AspectRatio->.35,ImageSize->300,GridLineSpacing->5,PlotColor->Directive[{Thickness[.006],Red}],PlotRange->{{10,-20},Full}],Epilog->Inset[ins,{12,650}]
],
err=specPlot[[i]]-fitPlot[[i]];
PlotSpectra[err,{dw,gyro},Method->"Re",PlotColor->{Directive[{Thickness[.007],Black}],Directive[{Thickness[.006],Black}]},AspectRatio->.15,ImageSize->320,GridLineSpacing->5,PlotRange->{{10,-20},{-0.15,0.15}Max[Abs[specPlot]]},PlotLabel->"Residual error ("<>ToString[NumberForm[Round[Re[Mean[err/10]],.1],{2,1}]]<>" ± "<>ToString[NumberForm[Round[StandardDeviation[err/10],.1],{2,1}]]<>" % )"]
},Alignment->Center]
,{i,1,5}],LineLegend[Directive[{Thick,#}]&/@{Black,Red},Style[#,Bold,16]&/@{"Measured Spectra","Fitted Spectra"}],4],3],Spacings->{2,2}];

imageDataFitWSVD=Column[{
Style["Singe spectrum fit and fit residuals",head],
f72
},Alignment->Center,Spacings->1];

Figure A8 WSVD: Fitting amplitudes

raw=[[All,2;;]];
atp={MedianNoZero[#[[{8,9,10}]]]}&/@raw;
pi={Total[#[[{3,4}]]]}&/@raw;
raw2=Transpose[Flatten[(Transpose/@{raw[[All,1;;2]],pi,raw[[All,5;;7]],atp,raw[[All,11;;]]}),1]];
plotR2=(
dat=#;
ref=Ceiling[dat[[7]]];
100DevideNoZero[#,ref]&/@dat
)&/@raw2;

mask=Mask[Total@Total@plotR2,{2500,5000}];

vals=Map[(
dd=#;
vals=GetMaskData[dd,mask];
val=Round[Flatten@{MedianNoZero[vals],StandardDeviation[vals],Quantile[vals,{.05,.95}]},.1];
out=(st=ToString[#]; If[StringTake[st,-1]===".",st<>"0",st])&/@val;
out[[1]]<>" ("<>out[[3]]<>" - "<>out[[4]]<>") %"
)&,plotR2,{2}];

names2={"PE","PC","Pi","GPE","GPC","PCr","ATP","NAD","UDPG"};
ran={25,25,100,30,75,700,100,50,25};
labs={"","Data-E",(*"Data-E: HA",*)"Data-E: DN+HA+DC","Data-H","Data-H: DN+DC",""};

leg=Grid[{
{Rotate[Show[ColorData["SunsetColors","Image"],ImageSize->90,Frame->True,FrameTicks->False,AspectRatio->.2],90Degree],Style[#,lab]},
{SpanFromAbove,Style[0,lab]}
},Alignment->{{Left,Left},{Top,Bottom}}]&/@ran;

sel={(*1,*)2,3,5,6,8(*,9*)};
imageFitWSVD=Grid[Prepend[
Transpose[
Append[Prepend[
Table[MapThread[ArrayPlot[#1,PlotRange->{0,#2},ColorFunction->"SunsetColors",Frame->False,ImageSize->200,PlotLabel->#4,LabelStyle->Directive[Bold, Black, 13]]&,{plotR2[[i,sel,6]],ran[[sel]],names2[[sel]],vals[[i,sel]]}],{i,{1,(*2,*)3,4,5}}]
,Rotate[Style[#,Bold,Black,18,FontFamily->"Helvetica"],90Degree]&/@names2[[sel]]],leg[[sel]]]
]
,Style[#,Bold,Black,18,FontFamily->"Helvetica"]&/@labs]
,Spacings->{2,1},Alignment->{{Center, Center,Center,Center,Center,Center,Left},Center}];

Figure A9*: Denoise Dynamic data

specs=;
te=0.3/1000;
bw=5000;

dw=1./bw;
nuc="31P";
field=7;
gyro=GetGyro[nuc,field];

imageDyn=Grid[Partition[(
Column[{
Style[#[[2]],Bold,Black,18],
Show[PlotSpectra[2PhaseCorrectSpectra@ApodizePadSpectra@CorrectTESpec[#[[1,1]]/1000,dw,te,gyro,{10,-20}],{dw,gyro},Method->"ReIm",PlotLabel->Style["Original spectra",12],
PlotRange->{{10.5,-20},{-400,800}/1000},PlotColor->{{Thick,Red},{Thick,Black}}],Frame->{{True,False},{True,False}},AspectRatio->.3,ImageSize->500],
Show[PlotSpectra[2PhaseCorrectSpectra@ApodizePadSpectra@CorrectTESpec[#[[1,2]]/1000,dw,te,gyro,{10,-20}],{dw,gyro},Method->"ReIm",PlotLabel->Style["Denoised spectra",12],
PlotRange->{{10.5,-20},{-400,800}/1000},PlotColor->{{Thick,Red},{Thick,Black}}],Frame->{{True,False},{True,False}},AspectRatio->.3,ImageSize->500],
Show[PlotSpectra[2PhaseCorrectSpectra@ApodizePadSpectra@CorrectTESpec[#[[1,3]]/1000,dw,te,gyro,{10,-20}],{dw,gyro},Method->"ReIm",PlotLabel->Style["Difference",12],
PlotRange->{{10.5,-20},{-100,100}/1000},PlotColor->{{Thick,Red},{Thick,Black}}],Frame->{{True,False},{True,False}},AspectRatio->.1,ImageSize->500]
},Alignment->Center
])&/@Transpose[{specs,{"A. Rest","B. Exercise","C. Early recovery","D. Late recovery"}}],2]
,Spacings->{3,2}];

Figures Extra

Figure A2* : Noise estimation

MakeNoiseFigure[aa_,ll_,t_]:=Column[Prepend[Column[{
Style[ToString[#],Bold,12,Black],
Row[{
ListLinePlot[#@aa[[;;;;2]],PlotRange->Full,Axes->False,AspectRatio->0.75,PlotStyle->Black,ImageSize->100],Histogram[#@aa[[;;;;2]],{Max[Abs[aa[[;;;;2]]]]/40},Axes->False,PerformanceGoal->"Speed",ChartStyle->Directive[{Gray,EdgeForm[None]}],BarOrigin->Left,AspectRatio->1,ImageSize->75,PlotRange->{All,All}]}]
},Alignment->Center]&/@{Re,Im},
Style[ll<>"\nSTDV: "<>ToString[Round[StandardDeviation[aa],.1]]<>"\nSamples: "<>ToString[Round[100 Length[aa]/Switch[t,"c",16384,"ss",122880,"sr",115200],.1]]<>" %",Bold,14,Black,TextAlignment->Center]
],Alignment->Center]

MakeNoiseFigureTot[data_,ll_,sr_]:=Block[{vx,cor,corO,spc,s1,s2,spcD,spcDO},
vx={1,2,-1,-2};
cor=Flatten[data[[vx,vx,vx]]];
corO=Pick[cor,FindOutliers[Re@cor,OutlierRange->10]FindOutliers[Im@cor,OutlierRange->10],1];

spc=Flatten[data,2];
s1=#-GaussianFilter[#,20,Padding->"Reflected"]&/@spc[[All,;;20]];
s2=#-GaussianFilter[#,20,Padding->"Reflected"]&/@spc[[All,-20;;]];

spc=Flatten[{spc[[All,;;20]],spc[[All,-20;;]]}];
spcD=Flatten[{s1,s2}];
spcDO=Pick[spcD,FindOutliers[Re@spcD,OutlierRange->8]FindOutliers[Im@spcD,OutlierRange->8],1];

Row[{
Column[{Style[ll[[1]]<>". Corner",lab],Row[{MakeNoiseFigure[cor,"Raw","c"],MakeNoiseFigure[corO,"Outlier","c"]},"  "]},Alignment->Center],
Column[{Style[ll[[2]]". Spectra",lab],Row[{MakeNoiseFigure[spc,"Raw","s"<>sr],MakeNoiseFigure[spcD,"Detrend","s"<>sr],MakeNoiseFigure[spcDO,"Detrend + Outlier","s"<>sr]},"  "]},Alignment->Center]},
"                 "]
]

<<noiseData.mx

(*Column[{
Style["Before Processing - Sim E",head],
MakeNoiseFigureTot[simDataE[[1]],{"A","B"},"s"],"","",
Style["After Processing - Sim E (Den + Ham + Dec)",head],
MakeNoiseFigureTot[simDataE[[2]],{"C","D"},"s"]
},Alignment->Center]*)

(*Column[{
Style["Before Processing - Data E",head],
MakeNoiseFigureTot[realDataE[[1]],{"A","B"},"r"],"","",
Style["After Processing - Data E (Den + Ham + Dec)",head],
MakeNoiseFigureTot[realDataE[[2]],{"C","D"},"r"]
},Alignment->Center]*)

noiseFigS=Column[{
Style["Before Processing - Sim H",head],
MakeNoiseFigureTot[simDataH[[1]],{"A","B"},"s"],"",
Style["After Processing - Sim H (Den + Dec)",head],
MakeNoiseFigureTot[simDataH[[2]],{"C","D"},"s"],"","","",
Style["Before Processing  - Data H",head],
MakeNoiseFigureTot[realDataH[[1]],{"E","F"},"r"],"",
Style["After Processing  - Data H (Den + Dec)",head],
MakeNoiseFigureTot[realDataH[[2]],{"G","H"},"r"]
},Alignment->Center];

View Figures

TabView[Thread[{
"F1","F2","F3","F4","F5","F6","F7","F8",
"FA1","FA2","FA3","FA4","FA5","FA6","FA7","FA8","FA9"
}->{
imagePCA,imageDec,imageSim,imageProces,imageDecon,imageData, imageDataFit, imageFit,
imageSimKspace,imageProcesAll,imagReg,imageSNR,imageDataAll,imageDataWSVD,imageDataFitWSVD,imageFitWSVD, imageDyn
}]]

Export Figures

Export["f1 - PCA method."<>#,imagePCA,ImageResolution->300]&/@{"jpg","tif"};

Export["f2 - Decon method."<>#,imageDec,ImageResolution->300]&/@{"jpg","tif"};

Export["f3 - Simulate data."<>#,imageSim,ImageResolution->300]&/@{"jpg","tif"};

Export["f4 - Sim process."<># ,imageProces,ImageResolution->300]&/@{"jpg","tif"};

Export["f5 - decon."<>#,imageDecon,ImageResolution->300]&/@{"jpg","tif"};

Export["f6 - Data process."<>#,imageData,ImageResolution->300]&/@{"jpg","tif"};

Export["f7 - spec Fit."<>#,imageDataFit,ImageResolution->300]&/@{"jpg","tif"};

Export["f8 - Data fitting."<>#,imageFit,ImageResolution->300]&/@{"jpg","tif"};

Export["fA1 - sim kspace."<>#,imageSimKspace,ImageResolution->300]&/@{"jpg","tif"};

Export["fA2 - Sim process All."<>#,imageProcesAll,ImageResolution->300]&/@{"jpg","tif"};

Export["fA3 - regularization."<>#,imagReg,ImageResolution->300]&/@{"jpg","tif"};

Export["fA4 - SNR maps."<>#,imageSNR,ImageResolution->300]&/@{"jpg","tif"};

Export["fA5 - Data process All."<>#,imageDataAll,ImageResolution->300]&/@{"jpg","tif"};

Export["fA6 - Data process WSVD."<>#,imageDataWSVD,ImageResolution->300]&/@{"jpg","tif"};

Export["fA7 - spec Fit WSVD."<>#,imageDataFitWSVD,ImageResolution->300]&/@{"jpg","tif"};

Export["fA8 - Data fitting WSVD."<>#,imageFitWSVD,ImageResolution->300]&/@{"jpg","tif"};

Export["fA9 - dynamic."<>#,imageDyn,ImageResolution->300]&/@{"jpg","tif"};

Export["fA2 - noise."<>#,noiseFigS,ImageResolution->300]&/@{"jpg","tif"};