def random_points(self,n,minmass=None,maxmass=None,<EOL>minage=None,maxage=None,<EOL>minfeh=None,maxfeh=None):
if minmass is None:<EOL><INDENT>minmass = self.minmass<EOL><DEDENT>if maxmass is None:<EOL><INDENT>maxmass = self.maxmass<EOL><DEDENT>if minage is None:<EOL><INDENT>minage = self.minage<EOL><DEDENT>if maxage is None:<EOL><INDENT>maxage = self.maxage<EOL><DEDENT>if minfeh is None:<EOL><INDENT>minfeh = self.minfeh<EOL><DEDENT>if maxfeh is None:<EOL><INDENT>maxfeh = self.maxfeh<EOL><DEDENT>ms = rand.uniform(minmass,maxmass,size=n)<EOL>ages = rand.uniform(minage,maxage,size=n)<EOL>fehs = rand.uniform(minage,maxage,size=n)<EOL>Rs = self.radius(ms,ages,fehs)<EOL>bad = np.isnan(Rs)<EOL>nbad = bad.sum()<EOL>while nbad > <NUM_LIT:0>:<EOL><INDENT>ms[bad] = rand.uniform(minmass,maxmass,size=nbad)<EOL>ages[bad] = rand.uniform(minage,maxage,size=nbad)<EOL>fehs[bad] = rand.uniform(minfeh,maxfeh,size=nbad)<EOL>Rs = self.radius(ms,ages,fehs)<EOL>bad = np.isnan(Rs)<EOL>nbad = bad.sum()<EOL><DEDENT>return ms,ages,fehs<EOL>
Returns n random mass, age, feh points, none of which are out of range.

:param n:
    Number of desired points.

:param minmass, maxmass: (optional)
    Desired allowed range.  Default is mass range of ``self``.

:param minage, maxage: (optional)
    Desired allowed range.  Default is log10(age) range of
    ``self``.

:param minfehs, maxfeh: (optional)
    Desired allowed range.  Default is feh range of ``self``.

:return:
    :class:`np.ndarray` arrays of randomly selected mass, log10(age),
    and feh values
    within allowed ranges.  Used, e.g., to initialize random walkers for
    :class:`StarModel` fits.

.. todo::

    Should change this to drawing from priors!  Current implementation
    is a bit outdated.