VERITAS-Observatory / V2DL3

VERITAS (VEGAS and Eventdisplay) to DL3 Converter
BSD 3-Clause "New" or "Revised" License
8 stars 1 forks source link

Add Event Classes #141

Closed tmcahill closed 2 years ago

tmcahill commented 2 years ago

First of a series of updates for my implementation of Alisha Chromey's work for 4DMLM.

This update implements the EventClass object, a simple data structure by which event classes are implemented.

EventClasses are created when using event class mode (-ec). The user may provide one or more EAs per EA tag in the runlist to create an EventClass for each EA in the tag. Event classes are paired to the data files of the same ID. Example runlist

Giving event classes their own object is cleaner than passing event class data many times via function parameters. It also allows us to avoid redundant computations for input files which correspond to an already constructed event class.

Next patch will make use of these EventClasses to select events to separate .fits files.

Vegas-side run successful with this patch.

Itemized changes

EventClass.py

genHDUList.py

v2dl3.py

VegasDataSource.py

parseSt6RunList.py

util.py

tmcahill commented 2 years ago

Combed through every occurrence of 'v2dl3' in the code for the refactor from v2dl3.py -> v2dl3_for_vegas.py:

Tested the updated README commands on a fresh install to a new conda env; All working and successfully processed a runlist.

Other minor changes: