Page 2 of 2

Re: Acquiring GSR signal in BCI2000

Posted: 10 Jan 2012, 12:51
by ikara
Hi mellinger and thank you for the reply,

I took a look at the IIRFilterBase code and also the wiki for more information, and the Process() you are referring to,
has no loop over channels, unless you were talking about a different .cpp file

Code: Select all

IIRFilterBase::Process( const GenericSignal& Input, GenericSignal& Output )
{
  mFilter.Process( Input, Output );
}

Re: Acquiring GSR signal in BCI2000

Posted: 11 Jan 2012, 13:35
by mellinger
Hi,

I actually forgot about the exact details of how IIRFilterBase is implemented. You will need to add the following at the end of the function:

Code: Select all

for( int ch = 0; ch < Input.Channels(); ++ch )
  if( !mDoFilter[ch] )
    for( int sample = 0; sample < Input.Elements(); ++sample )
      Output( ch, sample ) = Input( ch, sample );
There, mDoFilter is a member variable of type std::vector<bool> which you must resize to the number of channels inside Initialize(), and assign true for each channel that should be filtered.

Regards,
Juergen

Re: Acquiring GSR signal in BCI2000

Posted: 11 Jan 2012, 15:01
by ikara
Thank you very much! :)