halo subcatalogue code changed to do unique random sampling via random.sample