Skip to main content
Ctrl+K
LSDB - Home

Using LSDB

  • Home page
  • Getting Started
  • Tutorials
  • API Reference

Project

  • About
  • Contact us
  • Contribution Guide
  • .rst

lsdb.core.search.box_search

Contents

  • Classes
  • Functions
  • Module Contents
    • BoxSearch
      • BoxSearch.filter_hc_catalog()
      • BoxSearch.search_points()
    • box_filter()
    • _create_ra_mask()

lsdb.core.search.box_search#

Classes#

BoxSearch

Perform a box search to filter the catalog. This type of search is used for a

Functions#

box_filter(→ nested_pandas.NestedFrame)

Filters a dataframe to only include points within the specified box region.

_create_ra_mask(→ numpy.ndarray)

Creates the mask to filter right ascension values. If this range crosses

Module Contents#

class BoxSearch(ra: tuple[float, float], dec: tuple[float, float], fine: bool = True)[source]#

Bases: lsdb.core.search.abstract_search.AbstractSearch

Perform a box search to filter the catalog. This type of search is used for a range of right ascension or declination, where the right ascension edges follow great arc circles and the declination edges follow small arc circles.

Filters to points within the ra / dec region, specified in degrees. Filters partitions in the catalog to those that have some overlap with the region.

filter_hc_catalog(hc_structure: lsdb.types.HCCatalogTypeVar) → mocpy.MOC[source]#

Filters catalog pixels according to the box

search_points(frame: nested_pandas.NestedFrame, metadata: hats.catalog.TableProperties) → nested_pandas.NestedFrame[source]#

Determine the search results within a data frame

box_filter(data_frame: nested_pandas.NestedFrame, ra: tuple[float, float], dec: tuple[float, float], metadata: hats.catalog.TableProperties) → nested_pandas.NestedFrame[source]#

Filters a dataframe to only include points within the specified box region.

Parameters:
  • data_frame (npd.NestedFrame) – DataFrame containing points in the sky

  • ra (tuple[float, float]) – Right ascension range, in degrees

  • dec (tuple[float, float]) – Declination range, in degrees

  • metadata (hc.catalog.Catalog) – hats Catalog with catalog_info that matches data_frame

Returns:

A new DataFrame with the rows from data_frame filtered to only the points inside the box region.

_create_ra_mask(ra: tuple[float, float], values: numpy.ndarray) → numpy.ndarray[source]#

Creates the mask to filter right ascension values. If this range crosses the discontinuity line (0 degrees), we have a branched logical operation.

previous

lsdb.core.search.abstract_search

next

lsdb.core.search.cone_search

Contents
  • Classes
  • Functions
  • Module Contents
    • BoxSearch
      • BoxSearch.filter_hc_catalog()
      • BoxSearch.search_points()
    • box_filter()
    • _create_ra_mask()

By LINCC Frameworks

© Copyright 2025, LINCC Frameworks.