Amplitude and Area Measurements Under the Curve

(Author: Amaad Chaudhry, Katinka Stecina; Edited by: Gilles Detillieux)

The following tutorial walks through how to create amplitude and area measurements from data files using the SCRC analysis program. The tutorial uses data from a mouse stimulation experiment as an example. To begin amplitude and area measurements load the desired file, and display relevant waveforms (use AR then G to view raw waveforms). In this example Waveform 12 (LaserDopplerFlux) will be the target of the tutorial (as shown below). The red settings are really crucial for this analysis to be correct.

  1. If large ranges of data are used it may be useful to set the time to absolute values by SWAY. This will change the time scale on the raw waveform display, but won't affect other analyses. Then from the Main Menu, use SRS (Desired start range) |E (Desired end range) - Enter the desired start range and end range of the data for which you want the amplitude and area measurement. In this example the amplitude of data before and after a certain point is desired - specifically where the flux begins to increase, up to the end. Setting the Start of range to 120s is just about perfect for this run. The End of range can be set to 600s or "max" to go to the end of the run. Then go back to the Main Menu (Esc key), and use Go again to redisplay if desired.

  2. Now we select the analysis method we need: AGWVA - This is used to display the area and amplitude measurements created by the analysis program. After this, it's a good idea to use VR to view the required parameters for this analysis, as it gives us some focus on what to set.

  3. SCW -1. Set the cycles to waveform -1 to allow the program to analyze the selected range of data as a single cycle. We've selected an analysis method intended for cycles, but in this case we just want to apply this analysis to a single time range, not repeatedly over several cycles. Go back to the Main Menu.

  4. SGN: no. Set the graph settings so the data entered isn't normalized, giving us time values on the X axis (this is important because the X values factor into the area calculation).

  5. SGB: 1. Set the number of graph bins to be 1 or there could be higher numbers used as well. Go back to the Main Menu.

  6. SDTA: yes. This is to enable the area calculation (in addition to the amplitude).

  7. SDSA:no- Auto scale should be turned off.

  8. SDSY - U/L settings should be set to manually scale the data to consistent levels. The upper and the lower levels of the range within which the waveform to be analysed is showing data (note that this should be the same across the files to be compared with each other, i.e. pre-treatment, post-treatment etc.). Here for the flux, Upper level of 3000 and a Lower level of 0 should be set. Go back to the Main Menu.
    NOTE: While it is often advisable to manually set the scale to consistent levels when comparing the data from multiple runs, to get a consistent frame of reference, it is critical to do so when getting analysis to show the area under the curve! The reason for this is that the area is calculated directly from the displayed data, and the bottom of the graph is the reference level from which the area is calculated. If you raise the bottom of the graph by increasing the lower bound of the Y axis, you will reduce the area that is calculated. In most cases, you will want a lower bound of 0 for accurate area measurement.

  9. SLWN (Waveform number) - Enter the desired waveform that you want to analyze -- i.e. the flux wf # (waveform 12 in our example) or an ENG. Go back to the Main Menu.

  10. Not a necessary step, but if you want standard deviations of area and amplitude measurement, then set also: SDTS: yes. Go back to the Main Menu.

  11. Run the analysis by selecting Go at the main menu. By setting options in previous steps a graph based on the selected waveform will be used to display the number of measurements created based off of bins. For example if a bin of 1 is selected one overall snapshot of the waveform selected will be displayed on the graph.

  12. B - By doing a Bins-save, the amplitude and area measurements will be displayed in a table format and a text file can then be saved (name the file of your choosing). Alternatively, you can note the output numbers into an Xls worksheet (even without saving the txt files). For a small number of bins, or a single bin as in the example above, the latter would be quicker and easier. For larger numbers of bins, you may want to save the output into a text file for importing into the spreadsheet. If you do this, it may be preferable to change the Number list format, to get X and Y coordinate pairs, each on a single line (SDN: x, y\n). The "\n" sequence causes the insertion of a newline character after each x,y pair, rather than putting several values per line as it does by default. If you don't set the Number list format, all you get is the Y values, several per line, which is OK for manually transcribing a few levels, but not ideal for importing into a spreadsheet.



The area appears, by default, to be a fairly large number. This is because by default, levels are in millivolts, and time is in milliseconds. For large periods of time, with a large range of voltage levels, this can make the product of the two quite large when expressed in mV x ms (equivalent to microvolt seconds). You may want to change the units used to seconds (SDUTS) for time, and Volts (SDULV) for levels, to get the area in volt seconds. That would change the area from an unwieldy 6.32837e+08 (6.32837 x 108 µV.s) to a more tame 632.837 V.s. This is entirely optional, as the values are valid and usable either way.



Now that we have run the analysis and have gotten results, we can go back and change parameters to see how it affects things. For example, let's go back to step 5 and change the number of bins in the graph. Our first run didn't produce a particularly interesting visual graph, as we only calculated a single average data point for the average flux level over the whole selected range. Let's increase the number of bins to 10 and redisplay the graph. SGB: 10 followed by Esc and Go. Now we get a plot of the flux as it changes over 10 time intervals (of about 48 seconds each):





We can run it again for 20 and 50 bins. Each time, the curve gets more detailed, as the number of time intervals increases, and if we selected the standard deviation display in step 10 above, we will also notice the standard deviations get progressively smaller as the number of bins increases. Notice the effect on the area calculation though: it should remain consistent whether we have a single bin or 50 - it is effectively the product of the average flux level multiplied by the time range we selected. However, the area under the negative and positive standard deviation curves will change as the standard deviations reduce. We can save a plot file of the graph at any time, by selecting Plot/Plotter. To get different colours for the curve and S.D. bars, we can change the Data and Markers pens under the Plot menu. Pen numbers 2 and 3 will usually yield blue and green, which match the display.



There are a few things to note, if you do notice that the area under the mean curve changes: 1) if you choose a very large number of bins, some bins may end up with little or no samples in them, and that may throw off the area calculation somewhat, and 2) you must remember to select Go after changing parameters, even if all you want is to Bins-save them. Normally Bins-save will redo the analysis if parameters have changed, just as Go does, but because the area calculation is dependent on the graph's scaling values, you must re-display the graph using Go to get a proper calculation of the area under the curve before you Bins-save the results.