Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be compatible with https://github.com/XENONnT/straxen/pull/1563 #104

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
2 changes: 2 additions & 0 deletions axidence/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ def positioned_peak_dtype(n_channels=straxen.n_tpc_pmts):
]

peak_misc_fields = list(strax.to_numpy_dtype(som_additional_fields).names) + [
"ambience_1d_score",
"ambience_2d_score",
"n_competing",
"n_competing_left",
]
Expand Down
10 changes: 9 additions & 1 deletion axidence/plugins/salting/event_building.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@
class EventsSalted(Events, ExhaustPlugin):
__version__ = "0.2.0"
child_plugin = True
depends_on = ("peaks_salted", "peak_proximity_salted", "peak_basics", "peak_proximity")
depends_on = (
"peaks_salted",
"peak_proximity_salted",
"peak_ambience__salted",
"peak_basics",
"peak_proximity",
"peak_ambience_",
)
provides = "events_salted"
data_kind = "events_salted"
save_when = strax.SaveWhen.EXPLICIT
Expand Down Expand Up @@ -146,6 +153,7 @@ class EventBasicsSOMSalted(EventBasicsSOM, ExhaustPlugin):
"events_salted",
"peaks_salted",
"peak_proximity_salted",
"peak_ambience__salted",
"peak_basics",
"peak_proximity",
"peak_positions",
Expand Down
1 change: 1 addition & 0 deletions axidence/plugins/salting/event_combine.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class EventsCombine(ExhaustPlugin):
"event_basics_salted",
"event_shadow_salted",
"event_ambience_salted",
"event_ambience__salted",
"event_nearest_triggering_salted",
"event_se_score_salted",
)
Expand Down
6 changes: 2 additions & 4 deletions axidence/plugins/salting/events_salting.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ class EventsSalting(ExhaustPlugin, DownChunkingPlugin, EventPositions, EventBasi
salting_rate = straxen.URLConfig(
default=10,
type=(int, float, list, tuple),
help=(
"Rate of salting in Hz, " "if list or tuple, they are the factor for 2 and 3+ hits S1",
),
help="Rate of salting in Hz, if list or tuple, they are the factor for 2 and 3+ hits S1",
)

s1_area_range = straxen.URLConfig(
Expand Down Expand Up @@ -123,7 +121,7 @@ def setup(self):
if isinstance(self.salting_rate, (list, tuple)):
if len(self.salting_rate) != 2:
raise ValueError(
"The length of salting_rate should be 2 " "if provided list or tuple!"
"The length of salting_rate should be 2 if provided list or tuple!"
)
self.hits_salting_rate = list(self.salting_rate)
else:
Expand Down
9 changes: 8 additions & 1 deletion axidence/plugins/salting/peak_correlation.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,14 @@ def compute(self, peaks_salted, lone_hits, peaks):
class PeakNearestTriggeringSalted(PeakNearestTriggering):
__version__ = "0.0.0"
child_plugin = True
depends_on = ("peaks_salted", "peak_proximity_salted", "peak_basics", "peak_proximity")
depends_on = (
"peaks_salted",
"peak_proximity_salted",
"peak_ambience__salted",
"peak_basics",
"peak_proximity",
"peak_ambience_",
)
provides = "peak_nearest_triggering_salted"
data_kind = "peaks_salted"
save_when = strax.SaveWhen.EXPLICIT
Expand Down
Loading