def lnpost(self, p, use_local_fehprior=True):
if not self.use_emcee:<EOL><INDENT>mass, age, feh, dist, AV = (p[<NUM_LIT:0>], p[<NUM_LIT:1>], p[<NUM_LIT:2>], p[<NUM_LIT:3>], p[<NUM_LIT:4>])<EOL><DEDENT>else:<EOL><INDENT>if len(p)==<NUM_LIT:5>:<EOL><INDENT>fit_for_distance = True<EOL>mass,age,feh,dist,AV = p<EOL><DEDENT>elif len(p)==<NUM_LIT:3>:<EOL><INDENT>fit_for_distance = False<EOL>mass,age,feh = p<EOL>dist = None<EOL>AV = None<EOL><DEDENT><DEDENT>return (self.lnlike(p) + <EOL>self.lnprior(mass, age, feh, dist, AV,<EOL>use_local_fehprior=use_local_fehprior))<EOL>
log-posterior of model at given parameters