src/bvhtoolbox/convert/csv2bvh.py
def _df_to_channels(df):
    """ Map channels from degrees of freedom to joint names.
    
    :param df: These are the columns names of the rotations.csv.
    :type df: list
    :return: Dictionary with joint names as keys and list of rotation channels as values.
    :rtype: dict
    """
    # Get a version of df that does not contain 'time'.
    dof = df.copy()
    dof.remove('time')
    joints = df_to_joints(df)
    joint_channels = dict()
    try:
        for joint in joints:
            joint_channels[joint] = [ch.split('.')[1].upper() + "rotation" for ch in dof if joint == ch.split('.')[0]]
    except IndexError:
        raise ValueError("ERROR: degrees of freedom (columns) must be in the form of: joint.axis, e.g. Hips.x")
    return joint_channels
 Map channels from degrees of freedom to joint names.
    
    :param df: These are the columns names of the rotations.csv.
    :type df: list
    :return: Dictionary with joint names as keys and list of rotation channels as values.
    :rtype: dict
    
Map channels from degrees of freedom to joint names.
Map channels from degrees of freedom to joint names .
def _df_to_channels(df):
    dof = df.copy()
    dof.remove('time')
    joints = df_to_joints(df)
    joint_channels = dict()
    try:
        for joint in joints:
            joint_channels[joint] = [ch.split('.')[1].upper() + "rotation" for ch in dof if joint == ch.split('.')[0]]
    except IndexError:
        raise ValueError("ERROR: degrees of freedom (columns) must be in the form of: joint.axis, e.g. Hips.x")
    return joint_channels
def _df_to_channels ( df ) : dof = df . copy ( ) dof . remove ( 'time' ) joints = df_to_joints ( df ) joint_channels = dict ( ) try : for joint in joints : joint_channels [ joint ] = [ ch . split ( '.' ) [ 1 ] . upper ( ) + "rotation" for ch in dof if joint == ch . split ( '.' ) [ 0 ] ] except IndexError : raise ValueError ( "ERROR: degrees of freedom (columns) must be in the form of: joint.axis, e.g. Hips.x" ) return joint_channels
Map channels from degrees of freedom to joint names.
Map channels from degrees of freedom to joint names .
""" Map channels from degrees of freedom to joint names.
    
    :param df: These are the columns names of the rotations.csv.
    :type df: list
    :return: Dictionary with joint names as keys and list of rotation channels as values.
    :rtype: dict
    """ # Get a version of df that does not contain 'time'.
Dictionary with joint names as keys and list of rotation channels as values.
Dictionary with joint names as keys and list of rotation channels as values .
dict
df
These are the columns names of the rotations.csv.
These are the columns names of the rotations . csv .