data.jl
Functions to import experimental datasets and store them as Jeff.Data objects.
Jeff.read_data — Methodread_data(filename::String; delim=nothing, dq::Float64=0.05, dR::Float64=0.1)Read experimental data from a file and store in a Jeff.Data object.
Parameters
filename::String: the file path to be read in.delim::AbstractChar: the delimiting character in the input file. If the file is whitespace delimited, passnothing. Defaults tonothing.dq::Float64: percentage q-vector uncertainty, if not present in file. Defaults to5..dR::Float64: percentage reflected intensity uncertainty, if not present in file. Defaults to10..
Returns
::Jeff.Data: a data object containing the relevant information.
Jeff.transform — Methodtransform(y::Array{Measurements.Measurement}, f)Perform some transformation on the ordinate axis.
Parameters
y::Array{Measurements.Measurement}: ordinate data (reflected intensity).f: transformation to perform. Defaults to natural logarithm.
Returns
::Array{Measurements.Measurement}: transformed ordinate.
Jeff.Data — TypeData(q::Array{Measurements.Measurement}, R::Array{Measurements.Measurement}, resolution::Array{Distributions.UnivariateDistribution}, filepath::String)The struct for storing experimental datasets.
Parameters
q::Array{Measurement}: the q-vector values, including dq uncertainty.R::Array{Measurement}: the reflected intensity values, including uncertainty.resolution::Array{Distributions.UnivariateDistribution}: the resolution function at each q-vector.filepath::String: the file path for the file.