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

Improvements: New Generation Testbeam Analysis #50

Closed
wants to merge 218 commits into from

Conversation

laborleben
Copy link
Collaborator

No description provided.

@laborleben laborleben self-assigned this Feb 3, 2017
@laborleben laborleben changed the base branch from master to development February 3, 2017 19:58
@coveralls
Copy link

coveralls commented Feb 3, 2017

Coverage Status

Coverage increased (+0.06%) to 55.595% when pulling f0a2ac3 on improvements into 9feaa87 on development.

@@ -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

Copy link
Collaborator

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 :-(.

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.
Copy link
Collaborator

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?

@@ -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:
Copy link
Collaborator

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?

@@ -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)
Copy link
Collaborator

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:
Copy link
Collaborator

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?

@DavidLP
Copy link
Collaborator

DavidLP commented Feb 3, 2017

Nice. Did you test with eutelescope example? What are the residuals you get?

@laborleben laborleben closed this Dec 17, 2018
@laborleben
Copy link
Collaborator Author

This branch moved to a new project: https://github.com/SiLab-Bonn/beam_telescope_analysis

@laborleben laborleben deleted the improvements branch December 17, 2018 21:47
@laborleben laborleben restored the improvements branch December 17, 2018 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants