PICOcode.AnalysisModules
The AnalysisModules subpackage of PICOcode contains the processing code required to convert raw data to reconstructed data; that is, to summarize the data obtained in an event such that events may be categorized, e.g. into single- versus multi-bubble events, alpha- versus neutron-induced, etc. This is achieved through three steps of processing, contained in the event_modules, run_modules, and dataset_modules directories, which contain scripts which operate on events, runs, and full datasets, respectively.
Event Modules
Event modules operate on one event at a time, and do not require data from any
other event in order to complete. Each processor must inherit from the
ProcessorBase
class, and override the
run()
member function. This run() member function should simply call any other
user-made functions which are members of the class.
Each module contained in the top level of the PICOcode.AnalysisModules.event_modules
package is intended to contain a reference processor, i.e. one which can
provide a template class which may be inherited by classes in dataset-specific
directories. For example, the pico40l_22
directory contains the
FastDAQAnalysis
class, which inherits from
FastDAQAnalysisBase
.
The latter implements a basic form for acoustic t0
-finding and energy
calculation, with parameters initialized in its __init__()
function such as
frequency bin edges for the energy calculation. Inheritors may override these
parameters, or completely rewrite each function, add functions for futher
analyses, etc.
During processing, each event is processed in parallel.
Run Modules
Run modules are processing scripts/functions which operate on an entire run.
For the most part, these are external C++ programs which are called via the
subprocess.run()
Python function, with the exception of
XYZlookup
, a module
which has been translated from MATLAB code. The C++ programs called here
include AutoBub3hs,
PICOJarTracker, and
XYZFixL2.
As much as possible, future analyses should be written as event-specific processors under the Event Modules subpackage.
To Do
The processors in this subpackage should be bundled in a RunModuleBase class, or similar.
Dataset Modules
Dataset modules run on an entire dataset, i.e. all data in a particular set of
data collection (e.g. all runs processed for pico40l-22
). The main
purpose of these processors is so-called “level 2” processing, which includes
corrections to the data from event-level and
run-level such as position corrections for acoustic and
dytran data.
The structure of this subpackage is similar to
event-level in that there is a base class,
DatasetProcessorBase
which all other processors must inherit from. This all inheritors must
override the
run
method, which initiates all required processing. Additionally, certain
attributes of the class must be filled:
header
-