Skip to content

Commit

Permalink
Merge pull request #374 from astronomy-commons/sean/healpix-plotting
Browse files Browse the repository at this point in the history
Add custom healpix plotting method
  • Loading branch information
smcguire-cmu authored Oct 25, 2024
2 parents 1628457 + 23436e0 commit 4ef9952
Show file tree
Hide file tree
Showing 7 changed files with 1,030 additions and 152 deletions.
2 changes: 1 addition & 1 deletion src/.pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ max-bool-expr=5
max-branches=20

# Maximum number of locals for function / method body.
max-locals=20
max-locals=25

# Maximum number of parents for a class (see R0901).
max-parents=7
Expand Down
9 changes: 9 additions & 0 deletions src/hats/catalog/healpix_dataset/healpix_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from hats.catalog.dataset import Dataset
from hats.catalog.dataset.table_properties import TableProperties
from hats.catalog.partition_info import PartitionInfo
from hats.inspection import plot_pixels
from hats.io import file_io, paths
from hats.io.file_io import read_parquet_metadata
from hats.pixel_math import HealpixPixel
Expand Down Expand Up @@ -225,3 +226,11 @@ def align(
return align_with_mocs(
self.pixel_tree, other_cat.pixel_tree, self.moc, other_cat.moc, alignment_type=alignment_type
)

def plot_pixels(self, **kwargs):
"""Create a visual map of the pixel density of the catalog.
Args:
kwargs: Additional args to pass to `hipscat.inspection.visualize_catalog.plot_healpix_map`
"""
return plot_pixels(self, **kwargs)
Loading

0 comments on commit 4ef9952

Please sign in to comment.