def dostilt(s, bed_az, bed_dip):
    """
    Rotates "s" tensor to stratigraphic coordinates

    Parameters
    __________
    s : [x11,x22,x33,x12,x23,x13] - the six tensor elements
    bed_az : bedding dip direction
    bed_dip :  bedding dip

    Return
    s_rot : [x11,x22,x33,x12,x23,x13] - after rotation

    """
    tau, Vdirs = doseigs(s)
    Vrot = []
    for evec in Vdirs:
        d, i = dotilt(evec[0], evec[1], bed_az, bed_dip)
        Vrot.append([d, i])
    s_rot = doeigs_s(tau, Vrot)
    return s_rot
def dostilt ( s , bed_az , bed_dip ) : tau , Vdirs = doseigs ( s ) Vrot = [ ] for evec in Vdirs : d , i = dotilt ( evec [ 0 ] , evec [ 1 ] , bed_az , bed_dip ) Vrot . append ( [ d , i ] ) s_rot = doeigs_s ( tau , Vrot ) return s_rot
Rotates "s" tensor to stratigraphic coordinates

    Parameters
    __________
    s : [x11,x22,x33,x12,x23,x13] - the six tensor elements
    bed_az : bedding dip direction
    bed_dip :  bedding dip

    Return
    s_rot : [x11,x22,x33,x12,x23,x13] - after rotation