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

Bugfixes and improvements to emittance measurement class #218

Merged
merged 11 commits into from
Jan 22, 2025

Conversation

roussel-ryan
Copy link
Collaborator

@roussel-ryan roussel-ryan commented Dec 16, 2024

Add an init.py file to testing folder such that it runs the emittance measurement unit test, fixes several bugs in the QuadScanEmittanceMeasurement class and benchmarks the results to beam dynamics simulations

@roussel-ryan roussel-ryan marked this pull request as ready for review December 16, 2024 19:01
@roussel-ryan roussel-ryan requested a review from nneveu January 21, 2025 21:47
@roussel-ryan
Copy link
Collaborator Author

Note: the failing test is unrelated to this PR so I think we can merge without it passing -- this was an issue previously so I don't know how to address

Copy link
Collaborator

@eloiseyang eloiseyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Ryan, thanks for the PR. The changes look good to me. I left a couple minor comments about code comments. Feel free to merge when those are ready.

Should we remove the cryo tests for now? I'm not clear on what they're doing, and I don't know why they used random numbers. It leads to inconsistent tests, e.g. the latest 3.9 run failed where the 3.10 run passed running the same tests.

@@ -36,21 +37,24 @@ class QuadScanEmittance(Measurement):
design_twiss: Optional[dict] = None # design twiss values
beam_sizes: Optional[dict] = {}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we note the units here? Thank you!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should also correct the above rmat comment to match the new 2x2x2 matrix size.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added documentation

@nneveu
Copy link
Member

nneveu commented Jan 21, 2025

@eloiseyang @lisazacarias @hmarts9 could y'all chat about what the issue is w/ the cryo tests? slack or here is fine. I just don't know what the details and want to loop Lisa in.

@nneveu
Copy link
Member

nneveu commented Jan 21, 2025

@roussel-ryan feel free to merge after adding the comments @eloiseyang mentioned above. Thank you both!

@roussel-ryan roussel-ryan changed the title Create __init__.py Bugfixes and improvements to emittance measurement class Jan 22, 2025
@roussel-ryan roussel-ryan merged commit 28dc658 into main Jan 22, 2025
1 of 3 checks passed

return results

def measure_beamsize(self):
"""Take measurement from measurement device,
store beam sizes in self.beam_sizes"""
time.sleep(self.wait_time)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For later, perhaps this delay should be in the Magnet class scan method instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants