Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ requires-python = ">=3.9"
dependencies=[
"PyWavelets",
"colorlog",
"dbetto",
"h5py>=3.2",
"iminuit",
"legend-pydataobj>=1.16.0",
Expand Down
7 changes: 5 additions & 2 deletions src/dspeed/build_dsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -358,7 +360,7 @@ def build_dsp(
processors,
tb_in,
db_dict=db_dict,
outputs=outputs,
outputs=_outputs,
block_width=block_width,
)

Expand Down Expand Up @@ -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)
Expand Down
7 changes: 6 additions & 1 deletion src/dspeed/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import os
import sys

from dbetto import Props

from . import __version__, build_dsp, logging


Expand Down Expand Up @@ -55,6 +57,7 @@ def dspeed_cli():
parser.add_argument(
"--config",
"-c",
nargs="*",
required=True,
help=""""JSON file holding configuration of signal processing
routines""",
Expand Down Expand Up @@ -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,
Expand Down
Loading