Reply by Fred Marshall April 8, 20042004-04-08
"Toby Newman" <google@asktoby.com> wrote in message
news:Xns94C5846EA980Fgoogleasktobycom@127.0.0.1...
> > Maria wrote: > >> Hi, > >> > >> I am using Matlab to do ffts for some data collected in the lab of > >> electrophysiology recordings. When I plot the power spectrums, I get > >> huge peaks from 0-1 Hz. Are these peaks representative of the data or > >> artifacts carried over/created from the fft? > >> > >> Any help would be appreciated. > >> > >> Thanks. > > Perhaps they are DC offsets?
Toby, At the first spectral sample could be.... But not at any other spectral samples unless there's a window that will spread the spectrum of the dc component. Fred
Reply by Toby Newman April 8, 20042004-04-08
> Maria wrote: >> Hi, >> >> I am using Matlab to do ffts for some data collected in the lab of >> electrophysiology recordings. When I plot the power spectrums, I get >> huge peaks from 0-1 Hz. Are these peaks representative of the data or >> artifacts carried over/created from the fft? >> >> Any help would be appreciated. >> >> Thanks.
Perhaps they are DC offsets? -- Toby asktoby.com BSOD VST & ME
Reply by Richard Owlett April 7, 20042004-04-07
Maria wrote:
> Hi, > > I am using Matlab to do ffts for some data collected in the lab of > electrophysiology recordings. When I plot the power spectrums, I get > huge peaks from 0-1 Hz. Are these peaks representative of the data or > artifacts carried over/created from the fft? > > Any help would be appreciated. > > Thanks.
Based on various posts in this thread I suggest a literature search for Dr. Edgar Gasteiger Veterinary Physiology Cornell University circa late 1960's I worked for him and Dr. Nangeroni as a student electronics tech. The problem description brings back vague memories but too few useful details. I've initiated personal contacts. If anything comes up, I will post.
Reply by Randy Yates April 6, 20042004-04-06
Hey Rick,

Thanks for clarifying where she's coming from (processing
data already sampled).

r.lyons@_BOGUS_ieee.org (Rick Lyons) writes:
> [...] > "so all I know is that it > was recorded, filtered at 5kHz and > digitized at 10-20 kHz using a Digidata > 1200 A/D board. The data has been > downsampled to 2000Hz." > > That's sounds like lowpass analog filtering > with a cutoff freq of 5 kHz. I wonder how sharp > are the filter's skirts. Then the "digitized at > 10-20 kHz" phrase was also kinda "scary" because the > sample rate needs to be well-known and fixed > for FFT results to have meaning in terms of > spectral components' frequencies.
I agree - we don't know what her sampled data situation REALLY is.
> I didn't > know what her phrase "downsampled to 2000Hz" meant. > Wonder if that meant some sort of frequency > translation, or could it have meant, "decimated > to a sample rate of 2000 Hz"?
My first reaction is just that it was decimated - I don't know if she meant the sample rate came down to 2000 Hz or the data bandwidth.
> Her problem sure sounds interesting and one that > can be solved. I'll bet this is a university > research project. If she's in North Carolina > Randy, you could pay her a visit. If she's in Northern > California, I could stop by and look at her test > hardware. Sure sounds like any interesting project > to me.
You could probably get 10 usenet posts ahead if you could just talk to her interactively (i.e., on the phone). She could be at UNC/Chapel Hill since they have a biomedical engineering program and lots of medical stuff going on there (not to mention Duke). Of course she could be in Berkina Fasa, too. -- % Randy Yates % "Though you ride on the wheels of tomorrow, %% Fuquay-Varina, NC % you still wander the fields of your %%% 919-577-9882 % sorrow." %%%% <yates@ieee.org> % '21st Century Man', *Time*, ELO http://home.earthlink.net/~yatescr
Reply by Rick Lyons April 6, 20042004-04-06
On Mon, 05 Apr 2004 03:14:22 GMT, Randy Yates <yates@ieee.org> wrote:

