[Homer-users] MotionCorrectSpline

David Boas dboas at nmr.mgh.harvard.edu
Tue Jun 10 09:05:28 EDT 2014
Search archives:

Rob,
Thanks for sending the .nirs and .cfg file.

The error was quite simple.
The 't' vector in the .nirs file should be a column vector. You had it 
as a row vector.
I changed hmrMotionCorrectSpline.m to take either a column or row vector 
for t.
I have fixed this in the developers version.

But to be safe, it is best to have t as a column vector in the .nirs file.

David



On 6/10/14, 4:46 AM, Labruyere Rob wrote:
> Dear David
>
> Thanks again for your help. We ran our data with your processing stream config file and keep encountering Matlab error messages. First, we got notified that we were lacking a toolbox and after installing that one, we got the following:
>
> Error using  -
> Matrix dimensions must agree.
>
> Error in hmrMotionCorrectSpline (line 91)
>              dodSpline(lst,idx_ch) = dod(lst,idx_ch) - SplInterp;
>
> Error in EasyNIRS_Process (line 88)
>          eval( fcall );
>
> Error in EasyNIRS>runNIRSsignalProcess (line 1022)
> [procResult procInput err] = EasyNIRS_Process(hmr);
>
> Error in EasyNIRS>popupmenuNIRSsignalProcess_Callback (line 1435)
>          runNIRSsignalProcess(iGrp,iSubj,iRun,handles);
>
> Error in gui_mainfcn (line 96)
>          feval(varargin{:});
>
> Error in EasyNIRS (line 43)
>      gui_mainfcn(gui_State, varargin{:});
>
> Error in
> @(hObject,eventdata)EasyNIRS('popupmenuNIRSsignalProcess_Callback',hObject,eventdata,guidata(hObject))
>
>
> Error while evaluating uicontrol Callback
>
> Any ideas?
>
> Thank you very much and best regards
>
> Rob
>
>
>
> Am 28.05.2014 um 15:00 schrieb David Boas <dboas at nmr.mgh.harvard.edu<mailto:dboas at nmr.mgh.harvard.edu>>:
>
> Try the attached processing stream config file.
> This config file has the spline, wavelet, and targeted PCA motion correction algorithms in it.
>
> You can skip each function by :
> spline - set p=-1
> wavelet - set iqr<0
> tPCA - set maxIter=0
>
> For spline to correct motion artifacts, the motion artifacts must first be previously identified by hmrMotionArtifact or hmrMotionArtifactByChannel. Make sure you set the AmpThresh and/or STDEVthresh to find motion artifacts.
>
> I guess the error you mentioned could arise if you didn't use one of these MotionArtifact functions to find artifacts and thus define tInc. Unfortunately we haven't had the time to write code to do self-consistency checking on processing streams to warn you if such problems will occur. This is on our to do list, along with making the whole processing of defining the processing stream more easy.
>
> David
>
>
>
>
>
>
> On 5/28/14, 8:19 AM, Labruyere Rob wrote:
> Dear Simpsons
>
> We are interested in the Motion Artifact Correction function introduced by Felix Scholkman. Therefore, we wanted to try it on the HOmer2 demo data (we chose „Example2_tw1“, as we have some classical motion artifacts there).
> However, when we go to the Process Stream GUI and replace „enStimRejection“ with „hmrMotionCorrectSpline“, Matlab give us the following errors:
>
> Attempted to access tInc(:,1); index out of bounds
> because size(tInc)=[0,0].
>
> Error in hmrMotionCorrectSpline (line 55)
>      lstMA = find(tInc(:,idx_ch)==0);   % sublist of
>      motion artifact segments
>
> Error in EasyNIRS_Process (line 88)
>          eval( fcall );
>
> Error in EasyNIRS>runNIRSsignalProcess (line 1022)
> [procResult procInput err] = EasyNIRS_Process(hmr);
>
> Error in EasyNIRS>popupmenuNIRSsignalProcess_Callback
> (line 1435)
>          runNIRSsignalProcess(iGrp,iSubj,iRun,handles);
>
> Error in gui_mainfcn (line 96)
>          feval(varargin{:});
>
> Error in EasyNIRS (line 43)
>      gui_mainfcn(gui_State, varargin{:});
>
> Error in
> @(hObject,eventdata)EasyNIRS('popupmenuNIRSsignalProcess_Callback',hObject,eventdata,guidata(hObject))
>
>
> Error while evaluating uicontrol Callback
>
> Any help would be highly appreciated.
>
> Thanks and have a nice day!
>
> Rob
>
>
> Rob Labruyère, PhD
> Pediatric Rehab Research Group
> University Children’s Hospital Zurich
> Affoltern am Albis, Switzerland
>
>
> _______________________________________________
> Homer-users mailing list
> Homer-users at nmr.mgh.harvard.edu<mailto:Homer-users at nmr.mgh.harvard.edu>
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/homer-users
>
>
>
> --
> ==============================================================
> fNIRS 2014 Conference in Montreal Oct 10-12, 2014
> The conference is preceded by a one day educational workshop.
> Abstract Deadline June 16, 2014
> see http://fnirs2014.org for more details
> ==============================================================
>
> <processOpt_spline_wavelet_tPCA.cfg>_______________________________________________
> Homer-users mailing list
> Homer-users at nmr.mgh.harvard.edu<mailto:Homer-users at nmr.mgh.harvard.edu>
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/homer-users
>
>
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the e-mail
> contains patient information, please contact the Partners Compliance HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in error
> but does not contain patient information, please contact the sender and properly
> dispose of the e-mail.
>
>
> _______________________________________________
> Homer-users mailing list
> Homer-users at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/homer-users
>
>

-- 
==============================================================
fNIRS 2014 Conference in Montreal Oct 10-12, 2014
The conference is preceded by a one day educational workshop.
Abstract Deadline June 16, 2014
see http://fnirs2014.org for more details
==============================================================




More information about the Homer-users mailing list