Am I right in thinking *_separate_dims* and *_vectorise* are only ever, and will only ever be, used together like this?
They are tightly coupled and seem to require refactoring into a single function.
http://en.wikipedia.org/wiki/Coupling_(computer_programming)