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
b3990e81
Commit
b3990e81
authored
Dec 13, 2023
by
Francois POLACK
Browse files
Options
Downloads
Patches
Plain Diff
fix: Bug in datx openfilefunction
Improved convergence info of conic fit
parent
98eb23bf
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
heightmap.py
+0
-1
0 additions, 1 deletion
heightmap.py
processing.py
+15
-1
15 additions, 1 deletion
processing.py
with
15 additions
and
2 deletions
heightmap.py
+
0
−
1
View file @
b3990e81
...
@@ -153,7 +153,6 @@ class HeightMap(object):
...
@@ -153,7 +153,6 @@ class HeightMap(object):
datfile
=
ZygoXYZ
.
XYZfile
()
datfile
=
ZygoXYZ
.
XYZfile
()
elif
Path
(
filename
).
suffix
==
"
.datx
"
:
elif
Path
(
filename
).
suffix
==
"
.datx
"
:
datfile
=
ZygoDatx
.
DatxFile
()
datfile
=
ZygoDatx
.
DatxFile
()
datfile
.
info
()
else
:
else
:
print
(
"
Unknown file type:
"
,
Path
(
filename
).
suffix
)
print
(
"
Unknown file type:
"
,
Path
(
filename
).
suffix
)
return
False
return
False
...
...
This diff is collapsed.
Click to expand it.
processing.py
+
15
−
1
View file @
b3990e81
...
@@ -363,7 +363,21 @@ def fit_conic_cylinder(xin,yin,z, guess=None,variability=(0,1,1,1,0,1)):
...
@@ -363,7 +363,21 @@ def fit_conic_cylinder(xin,yin,z, guess=None,variability=(0,1,1,1,0,1)):
i
+=
1
i
+=
1
print
(
'
initial parameters
'
,
initparam
)
print
(
'
initial parameters
'
,
initparam
)
result
=
scipy
.
optimize
.
least_squares
(
residuals
,
initparam
,
method
=
'
lm
'
)
result
=
scipy
.
optimize
.
least_squares
(
residuals
,
initparam
,
method
=
'
lm
'
)
print
(
'
optimisation status
'
,
result
.
status
)
if
result
.
status
==
-
1
:
endmsg
=
"
Badinput parameters
"
elif
result
.
status
==
0
:
endmsg
=
"
Convergence not reached
"
elif
result
.
status
==
1
:
endmsg
=
"
Gradient convergence stalling
"
elif
result
.
status
==
2
:
endmsg
=
"
Cost function minimized
"
elif
result
.
status
==
3
:
endmsg
=
"
Parameter convergence stalling
"
elif
result
.
status
==
4
:
endmsg
=
"
cost function and pameter convergence
"
print
(
'
optimisation status
'
,
result
.
status
,
endmsg
)
print
(
'
parameters
'
,
tuple
(
result
.
x
))
print
(
'
parameters
'
,
tuple
(
result
.
x
))
print
(
'
cost value
'
,
result
.
cost
)
print
(
'
cost value
'
,
result
.
cost
)
ze
=
np
.
ma
.
array
(
np
.
zeros
(
z
.
shape
),
mask
=
z
.
mask
)
ze
=
np
.
ma
.
array
(
np
.
zeros
(
z
.
shape
),
mask
=
z
.
mask
)
...
...
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