pymchelper.detector module

class pymchelper.detector.Axis[source]

Bases: enum.IntEnum

Axis numbers

x = 0
y = 1
z = 2
class pymchelper.detector.Converters[source]

Bases: enum.IntEnum

Available converters

excel = 6
gnuplot = 2
image = 3
plotdata = 1
sparse = 7
tripcube = 4
tripddd = 5
txt = 0
class pymchelper.detector.Detector[source]

Holds data read from single estimator

class AxisData(min, max, n, number)

Bases: tuple

max

Alias for field number 1

min

Alias for field number 0

n

Alias for field number 2

number

Alias for field number 3

Detector.average_with_nan(other_detectors, error_estimate=<ErrorEstimate.stderr: 1>)[source]

Average (not add) data with other detector, excluding malformed data (NaN) from averaging. :param other_detectors: :param error_estimate: :return:

Detector.average_with_other(other_detector, error_estimate=<ErrorEstimate.stderr: 1>)[source]

Average (not add) data with other detector :param other_detector: :param error_estimate: :return:

Detector.axis_data(axis_number, plotting_order=False)[source]
Detector.axis_values(axis_no, plotting_order=False)[source]
Detector.counter = -1
Detector.data = None
Detector.dettyp = 0
Detector.dimension
Detector.e
Detector.error = None
Detector.geotyp = 0
Detector.is_valid
Detector.nstat = -1
Detector.nx = -1
Detector.ny = -1
Detector.nz = -1
Detector.particle = 0
Detector.read(filename, nscale=1)[source]

Reads binary file with. Automatically discovers which reader should be used. :param filename: binary file name :param nscale: :return: none

Detector.save(filename, options)[source]

Save data to the file, using list of converters :param filename: :param options: :return:

Detector.v
Detector.x
Detector.xmax = nan
Detector.xmin = nan
Detector.y
Detector.ymax = nan
Detector.ymin = nan
Detector.z
Detector.zmax = nan
Detector.zmin = nan
class pymchelper.detector.ErrorEstimate[source]

Bases: enum.IntEnum

none = 0
stddev = 2
stderr = 1
pymchelper.detector.merge_list(input_file_list, output_file, options)[source]

Takes set of input file names, containing data from the same estimator. All input files are read and data is filled (and summed) into detector structure. Finally data stored in detector is averaged and saved to output file. :param input_file_list: list of input files :param output_file: name of output file :param options: list of parsed options :return: none

pymchelper.detector.merge_many(input_file_list, outputdir, options, jobs)[source]

Takes set of input file names, belonging to possibly different estimators. Input files are grouped according to the estimators and for each group merging is performed, as in @merge_list method. Output file name is automatically generated. :param input_file_list: list of input files :param outputdir: output directory :param options: list of parsed options :param jobs: number of CPU cores to use (-1 means all) :return: none