Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 29, 2024
1 parent 9d920be commit 312df34
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/simweights/_genie_weighter.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
from ._generation_surface import GenerationSurface, generation_surface
from ._powerlaw import PowerLaw
from ._spatial import CircleInjector
from ._utils import Column, Const, has_column, get_column, get_table
from ._utils import Column, Const, get_column, get_table, has_column
from ._weighter import Weighter


def genie_surface(table: Iterable[Mapping[str, float]]) -> GenerationSurface:
"""Inspect the rows of a GENIE S-Frame table object to generate a surface object."""
surfaces = []
Expand All @@ -35,7 +36,9 @@ def genie_surface(table: Iterable[Mapping[str, float]]) -> GenerationSurface:
global_probability_scale = get_column(table, "global_probability_scale")[i]
surfaces.append(
nevents
* generation_surface(pdgid, Const(1 / spatial.etendue / global_probability_scale), Column("wght"), Column("volscale"), spectrum),
* generation_surface(
pdgid, Const(1 / spatial.etendue / global_probability_scale), Column("wght"), Column("volscale"), spectrum
),
)
retval = sum(surfaces)
assert isinstance(retval, GenerationSurface)
Expand Down Expand Up @@ -64,5 +67,5 @@ def GenieWeighter(file_obj: Any) -> Weighter: # noqa: N802
else:
volscale = np.ones_like(get_column(result_table, "wght"))
weighter.add_weight_column("volscale", volscale)

return weighter

0 comments on commit 312df34

Please sign in to comment.