QA402 Accumulating Traces on a Plot

A question in email came up on how to “append” a series of sweeps…measure, change a parameter, run another, and graph them all together. Since this response is picture-intensive, I’m posting it here instead of mail.

The main display doesn’t have this capability. But the Automated Measurements do. For example, Release 0.996 (out early next week) will have the AMP Frequency Response Chirp plugin ported from the QA401. Let’s say you wanted to sweep a narrow bandpass filter, and you aren’t sure what smoothing should be applied, or how the smoothing might impact the measurements. You could run a few acquisitions at different smoothing settings and compare visually.

Start by locating the plug-in you want from the Automated Test menu. Here we’ll use the new Freq Response Chirp plugin available starting in release 0.996:

image

Set the output level to -10 dBV. This means the Expo Chirp aka Chirp aka Swept Sine will be -10 dBV or 100 mV in amplitude. Specify 1 octave of smoothing. This means that for each point, you will average over one octave of data. So, the point at 1 kHz will be an average of all data from 750 Hz to 1.5 kHz (the math isn’t quite that clean, but for illustration purposes it’s close enough). Specify one octave smoothing, and give the series a description name. Make sure the QA402 is in loopback, and the press OK and the acquisition will run.

image

You should get a plot that looks as follows:

Run the same plug-in again. As a short-cut, the F3 key will run the last plug-in and remembers the last settings. Change the indicated parameters. Remember, for 1/2 octave smoothing, you specify 2 in the “Octaves Smoothing” parameters.

image

Run it again. This time, you’ll be greeted with a choice where you can add the new trace to an existing graph OR add it to a new graph. This is where you can stack up traces. Note too that the it’s asking which Graph Window to add it to. The “Graph 177” will match the title bar of the last window:

image

Now the graph appears as follows. Note we have two traces, but we can’t tell which is which.

If you want to rename the trace, you can select it in the Current Trace dropdown and then do Traces->Rename Trace:

But since we specified a series name, the name makes sense. But let’s change the color to green so we can distinguish the traces:

Now repeat several more times with different smoothing options until you feel like you have a good sense of the options. You can change limits on the graph and add a title:

And when you have the graph setup the way you like, Edit->Copy Bitmap will let you graph a graph at a fixed resolution to insert into a document. Or you could save the bitmap at its current size via File menu.

image

And the final graph appears as follows:

2 Likes

Hi Matt,

Some feedback here:

  • Please allow the series-name to be built up by a prefix (name) + automatically append the relevant parameters used in the plugin (i.e. output level, smoothing in the example above). This way you don’t have to double-type and accidentaly write the wrong value in the series name field.
  • To make it more flexible, use a syntax for it like 'my-woofer '+output_level_fmt+'smoothing: '+octaves_smoothing_val where _val would be -10 vs _fmt would be -10dBV including the active unit

More

  • Make sure ‘Trace color’ automatically steps to the next unused color for each appended graph. I believe we could find a great color palette with semantically resonant colors that are easy to see
  • Please consider making this window based on vector graphics so we can output it to .svg as it makes it better when used in datasheets or user-manuals.

Hi @audio-dav,

That’s a very good suggestion on macros that can be expanded on each iteration. Seems a generic plugin that would sweep a generic parameter or two and make a generic measurement would be a natural extension from that.

You can export a vector representation from the graph by right-click in graph area, and save the file as an EMF. And then import the EMF into word. Theoretically you could import it into something like Inkscape which would then emit an SVG. But agree it would be nice to just export SVG.

The Trace Color is also a very good idea that will go into 0.996. You can build the graph is you normally do:

And once finished there’s a new menu item called “Make Trace Colors Distinct” which will assign a unique color to every trace

The palette was re-organized to make the first 15 colors or so better stand apart from each other:

1 Like

super, thanks for adding this!

ps. EMF doesn’t play well on macOS, there are obscure converters, but .svg just makes it much easier to incorporate into web-apps/issue-trackers and most pdf making apps.

ps2. maybe add a tiny meta-text in the footer on what hardware/software/plugin revs that was used when making the plot)

one more thing…! :slight_smile:
I usually find myself annotating on top of plots when making a compiled report

would it be possible to support labels in this view as well?
a bit like when you hover an analog waveform in Saleae Logic, you see the actual value.
image

imagine if we could have this as well to quickly pin-point some key values and get the x vs y axis or both plotted in a color coded label. label can be static in x, above the plot, but even better if you can move it later and get a little connecting line to a dot showing where it was sampled

