Skip to content

Commit

Permalink
Pre-factor to simplify hats loading (#461)
Browse files Browse the repository at this point in the history
* Pre-factor to simplify hats loading

* Seriously refactor catalog loading.

* Add test for issue 442

* Add implementation note.

* Comments from code review.
  • Loading branch information
delucchi-cmu authored Oct 29, 2024
1 parent f1a3713 commit c9779aa
Show file tree
Hide file tree
Showing 12 changed files with 216 additions and 365 deletions.
6 changes: 3 additions & 3 deletions benchmarks/benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@


def load_small_sky():
return lsdb.read_hats(TEST_DIR / DATA_DIR_NAME / SMALL_SKY_DIR_NAME, catalog_type=lsdb.Catalog)
return lsdb.read_hats(TEST_DIR / DATA_DIR_NAME / SMALL_SKY_DIR_NAME)


def load_small_sky_order1():
return lsdb.read_hats(TEST_DIR / DATA_DIR_NAME / SMALL_SKY_ORDER1, catalog_type=lsdb.Catalog)
return lsdb.read_hats(TEST_DIR / DATA_DIR_NAME / SMALL_SKY_ORDER1)


def load_small_sky_xmatch():
return lsdb.read_hats(TEST_DIR / DATA_DIR_NAME / SMALL_SKY_XMATCH_NAME, catalog_type=lsdb.Catalog)
return lsdb.read_hats(TEST_DIR / DATA_DIR_NAME / SMALL_SKY_XMATCH_NAME)


def time_kdtree_crossmatch():
Expand Down
134 changes: 0 additions & 134 deletions src/lsdb/loaders/hats/abstract_catalog_loader.py

This file was deleted.

27 changes: 0 additions & 27 deletions src/lsdb/loaders/hats/association_catalog_loader.py

This file was deleted.

67 changes: 0 additions & 67 deletions src/lsdb/loaders/hats/hats_catalog_loader.py

This file was deleted.

42 changes: 0 additions & 42 deletions src/lsdb/loaders/hats/hats_loader_factory.py

This file was deleted.

7 changes: 7 additions & 0 deletions src/lsdb/loaders/hats/hats_loading_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,10 @@ def make_query_url_params(self) -> dict:
url_params["filters"].append(f"{filtr[0]}{filtr[1]}{filtr[2]}")

return url_params

def get_read_kwargs(self):
"""Clumps existing kwargs and `dtype_backend`, if specified."""
kwargs = dict(self.kwargs)
if self.dtype_backend is not None:
kwargs["dtype_backend"] = self.dtype_backend
return kwargs
38 changes: 0 additions & 38 deletions src/lsdb/loaders/hats/margin_catalog_loader.py

This file was deleted.

Loading

0 comments on commit c9779aa

Please sign in to comment.