def split_params(self, params, values=None):
pc, vc = [], []<EOL>returnvalues = values is not None<EOL>if values is None:<EOL><INDENT>values = [<NUM_LIT:0>]*len(util.listify(params))<EOL><DEDENT>for c in self.comps:<EOL><INDENT>tp, tv = [], []<EOL>for p,v in zip(util.listify(params), util.listify(values)):<EOL><INDENT>if not p in self.lmap:<EOL><INDENT>raise NotAParameterError("<STR_LIT>" % (p, self))<EOL><DEDENT>if c in self.pmap[p]:<EOL><INDENT>tp.append(p)<EOL>tv.append(v)<EOL><DEDENT><DEDENT>pc.append(tp)<EOL>vc.append(tv)<EOL><DEDENT>if returnvalues:<EOL><INDENT>return pc, vc<EOL><DEDENT>return pc<EOL>
Split params, values into groups that correspond to the ordering in
self.comps. For example, given a sphere collection and slab::

    [
        (spheres) [pos rad etc] [pos val, rad val, etc]
        (slab) [slab params] [slab vals]
    ]