-
Notifications
You must be signed in to change notification settings - Fork 6
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
Improvements: New Generation Testbeam Analysis #50
Conversation
testbeam_analysis/dut_alignment.py
Outdated
@@ -296,35 +299,37 @@ def prealignment(input_correlation_file, output_alignment_file, z_positions, pix | |||
background = np.array(background, dtype=np.int) # make Numpy array | |||
data = (data - background).astype(np.int) # remove background | |||
data -= data.min() # only positive values | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This calculations take quite some time, and the line fit usually does not fail due to missing start parameters. Or are the mu/sigma parameters for the Gaussian fits set by the hough results? I have a tough time reading the code on github because the line length is too long and scrolling is not supported :-(.
testbeam_analysis/dut_alignment.py
Outdated
max_iterations : uint | ||
Maximum number of iterations of calc residuals, apply rotation refit loop until constant result is expected. | ||
Usually the procedure converges rather fast (< 5 iterations) | ||
use_n_tracks: uint | ||
Defines the amount of tracks to be used for the alignment. More tracks can potentially make the result | ||
more precise, but will also increase the calculation time. | ||
new_alignment : bool | ||
If True, discard existig alignment parameters from input alignment file and start all over. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But keep pre-alignment parameters?
testbeam_analysis/dut_alignment.py
Outdated
@@ -777,7 +789,12 @@ def alignment(input_track_candidates_file, input_alignment_file, n_pixels, pixel | |||
alignment_parameters = _create_alignment_array(n_duts) | |||
alignment_parameters['translation_z'] = prealignment['z'] | |||
|
|||
if initial_rotation: | |||
if initial_rotation is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you check if this work with simulated data in different orientations?
testbeam_analysis/result_analysis.py
Outdated
@@ -132,6 +143,55 @@ def calculate_residuals(input_tracks_file, input_alignment_file, output_residual | |||
logging.error('Hit z position = %s and z intersection %s', str(hit_z_local[:3]), str(intersection_z_local[:3])) | |||
raise RuntimeError('The transformation to the local coordinate system did not give all z = 0. Wrong alignment used?') | |||
|
|||
limit_x_selection = np.ones_like(hit_x_local, dtype=np.bool) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe time for a helper function here to reduce loc?
|
||
alignment_parameters = old_alignment.copy() # Do not change input parameters | ||
|
||
for dut in select_duts: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You do not correct alignment changes by mean?
Nice. Did you test with eutelescope example? What are the residuals you get? |
c4f3cfa
to
be1b81f
Compare
be1b81f
to
88e9aca
Compare
88e9aca
to
cbdbfa8
Compare
c3629d3
to
4566d7a
Compare
dc777ab
to
d1b6e24
Compare
…hare the same tracks
…otation rotation matrix
124ecc1
to
9422618
Compare
2bfc41c
to
4e36893
Compare
This branch moved to a new project: https://github.com/SiLab-Bonn/beam_telescope_analysis |
No description provided.