" DataIOFilter Modification"

Forum for software developers to discuss BCI2000 software development
Locked
darvish_sam
Posts: 18
Joined: 02 May 2012, 21:29

" DataIOFilter Modification"

Post by darvish_sam » 25 Nov 2013, 04:46

Dear all,
Could possibly someone tell me how to change the DataIOFilter so as to modify the value of each channel before saving?
I need it to re-reference EEG Channels as I am recording data using TMSi Amplifier and recording EEG, EMG and EOG concurrently and due to its automatic common average referencing, I need to re-reference the EEG values before saving to the file.

I have gone through DataIOFilter code few times but can't figure out how it saves each block's data to the .dat file.

Any kind of help is highly appreciated.

Thank you,
Sam

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

Re: " DataIOFilter Modification"

Post by mellinger » 25 Nov 2013, 08:37

Hi,

as this is a problem specific to the TMSI amplifier, I think the appropriate place to implement your change will be the TMSI source module rather than the DataIOFilter.

Actual writing to data files is done by separate components, specific to the various file formats that BCI2000 supports. These will write whatever they are provided with by the GenericADC or BufferedADC descendant that actually handles the physical amplifier.

HTH,
Juergen

darvish_sam
Posts: 18
Joined: 02 May 2012, 21:29

Re: " DataIOFilter Modification"

Post by darvish_sam » 25 Nov 2013, 17:26

Thank you Juergen for your very helpful reply. I'll try to modify the source module instead.
Just tone more question: As you know some amplifiers like TMSi Refa, do not have built-in filters and so I have added the source filter and re-built the TMSi class. Now as far as visualization concerns it works perfectly according to the defined LP, HP and the notch filter.and the EEG data seem to be all in -100 Micovolts to 100 microvolts. However, when I try to read the recoreded data in Matlab , I see much bigger values in the range of -2000 to 2000 microvolts. Also whenever I try to replay the recorded online sessions using "fileplayback" the visualized data seem to be non-filtered and I have to activate the provided LP, HP and the power line filter again to see the same sort of signals that I used to see during the online sessions.
Do you think I am missing something? Or the source filter just applies on the visualization part and not on the recoded data by definition?

Kind regards,
Sam

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

Re: " DataIOFilter Modification"

Post by mellinger » 26 Nov 2013, 13:01

Hi,

to obtain data in microvolts when loading into Matlab, use the '-calibrated' option to load_bcidat, as described in the load_bcidat help.

To enable the source filter, don't use the context menu of the source visualization window. Instead, use the SourceFilter parameters in the Operator configuration dialog.

Regards,
Juergen

Locked

Who is online

Users browsing this forum: No registered users and 1 guest