Add documentation of function argument
Add check that length of input arrays are consistent

As a bonus, this includes a hack for finding the length of an array of coordinates in astropy.
Correctly handle check for duplicate objects in catalog in case when there is only one object