Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Superflat_scripts
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
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OPTIQUE
LEAPS
Superflat_scripts
Commits
86886d0a
Commit
86886d0a
authored
May 31, 2023
by
Francois POLACK
Browse files
Options
Downloads
Patches
Plain Diff
feat: Curvatures added to the HeightMap class attributes
parent
fca41f74
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
heightmap.py
+11
-1
11 additions, 1 deletion
heightmap.py
with
11 additions
and
1 deletion
heightmap.py
+
11
−
1
View file @
86886d0a
...
@@ -96,6 +96,11 @@ class HeightMap(object):
...
@@ -96,6 +96,11 @@ class HeightMap(object):
## detrending method used
## detrending method used
self
.
detrend
=
None
self
.
detrend
=
None
## memorization of detrend curvatures & orientation
self
.
angle
=
None
self
.
Cx
=
None
self
.
Cy
=
None
...
@@ -232,6 +237,7 @@ class HeightMap(object):
...
@@ -232,6 +237,7 @@ class HeightMap(object):
angle
=
math
.
atan
(
xy
/
d
)
angle
=
math
.
atan
(
xy
/
d
)
d
/=
math
.
cos
(
angle
)
d
/=
math
.
cos
(
angle
)
angle
=
0.5
*
(
angle
)
angle
=
0.5
*
(
angle
)
# here Cx and Cy are not the curvatures but the 2nd degree coefficients of polynomial expansion when ratoated
Cx
=
0.5
*
(
x2
+
y2
+
d
)
Cx
=
0.5
*
(
x2
+
y2
+
d
)
Cy
=
0.5
*
(
x2
+
y2
-
d
)
Cy
=
0.5
*
(
x2
+
y2
-
d
)
...
@@ -268,6 +274,10 @@ class HeightMap(object):
...
@@ -268,6 +274,10 @@ class HeightMap(object):
print
(
"
\n
Remove best toroid with axis orientation {:.3f}mrad=
"
.
format
(
1e3
*
rot
))
print
(
"
\n
Remove best toroid with axis orientation {:.3f}mrad=
"
.
format
(
1e3
*
rot
))
(
fitparams
,
self
.
ze
)
=
fit_toroid
(
self
.
x
,
self
.
y
,
self
.
z
,
rot
)
(
fitparams
,
self
.
ze
)
=
fit_toroid
(
self
.
x
,
self
.
y
,
self
.
z
,
rot
)
(
Z0
,
pitch
,
roll
,
x2
,
y2
)
=
fitparams
(
Z0
,
pitch
,
roll
,
x2
,
y2
)
=
fitparams
self
.
angle
=
rot
# these are the removed curvatures = 1/R
self
.
Cx
=
2
*
x2
self
.
Cy
=
2
*
y2
try
:
try
:
ry
=
0.5
/
y2
ry
=
0.5
/
y2
...
...
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