Hi @Audio-Dav

I usually find myself annotating on top of plots when making a compiled report…a bit like when you hover an analog waveform in Saleae Logic, you see the actual value.

If you right-click on the graph you can select “show point values” which will then show the XY values as you hover over the graph. Yes, long term cursors would be good and useful for making a point on a graph.

I view the graphing tool as something that will get you most of the way there. At some point, a decision needs to be made whether you build the world’s best charting tool OR do you make it easy to export into Plotly or R or whatever and then use that tool for the final 20%.

ps. EMF doesn’t play well on macOS, there are obscure converters, but .svg just makes it much easier to incorporate into web-apps/issue-trackers and most pdf making apps.

It is indeed a dated format. But they drop nicely into Word. SVG would be much nicer you are right.

ps2. maybe add a tiny meta-text in the footer on what hardware/software/plugin revs that was used when making the plot)

Yes, that could be useful too as I often forget to note something important when looking back at data. What might be better approach is to allow the plots to be saved with all the meta info (eg fft sizes, smoothing, input levels, etc) and THEN later you could go back, re-load the plot, inspect the meta data and re-annotate based on the point you wanted to make.

For simple notes, there are two note fields you can add whatever text you want to at the bottom of the left-hand pane on the left side of the graph. The ‘note’ fields will show up on the lower left and lower right on the graph, in a smaller font.

I didn’t know about the ‘show point values’ feature, without building plotly, just being able to get these persistent (in the same color as the graph) and go along with the export would be good enough!

But agree, that at some point, you might be better off with the raw capture data and massage it in Jupyter notebook.

I like your idea with the meta-data feature. Since SVG has meta defined as part of the standard, you could add everything from the hw-setup + plugin params and later extract in your favorite cmdline tool or read them in a simple client-side javascript / web app.

I thought this would be the appropriate place for this question: When using the Amp Frequency Response Chirp Automated test and adding traces, I continually get this error:

warning

I close the window and click on the graph icon in the taskbar area of my screen, and the trace has been added correctly. I am not overloading the input from what I can tell and get the same warning when I have tried testing something else. More of an annoyance since the trace is saved, but thought I should mention it…

When the measurement runs, do you see a message flash in the upper left of the of the graph display? This message is commonly shown if the inputs overload during a message. The plug-ins use the REST interface.

Matt- I made a video showing it acting up. Thanks for looking at this:

Maybe I should have called the video something other than “Error”…?

Hi @Var, I just tried to reproduce on 1.154 and wasn’t able to. But I can’t think of what would have changed in 1.154 that would have fixed this.

Can you try this:

  1. File->New Settings
  2. run Amp Freq Response Chirp with the following settings in loopback

image

  1. Graph the plot
  2. Run Amp Freq Response Chirp again with the following settings in loopback:

image

  1. Add that to the plot
  2. Verify plot is expected:

If you do the above sequence, do you see the error you encountered?

Thanks for looking at this again. Matt. I downloaded the latest 1.154 release and will try what you say with the loopthru, as well as some measurements I will be making later today on an old receiver and post my findings.

Matt - I am getting the same error as Var running your test above and the trace
has been added correctly. I do not see a message flash (the test runs
so quicky). My resulting graph is exactly the same as in your example.

Hi @BLamb and @VAR, are you both QA403 hardware?

I have a QA402. I tried it with the latest software update- with the loopthru method I got the error still and tried it on my old receiver and got it as well.

Hi @Var, I watched the video again, and the bug seems to manifest IF the graph window is minimized rather than moved to back.

Can you confirm this? That is, when you go to run the Automated Test again, you have two choices: First is minimize the graph as you did in the video. The second is to click the analyzer app to bring it to foreground. This puts the graph window to the background BUT it doesn’t minimize it.

If you can confirm that if you don’t minimize the graph window (and instead just bring the analyzer window to the foreground) the problem doesn’t happen, then we can get it fixed pretty quickly.

That was it, Matt- or so it appears. I never minimized the graph like you suggested and never got the error after running it a few more times. Interesting problem that goes beyond my understanding what why that would make a difference. Am glad that I made the little video. Thanks!

I am running a QA402 on v1.152. Same here. That is it, I was minimizing the graph.

. Am glad that I made the little video.

Hi @VAR, me too it was very helpful. Thanks for confirming and thanks for reporting! This will be fixed for the next release.