cone_search#
- Catalog.cone_search(ra: float, dec: float, radius_arcsec: float, fine: bool = True) Self#
Perform a cone search to filter the catalog.
Filters to points within radius great circle distance to the point specified by ra and dec in degrees. Filters partitions in the catalog to those that have some overlap with the cone.
- Parameters:
- rafloat
Right Ascension of the center of the cone in degrees
- decfloat
Declination of the center of the cone in degrees
- radius_arcsecfloat
Radius of the cone in arcseconds
- finebool, default True
True if points are to be filtered, False if not. Defaults to True.
- Returns:
- Self
A new Catalog containing the points filtered to those within the cone, and the partitions that overlap the cone.
Examples
Filter a small synthetic catalog to a cone on the sky:
>>> import lsdb >>> from lsdb.nested.datasets import generate_data >>> nf = generate_data(1000, 5, seed=42, ra_range=(0.0, 300.0), dec_range=(-50.0, 50.0)) >>> catalog = lsdb.from_dataframe(nf.compute()[["ra", "dec", "id"]]) >>> cone = catalog.cone_search(ra=150.0, dec=0.0, radius_arcsec=7200) >>> cone.head() ra dec id _healpix_29 1917605570237722650 151.359297 1.383203 4296