Skip to content

Commit

Permalink
Merge pull request #250 from astronomy-commons/sean/update-skymap-def…
Browse files Browse the repository at this point in the history
…ault

Update Skymap default
  • Loading branch information
smcguire-cmu authored Mar 27, 2024
2 parents d802339 + 973b156 commit c94b06b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/lsdb/catalog/dataset/healpix_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import dask
import dask.dataframe as dd
import healpy as hp
import hipscat as hc
import numpy as np
import pandas as pd
Expand Down Expand Up @@ -277,7 +278,7 @@ def skymap(
self,
func: Callable[[pd.DataFrame, HealpixPixel], Any],
order: int | None = None,
default_value: Any = 0.0,
default_value: Any = hp.pixelfunc.UNSEEN,
projection="moll",
plotting_args: Dict | None = None,
**kwargs,
Expand Down
2 changes: 1 addition & 1 deletion tests/lsdb/catalog/test_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def func(df, healpix):
pixel_map = small_sky_order1_catalog.skymap_data(func)
pixel_map = {pixel: value.compute() for pixel, value in pixel_map.items()}
max_order = max(pixel_map.keys(), key=lambda x: x.order).order
img = np.zeros(hp.nside2npix(hp.order2nside(max_order)))
img = np.full(hp.nside2npix(hp.order2nside(max_order)), hp.pixelfunc.UNSEEN)
for pixel, value in pixel_map.items():
dorder = max_order - pixel.order
start = pixel.pixel * (4**dorder)
Expand Down

0 comments on commit c94b06b

Please sign in to comment.