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
9fc46e9c
Commit
9fc46e9c
authored
10 months ago
by
Keon Hee KIM
Browse files
Options
Downloads
Patches
Plain Diff
Corrected some typos
parent
b74830df
No related branches found
No related tags found
2 merge requests
!14
Faster CircularResistiveWall
,
!3
Yokoya elliptic (reopened)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mbtrack2/utilities/misc.py
+11
-8
11 additions, 8 deletions
mbtrack2/utilities/misc.py
with
11 additions
and
8 deletions
mbtrack2/utilities/misc.py
+
11
−
8
View file @
9fc46e9c
...
...
@@ -221,7 +221,8 @@ def yokoya_elliptic(x_radius, y_radius):
small_semiaxis
=
x_radius
large_semiaxis
=
y_radius
# Our equations are approximately valid only for qr (ratio) values less than or equal to 0.8.
# Our equations are approximately valid only for qr (ratio) values
# less than or equal to 0.8.
qr_th
=
0.8
F
=
np
.
sqrt
(
large_semiaxis
**
2
-
small_semiaxis
**
2
)
mu_b
=
np
.
arccosh
(
large_semiaxis
/
F
)
...
...
@@ -305,14 +306,15 @@ def yokoya_elliptic(x_radius, y_radius):
ff_values
=
np
.
array
(
function_ff
(
small_semiaxis_th
,
F_th
,
mu_b_th
,
ip
,
il
))
L_values
=
np
.
array
(
function_L
(
mu_b_th
,
ip
,
il
))
coeff_long
=
np
.
where
((
ip
==
0
)
&
(
il
==
0
),
0.25
,
np
.
where
((
ip
==
0
)
|
(
il
==
0
),
0.5
,
1.0
))
coeff_long
=
np
.
where
(
(
ip
==
0
)
&
(
il
==
0
),
0.25
,
np
.
where
((
ip
==
0
)
|
(
il
==
0
),
0.5
,
1.0
)
)
coeff_quad
=
np
.
where
(
il
==
0
,
0.5
,
1.0
)
yoklong
=
np
.
sum
(
coeff_long
*
ff_values
[
0
]
*
L_values
[
0
])
yokxdip
=
np
.
sum
(
ff_values
[
1
]
*
L_values
[
1
])
yokydip
=
np
.
sum
(
ff_values
[
2
]
*
L_values
[
2
])
yokxquad
=
-
np
.
sum
(
coeff_quad
*
ff_values
[
3
]
*
L_values
[
0
])
yokyquad
=
-
yokxquad
yoklong
_th
=
np
.
sum
(
coeff_long
*
ff_values
[
0
]
*
L_values
[
0
])
yokxdip
_th
=
np
.
sum
(
ff_values
[
1
]
*
L_values
[
1
])
yokydip
_th
=
np
.
sum
(
ff_values
[
2
]
*
L_values
[
2
])
yokxquad
_th
=
-
np
.
sum
(
coeff_quad
*
ff_values
[
3
]
*
L_values
[
0
])
yokyquad
_th
=
-
yokxquad
_th
if
y_radius
>
x_radius
:
yokxdip_th
,
yokydip_th
=
yokydip_th
,
yokxdip_th
...
...
@@ -344,7 +346,8 @@ def yokoya_elliptic(x_radius, y_radius):
ff_values
=
np
.
array
(
function_ff
(
small_semiaxis
,
F
,
mu_b
,
ip
,
il
))
L_values
=
np
.
array
(
function_L
(
mu_b
,
ip
,
il
))
coeff_long
=
np
.
where
((
ip
==
0
)
&
(
il
==
0
),
0.25
,
np
.
where
((
ip
==
0
)
|
(
il
==
0
),
0.5
,
1.0
))
coeff_long
=
np
.
where
(
(
ip
==
0
)
&
(
il
==
0
),
0.25
,
np
.
where
((
ip
==
0
)
|
(
il
==
0
),
0.5
,
1.0
)
)
coeff_quad
=
np
.
where
(
il
==
0
,
0.5
,
1.0
)
yoklong
=
np
.
sum
(
coeff_long
*
ff_values
[
0
]
*
L_values
[
0
])
...
...
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