def METHOD_NAME(self, y) -> list[float]:
    absy = y - self.topMargin
    if self.logarithmicY:
        min_val = self.maxVSWR - self.span
        if self.maxVSWR > 0 and min_val > 0:
            span = math.log(self.maxVSWR) - math.log(min_val)
            step = span / self.dim.height
            val = math.exp(math.log(self.maxVSWR) - absy * step)
        else:
            val = -1
    else:
        val = -1 * ((absy / self.dim.height * self.span) - self.maxVSWR)
    return [val]