code: def write_membership(filename,config,srcfile,section=None):
      
      source = Source()
      source.load(srcfile,section=section)
      loglike = createLoglike(config,source)
      loglike.write_membership(filename)
docs: Top level interface to write the membership from a config and source model.