def lnprior(self, mass, age, feh,<EOL>distance=None, AV=None, <EOL>use_local_fehprior=True):
mass_prior = salpeter_prior(mass)<EOL>if mass_prior==<NUM_LIT:0>:<EOL><INDENT>mass_lnprior = -np.inf<EOL><DEDENT>else:<EOL><INDENT>mass_lnprior = np.log(mass_prior)<EOL><DEDENT>if np.isnan(mass_lnprior):<EOL><INDENT>logging.warning('<STR_LIT>'.format(mass))<EOL><DEDENT>age_lnprior = np.log(age * (<NUM_LIT:2>/(self.ic.maxage**<NUM_LIT:2>-self.ic.minage**<NUM_LIT:2>)))<EOL>if np.isnan(age_lnprior):<EOL><INDENT>logging.warning('<STR_LIT>'.format(age))<EOL><DEDENT>if use_local_fehprior:<EOL><INDENT>fehdist = local_fehdist(feh)<EOL><DEDENT>else:<EOL><INDENT>fehdist = <NUM_LIT:1>/(self.ic.maxfeh - self.ic.minfeh)<EOL><DEDENT>feh_lnprior = np.log(fehdist)<EOL>if np.isnan(feh_lnprior):<EOL><INDENT>logging.warning('<STR_LIT>'.format(feh))<EOL><DEDENT>if distance is not None:<EOL><INDENT>if distance <= <NUM_LIT:0>:<EOL><INDENT>distance_lnprior = -np.inf<EOL><DEDENT>else:<EOL><INDENT>distance_lnprior = np.log(<NUM_LIT:3>/self.max_distance**<NUM_LIT:3> * distance**<NUM_LIT:2>)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>distance_lnprior = <NUM_LIT:0><EOL><DEDENT>if np.isnan(distance_lnprior):<EOL><INDENT>logging.warning('<STR_LIT>'.format(distance))<EOL><DEDENT>if AV is not None:<EOL><INDENT>AV_lnprior = np.log(<NUM_LIT:1>/self.maxAV)<EOL><DEDENT>else:<EOL><INDENT>AV_lnprior = <NUM_LIT:0><EOL><DEDENT>if np.isnan(AV_lnprior):<EOL><INDENT>logging.warning('<STR_LIT>'.format(AV))<EOL><DEDENT>lnprior = (mass_lnprior + age_lnprior + feh_lnprior + <EOL>distance_lnprior + AV_lnprior)<EOL>return lnprior<EOL>
log-prior for model parameters