filter for neuroimaging-data

Guest #930506
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 .*
vector2);

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:
Hello!

   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)
bandpassfilter
   = 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
   ringing."

   Can anyone give me some praktical help on = this?

   Thanks in advance!

   Tim

Reply

A question of your own? This thread is over 18 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.