Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
delucchi-cmu committed Dec 4, 2024
1 parent a83a2cb commit 8a88384
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
7 changes: 5 additions & 2 deletions src/hats/catalog/association_catalog/association_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@

from hats.catalog.association_catalog.partition_join_info import PartitionJoinInfo
from hats.catalog.dataset.table_properties import TableProperties
from hats.catalog.healpix_dataset.healpix_dataset import HealpixDataset, PixelInputTypes
from hats.catalog.healpix_dataset.healpix_dataset import HealpixDataset
from hats.catalog.partition_info import PartitionInfo
from hats.pixel_math import HealpixPixel
from hats.pixel_tree.pixel_tree import PixelTree


class AssociationCatalog(HealpixDataset):
Expand All @@ -20,7 +23,7 @@ class AssociationCatalog(HealpixDataset):
def __init__(
self,
catalog_info: TableProperties,
pixels: PixelInputTypes,
pixels: PartitionInfo | PixelTree | list[HealpixPixel],
join_pixels: list | pd.DataFrame | PartitionJoinInfo,
catalog_path=None,
moc: MOC | None = None,
Expand Down
2 changes: 1 addition & 1 deletion src/hats/pixel_math/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Utilities for performing fun math on healpix pixels"""

from .healpix_pixel import HealpixPixel
from .healpix_pixel_convertor import HealpixInputTypes, get_healpix_pixel
from .healpix_pixel_convertor import get_healpix_pixel
from .partition_stats import empty_histogram, generate_alignment, generate_histogram
from .pixel_margins import get_margin
from .spatial_index import compute_spatial_index, spatial_index_to_healpix
8 changes: 5 additions & 3 deletions src/hats/pixel_tree/pixel_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import numpy as np
from mocpy import MOC

from hats.pixel_math import HealpixInputTypes, HealpixPixel
from hats.pixel_math import HealpixPixel
from hats.pixel_math.healpix_pixel_convertor import get_healpix_tuple
from hats.pixel_math.healpix_pixel_function import get_pixels_from_intervals

Expand Down Expand Up @@ -47,7 +47,7 @@ def __len__(self):
"""
return len(self.tree)

def contains(self, pixel: HealpixInputTypes) -> bool:
def contains(self, pixel: HealpixPixel | tuple[int, int]) -> bool:
"""Check if tree contains a node at a given order and pixel
Args:
Expand Down Expand Up @@ -96,7 +96,9 @@ def to_depth29_ranges(self) -> np.ndarray:
return self.tree << (2 * (29 - self.tree_order))

@classmethod
def from_healpix(cls, healpix_pixels: Sequence[HealpixInputTypes], tree_order=None) -> PixelTree:
def from_healpix(
cls, healpix_pixels: Sequence[HealpixPixel | tuple[int, int]], tree_order=None
) -> PixelTree:
"""Build a tree from a list of constituent healpix pixels
Args:
Expand Down

0 comments on commit 8a88384

Please sign in to comment.