Skip to content

Commit d3e9ce7

Browse files
authored
V1.3
Only now it works with an order file.
1 parent f1f6aa4 commit d3e9ce7

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

filtershift.cc

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,7 @@ void make_timings(Matrix *timings, Matrix *orders, int zs)
260260

261261
Matrix TempTimings;
262262
TempTimings.ReSize(zs,1);
263-
float tmn;
264-
float tmx;
263+
265264
try
266265
{
267266
*timings = read_ascii_matrix(timing.value(), zs, 1);
@@ -290,6 +289,8 @@ void make_timings(Matrix *timings, Matrix *orders, int zs)
290289
//Slice Order File, Default Reference Slice Tested 9/23/16 - Passed
291290
//Slice Order File, Custom Reference Slice Tested 9/23 - Passed
292291
// 9/23/16 - Will not Run With Multiband, only slice timing file (User Burden, Deal With It)
292+
//Slice Order File, Default Reference Slice Tested 10/10/16 - Passed
293+
//Slice Order File, Custom Reference Slice Tested 10/10/16 - Passed
293294

294295
int tmx;
295296
float shift;
@@ -303,29 +304,28 @@ void make_timings(Matrix *timings, Matrix *orders, int zs)
303304
std::cout<<"Error Loading file "<<order.value()<<std::endl;
304305
return;
305306
}
306-
307+
tmx=orders->Maximum();
307308
if (orders->Nrows()!=zs)
308309
{
309310
std::cout<<"Slice order file does not have the correct number of slices"<<std::endl;
310311
return;
311312
}
312313
Matrix TimeList;
313-
TimeList.ReSize(tmx,1);
314+
TimeList.ReSize(zs,1);
314315
shift=TR.value()*1.0/tmx;
315316

316317
for ( int i=1; i<=zs; i++ )
317318
{
318319
TimeList(i,1)=(float) (i-1)*shift;
319320
}
320-
321+
321322
// 9/23/16 - Made This loop more efficient
322323

323324
for (int j=1;j<=zs;j++)
324325
{
325326
timings->operator()(orders->operator()(j,1),1)=TimeList(j,1);
326327
}
327328

328-
329329
timings->operator-=(timings->operator()(ref.value(),1));
330330

331331
}
@@ -363,7 +363,6 @@ void make_timings(Matrix *timings, Matrix *orders, int zs)
363363

364364

365365
}
366-
367366
}
368367

369368

0 commit comments

Comments
 (0)