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

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

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

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?

Tim

Rate this post
 0 ▲ useful ▼ not useful
sorry, I have no answer to your question, but do you know this tutorial
page:
http://www.neurotraces.com/scilab/scilab2/index.html
"An introduction to the treatment of neurophysiological signals using
Scilab"

• $formula (LaTeX syntax)$
{"ft_lang_label":"__label__en","ft_lang_prob":0.90507185,"math_prob":0.8581501,"size":2185,"snap":"2020-34-2020-40","text_gpt3_token_len":604,"char_repetition_ratio":0.10270518,"word_repetition_ratio":0.06267806,"special_character_ratio":0.28146452,"punctuation_ratio":0.13365155,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99922514,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-09-29T05:10:03Z\",\"WARC-Record-ID\":\"<urn:uuid:ca7df775-910a-4a22-9b0c-675dbe5ab124>\",\"Content-Length\":\"30508\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:e870a843-0915-42a0-b4f4-c09ff85dfc0c>\",\"WARC-Concurrent-To\":\"<urn:uuid:562af563-f80d-40ca-8cb3-f34b46d10e35>\",\"WARC-IP-Address\":\"78.46.249.179\",\"WARC-Target-URI\":\"https://embdev.net/topic/105947\",\"WARC-Payload-Digest\":\"sha1:WG4JBGZQIRIOQK2OV7GILX627TV3RPSG\",\"WARC-Block-Digest\":\"sha1:OMPYLJCXFJOTT74PIK6GF4LMH65VLRLY\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-40/CC-MAIN-2020-40_segments_1600401624636.80_warc_CC-MAIN-20200929025239-20200929055239-00283.warc.gz\"}"}