View source: R/getStokes_from_experiment.R
getStokes.from.expData | R Documentation |
This function takes the output from RHotStuff::GET.elabftw.bycaption or RHotStuff::parseTable.elabftw with the parameter outputHTTP=FALSE (see the man page of the functions for details) and computes the stokes vectors for the experimental data of the experiment. The function extracts the power measurements from the input table, normalises it with data from the input table and calculates the stokes vectors before and after the optical fiber for different inital orientations of the lasers plane of polarisation.
getStokes.from.expData(data.elab)
data.elab |
The experimental data of a stokes measurement experiment |
This function expects the input to be in a specific format. If the elabFTW template "Bestimmung von Stokesvektoren an einer optischen Faser" is used for logging the measurements, the data meets the expectations. If the right template is used, the data can be downloaded like shown in the examples.
A list containing two data.frames: The stokes vectors before interferring with the fiber, after interferring with the fiber for different inital orientations of the lasers plane of polarisation. The data.frames also contain the total measured laser power after and before the fiber. The returned data has the same structure as the return value of getStokes.from.metaData.
# Read data from elabFTW input.data <- GET.elabftw.bycaption(EXPID, caption="Messdaten", header=T) # Read data from elabFTW and read the attached .csv files input.data <- GET.elabftw.bycaption(EXPID, caption="Messdaten", header=T, outputHTTP=T) %>% parseTable.elabftw(., func=function(x) qmean(x[,4], 0.8, na.rm=T, inf.rm=T), header=T, skip=14, sep=";") # Convert the measurements into stokes vectors getStokes.from.expData(input.data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.