Write coincidence counts into a Python pickle

def dump(self):
        """Write coincidence counts into a Python pickle"""
        self.print("Dumping data to {}".format(self.dump_filename))
        pickle.dump({
            'data': self.counts,
            'livetime': self.get_livetime()
        }, open(self.dump_filename, "wb"))