Forum: µC & Digital Electronics filter for neuroimaging-data

Author: Tim (Guest)
Posted on:

Rate this post
0 useful
not useful
Hi everybody,

since my last post (see below) I have tried to assemble
some code (Matlab). Is that correct? (I'm a total novice to
filtering, so I'm unsure about pretty much everything)
here's my "code" which ought to comply to the
specifications mentioned further below:
first Fourier transform my voxel time-series (vector 1)
then construct a second vector (vector 2) as described by
iorder = 2; f_half = 0.08;

r = (vector1 ./ f_half) .^ (2*iorder);
factor = 1./(1 + r);
eventually, I would multiply the corresponding elements of
vector 1 and vector 2 and then apply inverse Fourier
Transformation to the resulting vector, which then should
be my filtered data.
The whole code should look something like this
vector1 = FourierTransform(voxel_time_series);

% low-pass filter
iorder = 2;
f_half = 0.08;
r = (vector1 ./ f_half) .^ (2*iorder);
vector2 = 1./(1 + r);
data_filtered = inverseFourierTransform(vector1 .*

Does this make sense at all? I'm particularly unsure if
f_half is in Hertz as I need it to be...
Thanks in advance!

Last post:

   I have been struggeling to create a bandpassfilter for
= which I=20
   have been given certain specification. Probably quite
easy for some
   of=20 you.

   Here's the problem: I have a series of 304 =
measurements (one=20
   value every 2 seconds) which I would like to (probably)
   = so that=20 only frequencies between 0.009 and 0.08 Hz
are left
   afterwards. The = problem is=20 that I have
specifications from an
   article which I do not understand. It = simply=20 says:

   "The data were bandpass filtered in the complex =
Fourier domain=20
   using multiplication by frequency-dependent factors
computed using the
   = following=20 FORTRAN code:

   high-pass factor:

   r =3D (f/f_half)**2*iorder

   factor =3D r/(1 + r)

   low-pass factor:

   r =3D (f/f_half)**2*iorder

   factor =3D 1/(1 + r)

   (In FORTRAN, the ** operator indicates =
exponentiation.) For the=20
   high-pass component, f_half was 0.009 Hz and iorder was
1. For the =
   low-pass=20 component, f_half was 0.08 Hz and iorder
was 2. Gentle
   slopes about the=20 half-frequency were chosen
specifically to avoid

   Can anyone give me some praktical help on = this?

   Thanks in advance!


Author: Christoph Kessler (db1uq) (christoph_kessler)
Posted on:

Rate this post
0 useful
not useful
sorry, I have no answer to your question, but do you know this tutorial 
"An introduction to the treatment of neurophysiological signals using 


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.