Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Solar limb detection and correction
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
PRESAGE
Solar limb detection and correction
Commits
3461bda1
Commit
3461bda1
authored
1 year ago
by
Jay Paul Morgan
Browse files
Options
Downloads
Patches
Plain Diff
Improve the detection of limb points
parent
d72b63b7
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
solar_limb_detection/detection.py
+18
-15
18 additions, 15 deletions
solar_limb_detection/detection.py
with
18 additions
and
15 deletions
solar_limb_detection/detection.py
+
18
−
15
View file @
3461bda1
...
...
@@ -50,30 +50,33 @@ class CircleFitter(torch.nn.Module):
def
find_anchors
(
smap
:
sunpy
.
map
.
GenericMap
)
->
torch
.
Tensor
:
x
,
y
=
smap
.
shape
xs
=
np
.
linspace
(
x
//
4
,
x
-
x
//
4
,
69
,
dtype
=
int
)
ys
=
np
.
linspace
(
y
//
4
,
y
-
y
//
4
,
69
,
dtype
=
int
)
inter
=
3
xs
=
np
.
linspace
(
x
//
inter
,
x
-
x
//
inter
,
69
,
dtype
=
int
)
ys
=
np
.
linspace
(
y
//
inter
,
y
-
y
//
inter
,
69
,
dtype
=
int
)
k
=
np
.
array
([
-
1
,
0
,
+
1
]).
reshape
(
1
,
3
)
dy
=
cv2
.
filter2D
(
filters
.
gaussian
(
smap
,
7
),
-
1
,
k
.
reshape
(
-
1
,
1
))
dx
=
cv2
.
filter2D
(
filters
.
gaussian
(
smap
,
7
),
-
1
,
k
)
points
=
[]
for
xi
in
xs
:
# bottom profile
point
=
np
.
argmin
(
dy
[
y
-
(
y
//
4
):,
xi
])
points
.
append
((
xi
,
y
-
y
//
4
+
point
))
for
yi
in
ys
:
# right profile
point
=
np
.
argmin
(
dx
[
yi
,
x
-
x
//
4
:])
points
.
append
((
x
-
x
//
4
+
point
,
yi
))
# bottom profile
point
=
np
.
argmin
(
dy
[
x
-
x
//
inter
:,
yi
])
points
.
append
((
yi
,
x
-
x
//
inter
+
point
))
for
xi
in
xs
:
# top profile
point
=
np
.
argmax
(
dy
[:
y
//
4
,
xi
])
points
.
append
((
xi
,
point
))
# right profile
point
=
np
.
argmin
(
dx
[
xi
,
y
-
y
//
inter
:])
points
.
append
((
y
-
y
//
inter
+
point
,
xi
))
for
yi
in
ys
:
# top profile
point
=
np
.
argmax
(
dy
[:
x
//
inter
,
yi
])
points
.
append
((
yi
,
point
))
for
xi
in
xs
:
# left profile
point
=
np
.
argmax
(
dx
[
y
i
,:
y
//
3
])
points
.
append
((
point
,
y
i
))
point
=
np
.
argmax
(
dx
[
x
i
,:
y
//
inter
])
points
.
append
((
point
,
x
i
))
return
torch
.
Tensor
(
points
)
...
...
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