def apply_range_correction(signal, altitude):
    """
    Apply range correction, i.e. multiply with z^2.

    The signal can be either a 1D array or a 2D array with dimensions (time, range).
    The input signal should have already been corrected for background offset.

    Parameters
    ----------
    signal: array
       The input signal array
    altitude: array
       The altitude array. It should be the same size as the signal.

    Returns
    -------
    rcs: array
       The range corrected signal.

    """
    rcs = signal * altitude ** 2
    return rcs
