Scripts and Automation: Sweep trace averaging
dScope Series III Automation script for finding the min, max and mean of a set of sweep result traces.Background
There may be instances when you have performed a series of sweeps and want to see the minimum, maximum and mean at each point of the sweep. This script takes the selected set of sweep traces and generates additional user traces for the minimum, maximum and mean.
Usage
To use this script, simply copy it to your /scripts/automation folder (usually C:\Program Files\Prism Sound\dScope Series III\Scripts\Automation) and run it from the dScope "Run script" dialogue (either in the "automation" menu or from the toolbar).
The user interface is as below:
It works by finding which sweep results are available and listing them in a drop list. Select the one you want to work with. When the "Run statistics" button is pressed, the script looks for which of the traces of the selected type (including copy traces) are turned on in the Trace Window and finds the min, max and mean at each trace point and plots the resulting min, max and mean as user traces.
To use it, typically you will make multiple sweeps, appending or copying each time so that there are multiple results available to work with. You then make sure that only the ones you want to average are turned on and run the statistics. The results will get plotted as user traces. You can then turn off the original traces using the "Traces Off" button to see the results (as they will be overlaid on the originals and this turns off all the traces of the selected result type apart from the newly generated min, max and mean). Turn them back on with the "Last Used Traces" button, or turn on ALL the available traces of the selected result type with the "Traces on" button.
The reload button re-loads the list of available sweep results that populates the drop-list.
A note about the averaging: when working with linear units, the resulting mean trace is the arithmetic mean of the Y axis values of all the selected traces. When working with dB / Log units, the mean is calculated by converting the dB values to linear values, performing the arithmetic mean and then converting back to dB units.
Note also that this will not work with anything other than sweep results.
Resource Type: Scripts and Automation
(File Download) Download Link (https:): Sweep_Stats.dss Size: 19 KiB Date 2011-04-18 Relevant Products:
|