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
d4b5a253
Commit
d4b5a253
authored
11 months ago
by
Julian Rüstig
Browse files
Options
Downloads
Patches
Plain Diff
multi: separate out the calculation of center (xy)
parent
e9a774fc
No related branches found
No related tags found
1 merge request
!50
Draft: Mosaic imaging
Pipeline
#230201
failed
11 months ago
Stage: build_docker
Stage: testing
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
resolve/mosaicing/mosaic_likelihood.py
+0
-1
0 additions, 1 deletion
resolve/mosaicing/mosaic_likelihood.py
resolve/mosaicing/sky_beamer.py
+25
-5
25 additions, 5 deletions
resolve/mosaicing/sky_beamer.py
with
25 additions
and
6 deletions
resolve/mosaicing/mosaic_likelihood.py
+
0
−
1
View file @
d4b5a253
...
@@ -121,7 +121,6 @@ def build_response(
...
@@ -121,7 +121,6 @@ def build_response(
If true w-gridding will be applied
If true w-gridding will be applied
epsilon: float
epsilon: float
The desired accuracy of sky2vis.
The desired accuracy of sky2vis.
"""
"""
domain
=
sky_beamer
.
target
[
field_name
]
domain
=
sky_beamer
.
target
[
field_name
]
...
...
...
...
This diff is collapsed.
Click to expand it.
resolve/mosaicing/sky_beamer.py
+
25
−
5
View file @
d4b5a253
...
@@ -71,6 +71,27 @@ class SkyBeamer(ift.LinearOperator):
...
@@ -71,6 +71,27 @@ class SkyBeamer(ift.LinearOperator):
return
ift
.
makeField
(
self
.
_tgt
(
mode
),
res
)
return
ift
.
makeField
(
self
.
_tgt
(
mode
),
res
)
def
calculate_phase_offset_to_image_center
(
sky_center
:
SkyCoord
,
phase_center
:
SkyCoord
,
):
'''
Calculate the relative shift of the phase center to the sky center
(reconstruction center) in radians.
Parameters
----------
sky_center: astropy.SkyCoord
The world coordinate of the sky center.
phase_center: astropy.SkyCoord
The world coordinate of the phase center of the observation.
'''
r
=
sky_center
.
separation
(
phase_center
)
phi
=
sky_center
.
position_angle
(
phase_center
)
center_y
=
r
.
to
(
u
.
rad
).
value
*
np
.
cos
(
phi
.
to
(
u
.
rad
).
value
)
center_x
=
r
.
to
(
u
.
rad
).
value
*
np
.
sin
(
phi
.
to
(
u
.
rad
).
value
)
return
center_x
,
center_y
def
build_sky_beamer
(
def
build_sky_beamer
(
sky_domain
:
ift
.
DomainTuple
,
sky_domain
:
ift
.
DomainTuple
,
sky_center
:
SkyCoord
,
sky_center
:
SkyCoord
,
...
@@ -121,14 +142,13 @@ def build_sky_beamer(
...
@@ -121,14 +142,13 @@ def build_sky_beamer(
):
):
direction
=
oo
.
direction_from_key
(
direction_key
)
direction
=
oo
.
direction_from_key
(
direction_key
)
o_phase_center
=
SkyCoord
(
direction
.
phase_center
[
0
]
*
u
.
rad
,
o_phase_center
=
SkyCoord
(
direction
.
phase_center
[
0
]
*
u
.
rad
,
direction
.
phase_center
[
1
]
*
u
.
rad
,
direction
.
phase_center
[
1
]
*
u
.
rad
,
frame
=
sky_center
.
frame
)
frame
=
sky_center
.
frame
)
r
=
sky_center
.
separation
(
o_phase_center
)
phi
=
sky_center
.
position_angle
(
o_phas
e_center
)
center_x
,
center_y
=
calculate_phase_offset_to_imag
e_center
(
center_y
=
r
.
to
(
u
.
rad
).
value
*
np
.
cos
(
phi
.
to
(
u
.
rad
).
value
)
sky_center
,
o_phase_center
center_x
=
r
.
to
(
u
.
rad
).
value
*
np
.
sin
(
phi
.
to
(
u
.
rad
).
value
)
)
x
=
sky_coords
.
separation
(
o_phase_center
)
x
=
sky_coords
.
separation
(
o_phase_center
)
x
=
x
.
to
(
u
.
rad
).
value
x
=
x
.
to
(
u
.
rad
).
value
...
...
...
...
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
sign in
to comment