Skip to content

Commit

Permalink
Amstrax needs a new maintainer (#251)
Browse files Browse the repository at this point in the history
* Amstrax needs a new maintainer

* Update daqreader.py

* Update pax_interface.py
  • Loading branch information
JoranAngevaare authored Mar 10, 2023
1 parent cd49f8f commit 383a0fb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
6 changes: 1 addition & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,10 @@ updates:
schedule:
# Check for updates to GitHub Actions every weekday
interval: "monthly"
assignees:
- JoranAngevaare
# Maintain the requirements requirements folder
- package-ecosystem: "pip"
directory: "/extra_requirements"
schedule:
# Check for updates to requirements every month
interval: "monthly"
open-pull-requests-limit: 100
assignees:
- JoranAngevaare
open-pull-requests-limit: 5
6 changes: 5 additions & 1 deletion amstrax/plugins/daqreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
import strax
import straxen
from immutabledict import immutabledict
from straxen.plugins.daqreader import split_channel_ranges
try:
# Straxen > 2 changed the imports
from straxen.plugins.raw_records.daqreader import split_channel_ranges
except ModuleNotFoundError:
from straxen.plugins.daqreader import split_channel_ranges

export, __all__ = strax.exporter()
__all__ += ['ARTIFICIAL_DEADTIME_CHANNEL']
Expand Down
7 changes: 6 additions & 1 deletion amstrax/plugins/pax_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@
import numba
import numpy as np
import strax
from straxen.plugins.pax_interface import records_needed

export, __all__ = strax.exporter()


# From https://github.com/XENONnT/straxen/blob/81da4e1c761033a220bb07a86910f8badafcabf6/straxen/legacy/plugins_1t/pax_interface.py # noqa
def records_needed(pulse_length, samples_per_record):
"""Return records needed to store pulse_length samples"""
return np.ceil(pulse_length / samples_per_record).astype(np.int64)


@export
def pax_to_records(input_filename,
samples_per_record=strax.DEFAULT_RECORD_LENGTH,
Expand Down

0 comments on commit 383a0fb

Please sign in to comment.