legenddataflowscripts.tier package¶
Submodules¶
legenddataflowscripts.tier.dsp module¶
- legenddataflowscripts.tier.dsp._replace_list_with_array(dic)¶
Recursively replace list values with NumPy
float32arrays.- Parameters:
dic (dict) – Nested dictionary whose list values should be converted.
- Returns:
dict – dic modified in-place, with all list values replaced by
numpy.ndarrayof dtypefloat32.
- legenddataflowscripts.tier.dsp.build_dsp_wrapper(kwargs)¶
Unpack kwargs and delegate to
dspeed.build_dsp().This thin wrapper exists so that a single-argument callable can be passed to
multiprocessing.Pool.map().- Parameters:
kwargs (dict) – Keyword arguments forwarded verbatim to
dspeed.build_dsp().
- legenddataflowscripts.tier.dsp.build_tier_dsp()¶
Build the DSP tier from raw LH5 data (multi-channel entry point).
CLI entry point registered as
build-tier-dsp. Reads raw waveform data from a single LH5 input file and runs each channel through the digital signal processing (DSP) chain defined in the dataflow configuration, writing the processed output to an LH5 file.When
--n-processesis greater than 1, channels are sorted by table length (longest first) and distributed in round-robin fashion across worker processes. Each worker writes to a temporary shard file; the shards are merged into the final output and then deleted.Notes
Command-line arguments
--configsstrPath to the dataflow configuration directory (TextDB-compatible).
--table-mapstr, optionalJSON-encoded
{channel: lh5_table_path}mapping.--logstr, optionalPath to the log file.
--alias-tablestr, optionalJSON-encoded alias mapping appended to the output file via
alias_table().--n-processesintNumber of parallel worker processes. Defaults to
1.--datatypestrData-type identifier used to select the active configuration (e.g.
cal,phy).--timestampstrRun timestamp used to select the active configuration.
--tierstrTier label (e.g.
dsp).--pars-filelist of strDatabase parameter files (
.json/.yaml) containing per-channel DSP parameters.--inputstrPath to the input raw LH5 file.
--outputstrPath for the output DSP LH5 file.
- legenddataflowscripts.tier.dsp.build_tier_dsp_single_channel()¶
Build the DSP tier from raw LH5 data (single-channel entry point).
CLI entry point registered as
build-tier-dsp-single-channel. Processes one detector channel at a time through the DSP chain defined in the dataflow configuration. This entry point is used by single-channel Snakemake rules where parallelism is managed by the workflow scheduler rather than in-process multiprocessing.Notes
Command-line arguments
--configsstrPath to the dataflow configuration directory (TextDB-compatible).
--channelstr, optionalChannel identifier to process. When provided, channel-specific configuration and parameter overrides are applied.
--logstr, optionalPath to the log file.
--datatypestrData-type identifier.
--timestampstrRun timestamp used to select the active configuration.
--tierstrTier label.
--pars-filelist of strDatabase parameter files to load.
--inputstrPath to the input raw LH5 file.
--outputstrPath for the output DSP LH5 file.
legenddataflowscripts.tier.hit module¶
- legenddataflowscripts.tier.hit.build_tier_hit()¶
Build the HIT tier from DSP LH5 data (multi-channel entry point).
CLI entry point registered as
build-tier-hit. Reads DSP-level LH5 data and computes reconstructed physics quantities (hit-level parameters) for each detector channel usingpygama.hit.build_hit.build_hit().For each channel the hit configuration file is read and then enriched with per-channel calibration parameters from the provided database files before being passed to the hit builder.
Notes
Command-line arguments
--inputstrPath to the input DSP LH5 file.
--pars-filelist of strDatabase parameter files containing per-channel hit parameters.
--configsstrPath to the dataflow configuration directory (TextDB-compatible).
--table-mapstr, optionalJSON-encoded
{channel: lh5_table_path}mapping.--logstr, optionalPath to the log file.
--alias-tablestr, optionalJSON-encoded alias mapping appended to the output file.
--datatypestrData-type identifier.
--timestampstrRun timestamp used to select the active configuration.
--tierstrTier label (e.g.
hit).--outputstrPath for the output HIT LH5 file.
- legenddataflowscripts.tier.hit.build_tier_hit_single_channel()¶
Build the HIT tier from DSP LH5 data (single-channel entry point).
CLI entry point registered as
build-tier-hit-single-channel. Processes a single detector channel, applying channel-specific hit configuration and calibration parameters before callingpygama.hit.build_hit.build_hit().Notes
Command-line arguments
--inputstrPath to the input DSP LH5 file.
--pars-filelist of strDatabase parameter files to load.
--configsstrPath to the dataflow configuration directory (TextDB-compatible).
--logstr, optionalPath to the log file.
--channelstr, optionalChannel identifier to process.
--datatypestrData-type identifier.
--timestampstrRun timestamp used to select the active configuration.
--tierstrTier label.
--outputstrPath for the output HIT LH5 file.