<div dir="ltr"><div class="gmail_quote"><div class="gmail_attr">hi all,</div><div class="gmail_attr"><br></div><div class="gmail_attr">reposting this because I'm not sure it went through..</div><div class="gmail_attr">---------------------------------------------------------------</div><div dir="ltr"><br></div><div dir="ltr">hello,<div><br></div><div>I'm having some trouble specifying several kinds of EEG recording details/metadata required for further processing. From looking at tutorials, functions, and the mailing list, it appears that Fieldtrip usually determines these things cleverly from the input data, but in my case this information needs to be manually added.</div><div><br></div><div>DATA</div><div>My data are 8-h continuous 265-channel signals in 

Brainvision format (256 "active" EEG channels, the implicit EEG reference [Cz, flatline], and 8 bipolar physiological signals). Data were originally recorded in EGI's mff format, but have since been downsampled and converted to Brainvision (no doubt resulting in some loss of metadata).</div><div><br></div><div>After reading data into Fieldtrip, I'm left with this bare-bones structure:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>data_ft = </div><div><br></div><div>  struct with fields:</div><div><br></div><div>    fsample: 250</div><div>      trial: {[265×7671535 single]}</div><div>       time: {[1×7671535 double]}</div><div>      label: {1×265 cell}</div><div>        cfg: [1×1 struct]</div></blockquote><div><br></div><div>Basically the data and channel labels (as present in the Brainvision file), nothing more.</div><div><br></div><div>ELECTRODE LOCATIONS<br></div><div>I get my EEG electrode coordinates from reading the header of one of the original mffs:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>hdr_mff = ft_read_header(mff_file)</div><div>elec_eeg=hdr_mff.elec</div><div><br></div><div>elec_eeg = </div><div><br></div><div>  struct with fields:</div><div><br></div><div>     chanpos: [257×3 double]</div><div>    chantype: {257×1 cell}</div><div>    chanunit: {257×1 cell}</div><div>     elecpos: [257×3 double]</div><div>       label: {257×1 cell}</div><div>        type: 'egi256'</div><div>        unit: 'cm'</div></blockquote><div><br></div><div>So this reflects the 256+1 EEG electrodes, but not the physiological signals (presumably because the mff file doesn't - and couldn't - hold this information). I can turn these EEG coordinates into an EEG layout that looks accurate (and very similar to the EGI template layout provided in Fieldtrip):</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>cfg = [];</div><div>cfg.elec = elec_eeg;</div><div>mff_layout = ft_prepare_layout(cfg);</div><div>figure</div><div>ft_plot_layout(mff_layout);</div></blockquote><div><br></div><div>So far so good.</div><div><br></div><div>Q1: how do I add (mock) location information for the bipolar phys signals? I imagine I'll run into trouble if channel/electrode counts don't match between ft_data and elec_eeg. It would also be nice to be able to create a layout that includes the phys signals (which means they should be present in the elec_eeg struct). Do I manually expand the elec_eeg fields from 257 to 265? Suggestions for mock values that work well with ft_prepare_layout?</div><div><br></div><div>CHANNEL TYPES</div><div>Q2: how/where do I specify that the 8 phys channels are not EEG? Can elec_eeg.chantype be set to "non-eeg" or even more specific types (e.g., we have ecg, emg, etc..)? I can't find an overview of allowed channel types. And is it only the elec_eeg structure that needs this info, or do I need to specify it elsewhere too? (Ultimately, I'd like to be able to use ft_selectdata to select specific channel types etc.)</div><div><br></div><div>REFERENCE</div><div>Q3: how/where do I indicate that the first 256 channels are referenced to channel 257 (Cz, which is flatline), and that channels 258-265 are bipolar channels, such that later re-referencing works as intended? (I know having the EEG refence channel explicitly in the data is uncommon, so perhaps it needs to be deleted?)</div><div><br></div><div>Thanks for any input!</div><div><br></div><div>Best,</div><div>Roy</div><div><br></div></div>
</div></div>