Skip to content

Commit

Permalink
replace small_sky_xmatch_margin with small_sky_order1_margin
Browse files Browse the repository at this point in the history
  • Loading branch information
smcguire-cmu committed Jan 31, 2024
1 parent 706b7b5 commit 4b34e1e
Show file tree
Hide file tree
Showing 21 changed files with 66 additions and 38 deletions.
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def margin_catalog_pixels() -> List[HealpixPixel]:

@pytest.fixture
def margin_catalog_path(test_data_dir) -> str:
return os.path.join(test_data_dir, "small_sky_xmatch_margin")
return os.path.join(test_data_dir, "small_sky_order1_margin")


@pytest.fixture
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
28 changes: 28 additions & 0 deletions tests/data/small_sky_order1_margin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Catalog description

This catalog exists as an margin cache of the small_sky_order1 table,
allowing spatial operations to be performed efficiently and accurately.

This catalog was generated using the following snippet:

```
from hipscat_import.margin_cache.margin_cache_arguments import MarginCacheArguments
from hipscat_import.margin_cache import generate_margin_cache
margin_args = MarginCacheArguments(
margin_threshold=7200,
input_catalog_path="data/small_sky_order1",
output_path="data/",
output_artifact_name="small_sky_order1_margin"
)
if __name__ == "__main__":
generate_margin_cache(margin_args, client)
```

NB:

- The setting `margin_threshold` at 7200 arcseconds (2 degrees) is much higher than
a usual margin cache would be generated at, but is used because the small sky test
dataset is sparse.
Binary file not shown.
Binary file added tests/data/small_sky_order1_margin/_metadata
Binary file not shown.
7 changes: 7 additions & 0 deletions tests/data/small_sky_order1_margin/catalog_info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"catalog_name": "small_sky_order1_margin",
"catalog_type": "margin",
"total_rows": 28,
"primary_catalog": "small_sky_order1",
"margin_threshold": 7200
}
28 changes: 28 additions & 0 deletions tests/data/small_sky_order1_margin/provenance_info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"catalog_name": "small_sky_order1_margin",
"catalog_type": "margin",
"total_rows": 28,
"primary_catalog": "data/small_sky_order1",
"margin_threshold": 7200,
"version": "0.2.3",
"generation_date": "2024.01.30",
"tool_args": {
"tool_name": "hipscat_import",
"version": "0.2.2",
"runtime_args": {
"catalog_name": "small_sky_order1_margin",
"output_path": "data/",
"output_artifact_name": "small_sky_order1_margin",
"tmp_dir": "",
"overwrite": false,
"dask_tmp": "",
"dask_n_workers": 1,
"dask_threads_per_worker": 1,
"catalog_path": "data/small_sky_order1_margin",
"tmp_path": "data/small_sky_order1_margin/intermediate",
"input_catalog_path": "data/small_sky_order1",
"margin_threshold": 7200,
"margin_order": 2
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed tests/data/small_sky_xmatch_margin/_common_metadata
Binary file not shown.
Binary file removed tests/data/small_sky_xmatch_margin/_metadata
Binary file not shown.
7 changes: 0 additions & 7 deletions tests/data/small_sky_xmatch_margin/catalog_info.json

This file was deleted.

28 changes: 0 additions & 28 deletions tests/data/small_sky_xmatch_margin/provenance_info.json

This file was deleted.

4 changes: 2 additions & 2 deletions tests/hipscat/catalog/margin_cache/test_margin_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ def test_read_from_file(margin_catalog_path, margin_catalog_pixels):
assert catalog.get_healpix_pixels() == margin_catalog_pixels

info = catalog.catalog_info
assert info.catalog_name == "small_sky_xmatch_margin"
assert info.catalog_name == "small_sky_order1_margin"
assert info.catalog_type == CatalogType.MARGIN
assert info.primary_catalog == "small_sky_xmatch"
assert info.primary_catalog == "small_sky_order1"
assert info.margin_threshold == 7200


Expand Down

0 comments on commit 4b34e1e

Please sign in to comment.