Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom healpix plotting method #374

Merged
merged 24 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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)

Check warning on line 236 in src/hats/catalog/healpix_dataset/healpix_dataset.py

View check run for this annotation

Codecov / codecov/patch

src/hats/catalog/healpix_dataset/healpix_dataset.py#L236

Added line #L236 was not covered by tests
Loading