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

Sort times by time of first interaction #91

Merged
merged 3 commits into from
Dec 22, 2023
Merged
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: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.2.4
current_version = 0.2.5
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion fuse/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.2.4"
__version__ = "0.2.5"

from . import plugins
from .plugins import *
Expand Down
10 changes: 7 additions & 3 deletions fuse/plugins/micro_physics/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@export
class ChunkInput(strax.Plugin):

__version__ = "0.1.1"
__version__ = "0.1.2"

depends_on = tuple()
provides = "geant4_interactions"
Expand Down Expand Up @@ -83,7 +83,7 @@ class ChunkInput(strax.Plugin):
)

cut_delayed = straxen.URLConfig(
default=4e14, type=(int, float),
default=9e18, type=(int, float),
help='All interactions happening after this time (including the event time) will be cut.',
)

Expand Down Expand Up @@ -288,7 +288,11 @@ def output_chunk(self):
# Removing all events with no interactions:
m = ak.num(interactions['ed']) > 0
interactions = interactions[m]


#Sort interactions in events by time and subtract time of the first interaction
interactions = interactions[ak.argsort(interactions['t'])]
interactions['t'] = interactions['t'] - interactions['t'][:, 0]

inter_reshaped = full_array_to_numpy(interactions, self.dtype)

#Need to check start and stop again....
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "fuse"
version = "0.2.4"
version = "0.2.5"
authors = [
{ name="Henning Schulze Eißing", email="[email protected]" },
{ name="Diego Ramírez García", email="[email protected]" }
Expand Down