# -*- coding: utf-8 -*-

from numpy import arcsin, cos, exp, pi, sin, tan


def comp_height(self):
    """Compute the height of the Slot.
    Caution, the bottom of the Slot is an Arc

    Parameters
    ----------
    self : SlotW14
        A SlotW14 object

    Returns
    -------
    Htot: float
        Height of the slot [m]

    """

    Rbo = self.get_Rbo()

    point_dict = self._comp_point_coordinate()
    Z4 = point_dict["Z4"]
    Z5 = point_dict["Z5"]

    if self.is_outwards():
        return abs(Z5) - Rbo
    else:
        return Rbo - abs(Z4)
