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
d68ee8fe
Unverified
Commit
d68ee8fe
authored
5 years ago
by
Eduardo Gonzalez Solares
Browse files
Options
Downloads
Patches
Plain Diff
Remove spaces around delimiters
parent
8f6c37cb
No related branches found
No related tags found
1 merge request
!3
Dask
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
stpt_pipeline/chi_functions.py
+21
-21
21 additions, 21 deletions
stpt_pipeline/chi_functions.py
stpt_pipeline/stpt_displacement.py
+2
-2
2 additions, 2 deletions
stpt_pipeline/stpt_displacement.py
with
23 additions
and
23 deletions
stpt_pipeline/chi_functions.py
+
21
−
21
View file @
d68ee8fe
...
...
@@ -264,13 +264,13 @@ def find_overlap_conf(
npx
=
np
.
ones
((
len
(
desp_x
),
len
(
desp_y
)))
for
i
in
range
(
len
(
desp_y
)):
# a slice of the reference image
t_ref
=
img0
[:,
desp_y
[
i
]
:]
err_ref
=
np
.
sqrt
(
img0
[:,
desp_y
[
i
]
:])
# assuming poisson errors
mask_ref
=
mask0
[:,
desp_y
[
i
]
:]
t_ref
=
img0
[:,
desp_y
[
i
]:]
err_ref
=
np
.
sqrt
(
img0
[:,
desp_y
[
i
]:])
# assuming poisson errors
mask_ref
=
mask0
[:,
desp_y
[
i
]:]
# same for the other image
t1
=
img1
[:,
0
:
-
desp_y
[
i
]]
maskt
=
mask1
[:,
0
:
-
desp_y
[
i
]]
err_1
=
np
.
sqrt
(
img1
[:,
0
:
-
desp_y
[
i
]])
t1
=
img1
[:,
0
:
-
desp_y
[
i
]]
maskt
=
mask1
[:,
0
:
-
desp_y
[
i
]]
err_1
=
np
.
sqrt
(
img1
[:,
0
:
-
desp_y
[
i
]])
#
for
j
in
range
(
len
(
desp_x
)):
if
desp_x
[
j
]
<
0
:
...
...
@@ -279,17 +279,17 @@ def find_overlap_conf(
# is positive, negative or zero the indexes need to be generated,
# so there's on branch of the if
temp
=
(
t1
[
np
.
abs
(
desp_x
[
j
])
:,]
*
maskt
[
np
.
abs
(
desp_x
[
j
])
:,
:]
-
t_ref
[
0
:
desp_x
[
j
],]
*
mask_ref
[
0
:
desp_x
[
j
],
:]
t1
[
np
.
abs
(
desp_x
[
j
]):,
]
*
maskt
[
np
.
abs
(
desp_x
[
j
]):,
:]
-
t_ref
[
0
:
desp_x
[
j
],
]
*
mask_ref
[
0
:
desp_x
[
j
],
:]
)
# combined mask
mask_final
=
(
maskt
[
np
.
abs
(
desp_x
[
j
])
:,
:]
+
mask_ref
[
0
:
desp_x
[
j
],
:]
maskt
[
np
.
abs
(
desp_x
[
j
]):,
:]
+
mask_ref
[
0
:
desp_x
[
j
],
:]
)
# and erros added in cuadrature
div_t
=
np
.
sqrt
(
err_ref
[
0
:
desp_x
[
j
],
:]
**
2
+
err_1
[
np
.
abs
(
desp_x
[
j
])
:,]
**
2
err_ref
[
0
:
desp_x
[
j
],
:]
**
2
+
err_1
[
np
.
abs
(
desp_x
[
j
]):,
]
**
2
)
#
elif
desp_x
[
j
]
==
0
:
...
...
@@ -302,14 +302,14 @@ def find_overlap_conf(
else
:
#
temp
=
(
t1
[
0
:
-
desp_x
[
j
],]
*
maskt
[
0
:
-
desp_x
[
j
],]
-
t_ref
[
desp_x
[
j
]
:,]
*
mask_ref
[
desp_x
[
j
]
:,]
t1
[
0
:
-
desp_x
[
j
],
]
*
maskt
[
0
:
-
desp_x
[
j
],
]
-
t_ref
[
desp_x
[
j
]:,
]
*
mask_ref
[
desp_x
[
j
]:,
]
)
#
mask_final
=
maskt
[
0
:
-
desp_x
[
j
],]
+
mask_ref
[
desp_x
[
j
]
:,]
mask_final
=
maskt
[
0
:
-
desp_x
[
j
],
]
+
mask_ref
[
desp_x
[
j
]:,
]
#
div_t
=
np
.
sqrt
(
err_ref
[
np
.
abs
(
desp_x
[
j
])
:,]
**
2
+
err_1
[
0
:
-
desp_x
[
j
],]
**
2
err_ref
[
np
.
abs
(
desp_x
[
j
]):,
]
**
2
+
err_1
[
0
:
-
desp_x
[
j
],
]
**
2
)
#
# if there are not enough good pixels we set chi to 10e7
...
...
@@ -409,16 +409,16 @@ def overlap_images(img0, img1, dx, dy):
delta_y
=
0
overlap
=
np
.
zeros_like
(
big_picture
)
big_picture
[
delta_x
:
delta_x
+
img0
.
shape
[
0
],
delta_y
:
delta_y
+
img0
.
shape
[
1
]
delta_x
:
delta_x
+
img0
.
shape
[
0
],
delta_y
:
delta_y
+
img0
.
shape
[
1
]
]
=
img0
overlap
[
delta_x
:
delta_x
+
img0
.
shape
[
0
],
delta_y
:
delta_y
+
img0
.
shape
[
1
]]
+=
1
overlap
[
delta_x
:
delta_x
+
img0
.
shape
[
0
],
delta_y
:
delta_y
+
img0
.
shape
[
1
]]
+=
1
big_picture
[
delta_x
+
dx
:
delta_x
+
img0
.
shape
[
0
]
+
dx
,
delta_y
+
dy
:
delta_y
+
dy
+
img0
.
shape
[
1
],
delta_x
+
dx
:
delta_x
+
img0
.
shape
[
0
]
+
dx
,
delta_y
+
dy
:
delta_y
+
dy
+
img0
.
shape
[
1
],
]
+=
img1
overlap
[
delta_x
+
dx
:
delta_x
+
img0
.
shape
[
0
]
+
dx
,
delta_y
+
dy
:
delta_y
+
dy
+
img0
.
shape
[
1
],
delta_x
+
dx
:
delta_x
+
img0
.
shape
[
0
]
+
dx
,
delta_y
+
dy
:
delta_y
+
dy
+
img0
.
shape
[
1
],
]
+=
1
#
return
big_picture
,
overlap
This diff is collapsed.
Click to expand it.
stpt_pipeline/stpt_displacement.py
+
2
−
2
View file @
d68ee8fe
...
...
@@ -32,7 +32,7 @@ def med_box(y, half_box=2):
i_min
=
(
i_min
if
i_min
+
2
*
half_box
<=
len
(
y
)
-
1
else
len
(
y
)
-
1
-
2
*
half_box
)
ym
.
append
(
np
.
median
(
y
[
i_min
:
i_min
+
2
*
half_box
]))
ym
.
append
(
np
.
median
(
y
[
i_min
:
i_min
+
2
*
half_box
]))
#
return
np
.
array
(
ym
)
...
...
@@ -57,7 +57,7 @@ def defringe(img):
elif
i
>
fr_img
.
shape
[
1
]
-
5
:
t
=
np
.
median
(
img
[:,
-
10
:],
1
)
else
:
t
=
np
.
median
(
img
[:,
i
-
5
:
i
+
5
],
1
)
t
=
np
.
median
(
img
[:,
i
-
5
:
i
+
5
],
1
)
#
fr_img
[:,
i
]
=
img
[:,
i
]
-
med_box
(
t
,
5
)
#
...
...
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