-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add functionality to output the positions of the ray surface intersec…
…tions, as well as python tools to plot them in an xy - and an rz view. The data can both be plotted for the ray and the helix scan, which needs to be turned on by the --write_scan_data option.
- Loading branch information
1 parent
8b3e0d5
commit b49dc4a
Showing
11 changed files
with
567 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Detray library, part of the ACTS project (R&D line) | ||
# | ||
# (c) 2023 CERN for the benefit of the ACTS project | ||
# | ||
# Mozilla Public License Version 2.0 | ||
|
||
from collections import namedtuple | ||
|
||
#------------------------------------------------------------------------------- | ||
# Common helpers for plotting measurement data | ||
#------------------------------------------------------------------------------- | ||
|
||
""" Filter the data in a data frame by a given prescription """ | ||
def filter_data(data, filter = lambda df: [], variables = []): | ||
dataColl = [] | ||
|
||
# Get global data | ||
if len(filter(data)) == 0: | ||
for var in variables: | ||
dataColl.append(data[var].to_numpy()) | ||
|
||
# Filtered data | ||
else: | ||
filtered = data.loc[filter] | ||
for var in variables: | ||
dataColl.append(filtered[var].to_numpy()) | ||
|
||
return tuple(dataColl) | ||
|
||
#------------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.