Skip to content

Commit

Permalink
(fixup) Strip .value and skip .timestamp from rec params if present
Browse files Browse the repository at this point in the history
  • Loading branch information
philsmt committed Apr 24, 2024
1 parent f434bc9 commit fd05eea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/extra/components/dld.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,10 @@ def instrument_source(self):
@property
def rec_params(self):
"""Reconstruction parameters."""
return self.control_source.run_values()
return {key.removesuffix('.value'): value
for key, value
in self.control_source.run_values().items()
if not key.endswith('.timestamp')}

def select_trains(self, trains):
new_self = copy(self)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_components_dld.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_dld_init(mock_sqs_remi_run):
dld = DelayLineDetector(run, 'SQS_REMI_DLD6/DET/TOP', pulses)

# Reconstruction parameters.
assert 'digitizer.baseline_region.value' in dld.rec_params
assert 'digitizer.baseline_region' in dld.rec_params


@pytest.mark.parametrize('pulse_dim', ['pulseId', 'pulseIndex', 'time'])
Expand Down

0 comments on commit fd05eea

Please sign in to comment.