Skip to content

Commit

Permalink
Modified the data load functions (io_loadspec_twix.m and related) so …
Browse files Browse the repository at this point in the history
…that they write a field called out.seq, which contains information about the pulse sequence. In most cases this will not be used, but in some cases (ie. in the case of data acquired using WIP529), this information can be used by the functions or example run scripts. Specifically, I modified run_megapressproc.m so that it uses this information to determine how to properly combine the water unsuppressed sub-spectra. Thank you to Georg Oeltzschner, who spotted the problem and suggested the solutiongit status
  • Loading branch information
jamienear committed Apr 2, 2015
1 parent 2fdd975 commit faffb2c
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 1 deletion.
8 changes: 7 additions & 1 deletion exampleRunScripts/run_megapressproc.m
Original file line number Diff line number Diff line change
Expand Up @@ -408,9 +408,15 @@
out1_diff=op_combinesubspecs(out1,'diff');
out1_sum=op_combinesubspecs(out1,'summ');


%Make final water unsuppressed data
if water
outw=op_combinesubspecs(outw_ls,'summ');
if strcmp(outw_ls.seq,'WIP529');
outw=op_combinesubspecs(outw_ls,'diff');
else
outw=op_combinesubspecs(outw_ls,'summ');
end
outw=op_addphase(outw,-phase(outw.fids(1))*180/pi,0,4.65,1);
else
outw=0;
end
Expand Down
2 changes: 2 additions & 0 deletions inputOutput/io_loadjmrui.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
out.date=date;
out.dims=dims;
out.Bo=Bo;
out.seq='';
out.pointsToLeftshift=0;

%Write flags
out.flags.writtentostruct=1;
Expand Down
2 changes: 2 additions & 0 deletions inputOutput/io_loadspec_GE.m
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@
out.rawAverages=rawAverages;
out.subspecs=subspecs;
out.rawSubspecs=rawSubspecs;
out.seq='';
out.pointsToLeftshift=0;


Expand Down Expand Up @@ -225,6 +226,7 @@
out_w.rawAverages=rawAverages_w;
out_w.subspecs=subspecs_w;
out_w.rawSubspecs=rawSubspecs_w;
out_w.seq='';
out_w.pointsToLeftshift=0;


Expand Down
1 change: 1 addition & 0 deletions inputOutput/io_loadspec_IMA.m
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@
out.rawAverages=rawAverages;
out.subspecs=subspecs;
out.rawSubspecs=rawSubspecs;
out.seq='';
out.pointsToLeftshift=0;


Expand Down
2 changes: 2 additions & 0 deletions inputOutput/io_loadspec_data.m
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@
out.rawAverages=rawAverages;
out.subspecs=subspecs;
out.rawSubspecs=rawSubspecs;
out.seq='';
out.pointsToLeftshift=0;


Expand Down Expand Up @@ -231,6 +232,7 @@
out_w.rawAverages=rawAverages_w;
out_w.subspecs=subspecs_w;
out_w.rawSubspecs=rawSubspecs_w;
out_w.seq='';
out_w.pointsToLeftshift=0;


Expand Down
1 change: 1 addition & 0 deletions inputOutput/io_loadspec_sdat.m
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
out.rawAverages=rawAverages;
out.subspecs=subspecs;
out.rawSubspecs=rawSubspecs;
out.seq='';
out.pointsToLeftshift=0;


Expand Down
12 changes: 12 additions & 0 deletions inputOutput/io_loadspec_twix.m
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@
data=dOut.data;
end

%Make a pulse sequence identifier for the header (out.seq);
if isSpecial
seq='rm_special'
elseif isWIP529
seq='WIP529'
else
seq='';
end



fids=squeeze(data);

%If we are dealing with WIP 529, then we need to swap the order of the
Expand Down Expand Up @@ -327,6 +338,7 @@
out.rawAverages=rawAverages;
out.subspecs=subspecs;
out.rawSubspecs=rawSubspecs;
out.seq=seq;
if RaidLength==1
out.pointsToLeftshift=twix_obj.image.freeParam(1);
elseif RaidLength>1
Expand Down
2 changes: 2 additions & 0 deletions inputOutput/io_loadspec_varian.m
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@
out.date=date;
out.dims=dims;
out.Bo=out.txfrq/42.577/1e6;
out.seq='';
out.pointsToLeftshift=0;

%FILLING IN THE FLAGS
out.flags.writtentostruct=1;
Expand Down
1 change: 1 addition & 0 deletions inputOutput/io_readlcmraw.m
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@
out.txfrq=txfrq;

out.date=date;
out.seq='';

out.dims.t=1;
out.dims.coils=0;
Expand Down
1 change: 1 addition & 0 deletions inputOutput/io_readlcmraw_basis.m
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
out.txfrq=txfrq;

out.date=date;
out.seq='';

out.dims.t=1;
out.dims.coils=0;
Expand Down

0 comments on commit faffb2c

Please sign in to comment.