Hi, Philipp-

To do bandpassing within a ceratin range of Hz, indeed you need to convert the "digital" frequencies to those of physical units (Hz), and indeed this depends on the sampling rate, TR, and number of time points, N. Let's stick with even N for the moment.

The upper frequency (Nyquist) is determined just by TR:

Fmax = Fnyquist = 1/(2*TR).

The spacing of the frequency spectrum samples depends on this and the number of time points:

df = Fnyquist/(N/2) = 1/(N*TR).

Sometimes, if people want different frequency sampling, they zeropad (or "meanpad") their time series, but that doesn't add information, just might interpolate the frequency spectrum; also, from Fnyquist's definition, doing that padding doesn't change the max frequency one can model.

So, each frequency in your (half)spectrum is k*df, for k=0...N/2; k=0 is the special case of the "baseline" or mean value. The maximum frequency would occur at k=kmax=N/2, and note that:

kmax*df = (N/2)*1/(N*TR) = 1/(2*TR) = Fnyquist,

which is consistent with the earlier information. NB: these are talking about the *frequencies* themselves (the "x-axis" in frequency space), not the power values associated with each.

So, in your case of wanting a bandpass interval [A, B] ~ [0.01, 0.25], you want to find:

+ the maximum integer A such that A*df <= 0.01,

+ the minimum integer B such that B*df >= 0.25.

So, I think you want:

+ A = floor(0.01*df) = floor(0.01/N*TR)

+ B = ceil(0.25*df) = ceil(0.25/N*TR)

And yes, you can then use index selectors with the A and B values to select out data you want.

You mention having "5xx sampling points"---does that mean you upsampled by a factor of 5? I don't know what "5xx" means. Again, upsampling won't add information nor energy to the signal (assuming you are meanpadding, and not including the k=0 frequency in your power evaluations.

Note that the resting state signal in general will not be a "flat" spectrum---the named noise distributions in signal processing are, like "white noise" (which has slope=0), purple noise, pink noise, brown noise, ... etc; see:

https://en.wikipedia.org/wiki/Colors_of_noise
It will be big in the lower side of frequencies---in the typical ALFF range---end then mostly drop off at higher frequencies. I am not sure that a line will ever be a good fit, in either the power-frequency space, or log(power)-log(frequency) space. I think the plots you are showing have the shape I would roughly expect.

As to the differences between the two---well, I am not sure. Up above, we discussed that for no tapering, linear detrending for each, etc., they 3dPeriodogram and scipy.signal.periodogram() yielded the exact same results. Doing the same range of bandpassing on each shouldn't change that. I guess I would check that your interpolation is being done in the same way, if it must be done (and must it? I don't see why).

--pt