Skip to content
Snippets Groups Projects
Commit 86886d0a authored by Francois POLACK's avatar Francois POLACK
Browse files

feat: Curvatures added to the HeightMap class attributes

parent fca41f74
No related branches found
No related tags found
No related merge requests found
...@@ -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("\nRemove best toroid with axis orientation {:.3f}mrad=".format(1e3*rot)) print("\nRemove 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment