Learn R Programming

⚠️There's a newer version (3.1.2) of this package.Take me there.

Hadron

An R implementation of fitting routines used in lattice QCD. It provides useful functions for extraction hadronic quantities and such like.

The license is GPL 3 or later, even though the DESCRIPTION only shows GPL-3.

Copy Link

Version

Install

install.packages('hadron')

Monthly Downloads

48

Version

3.1.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Carsten Urbach

Last Published

July 4th, 2020

Functions in hadron (3.1.0)

add.cf

Arithmetically adds two correlation functions
alphas

compute alpha strong at given scale
addStat.raw_cf

Extend statistics of an existing raw_cf container
analysis_online

analysis_online
add.raw_cf

add two raw_cf objects
CExp

Cosh Or Sinh Build Out Of Two Exps
avg.cbt.cf

average close-by-times in a correlation function
analysis_gradient_flow

analysis_gradient_flow
addStat.cf

Combine statistics of two cf objects
block.raw_cf

Block average correlation function data
cf_meta

CF metadata mixin constructor
bootstrap.cf

bootstrap a set of correlation functions
bootstrap.analysis

Performs a Bootstrap with Blocking Analysis of a Timeseries
bootstrap.effectivemass

Computes effective masses with bootstrapping errors
c.raw_cf

Concatenate raw_cf correlation function objects
bootstrap.nlsfit

Bootstrap a non-linear least-squares fit
addConfIndex2cf

add a configuration index to an cf object
cf_orig

Original data CF mixin constructor
cA2.09.48_3pi_I3_0_A1u_1_pc

A three pion correlator with significant thermal states.
bootstrap.gevp

perform a bootstrap analysis of a GEVP
correlatormatrix

Sample correlator matrix
cf_smeared

Smeared CF mixin constructor
bootstrap.hankel

GEVP method based on Hankel matrices.
cf_subtracted

Subtracted CF mixin constructor
cf_key_meson_2pt

Generate key string to identify a meson 2pt function
bootstrap.hankel_summed

GEVP method based on Hankel matrices.
bootstrap.meanerror

Compute the bootstrap error of the mean
correlators_key_meson_2pt

Generate HDF5 key for CVC 'correlators' meson 2pt function
computefpsOS

Computes the pseudoscalar decay constant for the Osterwalder Seiler case from the pseudoscalar amplitude and mass
computefps

Computes the pseudoscalar decay constant for the twisted mass case from the pseudoscalar amplitude and mass
cf_key_meson_3pt

Generate HDF5 key for CVC 'correlators' meson 3pt function with a local or derivative insertion The key for a meson three-point function has the form: /sud+-g-u-g/t10/dt12/gf5/pfx0pfy0pfz0/gc0/Ddim0_dir0/Ddim1_dir1/D.../gi5/pix0piy0piz0 where, from left to right:
  • 'u' is the flavour of the "backward" propagator

  • 'd' is the flavour of the "sequential" propagator

  • '+' indicates that 'sud' is daggered

  • 'g' indicates a gamma insertion

  • 'u' is the flavour of the foward propagator

  • 'g' indicates a Dirac structure at the source

  • 'tXX' is the source time slice

  • 'dtYY' is the source-sink separation

  • 'gfN' gamma structure at the sink in CVC indexing

  • 'pfxXpfyYpfzZ' is the sink momentum in CVC convention (sink and source phases are both e^ipx)

  • 'gcN' gamma structure at the current insertion point in CVC indexing

  • 'DdimJ_dirK' covariant displacement applied in dimension 'J', direction 'K' where it should be noted that this is. in operator notation, i.e., the right-most displacement is the one applied first.

  • ...

  • 'giN' gamma structure at the souce in CVC indexing

  • 'pixXpiyYpizZ' at the source in CVC convention

cf_shifted

Shifted CF mixin constructor
effectivemass.cf

Computes effective mass values for a correlation function
cf_boot

Bootstrapped CF mixin constructor
cf

