Simple FilterChain question

Forum for software developers to discuss BCI2000 software development
Locked
RemyWahnoun
Posts: 10
Joined: 16 Feb 2010, 22:46

Simple FilterChain question

Post by RemyWahnoun » 22 Oct 2010, 16:32

hi all,
Im working with an amplifier that feeds me with 128 channels without allowing me to select what comes in.
I tried to change the SignalSourceFilterChain to place the TransmissionFilter before all the file writers in the prm file.
However, when i look at the recorded data via the BCIViewer, i see all channels.
Shouldnt the TransmissonFilter cut down to the desiredchannels before the file writing then?
Any better idea?

Thanks a lot in advance, looking forward to seeing yall at SFN2k10

mellinger
Posts: 1071
Joined: 12 Feb 2003, 11:06

Post by mellinger » 25 Oct 2010, 08:32

Hi Remy,

FilterChain parameters are read-only, and cannot be used to change the filter chain in a module.
What you will need to do is to modify the ADC filter such that it returns only a subset of channels in its output signal.

Best regards,
Juergen

RemyWahnoun
Posts: 10
Joined: 16 Feb 2010, 22:46

Post by RemyWahnoun » 25 Oct 2010, 18:17

Thanks Juergen,
i guess i got confused because when i change manually the order of the filter chain before recording, then i can actually run the experiment, and when i look at the data using the viewer, it remains as i wrote it.
i will then write a built-in filter to the acquisition module, as you advised.
sincerely,

RemyWahnoun
Posts: 10
Joined: 16 Feb 2010, 22:46

FilterChain

Post by RemyWahnoun » 28 Oct 2010, 20:02

Ok, now i am really confused.
I thought later that if i changed the filterchain in the source code, then it should work.
So i changed the RegisterFilter call to all filewriters to 1.9 while the transmission filter is set to 1.2
After recompiling BCI2k 3.0, i still see all channels in the data.
Wouldnt hard coding the filterchain this way leave only the requested channels in the data?
Thanks again.

mellinger
Posts: 1071
Joined: 12 Feb 2003, 11:06

Post by mellinger » 29 Oct 2010, 09:01

No, FileWriter filters are always treated as sub-filters of the DataIOFilter, which uses them to write raw data to the current data file. The actual filter chain only contains the DataIOFilter, the AlignmentFilter, and the TransmissionFilter. Raw data is received from the ADC filter, and written to disk within the DataIOFilter, so there is no way to change the number of channels written to disk without modifying the ADC filter.

RemyWahnoun
Posts: 10
Joined: 16 Feb 2010, 22:46

Post by RemyWahnoun » 29 Oct 2010, 10:54

Oh ok now i understand,
Ill just implement my own transmission filter in the ADC then.
Thanks again.

Locked

Who is online

Users browsing this forum: No registered users and 0 guests