Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate margin cache for ZTF DR22 on Epyc #460

Closed
hombit opened this issue Dec 19, 2024 · 3 comments
Closed

Generate margin cache for ZTF DR22 on Epyc #460

hombit opened this issue Dec 19, 2024 · 3 comments
Assignees

Comments

@hombit
Copy link
Contributor

hombit commented Dec 19, 2024

@gitosaurus hats-imported ZTF DR22 on Epyc (see #452), it also would be great to have a margin cache for that catalog.

Follow docs/guide/margin_cache.rst with margin_threshold=10.0 and call the output margin catalog {main_catalog_name}_10arcs

@gitosaurus
Copy link
Contributor

Using this script to create the margin cache:

from pathlib import Path

from dask.distributed import Client
from hats_import.pipeline import pipeline_with_client
from hats_import.margin_cache.margin_cache_arguments import MarginCacheArguments


def main(main_catalog_path: Path):
    main_catalog_name = main_catalog_path.name
    main_catalog_dir = main_catalog_path.parent
    margin_cache = f"{main_catalog_name}_10arcs"
    args = MarginCacheArguments(
        input_catalog_path=main_catalog_path,
        output_path=main_catalog_dir,
        margin_threshold=10.0,
        output_artifact_name=margin_cache,
    )
    with Client(
        n_workers=16,
        memory_limit="64GB",
        threads_per_worker=2,
        local_directory="/epyc/data3/hats/tmp",
    ) as client:
        pipeline_with_client(args, client)


if __name__ == "__main__":
    main(
        Path("/data3/epyc/data3/hats/catalogs/ztf_dr22/ztf_lc"),
    )

@gitosaurus
Copy link
Contributor

gitosaurus commented Dec 19, 2024

Getting many instances of this sort of error:

Mapping   :   0%|▏                                                | 45/10839 [00:38<1:24:52,  2.12it/s]
Failed MAPPING stage for pixel: 4_21
  worker address: tcp://127.0.0.1:34799
argument 'lon': 'ndarray' object cannot be converted to 'PyArray<T, D>'

So far I have only seen it happen with the lon argument.

This appears to be an instance of #458 .

@gitosaurus
Copy link
Contributor

With a proposed fix to #458 to convert RA and DEC to double-precision for radec2pix, the margin-cache generation succeeded:

Mapping   : 100%|██████████████████████████████████████████████| 10839/10839 [5:23:57<00:00,  1.79s/it]
Binning   :   0%|                                                                | 0/1 [00:07<?, ?it/s]
Reducing  : 100%|████████████████████████████████████████████████| 10887/10887 [08:09<00:00, 22.25it/s]
Finishing : 100%|████████████████████████████████████████████████████████| 4/4 [00:21<00:00,  5.26s/it]

Final margin cache is at /data3/epyc/data3/hats/catalogs/ztf_dr22/ztf_lc_10arcs. Changed group membership to lsst.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants