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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ift
resolve
Commits
60aba6d4
Commit
60aba6d4
authored
May 17, 2024
by
Jakob Roth
Browse files
Options
Downloads
Patches
Plain Diff
re.response: formatting
parent
dcf61f6e
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!48
Polarization response
Pipeline
#205293
passed
May 17, 2024
Stage: build_docker
Stage: testing
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
resolve/re/response.py
+11
-13
11 additions, 13 deletions
resolve/re/response.py
with
11 additions
and
13 deletions
resolve/re/response.py
+
11
−
13
View file @
60aba6d4
...
@@ -19,18 +19,16 @@ def get_binbounds(coordinates):
...
@@ -19,18 +19,16 @@ def get_binbounds(coordinates):
def
convert_polarization
(
inp
,
inp_pol
,
out_pol
):
def
convert_polarization
(
inp
,
inp_pol
,
out_pol
):
mat_stokes_to_circular
=
jnp
.
array
([[
1
,
0
,
0
,
1
],
mat_stokes_to_circular
=
jnp
.
array
(
[
0
,
1
,
1j
,
0
],
[[
1
,
0
,
0
,
1
],
[
0
,
1
,
1j
,
0
],
[
0
,
1
,
-
1j
,
0
],
[
1
,
0
,
0
,
-
1
]]
[
0
,
1
,
-
1j
,
0
],
)
[
1
,
0
,
0
,
-
1
]])
mat_stokes_to_linear
=
jnp
.
array
(
mat_stokes_to_linear
=
jnp
.
array
([[
1
,
1
,
0
,
0
],
[[
1
,
1
,
0
,
0
],
[
1
,
-
1
,
0
,
0
],
[
0
,
0
,
1
,
1j
],
[
0
,
0
,
1
,
-
1j
]]
[
1
,
-
1
,
0
,
0
],
)
[
0
,
0
,
1
,
1j
],
if
set
(
inp_pol
)
==
{
"
I
"
,
"
Q
"
,
"
U
"
,
"
V
"
}:
[
0
,
0
,
1
,
-
1j
]])
if
set
(
out_pol
)
==
{
"
RR
"
,
"
RL
"
,
"
LR
"
,
"
LL
"
}:
if
set
(
inp_pol
)
==
{
'
I
'
,
'
Q
'
,
'
U
'
,
'
V
'
}:
if
set
(
out_pol
)
==
{
'
RR
'
,
'
RL
'
,
'
LR
'
,
'
LL
'
}:
return
jnp
.
tensordot
(
mat_stokes_to_circular
,
inp
,
axes
=
([
0
],
[
0
]))
return
jnp
.
tensordot
(
mat_stokes_to_circular
,
inp
,
axes
=
([
0
],
[
0
]))
elif
set
(
out_pol
)
==
{
'
XX
'
,
'
XY
'
,
'
YX
'
,
'
YY
'
}:
elif
set
(
out_pol
)
==
{
"
XX
"
,
"
XY
"
,
"
YX
"
,
"
YY
"
}:
return
jnp
.
tensordot
(
mat_stokes_to_linear
,
inp
,
axes
=
([
0
],
[
0
]))
return
jnp
.
tensordot
(
mat_stokes_to_linear
,
inp
,
axes
=
([
0
],
[
0
]))
elif
inp_pol
==
(
"
I
"
,):
elif
inp_pol
==
(
"
I
"
,):
if
out_pol
==
(
"
LL
"
,
"
RR
"
)
or
out_pol
==
(
"
XX
"
,
"
YY
"
):
if
out_pol
==
(
"
LL
"
,
"
RR
"
)
or
out_pol
==
(
"
XX
"
,
"
YY
"
):
...
...
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