hats.search.region_search#
Functions#
|
Filters a dataframe to only include points within the specified box region. |
|
Filters a dataframe to only include points within the specified cone |
|
Filters a dataframe to only include points within the specified polygon. |
|
Creates the convex polygon to filter pixels with. It transforms the |
Module Contents#
- 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_framenpd.NestedFrame
DataFrame containing points in the sky
- ratuple[float,float]
Right ascension range, in degrees
- dectuple[float,float]
Declination range, in degrees
- metadataTableProperties
hats Catalog with catalog_info that matches data_frame
- Returns:
- NestedFrame
A new DataFrame with the rows from data_frame filtered to only the points inside the box region.
- cone_filter(data_frame: nested_pandas.NestedFrame, ra, dec, radius_arcsec, metadata: hats.catalog.TableProperties)[source]#
Filters a dataframe to only include points within the specified cone
- Parameters:
- data_framenpd.NestedFrame
DataFrame containing points in the sky
- 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
- metadatahc.TableProperties
hats TableProperties with metadata that matches data_frame
- Returns:
- NestedFrame
A new DataFrame with the rows from data_frame filtered to only the points inside the cone
- polygon_filter(data_frame: nested_pandas.NestedFrame, polygon, metadata: hats.catalog.TableProperties) nested_pandas.NestedFrame[source]#
Filters a dataframe to only include points within the specified polygon.
- Parameters:
- data_framenpd.NestedFrame
DataFrame containing points in the sky
- polygonConvexPolygon
Convex spherical polygon of interest, used to filter points
- metadataTableProperties
hats Catalog with catalog_info that matches dataframe
- Returns:
- NestedFrame
A new DataFrame with the rows from dataframe filtered to only the pixels inside the polygon.
- get_cartesian_polygon(vertices: list[tuple[float, float]])[source]#
Creates the convex polygon to filter pixels with. It transforms the vertices, provided in sky coordinates of ra and dec, to their respective cartesian representation on the unit sphere.
- Parameters:
- verticeslist[tuple[float, float]]
The list of vertices of the polygon to filter pixels with, as a list of (ra,dec) coordinates, in degrees.
- Returns:
- sphgeom.ConvexPolygon
The convex polygon object.