* generate pyephem snapshot*

    **Key Arguments:**
        - ``mjd`` -- the mjd to generate the pyephem snapshot database for
        - ``xephemOE`` -- a list of xephem database format strings for use with pyephem

    **Return:**
        - ``pyephemDB`` -- the pyephem solar-system snapshot database

def _generate_pyephem_snapshot(
        mjd,
        log,
        magLimit):
    """* generate pyephem snapshot*

    **Key Arguments:**
        - ``mjd`` -- the mjd to generate the pyephem snapshot database for
        - ``xephemOE`` -- a list of xephem database format strings for use with pyephem

    **Return:**
        - ``pyephemDB`` -- the pyephem solar-system snapshot database
    """
    log.info('starting the ``_generate_pyephem_snapshot`` method')

    print "generating pyephem database for MJD %(mjd)s" % locals()

    global xephemOE
    global DEG_TO_RAD_FACTOR
    global RAD_TO_DEG_FACTOR
    global nside

    # THE PYEPHEM OBSERVER
    obs = ephem.Observer()
    # PYEPHEM WORKS IN DUBLIN JD, TO CONVERT FROM MJD SUBTRACT 15019.5
    obs.date = float(mjd) - 15019.5
    pyephemDB = {
        "ra_deg": [],
        "dec_deg": [],
        "mpc_number": [],
        "object_name": [],
        "healpix": [],
        "mag": []
    }

    for d in xephemOE:

        # GENERATE EPHEMERIS FOR THIS OBJECT
        minorPlanet = ephem.readdb(d["pyephem_string"])
        minorPlanet.compute(obs)

        if minorPlanet.mag > magLimit:
            continue

        if d["mpc_number"]:
            d["mpc_number"] = int(d["mpc_number"])

        thisRa = minorPlanet.a_ra * RAD_TO_DEG_FACTOR
        thisDec = minorPlanet.a_dec * RAD_TO_DEG_FACTOR
        pyephemDB["mag"].append(minorPlanet.mag)
        pyephemDB["ra_deg"].append(thisRa)
        pyephemDB["dec_deg"].append(thisDec)
        pyephemDB["mpc_number"].append(d["mpc_number"])
        pyephemDB["object_name"].append(d["name"])
        pyephemDB["healpix"].append(hp.ang2pix(
            nside, theta=thisRa, phi=thisDec, lonlat=True))

    log.info('completed the ``_generate_pyephem_snapshot`` method')
    return pyephemDB