professor is hosted by Hepforge, IPPP Durham

Creating response function parameterizations – prof-interpolate

The polynomial coefficients for the parameterization of the MC response function are calculated by prof-interpolate. This must be done before prof-tune is called to find optimal parameter values.

A file with the run combinations that are used for the parameterizations can be specified via -R RUNSFILE. This file can be prepared with prof-runcombs. If no file is given runcombs.dat is assumed.

The parameterization of the MC response function is calculated for all observables which are listed in the file given by the --weights.

The --datadir DATADIR and related options are used as normal to specify the reference data, MC runs, and interpolation objects: see the path options page.

For each run combination in RUNSFILE a file is created under IPOLDIR. The file name follows the scheme profipol_METHOD_HASH.pkl. METHOD specifies the method of the parameterization, usually the order of the polynomial, and HASH is a md5-hash of the run combinations.

Note

Due to limitations of the Python interpreter (especially the global interpreter lock, GIL). This cannot be done in parallel in one process. To make use of multiple CPU cores you can split the run combinations file in multiple separate and start prof-interpolate for each of this “sub-files”. Alternatively you can use prof-batchtune to produce shell scripts for this purpose. These scripts can also be fed to a batch system.

Examples

Have MC and parameterization data located in the same directory (/my/data/):

prof-interpolate --weights my.weights --runsfile mycombinations --data /my/data/

MC and parameterization data in different directories:

prof-interpolate --weights my.weights --runsfile mycombinations --mcdata /my/data/mc/ --ipoldir /my/tmp/ipol/

Command-line options

The --datadir DATADIR and related options are used as normal to specify the reference data, MC runs, and interpolation objects: see the path options page.

--runs RUNSFILE, --runcombs RUNSFILE

A file with run combinations that are used as anchor points. One set of polynomial coefficients is calculated for each run combination. [default: use all available runs]

--ipol IPOLMETHOD

The interpolation method. At the moment the order of the polynomial: quadratic or cubic. [default: cubic]

--weave, --noweave

Use an optimized implementation of the parameterization code. This code uses C code, that is compiled on-the-fly, and is ~5 times faster than the pure-Python code. If the compilation fails you can use --noweave to use the pure-Python code. [default: use weave]

--weights WEIGHTS, --obsfile WEIGHTS

Parameterization coefficients for all observables in WEIGHTS are calculated, including those with a weight of 0.