Jump to content
  • 0

Difference between data viewed in Waveforms GUI and recorded with SDK


Marcus Watson

Question

Hi,

I am attempting to verify timing of brief audio and visual stimulus presentations using an Analog Discover 3. When I use the Waveforms GUI, I am able to reliably see traces corresponding to both stimuli, but when I try to integrate control of the AD3 into my control scripts using the SDK, I cannot replicate what I am easily able to see in the GUI. Specifically, the SDK-produced trace appears to be the equivalent of an amplitude modulation of the traces I see in the GUI.

I have the feeling this is a simple electrical engineering question I've never had to think about before, so apologies if I'm missing something obvious.

All data is being recorded over the analog in channels, with a microphone and photodiode connected via BNC. Both the GUI and SDK channels are set up to use averaging as the filter method, with the only pertinent difference that I can see between the two being that I've reduced the sample rate to 10,000 Hz in the (to allow longer windows of data to be recorded). 

My first screenshot comes from the GUI, and clearly shows the visual (orange) stimulus approximately 200ms prior to the auditory (blue) stimulus. The second file (Trial274) is the data collected from a similar trial, but via the SDK. As you can see, the auditory stimulus is clearly visible (blue again), but its shape is very different from that of the first example - as I said, this trace appears to be an amplitude modulation of the first trace, such that the oscillatory component of the first trace is replaced by height in the second. As there isn't much of an oscillatory component in the orange trace, I cannot detect the visual stimulus reliably in my recorded data. 

What am I missing? Any help would be much appreciated.

 

Screenshot 2024-04-04 at 8.18.07 AM.png

Trial274.csv.png

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hi @Marcus Watson

Are you using similar vertical range for C2 in WF and script ?
The AD3 scope inputs have two input ranges. If C2 with WF app is in low range (high resolution) and with script in high range, the lower resolution could hide details.
dwf.FDwfAnalogInChannelRangeSet(hdwf, 1, c_double(5.0)) # C2 low range

image.png

 

Approximate overlay looks like this:

image.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...