<div dir="ltr"><div><span style="font-size:12.8000001907349px">Dear fieldtrip users,</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">I have encountered a problem getting dipole fit to a topography observed on consecutive time points. I have attempted to format the data appropriately (Tzvetan, thank you for your help!), but the call to </span><span style="font-size:12.8000001907349px">ft_dipolefitting</span><span style="font-size:12.8000001907349px"> function returns the "Objective function is undefined at initial point" error both during gridsearch and nonlinear search. What could be the cause of such behavior? Could it be that electrode coordinates are somehow in a wrong format (I have taken mine from an eeglab dataset) or would they anyway be projected onto head surface and cause wrong results, but not an error?</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Thank you in advance for any help.</span><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Ksenia Volkova</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="font-size:12.8000001907349px">Dear Ksenia,</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">I would first start with the organization of the data in a format FieldTrip can sense.<br></span><span style="font-size:12.8000001907349px">data = [];<br></span><span style="font-size:12.8000001907349px">data.trial ={[chan x time]} % this is your elec x topography matrix, where topography is observed on consecutive time points<br></span><span style="font-size:12.8000001907349px">data.time = [vector-number of time points];<br></span><span style="font-size:12.8000001907349px">data.label = {?elec1?,?elec2? etc.} your electrode labels<br></span><span style="font-size:12.8000001907349px">data.elec = this is key reflecting the position of the electrodes relative to the head</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">Next, you have to compute a volume conduction model. How to do so is explained here: </span><a href="http://www.fieldtriptoolbox.org/tutorial/headmodel_eeg?s[]=eeg&s[]=volume&s[]=conduction&s[]=model" rel="noreferrer" target="_blank" style="font-size:12.8000001907349px">http://www.fieldtriptoolbox.org/tutorial/headmodel_eeg?s[]=eeg&s[]=volume&s[]=conduction&s[]=model<br></a><span style="font-size:12.8000001907349px">After this you can proceed with the dipole fitting which is explained for instance here: </span><a href="http://www.fieldtriptoolbox.org/tutorial/natmeg/dipolefitting#fit_a_dipole_model_to_the_meg_data" rel="noreferrer" target="_blank" style="font-size:12.8000001907349px">http://www.fieldtriptoolbox.org/tutorial/natmeg/dipolefitting#fit_a_dipole_model_to_the_meg_data<br></a><span style="font-size:12.8000001907349px">Under cfg.latency you could specify the number of the topography you are interested in and under cfg.vol the BEM model you computed in the previous step. If you don#t have individual MRI<br></span><span style="font-size:12.8000001907349px">you can use the standard BEM model located in the ~template/headmodel/standard_</span><span style="font-size:12.8000001907349px">bem.mat. Note that before you do so you should coregister the headmodel with the electrodes using<br></span><span style="font-size:12.8000001907349px">ft_electroderealign.</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">Good luck<br></span><span style="font-size:12.8000001907349px">tzvetan</span><br style="font-size:12.8000001907349px"><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">> Dear fieldtrip users,<br></span><span style="font-size:12.8000001907349px">><br></span><span style="font-size:12.8000001907349px">> I wonder if you can help me out. I have a relatively simple problem: having a topography matrix (where rows correspond to topographies, and columns correspond to channels) I want to fit a dipole to each topography. I have looked through tutorials and documentation and I've seen this example </span><a href="http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_dipole_fit" rel="noreferrer" target="_blank" style="font-size:12.8000001907349px">http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_dipole_fit</a><span style="font-size:12.8000001907349px">. Still, I can't figure out how I should use the toolbox to solve my problem.<br></span><span style="font-size:12.8000001907349px">><br></span><span style="font-size:12.8000001907349px">> What would be the right arguments to call ft_dipolefitting with in my case? If I have EEG data, topography matrix and channel locations, what would be the easiest way to fit a dipole to each topography?<br></span><span style="font-size:12.8000001907349px">><br></span><span style="font-size:12.8000001907349px">> Thank you in advance for any help.<br></span><span style="font-size:12.8000001907349px">><br></span><span style="font-size:12.8000001907349px">> Ksenia Volkova<br></span><span style="font-size:12.8000001907349px">> ______________________________</span><span style="font-size:12.8000001907349px">_________________<br></span><span style="font-size:12.8000001907349px">> fieldtrip mailing list<br></span><span style="font-size:12.8000001907349px">> </span><a href="mailto:fieldtrip@donders.ru.nl" style="font-size:12.8000001907349px">fieldtrip@donders.ru.nl<br></a><span style="font-size:12.8000001907349px">> </span><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank" style="font-size:12.8000001907349px">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></blockquote><div><br></div>
</div>