mjkramer / flow2supera

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flow2supera

This repository contains code to translate the HDF5 files output by ndlar_flow to Supera format for use by the DUNE machine learning reconstruction chain, lartpc_mlreco3d.

Prerequisites

flow2supera depends on edep2supera, SuperaAtomic, and h5flow. Install each of those repositories using the instructions on their respective READMEs and ensure that you can import them in python:

import edep2supera
import supera
import h5flow

Installation

Once the prerequisites are met, simply run this command from the top directory:

python3 -m pip install .

Usage

The main executable script is located at bin/run_flow2supera.py relative to the top directory. The required arguments are the input and output file names:

python3 bin/run_flow2supera.py -o <output_file> -c 2x2 <input_ndlar_flow_file>

You can also specify the following optional arguments:

  • -c or --config: Configuration keyword or a file path (full or relative including the file name). Currently, only a 2x2 config is supported.
  • -n or --num_events: Number of events to process.
  • -s or --skip: Number of first events to skip.
  • -l or --log: Name of a log file to be created.

Upon successful completion, this will produce an output larcv-format file that can be used as input to the machine learning reconstruction.

Contributing

Please read the contributing.md file for information on how you can contribute.

License

Distributed under the MIT License. See LICENSE for more information.

About

License:MIT License


Languages

Language:Python 100.0%