Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
resolve
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
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
ift
resolve
Merge requests
!48
Polarization response
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Polarization response
add_polarization_radio_response
into
master
Overview
2
Commits
13
Pipelines
12
Changes
4
Merged
Jakob Roth
requested to merge
add_polarization_radio_response
into
master
1 year ago
Overview
2
Commits
13
Pipelines
12
Changes
4
Expand
0
0
Merge request reports
Compare
master
version 11
e4b6315c
1 year ago
version 10
fe64784f
1 year ago
version 9
21dbdec7
1 year ago
version 8
21ad26b5
1 year ago
version 7
0ee82e90
1 year ago
version 6
c40db512
1 year ago
version 5
4ba7d311
1 year ago
version 4
f646ea75
1 year ago
version 3
60aba6d4
1 year ago
version 2
dcf61f6e
1 year ago
version 1
66c35536
1 year ago
master (base)
and
latest version
latest version
7c7fa2d8
13 commits,
1 year ago
version 11
e4b6315c
12 commits,
1 year ago
version 10
fe64784f
11 commits,
1 year ago
version 9
21dbdec7
11 commits,
1 year ago
version 8
21ad26b5
10 commits,
1 year ago
version 7
0ee82e90
9 commits,
1 year ago
version 6
c40db512
6 commits,
1 year ago
version 5
4ba7d311
5 commits,
1 year ago
version 4
f646ea75
4 commits,
1 year ago
version 3
60aba6d4
3 commits,
1 year ago
version 2
dcf61f6e
2 commits,
1 year ago
version 1
66c35536
1 commit,
1 year ago
4 files
+
62
−
13
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
resolve/re/response.py
+
13
−
2
Options
@@ -19,12 +19,23 @@ def get_binbounds(coordinates):
def
convert_polarization
(
inp
,
inp_pol
,
out_pol
):
if
inp_pol
==
(
"
I
"
,):
if
inp_pol
==
(
"
I
"
,
"
Q
"
,
"
U
"
,
"
V
"
):
if
out_pol
==
(
"
RR
"
,
"
RL
"
,
"
LR
"
,
"
LL
"
):
mat_stokes_to_circular
=
jnp
.
array
(
[[
1
,
0
,
0
,
1
],
[
0
,
1
,
1
,
0
],
[
0
,
1j
,
-
1j
,
0
],
[
1
,
0
,
0
,
-
1
]]
)
return
jnp
.
tensordot
(
mat_stokes_to_circular
,
inp
,
axes
=
([
0
],
[
0
]))
elif
out_pol
==
(
"
XX
"
,
"
XY
"
,
"
YX
"
,
"
YY
"
):
mat_stokes_to_linear
=
jnp
.
array
(
[[
1
,
1
,
0
,
0
],
[
1
,
-
1
,
0
,
0
],
[
0
,
0
,
1
,
1
],
[
0
,
0
,
1j
,
-
1j
]]
)
return
jnp
.
tensordot
(
mat_stokes_to_linear
,
inp
,
axes
=
([
0
],
[
0
]))
elif
inp_pol
==
(
"
I
"
,):
if
out_pol
==
(
"
LL
"
,
"
RR
"
)
or
out_pol
==
(
"
XX
"
,
"
YY
"
):
new_shp
=
list
(
inp
.
shape
)
new_shp
[
0
]
=
2
return
jnp
.
broadcast_to
(
inp
,
new_shp
)
if
len
(
out_pol
)
==
1
and
out_pol
[
0
]
in
(
"
I
"
,
"
RR
"
,
"
LL
"
,
"
XX
"
,
"
yy
"
):
if
len
(
out_pol
)
==
1
and
out_pol
[
0
]
in
(
"
I
"
,
"
RR
"
,
"
LL
"
,
"
XX
"
,
"
YY
"
):
return
inp
err
=
f
"
conversion of polarization
{
inp_pol
}
to
{
out_pol
}
not implemented. Please implement!
"
raise
NotImplementedError
(
err
)
Loading