Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EveryBeam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Peijin Zhang
EveryBeam
Commits
c8ce10ba
Commit
c8ce10ba
authored
4 years ago
by
Bas van der Tol
Browse files
Options
Downloads
Patches
Plain Diff
Flip axis instead of sign of phi
parent
4e5f245f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
demo/comparison-oskar/read_oskar_beams.py
+2
-2
2 additions, 2 deletions
demo/comparison-oskar/read_oskar_beams.py
with
2 additions
and
2 deletions
demo/comparison-oskar/read_oskar_beams.py
+
2
−
2
View file @
c8ce10ba
...
@@ -27,7 +27,7 @@ def read_oskar_beams():
...
@@ -27,7 +27,7 @@ def read_oskar_beams():
if
A
is
None
:
if
A
is
None
:
N
=
d
.
shape
[
-
1
]
N
=
d
.
shape
[
-
1
]
A
=
np
.
zeros
((
N
,
N
,
2
,
2
),
dtype
=
np
.
complex128
)
A
=
np
.
zeros
((
N
,
N
,
2
,
2
),
dtype
=
np
.
complex128
)
A
[:,
:,
i
,
j
]
=
d
A
[:,
:,
i
,
j
]
=
d
[::
-
1
,
:]
N
=
A
.
shape
[
0
]
N
=
A
.
shape
[
0
]
for
i
in
range
(
N
):
for
i
in
range
(
N
):
...
@@ -39,7 +39,7 @@ def read_oskar_beams():
...
@@ -39,7 +39,7 @@ def read_oskar_beams():
# Need to swap the sign of phi to get the transformation right
# Need to swap the sign of phi to get the transformation right
# Still need to figure out why
# Still need to figure out why
phi
=
-
phi
#
phi = -phi
e_theta
=
np
.
array
([[
np
.
cos
(
phi
)],
[
np
.
sin
(
phi
)]])
e_theta
=
np
.
array
([[
np
.
cos
(
phi
)],
[
np
.
sin
(
phi
)]])
e_phi
=
np
.
array
([[
-
np
.
sin
(
phi
)],
[
np
.
cos
(
phi
)]])
e_phi
=
np
.
array
([[
-
np
.
sin
(
phi
)],
[
np
.
cos
(
phi
)]])
...
...
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