Usage¶
The library exposes a single function convert
which enables conversion from different input formats
(oldhepdata
, yaml
) to different output formats (csv
, root
, yaml
, yoda
, yoda1
), by using a simple in-memory
intermediary format.
Python¶
import hepdata_converter
hepdata_converter.convert('sample.oldhepdata', 'Sample', options={'input_format': 'oldhepdata', 'output_format': 'yaml'})
CLI¶
hepdata-converter -i oldhepdata -o yaml sample.oldhepdata Sample
The default input and output formats are yaml
if not specified explicitly.
See a help message with more detailed options using hepdata-converter -h
.