FAQ
| This is a
LIVE
service |
Changelog
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
STPT Mosaic Pipeline
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
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
GitLab has been upgraded. See what's new in the
Changelog
.
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Institute of Astronomy
camCEAD
IMAXT
STPT Mosaic Pipeline
Commits
eff3fe07
Unverified
Commit
eff3fe07
authored
5 years ago
by
Carlos Gonzalez-Fernandez
Committed by
Eduardo Gonzalez Solares
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added abs mos pos
parent
58a8ef08
No related branches found
No related tags found
1 merge request
!4
Xarray
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
stpt_pipeline/chi_functions.py
+1
-1
1 addition, 1 deletion
stpt_pipeline/chi_functions.py
stpt_pipeline/stpt_mosaic.py
+25
-2
25 additions, 2 deletions
stpt_pipeline/stpt_mosaic.py
with
26 additions
and
3 deletions
stpt_pipeline/chi_functions.py
+
1
−
1
View file @
eff3fe07
...
...
@@ -341,7 +341,7 @@ def find_overlap_conf( # noqa
r_low_px_0
=
int
(
desp
[
0
])
r_high_px_0
=
img_ref
.
shape
[
0
]
-
1
o_low_px_0
=
0
o_high_px_0
=
img_ref
.
hape
[
0
]
-
int
(
desp
[
0
])
-
1
o_high_px_0
=
img_ref
.
s
hape
[
0
]
-
int
(
desp
[
0
])
-
1
if
desp
[
1
]
<
0
:
r_low_px_1
=
0
...
...
This diff is collapsed.
Click to expand it.
stpt_pipeline/stpt_mosaic.py
+
25
−
2
View file @
eff3fe07
...
...
@@ -156,6 +156,21 @@ class Section:
dy0
=
np
.
round
((
dy
-
dy
.
min
())
/
delta_y
).
astype
(
int
)
return
(
dx0
,
dy0
)
def
get_mos_pos
(
self
)
->
Tuple
[
np
.
ndarray
]:
"""
Find the mosaic grid
Returns
-------
dx, dy
Coordinates of each image in mosaic units
"""
dx
=
np
.
array
(
self
[
'
XPos
'
])
dy
=
np
.
array
(
self
[
'
YPos
'
])
return
(
dx
,
dy
)
def
find_orientation
(
self
,
dx1
:
int
,
dy1
:
int
,
dx2
:
int
,
dy2
:
int
)
->
str
:
"""
Find the relative orientation between grid positions of two images
...
...
@@ -203,6 +218,7 @@ class Section:
dist_conf
=
self
.
get_distconf
()
dx0
,
dy0
=
self
.
find_grid
()
dx_mos
,
dy_mos
=
self
.
get_mos_pos
()
for
i
,
img
in
enumerate
(
img_cube
):
r
=
np
.
sqrt
((
dx0
-
dx0
[
i
])
**
2
+
(
dy0
-
dy0
[
i
])
**
2
)
...
...
@@ -214,8 +230,15 @@ class Section:
if
i
>
this_img
:
continue
desp
=
[(
self
[
'
Xpos
'
][
this_img
]
-
self
[
'
Xpos
'
][
i
])
/
Settings
.
mosaic_scale
,
\
(
self
[
'
Ypos
'
][
this_img
]
-
self
[
'
Ypos
'
][
i
])
/
Settings
.
mosaic_scale
]
desp
=
[(
dx_mos
[
this_img
]
-
dx_mos
[
i
])
/
Settings
.
mosaic_scale
,
\
(
dy_mos
[
this_img
]
-
dy_mos
[
i
])
/
Settings
.
mosaic_scale
]
log
.
info
(
'
Initial offsets i: %d j: %d dx: %d dy: %d
'
,
i
,
this_img
,
desp
[
0
],
desp
[
1
],
)
im_obj
=
da
.
from_zarr
(
img_cube
[
this_img
])
res
=
delayed
(
find_overlap_conf
)(
...
...
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