readbinarycf: read correlation function from binary files

View source: R/readutils.R

readbinarycfR Documentation

read correlation function from binary files

Description

Reads a correlation function from binary files, including hdf5 formatted files.

Usage

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))

Arguments

files

list of filenames to be read. Can be created using getorderedfilelist. The filelist is assumed to be order according to ascending gauge fields.

Time

time extent of correlation functions.

obs

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>).

Nop

number of replicas for the correlator to read in.

symmetrise

symmetrise the correlation function or not

endian

the endianess of the binary file.

op

the N replicas can be either averaged (op="aver") or summed (op="sum").

excludelist

files to exclude from reading.

sym

if TRUE average C(+t) and C(-t), otherwise C(+t) and -C(-t).

path

path to be prepended to every filename.

hdf5format

if TRUE, try to read from an hdf5 file.

hdf5name

Name of the data set as a string.

hdf5index

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.

Details

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.

Value

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.

Author(s)

Carsten Urbach, curbach@gmx.de

See Also

readcmidatafiles, readbinarydisc, readcmidisc, readcmicor

Examples


X <- readbinarycf(path=paste0(system.file(package="hadron"), "/extdata/"),
                  files="C2_bin.dat", Time=64, obs=0)
X
X$cf


hadron documentation built on Sept. 9, 2022, 5:06 p.m.