Reads a correlation function from binary files, including hdf5 formatted files.
readbinarycf(files, Time, obs = 5, Nop = 1, symmetrise = TRUE,
endian = "little", op = "aver", excludelist = c(""), sym = TRUE,
path = "", hdf5format = FALSE, hdf5name, hdf5index = c(1, 2))list of filenames to be read. Can be created using
getorderedfilelist. The filelist is assumed to be order according to
ascending gauge fields.
time extent of correlation functions.
each file may contain many correlation functions. With 'obs'
one choses which observable to read in. To be precise, in each file the
reading will start at point Timeobssizeof(complex<double>) and read
NopTimesizeof(complex<double>).
number of replicas for the correlator to read in.
symmetrise the correlation function or not
the endianess of the binary file.
the N replicas can be either averaged (op="aver") or summed
(op="sum").
files to exclude from reading.
if TRUE average C(+t) and C(-t), otherwise C(+t) and
-C(-t).
path to be prepended to every filename.
if TRUE, try to read from an hdf5 file.
Name of the data set as a string.
The data might be an array of size n x Time. hdf5index
is used to convert two columns of the data to a complex valued vector using
the first and second index for real and imaginary part, respectively. If
hdf5index has length smaller than 2 the first index is reused.
returns a list with two arrays cf and icf with real
and imaginary parts of the correlator, and integers Time,
nrStypes=1 and nrObs=1. Both of the arrays have dimension
c(N, (Time/2+1)), where N is the number of measurements
(gauges). Time is the time extent, nrStypes the number of
smearing levels and nrObs the number of operators, both of which are
currently fixed to 1.
It is assumend that each file contains at least (obs+N)*Time complex
doubles, where Time is the time extent, obs is the number of the
observable to read in and Nop the number of replicas for this
observable. It is assumed that complex is the fastest running index, next
time and then obs. The filelist is assumed to be ordered according to the
gauge configuration MC history.
# NOT RUN {
X <- readbinarycf(path=paste0(system.file(package="hadron"), "/extdata/"),
files="C2_bin.dat", Time=64, obs=0)
X
X$cf
# }
Run the code above in your browser using DataLab