[FieldTrip] re-referencing using neuralynx.csc channels

Schoffelen, J.M. (Jan Mathijs) janmathijs.schoffelen at donders.ru.nl
Mon Mar 27 10:20:40 CEST 2023


Hi Peter,

ft_read_data is a so-called ‘intermediate’ level fieldtrip function and not typically called directly by the casual user.

I think your use case calls for the following strategy:

channellist = {‘channel1’;’channel2’;…’channelN’};
for k = 1:numel(channellist)
   cfg.channel = channellist{k}; % or something equivalent, at least instructing the reading function to grab a channel specific file
   data{k} = ft_preprocessing(cfg);
end

alldata = ft_appenddata([], data{:});

Once you have the alldata object, you can apply re-referencing. Perhaps indeed this is best done by creating a ‘montage’, and apply it to the data.

Best wishes,

Jan-Mathijs



On 23 Mar 2023, at 22:12, Peter Kaskan via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:

Hello,

I am writing a ft_preprocessing script; I can give it channel1.csc and proceed with filtering, defining trials etc.

...but, how do I re-reference to another channel?

Is there a way to use ft_read_data to create a structure with all channels, and then tell it what channel I want to use as a reference?

Or do I need to create a montage, and how do I do that with n #s of separate neuralynx.csc channels?



Thanks - Peter


Peter M. Kaskan, Ph.D.
Assistant Professor
Albert Einstein College of Medicine
Leo M. Davidoff Department of Neurological Surgery
1410 Pelham Parkway South
Kennedy Center Room 429B
Bronx, NY 10461

phone: 718-430-2763
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!60Yjt-0SzGHUVF1yExkMEcKS1zArQ8mpt3AIulklkHDlJZ2iPSvVKcYsMLEB7NWEBcyBLI95PBeKR0ssSeYQe78LAotamJRktAY1Ew$

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20230327/1bed0c77/attachment.htm>


More information about the fieldtrip mailing list