Correlation function container
effectivemass

effectivemass
cf_principal_correlator

Principal correlator CF mixin constructor
escapeLatexSpecials

Escape special LaTeX characters for use in LaTeX labels
cyprus_make_key_vector

HDF5 key for Cyprus CalcLoops derivative-type loops
cf_weighted

Weighted CF mixin constructor
c.cf

Concatenate correlation function objects
extract.loop

Extract a single loop from an object of class cmiloop
g1

g1
get_plotdata_raw_cf

extract data from 'raw_cf' in format convenient to plot
cdhnew

finite size corrections a la Colangelo, Duerr, Haefeli, but re-expanded as series in the quark mass
cdh

finite size corrections a la Colangelo, Duerr, Haefeli
correlators_key_meson_3pt

Generate HDF5 key for CVC 'correlators' meson 3pt function with a local or derivative insertion The key for a meson three-point function has the form: /sud+-g-u-g/t10/dt12/gf5/pfx0pfy0pfz0/gc0/Ddim0_dir0/Ddim1_dir1/D.../gi5/pix0piy0piz0 where, from left to right:
  • 'u' is the flavour of the "backward" propagator

  • 'd' is the flavour of the "sequential" propagator

  • '+' indicates that 'sud' is daggered

  • 'g' indicates a gamma insertion

  • 'u' is the flavour of the foward propagator

  • 'g' indicates a Dirac structure at the source

  • 'tXX' is the source time slice

  • 'dtYY' is the source-sink separation

  • 'gfN' gamma structure at the sink in CVC indexing

  • 'pfxXpfyYpfzZ' is the sink momentum in CVC convention (sink and source phases are both e^ipx)

  • 'gcN' gamma structure at the current insertion point in CVC indexing

  • 'DdimJ_dirK' covariant displacement applied in dimension 'J', direction 'K' where it should be noted that this is. in operator notation, i.e., the right-most displacement is the one applied first.

  • ...

  • 'giN' gamma structure at the souce in CVC indexing

  • 'pixXpiyYpizZ' at the source in CVC convention

cyprus_read_loops

read HDF5 loop files in the Cyprus CalcLoops format
extract_mass.matrixfit

specialisation of extract_mass to objects of type matrixfit
cvc_local_loop_key

Generate HDF5 key for a momentum and spin-projected CVC loop
create_displ_chains

create list of chains of displacements Multilpe covariant displacements, when applied in order, form a list of displacments. Each consists of a direction and a dimension.
dispersion_relation

Continuum dispersion relation for CM to lattice frame
disc_3pt

disconnected contribution to current insertion three-point function
extract_mass

generic function to extract a fitted mass
fs.mpia0

Finite Size Corrections to \(q\cot\delta\) for I=2 \(\pi\pi\) near threshold
fs.qcotdelta

Finite Size Corrections to \(q\cot\delta\) for I=2 \(\pi\pi\) near threshold
extract_mass.effectivemassfit

specialisation of extract_mass to objects of type effectivemassfit
compute.plotlims

compute.plotlims
cvc_read_loops

read HDF5 loop files in the CVC loop format
foldr1

Folds the non-empty list with the binary function
computeDisc

computes a disconnected correlation function from loops
fs.a0

Finite Size Corrections to \(q\cot\delta\) for I=2 \(\pi\pi\) near threshold
concat.cf

Concatenate two correlation function objects
concat.raw_cf

Concatenate two raw_cf correlation function objects
extractSingleCor.cf

extract one single correlator object as cf object from a large cf object.
-.raw_cf

add two raw_cf objects
-.cf

Arithmetically subtract correlators
fit.effectivemass

Fits a constant to effective mass data
extract.obs

Extract One or More Gamma Combinations from am CMI Correlator
fit.plateau2cf

fits a plateau to an object of class cf
fit.cosh

Fits a sum of several cosh-functions
conj_raw_cf

Take the complex conjugate of a raw_cf object
construct_onlinemeas_rundir

