Skip to content

Commit

Permalink
n_competing plus one (#103)
Browse files Browse the repository at this point in the history
* `n_competing` plus one

* Use `xenonnt` as an expedient
  • Loading branch information
dachengx authored Feb 17, 2025
1 parent 0556b37 commit 90dd306
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion axidence/plugins/salting/peak_correlation.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ def compute(self, peaks_salted, peaks):
return dict(
time=peaks_salted["time"],
endtime=strax.endtime(peaks_salted),
n_competing=n_tot,
# here the plus one accounts for the peak itself
n_competing=n_tot + 1,
n_competing_left=n_left,
salt_number=peaks_salted["salt_number"],
)
Expand Down
3 changes: 2 additions & 1 deletion tests/test_pairing.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class TestPairing(TestCase):
@classmethod
def setUpClass(cls) -> None:
cls.run_id = nt_test_run_id
cls.st = nt_test_context()
# TODO: xenonnt_online should be used here
cls.st = nt_test_context("xenonnt")
cls.st.set_context_config({"write_superruns": True})
cls.st.salt_and_pair_to_context()

Expand Down
3 changes: 2 additions & 1 deletion tests/test_salting.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ class TestSalting(TestCase):
@classmethod
def setUpClass(cls) -> None:
cls.run_id = nt_test_run_id
cls.st = nt_test_context()
# TODO: xenonnt_online should be used here
cls.st = nt_test_context("xenonnt")
cls.st.salt_to_context()

def test_salting(self):
Expand Down

0 comments on commit 90dd306

Please sign in to comment.