pymchelper.input_output module¶
-
pymchelper.input_output.convertfromlist(filelist, error, nan, outputdir, converter_name, options, outputfile=None)[source]¶ Parameters: - filelist –
- error – error estimation, see class ErrorEstimate class in pymchelper.estimator
- nan – if True, NaN (not a number) are excluded when averaing data.
- outputdir –
- converter_name –
- options –
- outputfile –
Returns:
-
pymchelper.input_output.convertfrompattern(pattern, outputdir, converter_name, options, error=<ErrorEstimate.stderr: 1>, nan=True, jobs=-1, verbose=0)[source]¶ Parameters: - pattern –
- outputdir –
- converter_name –
- options –
- error – error estimation, see class ErrorEstimate class in pymchelper.estimator
- nan – if True, NaN (not a number) are excluded when averaing data.
- jobs –
- verbose –
Returns:
-
pymchelper.input_output.fromfile(filename)[source]¶ Read estimator data from a binary file
`filename`
-
pymchelper.input_output.fromfilelist(input_file_list, error=<ErrorEstimate.stderr: 1>, nan=True)[source]¶ Reads all files from a given list, and returns a list of averaged estimators.
Parameters: - input_file_list – list of files to be read
- error – error estimation, see class ErrorEstimate class in pymchelper.estimator
- nan – if True, NaN (not a number) are excluded when averaging data.
Returns: list of estimators
-
pymchelper.input_output.frompattern(pattern, error=<ErrorEstimate.stderr: 1>, nan=True, jobs=-1, verbose=0)[source]¶ Reads all files matching pattern, e.g.: ‘foobar_*.bdo’, and returns a list of averaged estimators.
Parameters: - pattern – pattern to be matched for reading.
- error – error estimation, see class ErrorEstimate class in pymchelper.estimator
- nan – if True, NaN (not a number) are excluded when averaing data.
- jobs – optional number of threads for parallel processing
- verbose – optional verbosity level.
Returns: a list of estimators, or an empty list if no files were found.
-
pymchelper.input_output.group_input_files(input_file_list)[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 :return: core_names_dict
-
pymchelper.input_output.guess_corename(filename)[source]¶ Guess a reader based on file contents or extensions. In some cases (i.e. binary SH12A files) access to file contents is needed. :param filename: :return: the corename of the file (i.e. the basename without the running number for averaging)