cvc_to_raw_cf

Convert correlation function read from CVC HDF5 or AFF format to 'raw_cf'
cyprus_make_key_scalar

HDF5 key for Cyprus CalcLoops scalar-type loops
effmass

effmass
gm_mu

hankel2cf

hankel2cf
computeacf

Computes The ACF and Integrated AC Time
gevp

solve GEVP for correlator matrix
gevp.hankel

GEVP method based on Hankel matrices.
h5_get_dataset

get dataset from HDF5 file
hankel2effectivemass

hankel2effectivemass
idx_matrix.raw_cf

Construct the tensor index set for the entire raw correlator
int_idx_matrix.raw_cf

Construct tensor index set for the internal degrees of freedom
invalidate.samples.cf

Invalidate samples
is.raw_cf

check if an object is of class raw_cf
gevp.hankel_summed

GEVP method based on Hankel matrices.
gevp2amplitude

Extracts physical amplitudes from a GEVP
effmass2

effmass2
h5_names_exist

check if group names exist in HDF5 file
getorderedconfignumbers

Creates an ordered vector of gauge config file numbers
hadron

The Hadron Package
invcosh

numerically invert the cosh function for the mass
is_empty.cf

Checks whether the cf object contains no data
make_parind

Create a parameter index matrix for matrixfit
plot_timeseries

plot_timeseries
loopdata

Sample loop data
loop_stochav

average over stochastic samples of loop
new_matrixfit

perform a factorising fit of a matrix of correlation functions
plothlinewitherror

plothlinewitherror
loop_2pt

compute two-point correlation function between quark loops
loop_vev_subtract

subtract vev from loop data
loop_spin_project

spin projection of quark loop data
old_removeTemporal.cf

Remove temporal states
make_parlist

Create a parameter list for matrixfit
hankeldensity2effectivemass

hankeldensity2effectivemass
getorderedfilelist

Creates an ordered filelist from a basename and a path
pcacfit

pcacfit
plot.cfit

plot.c1fit
print.raw_cf

Print summary of data contained in raw_cf container
plot.cf

Plot a correlation function
matrixModel

Correlator matrix model.
plaq.sample

Sample plaquette time series
parametric.nlsfit

NLS fit with parametric bootstrap
pscor.sample

Sample pseudoscalar correlator
parametric.nlsfit.cov

parametric.nlsfit.cov
gm

List of arrays of gamma structures
plot.effectivemass

plot.effectivemass
is.cf

Checks whether an object is a cf
plot.coshfit

Plot a cosh-fit
raw_cf

Container for raw correlation functions
gevp2cf

Extracts a principle correlator from a GEVEP
readgradflow

Read Gradient Flow Output Files in tmLQCD format
residual_plot

residual_plot
readcmifiles

Read Single Data Files in Chris Michael Format
invertCovMatrix

Inverts the covariance matrix for noisy data
raw_cf_data

Original data mixin constructor for raw_cf
readoutputdata

Read Data In output.data Format of tmLQCD
summary.raw_cf

Print summary of data contained in raw_cf container
*.cf

Divide two cf objects by each other measurement by measurement
restore_seed

Restore random number generator state
summary.ofit

summary.ofit
/.raw_cf

divide two raw_cf objects
jackknife_cov

jackknife_cov
tikz.init

tikz.init
*.raw_cf

multiply two raw_cf objects
has_icf

Checks whether the cf object contains an imaginary part
is_empty.raw_cf

check if an obect is of class raw_cf and empty otherwise
readtextcf

Read correlator data from single file
summary.cf

summary.cf
summary.coshfit

Summarize a cosh-fit
weight.cf

Weight a correlation function
plot.outputdata

Plot Command For Class Ouputdata
plot.pionff

plot.pionff
jackknife_error

Estimates error from jackknife samples
print.effectivemassfit

print.effectivemassfit
weight_shift_reweight.cf

Weight-shift-reweight a correlation function
matrixfit

