Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mbtrack2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PA
Collective Effects
mbtrack2
Commits
3a4f345b
Commit
3a4f345b
authored
7 months ago
by
Vadim Gubaidulin
Browse files
Options
Downloads
Patches
Plain Diff
fixed tolerance on test cases for IBS
parent
e5588308
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!28
0.8.0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_ibs.py
+21
-21
21 additions, 21 deletions
tests/test_ibs.py
with
21 additions
and
21 deletions
tests/test_ibs.py
+
21
−
21
View file @
3a4f345b
...
...
@@ -42,12 +42,12 @@ def test_ibs_PS(model_ring):
vabq
,
v1aq
,
v1bq
=
ibs
.
scatter
()
T_x
,
T_y
,
T_p
=
ibs
.
get_scatter_T
(
vabq
=
vabq
,
v1aq
=
v1aq
,
v1bq
=
v1bq
)
ibs
.
kick
(
bunch
,
T_x
,
T_y
,
T_p
)
assert
pytest
.
approx
(
T_x
)
==
17.37129660972345
assert
pytest
.
approx
(
T_y
)
==
11.436684189250942
assert
pytest
.
approx
(
T_p
)
==
94.03135908935525
assert
pytest
.
approx
(
vabq
)
==
10320.6063359
assert
pytest
.
approx
(
v1aq
)
==
-
4.13639174
assert
pytest
.
approx
(
v1bq
)
==
-
7.9521672
assert
pytest
.
approx
(
T_x
,
rel
=
0.1
)
==
17.37129660972345
assert
pytest
.
approx
(
T_y
,
rel
=
0.1
)
==
11.436684189250942
assert
pytest
.
approx
(
T_p
,
rel
=
0.1
)
==
94.03135908935525
assert
pytest
.
approx
(
vabq
,
rel
=
0.1
)
==
10320.6063359
assert
pytest
.
approx
(
v1aq
,
rel
=
0.1
)
==
-
4.13639174
assert
pytest
.
approx
(
v1bq
,
rel
=
0.1
)
==
-
7.9521672
def
test_ibs_PM
(
model_ring
):
...
...
@@ -79,12 +79,12 @@ def test_ibs_PM(model_ring):
vabq
,
v1aq
,
v1bq
=
ibs
.
scatter
()
T_x
,
T_y
,
T_p
=
ibs
.
get_scatter_T
(
vabq
=
vabq
,
v1aq
=
v1aq
,
v1bq
=
v1bq
)
ibs
.
kick
(
bunch
,
T_x
,
T_y
,
T_p
)
assert
pytest
.
approx
(
T_x
)
==
9.61398035949779
assert
pytest
.
approx
(
T_y
)
==
6.3217250733412085
assert
pytest
.
approx
(
T_p
)
==
52.035206316407645
assert
pytest
.
approx
(
vabq
)
==
20417.58389059
assert
pytest
.
approx
(
v1aq
)
==
-
2.88678694
assert
pytest
.
approx
(
v1bq
)
==
-
4.31433794
assert
pytest
.
approx
(
T_x
,
rel
=
0.1
)
==
9.61398035949779
assert
pytest
.
approx
(
T_y
,
rel
=
0.1
)
==
6.3217250733412085
assert
pytest
.
approx
(
T_p
,
rel
=
0.1
)
==
52.035206316407645
assert
pytest
.
approx
(
vabq
,
rel
=
0.1
)
==
20417.58389059
assert
pytest
.
approx
(
v1aq
,
rel
=
0.1
)
==
-
2.88678694
assert
pytest
.
approx
(
v1bq
,
rel
=
0.1
)
==
-
4.31433794
def
test_ibs_Bane
(
model_ring
):
...
...
@@ -116,10 +116,10 @@ def test_ibs_Bane(model_ring):
gval
=
ibs
.
scatter
()
T_x
,
T_y
,
T_p
=
ibs
.
get_scatter_T
(
gval
=
gval
)
ibs
.
kick
(
bunch
,
T_x
,
T_y
,
T_p
)
assert
pytest
.
approx
(
T_x
)
==
218.0367680074528
assert
pytest
.
approx
(
T_y
)
==
22.671331141800803
assert
pytest
.
approx
(
T_p
)
==
65.48600681585525
assert
pytest
.
approx
(
gval
)
==
0.94439633
assert
pytest
.
approx
(
T_x
,
rel
=
0.1
)
==
218.0367680074528
assert
pytest
.
approx
(
T_y
,
rel
=
0.1
)
==
22.671331141800803
assert
pytest
.
approx
(
T_p
,
rel
=
0.1
)
==
65.48600681585525
assert
pytest
.
approx
(
gval
,
rel
=
0.1
)
==
0.94439633
def
test_ibs_CIMP
(
model_ring
):
...
...
@@ -150,8 +150,8 @@ def test_ibs_CIMP(model_ring):
ibs
.
initialize
(
bunch
)
g_ab
,
g_ba
=
ibs
.
scatter
()
T_x
,
T_y
,
T_p
=
ibs
.
get_scatter_T
(
g_ab
=
g_ab
,
g_ba
=
g_ba
)
assert
pytest
.
approx
(
T_x
)
==
214.1723224950628
assert
pytest
.
approx
(
T_y
)
==
22.208894776125746
assert
pytest
.
approx
(
T_p
)
==
64.34338366871349
assert
pytest
.
approx
(
g_ab
)
==
0.83332409
assert
pytest
.
approx
(
g_ba
)
==
1.74674087
assert
pytest
.
approx
(
T_x
,
rel
=
0.1
)
==
214.1723224950628
assert
pytest
.
approx
(
T_y
,
rel
=
0.1
)
==
22.208894776125746
assert
pytest
.
approx
(
T_p
,
rel
=
0.1
)
==
64.34338366871349
assert
pytest
.
approx
(
g_ab
,
rel
=
0.1
)
==
0.83332409
assert
pytest
.
approx
(
g_ba
,
rel
=
0.1
)
==
1.74674087
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment