def dotilt_V(indat):
    """
    Does a tilt correction on an array with rows of dec,inc bedding dip direction and dip.

    Parameters
    ----------
    input : declination, inclination, bedding dip direction and bedding dip
    nested array of [[dec1, inc1, bed_az1, bed_dip1],[dec2,inc2,bed_az2,bed_dip2]...]

    Returns
    -------
    dec,inc : arrays of rotated declination, inclination
    """
    indat = indat.transpose()
    # unpack input array into separate arrays
    dec, inc, bed_az, bed_dip = indat[0], indat[1], indat[2], indat[3]
    rad = old_div(np.pi, 180.)  # convert to radians
    Dir = np.array([dec, inc]).transpose()
    X = dir2cart(Dir).transpose()  # get cartesian coordinates
    N = np.size(dec)

# get some sines and cosines of new coordinate system
    sa, ca = -np.sin(bed_az * rad), np.cos(bed_az * rad)
    cdp, sdp = np.cos(bed_dip * rad), np.sin(bed_dip * rad)
# do the rotation
    xc = X[0] * (sa * sa + ca * ca * cdp) + X[1] * \
        (ca * sa * (1. - cdp)) + X[2] * sdp * ca
    yc = X[0] * ca * sa * (1. - cdp) + X[1] * \
        (ca * ca + sa * sa * cdp) - X[2] * sa * sdp
    zc = X[0] * ca * sdp - X[1] * sdp * sa - X[2] * cdp
# convert back to direction:
    cart = np.array([xc, yc, -zc]).transpose()
    Dir = cart2dir(cart).transpose()
    # return declination, inclination arrays of rotated direction
    return Dir[0], Dir[1]
Does a tilt correction on an array with rows of dec,inc bedding dip direction and dip.

    Parameters
    ----------
    input : declination, inclination, bedding dip direction and bedding dip
    nested array of [[dec1, inc1, bed_az1, bed_dip1],[dec2,inc2,bed_az2,bed_dip2]...]

    Returns
    -------
    dec,inc : arrays of rotated declination, inclination