diff --git a/pyproject.toml b/pyproject.toml index 12cc8fd..8a71aa5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,6 +37,7 @@ requires-python = ">=3.9" dependencies=[ "PyWavelets", "colorlog", + "dbetto", "h5py>=3.2", "iminuit", "legend-pydataobj>=1.16.0", diff --git a/src/dspeed/build_dsp.py b/src/dspeed/build_dsp.py index 57af12d..04ba357 100644 --- a/src/dspeed/build_dsp.py +++ b/src/dspeed/build_dsp.py @@ -330,7 +330,9 @@ def build_dsp( # Get outputs from config if they weren't provided if outputs is None: - outputs = this_config["outputs"] + _outputs = this_config["outputs"] + else: + _outputs = outputs # resize inputs, get table and iterable versions if n_entries is None: @@ -358,7 +360,7 @@ def build_dsp( processors, tb_in, db_dict=db_dict, - outputs=outputs, + outputs=_outputs, block_width=block_width, ) @@ -416,6 +418,7 @@ def build_dsp( lh5_file=dsp_out, wo_mode="o" if write_mode == "u" else "a", write_start=i_start + i_entry, + n_rows=len(tb_in), ) else: tb_fill.append(tb_out) diff --git a/src/dspeed/cli.py b/src/dspeed/cli.py index b0e304d..8885671 100644 --- a/src/dspeed/cli.py +++ b/src/dspeed/cli.py @@ -6,6 +6,8 @@ import os import sys +from dbetto import Props + from . import __version__, build_dsp, logging @@ -55,6 +57,7 @@ def dspeed_cli(): parser.add_argument( "--config", "-c", + nargs="*", required=True, help=""""JSON file holding configuration of signal processing routines""", @@ -172,11 +175,13 @@ def dspeed_cli(): basename = basename.removesuffix("_raw") out_files.append(f"{basename}_dsp.lh5") + config = Props.read_from(args.config) + for i in range(len(args.raw_lh5_file)): build_dsp( args.raw_lh5_file[i], out_files[i], - args.config, + config, lh5_tables=args.hdf5_groups, database=args.database, outputs=args.output_pars,