@@ -49,12 +49,12 @@ def get_phi(self,position):
49
49
50
50
51
51
def aperture_distance (self ,position1 , position2 ):
52
+ pos1_s = self .cart2surface (position = position1 )
52
53
if position2 is None :
53
- return np . sqrt ( self . get_surface_length ( position = position1 )[ 0 ] ** 2 + self . get_surface_length ( position = position1 )[ 1 ] ** 2 )
54
+ pos2_s = ( 0.0 , 0.0 )
54
55
else :
55
- pos1_s = self .cart2surface (position = position1 )
56
56
pos2_s = self .cart2surface (position = position2 )
57
- return (np .sqrt ( (pos1_s [0 ]- pos2_s [0 ])** 2 + (pos1_s [1 ]- pos2_s [1 ])** 2 ))
57
+ return (np .sqrt ( (pos1_s [0 ]- pos2_s [0 ])** 2 + (pos1_s [1 ]- pos2_s [1 ])** 2 ))
58
58
59
59
def cart2surface (self , position ):
60
60
return (self .ROC [0 ]* self .get_theta (position = position ), self .ROC [1 ]* self .get_phi (position = position ))
@@ -64,8 +64,8 @@ def surface2cart(self,position_s):
64
64
self .ROC [0 ]* np .sin (position_s [0 ]/ self .ROC [0 ]),
65
65
self .ROC [1 ]* np .sin (position_s [1 ]/ self .ROC [1 ]),
66
66
np .where (self .ROC [0 ]- self .ROC [0 ]* np .cos (position_s [0 ]/ self .ROC [0 ])> self .ROC [1 ]- self .ROC [1 ]* np .cos (position_s [1 ]/ self .ROC [1 ]),
67
- self .ROC [0 ]- self . ROC [ 0 ] * np .cos (position_s [0 ]/ self .ROC [0 ]),
68
- self .ROC [1 ]- self . ROC [ 1 ] * np .cos (position_s [1 ]/ self .ROC [1 ])
67
+ self .ROC [0 ]* np .cos (position_s [0 ]/ self .ROC [0 ])- self . ROC [ 0 ] ,
68
+ self .ROC [1 ]* np .cos (position_s [1 ]/ self .ROC [1 ])- self . ROC [ 1 ]
69
69
)
70
70
))
71
71
0 commit comments