-
Notifications
You must be signed in to change notification settings - Fork 5
Tune scan #49
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
Open
linahv
wants to merge
29
commits into
master
Choose a base branch
from
tune_scan
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Tune scan #49
Changes from 22 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
daa01d9
tune_scan function description added
2cd91c1
corrected
09a77c8
indents
simoneliuzzo 7becaaf
minors for help
simoneliuzzo 1ed4e9f
remove error message. Fix conflict.
1a5db63
added doc. Removed unexplained inputs of quadrupoles.
c596445
revert changes
025d3de
revert changes
21640de
corrected conflicts
0d783a9
Merge branch 'master' into tune_scan
linahv 55013c6
fit_tune documentation
b41ef80
added description of fit_tune
71410bb
changes in fit_tune
87f4b27
testing in progress
db8f62d
quadrupole input now allows N number of families, each with different…
12ce744
test functions for tune and chroma correction
1faa6b4
typo
6c3935d
succesful test
2d18041
Merge branch 'master' into tune_scan
linahv 2a4eb29
updated documentation
55c699b
Merge branch 'tune_scan' of https://github.com/lmalina/pySC into tune…
3eb4a1b
removed the function tune
1fc73bf
minor corrections
9e349c5
added the assess line
f10b0f1
simplified function and updated default values
9b58b02
assert test function added, test succesful
14f1f2e
Merge branch 'master' into tune_scan
lmalina 92895a6
Merge branch 'master' into tune_scan
lmalina 962b6ba
Little fixes
lmalina File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,29 @@ | ||
| import copy | ||
| import at | ||
| import pytest | ||
| import numpy as np | ||
| from numpy.testing import assert_equal, assert_allclose | ||
| from tests.test_at_wrapper import at_lattice | ||
| from pySC.correction.tune import tune_scan, fit_tune | ||
| from pySC.correction.chroma import fit_chroma | ||
| from pySC.core.simulated_commissioning import SimulatedCommissioning | ||
| from pySC.utils.sc_tools import SCgetOrds | ||
|
|
||
|
|
||
| def test_fit_tune(at_lattice): | ||
| sc = SimulatedCommissioning(at_lattice) | ||
| sc.register_cavities(SCgetOrds(sc.RING, 'RFCav'), | ||
| FrequencyOffset=5E3, | ||
| VoltageOffset=5E3, | ||
| TimeLagOffset=0.5) | ||
| sc.register_magnets(SCgetOrds(sc.RING, 'QF'), HCM=1E-3, | ||
| CalErrorB=np.array([5E-2, 1E-3]), | ||
| MagnetOffset=200E-6 * np.array([1, 1, 0]), | ||
| MagnetRoll=200E-6 * np.array([1, 0, 0])) | ||
| sc.register_magnets(SCgetOrds(sc.RING, 'QD'), VCM=1E-3, | ||
| CalErrorA=np.array([5E-2, 0]), | ||
| CalErrorB=np.array([0, 1E-3]), | ||
| MagnetOffset=200E-6 * np.array([1, 1, 0]), | ||
| MagnetRoll=200E-6 * np.array([1, 0, 0])) | ||
| sc = fit_tune(sc, q_ords=[SCgetOrds(sc.RING, 'QF'), SCgetOrds(sc.RING, 'QD')], target_tune=np.array([0.16, 0.21])) | ||
| return sc | ||
linahv marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.