It is necessary to clarify the difference between sampling period and
sampling rate. Sampling rate is the number of samples per second. This
could be a fraction of a second for very low sampling rates. The sampling
period or sampling interval is the time between two samples. So if the TR
is 2 seconds, the sampling period is 2 seconds, but the sampling rate is .5
cycles per second, or .5 Hz. You cannot have any signal components with
frequencies above half the sampling rate, or aliasing noise will be folded
back into the original signal. This is not a signal processing "point of
view" versus a statistics point of view. This is a theorem.
To examine the specific case of an ISI of 5 seconds and a TR of 3 seconds.
The sampling *rate* is (1/3) cycles per second, or (1/3) Hz. The ISI of 5
seconds corresponds to a rate of .2 Hz. Since .2 Hz is more than half of
1/3, this will produce aliasing error. You can upsample the onset vector
and the sampling. Then the upsampled signal can be convolved with the HRF.
The HRF has to act as a low pass filter such that when the signal is
downsampled again, its frequency content will not exceed half the sampling
rate, i.e., it cannot exceed (1/6) Hz. You would have to look at the
frequency response of the HRF in Matlab with freqz to see how much of the
higher frequencies it is eliminating and what is a tolerable amount of
aliasing. The canonical HRF does prevent a great deal of aliasing in many
In the theory of upsampling and downsampling, if you upsample a signal, the
frequency content still has to be below half the sampling rate so that when
you downsample, there won't be aliasing. If that requirement is not met,
there has to be additional low pass filtering before downsampling.
The question is what level of aliasing is all right. Suppose the aliasing
is at 1/100 the amplitude of the strongest frequency component. Is that
acceptable for your analysis? If you had a 16-bit integer signal of
amplitude 32767, the aliasing would be 327.
Note that spm_hrf places the default onset delay at 6 seconds, so that if
the TR is 3 seconds or less, it doesn't cause the aliasing problem.
Of course, the question is that if the filtering is going to eliminate that
part of the signal content, why bother to introduce it in the first place?
I am saying that from a frequency domain (Fourier transform domain) point
of view. You are really interested in the filtering of the part of the
spectrum that will not be eliminated by the frequency response of the HRF.
That is one of the questions I have.
I would be very appreciative of comments by other math nerds out there
concerning the sampling rate and aliasing issues.
> possible to further reduce the effective sampling rate.
> By staggering the timing of stimulus presentation relative to the timing
> of image acquisition, reconstructed signals can be produced with a
> shorter effective sampling rate than is implied by the actual TR
> E.g. stimuli are presented every 5 seconds, and the signal is sampled
> (TR) every 3 seconds.
> The first sample is at zero seconds relative to the onset of the first
> stimuli, the second sample is at three seconds, the third sample is at
> one second relative to the onset of the second stimuli, etc.
> Thus, over the course of an experiment signals will, in effect, be
> acquired every second relative to the onset of the stimuli (Josephs et
> al. 1997).
> (Thank-you Donaldson & Bucker, 2000)
> Thanks again everybody
> Dr. Rachel L. C. Mitchell,
> Lecturer in Psychology, Durham University.
> Honorary Senior Research Fellow, Institute of Psychiatry, KCL.
> Correspondence Address:
> Dept. of Psychology,
> Durham University,
> Science Site,
> South Road,
> Co. Durham.
> DH1 3LE.
> Phone +44 (0)191 334 3272
> Fax +44 (0)191 334 3241
> -----Original Message-----
> From: Linda Seltzer [mailto:[log in to unmask]]
> Sent: 20 February 2008 19:41
> To: MITCHELL R.L.C.; MITCHELL R.L.C.
> Subject: RE: [SPM] effective sampling rate
> I am not sure what you mean by effective sampling rate. The sampling
> is 1/TR. The stimulus presentation rate is not necessarily an integral
> number of TRs (sampling periods). That is why there is upsampling.
> Linda Seltzer
> UC Davis
> > Hello :-)
> > Has anyone written a script or developed a tool for calculating the
> > effective sampling rate given the TR and stimulus presentation rate?
> > Easy to do by hand for whole numbers of course, but not when you're
> > dealing with a couple of decimal places :-(
> > With hopeful thanks
> > Rachel
> > *************************************************************
> > Dr. Rachel L. C. Mitchell,
> > Lecturer in Psychology, Durham University.
> > Honorary Senior Research Fellow, Institute of Psychiatry, KCL.
> > Correspondence Address:
> > Dept. of Psychology,
> > Durham University,
> > Science Site,
> > South Road,
> > Durham,
> > Co. Durham.
> > DH1 3LE.
> > U.K.
> > Phone +44 (0)191 334 3272
> > Fax +44 (0)191 334 3241