View source: R/getStokes_from_experiment.R
| getStokes.from.metaData | 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 meta 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 vector before and after the optical fiber.
getStokes.from.metaData(meta.elab)
meta.elab |
The meta 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 vector before interferring with the fiber, after interferring with the fiber. 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.expData.
# Read data from elabFTW
input.data <- GET.elabftw.bycaption(EXPID, caption="Metadaten", header=T)
# Read data from elabFTW and read the attached .csv files
input.data <- GET.elabftw.bycaption(EXPID, caption="Metadaten", 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.metaData(input.data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.