Routine For A Factorising Matrix Fit
unsymmetrise.cf

Unfold a correlation function which has been symmetrised
jackknife.cf

jackknife a set of correlation functions
mom_combinations

Generate table of momentum component combinations
pcModel

Principal correlator two state model.
plot.gevp.amplitude

plot.gevp.amplitude
uwerr

Time Series Analysis With Gamma Method
plot.effmass

plot.effmass
mul.cf

Arithmetically scale a correlator by a scalar a
pcac

Computes the pcac mass
readhlcor

readhlcor
plot.matrixfit

Plot a matrixfit
print.ofit

print.ofit
readnissatextcf

reader for Nissa text format correlation functions
uwerr.cf

uwerr.cf
uwerr.raw_cf

Gamma method analysis on all time-slices in a 'raw_cf' object
plot.ofit

plot.ofit
store_correl

Store a 'raw_cf' correlator in an associative array together with a description The object cf will be stored as an element of cmap under key out_key in the member obj of cmap. The data frame passed via desc will be appended as a row to cmap[[out_key]]$map. If out_key does not exist as a key in cmap, a new element will be created. If it already exists, addStat.raw_cf is called to add statistics to the existing raw_cf. Requires the 'hash' package.
string2error

string2error
mul.raw_cf

scale raw_cf data
parametric.bootstrap

Parametric bootstrap
parametric.bootstrap.cov

Parametric bootstrap with covariance
plot.hadronacf

plot.hadronacf
plot.massfit

plot.massfit
+.raw_cf

add two raw_cf objects
pointswithslantederror

pointswithslantederror
readbinarysamples

Read binary correlation function by sample
onlinemeas

determines pion mass and pcac mass from online measured correlator of the HMC code
summary.gevp.amplitude

summary.gevp.amplitude
resampling_is_compatible

Checks whether the resampling of two cf objects is compatible
overview_plot_raw_cf

create convenient overview plots for a raw_cf object
plot.averx

Plots averx data
readcmidisc

reads disconnected loops in cmi format
plot.bootstrapfit

Plot a bootstrap NLS fit
plot.raw_cf

plot all correlators in raw_cf object
print.bootstrapfit

Print a bootstrap NLS fit
plot_eigenvalue_timeseries

plot_eigenvalue_timeseries
plot.uwerr

Plot Command For Class UWerr
resampling_is_concatenable

Checks whether the resampling of two cf objects is concatenable
raw_cf_meta

raw_cf metadata mixin constructor
raw_cf_to_cf

Extract a particular internal component of a 'raw_cf' into a 'cf'
print.cf

print.cf
shift.raw_cf

shift a raw_cf correlation function by 'places' time-slices
summary.hadronacf

summary.hadronacf
resample_hankel

Resample bootstrap samples in Hankel effmass
removeTemporal.cf

Remove Thermal States by Weighting and Shifting
samplecf

Sample cf data
plotwitherror

Plot Command For XY Plots With Error Bars
plot_hankel_spectrum

plot_hankel_spectrum
shift.cf

shift a correlation function by 'places' time-slices
readbinarycf

read correlation function from binary files
+.cf

Arithmetically add correlators
readbinarydisc

read disconnected loops from binary files
summary.hankel_summed

summary.hankel_summed
summary.bootstrapfit

Summarize a bootstrap NLS fit
summary.effectivemassfit

summary.effectivemassfit
subtract.excitedstates

Substract excited states.
summary.effectivemass

summary.effectivemass
symmetrise.cf

Average backward and forward-dominated parts of the correlation function
summary.matrixfit

summary.matrixfit
takeTimeDiff.cf

Take time difference
tex.catwitherror

paste a number with error in tex-ready format
zetazp

Computes the running of Z_P from scale mu0 to scale mu2
tikz.finalize

tikz.finalize
simple.nlsfit

NLS fit with without bootstrap
summary.uwerr

summary.uwerr
swap_seed

Set seed and store a seed which can be used to reset the random number generator