>Rick, I hope you don't mind my jumping in here. >
Hi, Randy, no, you're your ideas are sure welcome.
>marija616@hotmail.com (Maria) writes: >> [...] >> However, my signal has a very low SNR (singal to noise ratio), > >Is that before or after the A/D conversion? If after, then you >may not have the converter's input range matched properly to the >input signal range. That is, you may be degrading the SNR >unecessarily due to the quantization noise of the converter. > >Is there a programmable gain stage in analog front-end of your >data acquisition system? If so, you might try increasing the >gain as long as you don't digitally clip the input. > >Sorry if this is rehashing something already covered.
No, I don't think it was covered. It sounds like Maria's signal jumps all over the place in terms of its analog rms voltage. I hope she's driving the A/D converter sufficiently hard. She said. "I'm analyzing the data, I did not perform the experiments, ... That's a little "spooky" to me because so many steps must be performed properly to maximize the "usefulness" of the signal before she gets it. She also said: "so all I know is that it was recorded, filtered at 5kHz and digitized at 10-20 kHz using a Digidata 1200 A/D board. The data has been downsampled to 2000Hz." That's sounds like lowpass analog filtering with a cutoff freq of 5 kHz. I wonder how sharp are the filter's skirts. Then the "digitized at 10-20 kHz" phrase was also kinda "scary" because the sample rate needs to be well-known and fixed for FFT results to have meaning in terms of spectral components' frequencies. I didn't know what her phrase "downsampled to 2000Hz" meant. Wonder if that meant some sort of frequency translation, or could it have meant, "decimated to a sample rate of 2000 Hz"? Her problem sure sounds interesting and one that can be solved. I'll bet this is a university research project. If she's in North Carolina Randy, you could pay her a visit. If she's in Northern California, I could stop by and look at her test hardware. Sure sounds like any interesting project to me. [-Rick-]
Reply by Fred Marshall April 5, 20042004-04-05
"Maria" <marija616@hotmail.com> wrote in message
news:38a072b0.0404041541.7034916a@posting.google.com...
> Hi, > > My recordings are coming from rat brain slices. During recording, the > aim is to maintain 'clamp' the cell membrane voltage to -60mV (typical > cell membrane voltage). However, due to spontaneous activity in the > cell, this membrane voltage will fluctuate. So, I guess when I say > baseline, I mean the voltages recorded fluctuate about this value > (-60mV). So, in order to adjust my signal as was suggested, the > program that I'm using to record allows me to 'adjust' the entire > trace or recording by subtracting the mean of the trace. THat's what > I've done, so that now my recordings fluctuate about 0mV. Is this > right?
Yes, that would be the right thing to do if that's indeed what it's doing. One way to know for sure is to look at the zero frequency result in the FFT - it has to be zero if the record has zero mean. I thought you were using Matlab? So, "the program I'm using"???? I would rather trust Matlab to remove the mean before you FFT. In fact, what could that hurt just to make sure there's no residual dc component coming out of that other program? I would do it - i.e. remove the mean (again) using Matlab before doing the FFT with Matlab. *****************next subject If you want to look at data from 1 to 20Hz, then the amount of data you have will surely yield good enough resolution to split this region up into 100 cells (5 seconds of data) or more (10-100 seconds of data). How many data points do you need to get in the spectrum between 0 and 20Hz? Now, there will be a transient at the first sample above zero in the spectrum if the ends of the data values are very dissimilar. So, if you taper the ends of the time data this will be alleviated. Most windowing is just a more drastic type of tapering of the ends. With all the data you have, the energy in this transient is probably small but a bit of tapering or even full windowing won't hurt anything. I would definitely do this. See below about selecting the length of time records. Very important! *************************next subject I've brought this up before but I'm not sure I got it across: If you have 100 seconds of data and you analyze all 100 seconds at once using an FFT, then you won't be able to observe any changes in the data that occur during that 100 second period. You can only observe the existence of periodic components. So, if there's a periodic component that lasts for 4 seconds and then another, at a different frequency, that lasts for 7 seconds, these will be obscured in a 100 second record / FFT unless they have high SNR. In that case it would be better to analyze 10 second epochs separately. What is the nature of the variation in the signal of interest? Are you only looking for periodic components that last for 100 seconds or nearly so? This is a critical element in the design of the analytical approach. I hope this helps Maria! Fred
Reply by Randy Yates April 5, 20042004-04-05
Rick, I hope you don't mind my jumping in here. 

