Skip to content
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: 2 additions & 0 deletions src/lsdb/loaders/hats/read_hats.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ def _load_object_catalog(hc_catalog, config):

def _generate_pyarrow_filters_from_moc(filtered_catalog):
pyarrow_filter = []
if SPATIAL_INDEX_COLUMN not in filtered_catalog.schema.names:
return pyarrow_filter
if filtered_catalog.moc is not None:
depth_array = filtered_catalog.moc.to_depth29_ranges
if len(depth_array) > MAX_PYARROW_FILTERS:
Expand Down
5 changes: 3 additions & 2 deletions tests/data/generate_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@
" catalog_type=\"source\",\n",
" output_artifact_name=\"small_sky_source\",\n",
" highest_healpix_order=2,\n",
" add_healpix_29=False,\n",
" pixel_threshold=3000,\n",
" tmp_dir=pipeline_tmp,\n",
" )\n",
Expand Down Expand Up @@ -873,7 +874,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "lsdb",
"display_name": "sep",
"language": "python",
"name": "python3"
},
Expand All @@ -887,7 +888,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.11"
"version": "3.12.3"
}
},
"nbformat": 4,
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified tests/data/small_sky_source/dataset/Norder=2/Dir=0/Npix=66.parquet
Binary file not shown.
Binary file modified tests/data/small_sky_source/dataset/_common_metadata
Binary file not shown.
Binary file modified tests/data/small_sky_source/dataset/_metadata
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions tests/data/small_sky_source/hats.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ hats_col_ra=source_ra
hats_col_dec=source_dec
hats_npix_suffix=.parquet
hats_skymap_order=2
hats_builder=hats-import v0.6.1.dev1+gd082cb2, hats v0.7.dev0+g8d490830.d20250613
hats_creation_date=2025-06-16T15\:26UTC
hats_estsize=819
hats_builder=hats-import v0.6.5.dev5+g1a95e2449, hats v0.6.5.dev2+ga49f49815
hats_creation_date=2025-09-08T13:40UTC
hats_estsize=692
hats_release_date=2024-09-18
hats_version=v0.1
hats_max_rows=3000
Expand Down
6 changes: 3 additions & 3 deletions tests/data/small_sky_source/properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ hats_col_ra=source_ra
hats_col_dec=source_dec
hats_npix_suffix=.parquet
hats_skymap_order=2
hats_builder=hats-import v0.6.1.dev1+gd082cb2, hats v0.7.dev0+g8d490830.d20250613
hats_creation_date=2025-06-16T15\:26UTC
hats_estsize=819
hats_builder=hats-import v0.6.5.dev5+g1a95e2449, hats v0.6.5.dev2+ga49f49815
hats_creation_date=2025-09-08T13:40UTC
hats_estsize=692
hats_release_date=2024-09-18
hats_version=v0.1
hats_max_rows=3000
Expand Down
7 changes: 6 additions & 1 deletion tests/lsdb/loaders/hats/test_read_hats.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,9 +487,14 @@ def test_read_hats_subset_with_order_search(small_sky_source_catalog, small_sky_
order_search = OrderSearch(min_order=1, max_order=2)
# Filtering using catalog's order_search
order_search_catalog = small_sky_source_catalog.order_search(min_order=1, max_order=2)
results1 = order_search_catalog.compute()
# Filtering when calling `read_hats`
order_search_catalog_2 = lsdb.open_catalog(small_sky_source_dir, search_filter=order_search)
order_search_catalog_2 = lsdb.open_catalog(
small_sky_source_dir, search_filter=order_search, columns=["object_id", "object_ra", "object_dec"]
)
assert isinstance(order_search_catalog_2, lsdb.Catalog)
results2 = order_search_catalog_2.compute()
assert len(results1) == len(results2)
# The partitions of the catalogs are equivalent
assert order_search_catalog.get_healpix_pixels() == order_search_catalog_2.get_healpix_pixels()

Expand Down
Loading