Skip to content

Commit

Permalink
Merge pull request #5 from ggmarshall/xtalk
Browse files Browse the repository at this point in the history
Xtalk
  • Loading branch information
tdixon97 authored May 5, 2024
2 parents 495d215 + 367d18f commit f8cb29d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ dependencies = [
"iminuit",
"legend-daq2lh5>=1.2.1",
"legend-pydataobj>=1.6",
"legendmeta>=0.9",
"matplotlib",
"numba!=0.53.*,!=0.54.*,!=0.57",
"numpy>=1.21",
Expand Down
10 changes: 0 additions & 10 deletions src/pygama/evt/modules/xtalk.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

from __future__ import annotations

import importlib

import awkward as ak
import numpy as np
from legendmeta.catalog import Props
Expand Down Expand Up @@ -145,9 +143,6 @@ def filter_hits(
group = datainfo._asdict()[tier].group
logic = logic.replace(f"{group}.", f"{group}___")

# replace remaining . with __ as these are module calls
logic = logic.replace(".", "__")

c = compile(logic, "gcc -O3 -ffast-math build_hit.py", "eval")

tier_params = []
Expand All @@ -158,11 +153,6 @@ def filter_hits(
file = datainfo._asdict()[tier].file
if (file, group, column) not in tier_params:
tier_params.append((file, group, column))
elif "__" in name:
# get module and function names
package, func = name.rsplit("__", 1)
# import function into current namespace
importlib.import_module(package)

for idx_chan, channel in enumerate(rawids):
tbl = types.Table()
Expand Down
4 changes: 2 additions & 2 deletions src/pygama/math/distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

# nopycln: file

from pygama.math.functions.crystal_ball import crystal_ball # noqa: F401
from pygama.math.functions.crystal_ball import ( # noqa: F401
crystal_ball,
nb_crystal_ball_cdf,
nb_crystal_ball_pdf,
)
from pygama.math.functions.error_function import nb_erf, nb_erfc # noqa: F401
from pygama.math.functions.exgauss import exgauss # noqa: F401
from pygama.math.functions.exgauss import ( # noqa: F401
exgauss,
nb_exgauss_cdf,
nb_exgauss_pdf,
nb_gauss_tail_approx,
Expand Down

0 comments on commit f8cb29d

Please sign in to comment.