marija616@hotmail.com (Maria) writes:
> [...] > However, my signal has a very low SNR (singal to noise ratio),
Is that before or after the A/D conversion? If after, then you may not have the converter's input range matched properly to the input signal range. That is, you may be degrading the SNR unecessarily due to the quantization noise of the converter. Is there a programmable gain stage in analog front-end of your data acquisition system? If so, you might try increasing the gain as long as you don't digitally clip the input. Sorry if this is rehashing something already covered. -- % Randy Yates % "Watching all the days go by... %% Fuquay-Varina, NC % Who are you and who am I?" %%% 919-577-9882 % 'Mission (A World Record)', %%%% <yates@ieee.org> % *A New World Record*, ELO http://home.earthlink.net/~yatescr
Reply by Maria April 4, 20042004-04-04
Hi,

I'm recording the spontaneous activity in rat brain slices, in a
control setting, followed by perfusion with certain drugs.  I'm hoping
to see how the drugs affect the activity of the cell (i.e. cell
membrane voltage).  Without exciting the cell (i.e. cell at rest), the
dominant frequencies should lie around 0-20 Hz.  When I say highly
fluctuating, I guess I mean that the cell itself possess a lot of
intrinsic noise, so it's not very stable at all, the membrane voltage
is constantly falling and rising.

My goal is to determine the effect of the drugs on cellular activity
-> a decrease or increase, so I'm looking at the dominant frequencies
before and after the drugs are applied.  However, my signal has a very
low SNR (singal to noise ratio), so it's difficult to determine what
part is the signal.

I'm analyzing the data, I did not perform the experiments, so all I
know is that it was recorded, filtered at 5kHz and digitized at 10-20
kHz using a Digidata 1200 A/D board. The data has been downsampled to
2000Hz.

Maria 



r.lyons@_BOGUS_ieee.org (Rick Lyons) wrote in message news:<40703389.336331515@news.sf.sbcglobal.net>...
> On 3 Apr 2004 10:16:43 -0800, marija616@hotmail.com (Maria) wrote: > > >ok, so here's what's happening. > > UH oh! here we go. > > >My data, is at a baseline of ~ -60mV, > >which I've subtracted to get rid of the DC component. > > Was that subtraction before or after > A-D conversion? > > >I'm looking at > >spontaneous activity in the slices and my data is highly fluctuating. > > Please know that I don't know what "slices" > means. By "highly fluctuating" I'm guessing > you mean the signal contains much high frequency > energy. > > >Also my data may deviate from the baseline at most 10mV (usually 1-5). > > What number format are you using in the > digital domain? How many bits is your > A-D converter. Over what bit range does > your digital time samples fluctuate? > Can you tell us the "signal to quantization > noise" ratio of your time samples? > > > So my amplitude is very small and if I were to window, I don't want > >to lose the amplitude. > > Amplitude loss won't be much of a problem with > windowing, but the broadening (widening) of narrow > spectral components may be a problem. > > >Also, the data is very noisy. So from what > >I've read from all the great suggestions, I'm thinking of taking > >larger time intervals (the recordings go from 30-100s) and windowing. > >Any other suggestions? > > Yes. Try different-length FFTs and try using > no windowing and then try a hanning window. > Compare your results. What effect does the small/large FFT size have, > what effect does windowing have? > > >Also, i'm interested in the 0 - 20 Hz range, > > Ah yes, unless I missed it, what is your sampling rate? > Are you satisfying the Nyquist sampling > criterion? > > >and even after getting > >rid of the DC bias and windowing, I get huge spikes in my spectrum > >from 0-1 Hz. > > My next questions are: "Are you sure you're reducing > the DC component as much as possible? > What's the average value of the sequences of which > you're performing your FFTs? > > If you really are minimizing the DC component as much > as possible, my guess is that the 0-1 Hz spikes are > actually in your signal. > > >Is it just noise I can't get rid of; is there anything > >else I can do? I'm getting the 'grassy' white noise look, and not > >alot of signal coming through. > > Sounds like you're working with a signal > of very low signal-to-noise ratio. > Spectral averaging may help you with that. > > Are you merely trying to detect the presence of > low-level spectral components? Is that your > goal? > > Please provide some answers and keep asking > questions here Maria, > > Regards, > [-Rick-]
Reply by Maria April 4, 20042004-04-04
Hi,

