Commented to_cartesian and filled in docstring.