def conesearch_kdtree(kdtree,<EOL>racenter,<EOL>declcenter,<EOL>searchradiusdeg,<EOL>conesearchworkers=<NUM_LIT:1>):
cosdecl = np.cos(np.radians(declcenter))<EOL>sindecl = np.sin(np.radians(declcenter))<EOL>cosra = np.cos(np.radians(racenter))<EOL>sinra = np.sin(np.radians(racenter))<EOL>xyzdist = <NUM_LIT> * np.sin(np.radians(searchradiusdeg)/<NUM_LIT>)<EOL>kdtindices = kdtree.query_ball_point([cosra*cosdecl,<EOL>sinra*cosdecl,<EOL>sindecl],<EOL>xyzdist,<EOL>n_jobs=conesearchworkers)<EOL>return kdtindices<EOL>
This does a cone-search around (`racenter`, `declcenter`) in `kdtree`.

    Parameters
    ----------

    kdtree : scipy.spatial.CKDTree
        This is a kdtree object generated by the `make_kdtree` function.

    racenter,declcenter : float or array-like
        This is the center coordinate to run the cone-search around in decimal
        degrees. If this is an np.array, will search for all coordinate pairs in
        the array.

    searchradiusdeg : float
        The search radius to use for the cone-search in decimal degrees.

    conesearchworkers : int
        The number of parallel workers to launch for the cone-search.

    Returns
    -------

    list or np.array of lists
        If (`racenter`, `declcenter`) is a single coordinate, this will return a
        list of the indices of the matching objects in the kdtree. If
        (`racenter`, `declcenter`) are array-likes, this will return an object
        array containing lists of matching object indices for each coordinate
        searched.