Description Usage Arguments Value Examples
Takes an average time dynamics dataset and returns a dataframe and optionally plots data.
1 | read.delay_scan(filename, time_max = 1, zero_offset = 1:10, quick_plot = T)
|
filename |
The filename of the averaged output file from labview |
time_max |
maximum time in the scan |
zero_offset |
Add a zero offset if required |
quick_plot |
Toggle a quick plot |
returns a dataframe of time vs signal
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (filename, time_max = 1, zero_offset = 1:10, quick_plot = T)
{
data <- read.table(filename)$V1
time <- seq(0, time_max, , length(read.table(filename)$V1))
data_offset <- data - mean(data[zero_offset])
if (quick_plot) {
plot(time, data_offset, xlab = "time (ps)", pch = 16)
grid()
lines(time, data_offset)
}
return(data.frame(time, data_offset))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.