I think the above line will raise an error since 'self' isn't defined.
Also, this gives the impression that you won't be converting coordinate variables (base scalars) in this function?