Ellipse

class nrv.utils.geom.Ellipse(center: tuple[float, float] = (0, 0), radius: tuple[float, float] = (10, 10), rot: float = None, degree: bool = False)[source]

Ellipse class that inherits from Cshape. Represents an ellipse with a center, semi-major axis, and semi-minor axis.

Attributes

Ellipse.area

Area of the shape in $mu m^2$

Ellipse.bbox

Coordinate of the bounding box as a numpy.ndarray`in the following format :math:`y_{min}, z_{min}, y_{max}, z_{max}.

Ellipse.bbox_size

Size of the bounding bounding box of the shape.

Ellipse.c

Ellipse.is_rot

Ellipse.perimeter

Perimeter of the shape in $mu m^2$

Ellipse.r

Ellipse.rot_mat

rotation matrix

Ellipse.rot_mat_inverse

Inverse rotation matrix

Ellipse.x

Ellipse.y

Ellipse.z

Methods

Ellipse.__init__([center, radius, rot, degree])

Initializes the Ellipse

Ellipse.get_parameters()

Generic method returning all the atributes of an NRV_class instance

Ellipse.get_point_inside([n_pts, delta])

Returns n points coordinate randomly picked inside the shape

Ellipse.get_trace([n_theta])

Returns the trace of the geometry as a list of points.

Ellipse.is_inside(point[, delta, for_all])

Checks if a given point is inside the C-shape.

Ellipse.load(data[, blacklist])

Generic loading method for NRV_class instance

Ellipse.plot(axes[, n_tetha, add_center])

plot the border of the shape

Ellipse.plot_bbox(axes, *args, **kwgs)

plot the border of the shape

Ellipse.rotate(angle[, degree])

Rotate the shape.

Ellipse.save([save, fname, blacklist])

Generic saving method for NRV_class instance.

Ellipse.set_parameters(**kawrgs)

Generic method to set any attribute of NRV_class instance

Ellipse.translate([y, z])

Translate the shape.