@patch<EOL>def add_virtual_columns_cartesian_velocities_to_pmvr(self, x="<STR_LIT:x>", y="<STR_LIT:y>", z="<STR_LIT:z>", vx="<STR_LIT>", vy="<STR_LIT>", vz="<STR_LIT>", vr="<STR_LIT>", pm_long="<STR_LIT>", pm_lat="<STR_LIT>", distance=None):
if distance is None:<EOL><INDENT>distance = "<STR_LIT>".format(**locals())<EOL><DEDENT>k = <NUM_LIT><EOL>self.add_variable("<STR_LIT:k>", k, overwrite=False)<EOL>self.add_virtual_column(vr, "<STR_LIT>".format(**locals()))<EOL>self.add_virtual_column(pm_long, "<STR_LIT>".format(**locals()))<EOL>self.add_virtual_column(pm_lat, "<STR_LIT>".format(**locals()))<EOL>
Concert velocities from a cartesian system to proper motions and radial velocities

    TODO: errors

    :param x: name of x column (input)
    :param y:         y
    :param z:         z
    :param vx:       vx
    :param vy:       vy
    :param vz:       vz
    :param vr: name of the column for the radial velocity in the r direction (output)
    :param pm_long: name of the column for the proper motion component in the longitude direction  (output)
    :param pm_lat: name of the column for the proper motion component in the latitude direction, positive points to the north pole (output)
    :param distance: Expression for distance, if not given defaults to sqrt(x**2+y**2+z**2), but if this column already exists, passing this expression may lead to a better performance
    :return: