Skip to content

Commit

Permalink
Rename defualt_run_comments -> default_run_comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dachengx committed Nov 23, 2024
1 parent 0a31fa1 commit 0942724
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions straxen/plugins/led_cal/led_calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class LEDCalibration(strax.Plugin):
),
)

defualt_run_comments = straxen.URLConfig(
default_run_comments = straxen.URLConfig(
default=["auto, SC user: ", "pulserScript: "],
type=list,
help=("List of default comments the automatic script for runs in PMT calibration. "),
Expand Down Expand Up @@ -167,7 +167,7 @@ def compute(self, raw_records):
"""

self.is_led_on = is_the_led_on(
self.run_doc, self.defualt_run_comments, self.noise_run_comments
self.run_doc, self.default_run_comments, self.noise_run_comments
)

mask = np.where(np.in1d(raw_records["channel"], self.channel_list))[0]
Expand Down Expand Up @@ -205,7 +205,7 @@ def compute(self, raw_records):
return temp


def is_the_led_on(run_doc, defualt_run_comments, noise_run_comments):
def is_the_led_on(run_doc, default_run_comments, noise_run_comments):
"""Utilizing the run database metadata to determine whether the run ID corresponds to LED on or
LED off runs.
Expand All @@ -225,7 +225,7 @@ def is_the_led_on(run_doc, defualt_run_comments, noise_run_comments):
comment = doc["comment"]

# Check if the comment matches the expected pattern
if not all(x in comment for x in defualt_run_comments):
if not all(x in comment for x in default_run_comments):
raise ValueError("The comment does not match the expected pattern.")

if any(noise_comment in comment for noise_comment in noise_run_comments):
Expand Down
4 changes: 2 additions & 2 deletions straxen/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ def nt_test_context(
for plugin in to_remove:
del st._plugin_class_registry[plugin]

# Change the led_plugin defualt_run_comments to be compatible
# Change the led_plugin default_run_comments to be compatible
# with the test run_id in straxen.
st.set_config({"defualt_run_comments": ["S1-only"]})
st.set_config({"default_run_comments": ["S1-only"]})

return st

Expand Down

0 comments on commit 0942724

Please sign in to comment.