astronomy-commons / lsdb

Large Survey DataBase
https://lsdb.io
BSD 3-Clause "New" or "Revised" License
19 stars 5 forks source link

module 'hipscat.pixel_math' has no attribute 'compute_pixel_map' #385

Closed marixko closed 3 months ago

marixko commented 3 months ago

Bug report

I am trying to use lsdb.from_dataframe() to crossmatch two dataframes. I am getting "AttributeError: module 'hipscat.pixel_math' has no attribute 'compute_pixel_map'" error message: image

I am running lsdb 0.2.7, Python 3.12.

Code:

from astropy.table import Table
import lsdb

legacy = Table.read("sweep-000m005-005p000.fits") # downloaded from https://portal.nersc.gov/cfs/cosmo/data/legacysurvey/dr10/south/sweep/10.1/
names = [name for name in legacy.colnames if len(legacy[name].shape) <= 1]
legacy = legacy[names].to_pandas()

lsdb.from_dataframe(legacy, ra_column="RA", dec_column="DEC", margin_threshold=3600)

Before submitting Please check the following:

hombit commented 3 months ago

@marixko thank you for the report! Just in case, could you please check if you have up-to-date hipscat and lsdb? Could you please run

pip uninstall lsdb hipscat
pip install lsdb
delucchi-cmu commented 3 months ago

Sorry! This is my bad. I've just tagged lsdb v0.2.8 that contains the fix. This should propagate to pypi within the hour.

marixko commented 3 months ago

It is working flawlessly now, thank you! :smile: