Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Knoten
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
aflab
astrogeology
Knoten
Commits
6e06809e
Commit
6e06809e
authored
1 year ago
by
Amy Stamile
Browse files
Options
Downloads
Patches
Plain Diff
clean up docs
parent
e35fc471
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
knoten/shape.py
+7
-4
7 additions, 4 deletions
knoten/shape.py
knoten/utils.py
+0
-1
0 additions, 1 deletion
knoten/utils.py
with
7 additions
and
5 deletions
knoten/shape.py
+
7
−
4
View file @
6e06809e
...
@@ -5,7 +5,7 @@ import csmapi
...
@@ -5,7 +5,7 @@ import csmapi
class
Ellipsoid
:
class
Ellipsoid
:
"""
"""
A biaxial ellipsoid shape model.
A biaxial
or triaxial
ellipsoid shape model.
"""
"""
def
__init__
(
self
,
semi_major
,
semi_minor
=
None
,
median
=
None
):
def
__init__
(
self
,
semi_major
,
semi_minor
=
None
,
median
=
None
):
...
@@ -15,9 +15,11 @@ class Ellipsoid:
...
@@ -15,9 +15,11 @@ class Ellipsoid:
Parameters
Parameters
----------
----------
semi_major : float
semi_major : float
The equatorial semi-major radius of the ellipsoid
.
Length of ellipsoid semi-axis along the x-axis
.
semi_minor : float
semi_minor : float
The polar semi-minor radius of the ellipsoid.
Length of ellipsoid semi-axis along the z-axis.
median : float
Length of ellipsoid semi-axis along the y-axis.
"""
"""
self
.
a
=
semi_major
self
.
a
=
semi_major
self
.
b
=
semi_major
self
.
b
=
semi_major
...
@@ -35,6 +37,7 @@ class Ellipsoid:
...
@@ -35,6 +37,7 @@ class Ellipsoid:
semi_major
,
semi_minor
=
csm
.
get_radii
(
sensor
)
semi_major
,
semi_minor
=
csm
.
get_radii
(
sensor
)
return
cls
(
semi_major
,
semi_minor
)
return
cls
(
semi_major
,
semi_minor
)
def
get_surface_normal
(
self
,
ground_pt
):
def
get_surface_normal
(
self
,
ground_pt
):
"""
"""
Given a ground point, calculate the surface normal.
Given a ground point, calculate the surface normal.
...
...
This diff is collapsed.
Click to expand it.
knoten/utils.py
+
0
−
1
View file @
6e06809e
...
@@ -29,7 +29,6 @@ def sep_angle(a_vec, b_vec):
...
@@ -29,7 +29,6 @@ def sep_angle(a_vec, b_vec):
: np.ndarray
: np.ndarray
"""
"""
dot_prod
=
a_vec
.
x
*
b_vec
.
x
+
a_vec
.
y
*
b_vec
.
y
+
a_vec
.
z
*
b_vec
.
z
dot_prod
=
a_vec
.
x
*
b_vec
.
x
+
a_vec
.
y
*
b_vec
.
y
+
a_vec
.
z
*
b_vec
.
z
print
(
dot_prod
)
dot_prod
/=
magnitude
(
a_vec
)
*
magnitude
(
b_vec
)
dot_prod
/=
magnitude
(
a_vec
)
*
magnitude
(
b_vec
)
if
(
dot_prod
>=
1.0
):
return
0.0
if
(
dot_prod
>=
1.0
):
return
0.0
...
...
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