My recordings are coming from rat brain slices.  During recording, the
aim is to maintain 'clamp' the cell membrane voltage to -60mV (typical
cell membrane voltage).  However, due to spontaneous activity in the
cell, this membrane voltage will fluctuate.  So, I guess when I say
baseline, I mean the voltages recorded fluctuate about this value
(-60mV).  So, in order to adjust my signal as was suggested, the
program that I'm using to record allows me to 'adjust' the entire
trace or recording by subtracting the mean of the trace.  THat's what
I've done, so that now my recordings fluctuate about 0mV.  Is this
right?

Maria




"Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message news:<uMGdnawd37Ytpu3dRVn-vg@centurytel.net>...
> "Maria" <marija616@hotmail.com> wrote in message > news:38a072b0.0404031016.289b11d9@posting.google.com... > > ok, so here's what's happening. My data, is at a baseline of ~ -60mV, > > which I've subtracted to get rid of the DC component. I'm looking at > > spontaneous activity in the slices and my data is highly fluctuating. > > Also my data may deviate from the baseline at most 10mV (usually 1-5). > > So my amplitude is very small and if I were to window, I don't want > > to lose the amplitude. Also, the data is very noisy. So from what > > I've read from all the great suggestions, I'm thinking of taking > > larger time intervals (the recordings go from 30-100s) and windowing. > > Any other suggestions? > > > > Also, i'm interested in the 0 - 20 Hz range, and even after getting > > rid of the DC bias and windowing, I get huge spikes in my spectrum > > from 0-1 Hz. Is it just noise I can't get rid of; is there anything > > else I can do? I'm getting the 'grassy' white noise look, and not > > alot of signal coming through. > > Maria, > > You say the data is at a baseline of -60mV, which you have subtracted to get > rid of the dc component....... > > Could there be a misunderstanding here? > I might call the "baseline" the more or less lowest level one sees in noisy > data - in the time domain. As on a chart recorder or oscilloscope. > If that's what you mean, then that's *not* the dc component. > > To remove the dc component, you need to remove the mean of the whole signal. > This means > - compute the mean of the samples. The sum of the samples divided by N, the > number of samples. > - subtract that mean value from every sample of the signal. > Now you have zero mean and no dc component. > > So, can you confirm that this is what you've done? Then we'll get onto the > next things you might do to get better results. > > Fred
Reply by Fred Marshall April 4, 20042004-04-04
"Maria" <marija616@hotmail.com> wrote in message
news:38a072b0.0404031016.289b11d9@posting.google.com...
> ok, so here's what's happening. My data, is at a baseline of ~ -60mV, > which I've subtracted to get rid of the DC component. I'm looking at > spontaneous activity in the slices and my data is highly fluctuating. > Also my data may deviate from the baseline at most 10mV (usually 1-5). > So my amplitude is very small and if I were to window, I don't want > to lose the amplitude. Also, the data is very noisy. So from what > I've read from all the great suggestions, I'm thinking of taking > larger time intervals (the recordings go from 30-100s) and windowing. > Any other suggestions? > > Also, i'm interested in the 0 - 20 Hz range, and even after getting > rid of the DC bias and windowing, I get huge spikes in my spectrum > from 0-1 Hz. Is it just noise I can't get rid of; is there anything > else I can do? I'm getting the 'grassy' white noise look, and not > alot of signal coming through.
Maria, You say the data is at a baseline of -60mV, which you have subtracted to get rid of the dc component....... Could there be a misunderstanding here? I might call the "baseline" the more or less lowest level one sees in noisy data - in the time domain. As on a chart recorder or oscilloscope. If that's what you mean, then that's *not* the dc component. To remove the dc component, you need to remove the mean of the whole signal. This means - compute the mean of the samples. The sum of the samples divided by N, the number of samples. - subtract that mean value from every sample of the signal. Now you have zero mean and no dc component. So, can you confirm that this is what you've done? Then we'll get onto the next things you might do to get better results. Fred