@@ -426,21 +426,19 @@ def __init__(self, **kwargs):
426426 EllipseBEMSource .__init__ (self , ** kwargs )
427427
428428 def outline (self , cs = "xy" , npoints = 50 ):
429- return num .flipud (
430- get_ellipse_points (
431- self .lon ,
432- self .lat ,
433- self .east_shift ,
434- self .north_shift ,
435- self .a_half_axis ,
436- self .b_half_axis ,
437- self .dip ,
438- self .plunge ,
439- self .strike ,
440- cs = cs ,
441- npoints = npoints ,
429+ return get_ellipse_points (
430+ self .lon ,
431+ self .lat ,
432+ self .east_shift ,
433+ self .north_shift ,
434+ self .a_half_axis ,
435+ self .b_half_axis ,
436+ self .dip ,
437+ self .plunge ,
438+ self .strike ,
439+ cs = cs ,
440+ npoints = npoints ,
442441 )
443- )
444442
445443 def get_source_surface (self , geom , mesh_size ):
446444 self ._init_points_geometry (
@@ -948,10 +946,10 @@ def get_ellipse_points(
948946
949947 ring = num .linspace (0 , 2 * num .pi , npoints )
950948 ellipse = num .array (
951- [b_half_axis_rot * num .cos (ring ), a_half_axis_rot * num .sin (ring )]
952- )
949+ [a_half_axis_rot * num .sin (ring ), b_half_axis_rot * num .cos (ring )]
950+ ) # y, x | lat, lon
953951
954- strike_rad = - strike * DEG2RAD
952+ strike_rad = - ( strike + 90 ) * DEG2RAD
955953 rot_strike = num .array (
956954 [
957955 [num .cos (strike_rad ), - num .sin (strike_rad )],
@@ -961,9 +959,10 @@ def get_ellipse_points(
961959 ellipse_rot = rot_strike .dot (ellipse )
962960
963961 points = num .atleast_2d (num .zeros ([npoints , 2 ]))
964- points [:, 0 ] += ellipse_rot [1 , :] + north_shift
965- points [:, 1 ] += ellipse_rot [0 , :] + east_shift
962+ points [:, 0 ] += ellipse_rot [0 , :] + north_shift
963+ points [:, 1 ] += ellipse_rot [1 , :] + east_shift
966964
965+ # breakpoint()
967966 if cs == "xy" :
968967 return points
969968 elif cs in ("latlon" , "lonlat" ):
0 commit comments