'Get the mid value of z matrix
:rtype (float) z_avg: average val from z matrix'

def get_z_mid(self):

    if (np and isinstance(self.z, np.ndarray)):
        z_min = np.amin(self.z)
        z_max = np.amax(self.z)
    else:
        z_min = min(min(self.z))
        z_max = max(max(self.z))
    z_mid = ((z_max + z_min) / 2)
    return z_mid
