added index function to galaxy object, added attach option to match function in sourceCat