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
8 changes: 4 additions & 4 deletions benchmarks/test_column_mean.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import nested_pandas as npd


def test_pyarrow_mean(gaia_collection_path, lbench):
gaia_root = gaia_collection_path / "gaia"
def test_pyarrow_mean(gaia_local_collection_path, lbench):
gaia_root = gaia_local_collection_path / "gaia"
parquet_root = f"{gaia_root}/dataset"
pyarrow_ds = ds.parquet_dataset(f"{parquet_root}/_metadata")

Expand All @@ -31,7 +31,7 @@ def dataset_mean(dataset, field: str, *, use_threads: bool = True):
lbench(dataset_mean, pyarrow_ds, "phot_g_mean_mag")


def test_lsdb_mean(gaia_collection_path, lbench_dask):
def test_lsdb_mean(gaia_local_collection_path, lbench_dask):
def catalog_mean(df, target_column=""):
result = npd.NestedFrame(
{
Expand All @@ -41,7 +41,7 @@ def catalog_mean(df, target_column=""):
)
return result

lsdb_gaia = lsdb.open_catalog(gaia_collection_path, columns=["phot_g_mean_mag"])
lsdb_gaia = lsdb.open_catalog(gaia_local_collection_path, columns=["phot_g_mean_mag"])
unrealized = lsdb_gaia.map_partitions(
catalog_mean,
target_column="phot_g_mean_mag",
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/test_crossmatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import nested_pandas as npd

from hats.pixel_math import HealpixPixel
from lsdb.dask.crossmatch_catalog_data import perform_crossmatch
from lsdb.operations.functions.crossmatch_catalog_data import perform_crossmatch
from lsdb.operations.functions.merge_catalog_functions import generate_meta_df_for_joined_tables
from hats.io import pixel_catalog_file
from lsdb.core.crossmatch.kdtree_match import KdTreeCrossmatch
from lsdb.dask.merge_catalog_functions import generate_meta_df_for_joined_tables


@pytest.mark.lbench_memory
Expand Down
20 changes: 10 additions & 10 deletions benchmarks/test_local_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import pytest


def test_local_catalog_partition_read(gaia_collection_path, lbench_dask):
gaia = lsdb.read_hats(gaia_collection_path)
def test_local_catalog_partition_read(gaia_local_collection_path, lbench_dask):
gaia = lsdb.read_hats(gaia_local_collection_path)
cat = gaia.partitions[0]

def load_partition():
Expand All @@ -15,8 +15,8 @@ def load_partition():
lbench_dask(load_partition)


def test_local_catalog_npd_read(gaia_collection_path, lbench):
gaia = lsdb.read_hats(gaia_collection_path)
def test_local_catalog_npd_read(gaia_local_collection_path, lbench):
gaia = lsdb.read_hats(gaia_local_collection_path)
partition_0_pixel = gaia.partitions[0].get_healpix_pixels()[0]
partition_0_path = hats.io.paths.pixel_catalog_file(gaia.hc_structure.catalog_base_dir, partition_0_pixel)

Expand All @@ -26,8 +26,8 @@ def load_partition_npd():
lbench(load_partition_npd)


def test_local_catalog_pd_read(gaia_collection_path, lbench):
gaia = lsdb.read_hats(gaia_collection_path)
def test_local_catalog_pd_read(gaia_local_collection_path, lbench):
gaia = lsdb.read_hats(gaia_local_collection_path)
partition_0_pixel = gaia.partitions[0].get_healpix_pixels()[0]
partition_0_path = hats.io.paths.pixel_catalog_file(gaia.hc_structure.catalog_base_dir, partition_0_pixel)

Expand All @@ -38,8 +38,8 @@ def load_partition_pd():


@pytest.mark.benchmark(min_rounds=1)
def test_local_catalog_multi_partition_read(gaia_collection_path, lbench_dask):
gaia = lsdb.read_hats(gaia_collection_path)
def test_local_catalog_multi_partition_read(gaia_local_collection_path, lbench_dask):
gaia = lsdb.read_hats(gaia_local_collection_path)
n_partitions = 10
cat = gaia.partitions[:n_partitions]

Expand All @@ -50,8 +50,8 @@ def load_partitions():


@pytest.mark.benchmark(min_rounds=1)
def test_local_catalog_multi_partition_npd_read(gaia_collection_path, lbench):
gaia = lsdb.read_hats(gaia_collection_path)
def test_local_catalog_multi_partition_npd_read(gaia_local_collection_path, lbench):
gaia = lsdb.read_hats(gaia_local_collection_path)
n_partitions = 10
partition_paths = []
for i in range(n_partitions):
Expand Down
8 changes: 6 additions & 2 deletions benchmarks/test_protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ def crossmatch():
cone = lsdb.ConeSearch(ra=0.0, dec=0.0, radius_arcsec=3600)
gaia_int = lsdb.open_catalog(GAIA_URLS[internal_protocol], search_filter=cone)
gaia_ext = lsdb.open_catalog(GAIA_URLS[external_protocol], search_filter=cone)
xmatch = gaia_int.crossmatch(gaia_ext, radius_arcsec=1, suffixes=("_1", "_2"))
xmatch = gaia_int.crossmatch(
gaia_ext, radius_arcsec=1, suffixes=("_1", "_2"), suffix_method="all_columns"
)
xmatch.compute()

lbench_dask(crossmatch)
Expand All @@ -98,7 +100,9 @@ def crossmatch():
cone = lsdb.ConeSearch(ra=0.0, dec=0.0, radius_arcsec=3600)
gaia_int = lsdb.open_catalog(GAIA_URLS[internal_protocol], columns=["ra", "dec"], search_filter=cone)
gaia_ext = lsdb.open_catalog(GAIA_URLS[external_protocol], columns=["ra", "dec"], search_filter=cone)
xmatch = gaia_int.crossmatch(gaia_ext, radius_arcsec=1, suffixes=("_1", "_2"))
xmatch = gaia_int.crossmatch(
gaia_ext, radius_arcsec=1, suffixes=("_1", "_2"), suffix_method="all_columns"
)
xmatch.compute()

lbench_dask(crossmatch)
Expand Down
Loading