From 4c185c2ec7c173e545751ce16a8b36188f9c5057 Mon Sep 17 00:00:00 2001 From: Christina Hedges Date: Mon, 29 Jul 2024 14:37:26 -0400 Subject: [PATCH 01/15] add catalog queries --- poetry.lock | 415 ++++++++++++++++---------------- pyproject.toml | 2 +- src/lksearch/K2Search.py | 4 - src/lksearch/MASTSearch.py | 12 +- src/lksearch/TESSSearch.py | 5 +- src/lksearch/__init__.py | 13 +- src/lksearch/catalog.py | 355 +++++++++++++++++++++++++++ src/lksearch/config/__init__.py | 2 + src/lksearch/version.py | 3 - tests/test_query_catalog.py | 101 ++++++++ tests/test_search.py | 29 +-- 11 files changed, 693 insertions(+), 248 deletions(-) create mode 100644 src/lksearch/catalog.py delete mode 100644 src/lksearch/version.py create mode 100644 tests/test_query_catalog.py diff --git a/poetry.lock b/poetry.lock index f821a25..24e58a7 100644 --- a/poetry.lock +++ b/poetry.lock @@ -349,17 +349,17 @@ css = ["tinycss2 (>=1.1.0,<1.3)"] [[package]] name = "boto3" -version = "1.34.144" +version = "1.34.149" description = "The AWS SDK for Python" optional = false python-versions = ">=3.8" files = [ - {file = "boto3-1.34.144-py3-none-any.whl", hash = "sha256:b8433d481d50b68a0162c0379c0dd4aabfc3d1ad901800beb5b87815997511c1"}, - {file = "boto3-1.34.144.tar.gz", hash = "sha256:2f3e88b10b8fcc5f6100a9d74cd28230edc9d4fa226d99dd40a3ab38ac213673"}, + {file = "boto3-1.34.149-py3-none-any.whl", hash = "sha256:11edeeacdd517bda3b7615b754d8440820cdc9ddd66794cc995a9693ddeaa3be"}, + {file = "boto3-1.34.149.tar.gz", hash = "sha256:f4e6489ba9dc7fb37d53e0e82dbc97f2cb0a4969ef3970e2c88b8f94023ae81a"}, ] [package.dependencies] -botocore = ">=1.34.144,<1.35.0" +botocore = ">=1.34.149,<1.35.0" jmespath = ">=0.7.1,<2.0.0" s3transfer = ">=0.10.0,<0.11.0" @@ -368,13 +368,13 @@ crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] [[package]] name = "botocore" -version = "1.34.144" +version = "1.34.149" description = "Low-level, data-driven core of boto 3." optional = false python-versions = ">=3.8" files = [ - {file = "botocore-1.34.144-py3-none-any.whl", hash = "sha256:a2cf26e1bf10d5917a2285e50257bc44e94a1d16574f282f3274f7a5d8d1f08b"}, - {file = "botocore-1.34.144.tar.gz", hash = "sha256:4215db28d25309d59c99507f1f77df9089e5bebbad35f6e19c7c44ec5383a3e8"}, + {file = "botocore-1.34.149-py3-none-any.whl", hash = "sha256:ae6c4be52eeee96f68c116b27d252bab069cd046d61a17cfe8e9da411cf22906"}, + {file = "botocore-1.34.149.tar.gz", hash = "sha256:2e1eb5ef40102a3d796bb3dd05f2ac5e8fb43fe1ff114b4f6d33153437f5a372"}, ] [package.dependencies] @@ -655,43 +655,38 @@ test-no-images = ["pytest", "pytest-cov", "pytest-xdist", "wurlitzer"] [[package]] name = "cryptography" -version = "42.0.8" +version = "43.0.0" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." optional = false python-versions = ">=3.7" files = [ - {file = "cryptography-42.0.8-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:81d8a521705787afe7a18d5bfb47ea9d9cc068206270aad0b96a725022e18d2e"}, - {file = "cryptography-42.0.8-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:961e61cefdcb06e0c6d7e3a1b22ebe8b996eb2bf50614e89384be54c48c6b63d"}, - {file = "cryptography-42.0.8-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e3ec3672626e1b9e55afd0df6d774ff0e953452886e06e0f1eb7eb0c832e8902"}, - {file = "cryptography-42.0.8-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e599b53fd95357d92304510fb7bda8523ed1f79ca98dce2f43c115950aa78801"}, - {file = "cryptography-42.0.8-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:5226d5d21ab681f432a9c1cf8b658c0cb02533eece706b155e5fbd8a0cdd3949"}, - {file = "cryptography-42.0.8-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:6b7c4f03ce01afd3b76cf69a5455caa9cfa3de8c8f493e0d3ab7d20611c8dae9"}, - {file = "cryptography-42.0.8-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:2346b911eb349ab547076f47f2e035fc8ff2c02380a7cbbf8d87114fa0f1c583"}, - {file = "cryptography-42.0.8-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:ad803773e9df0b92e0a817d22fd8a3675493f690b96130a5e24f1b8fabbea9c7"}, - {file = "cryptography-42.0.8-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:2f66d9cd9147ee495a8374a45ca445819f8929a3efcd2e3df6428e46c3cbb10b"}, - {file = "cryptography-42.0.8-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:d45b940883a03e19e944456a558b67a41160e367a719833c53de6911cabba2b7"}, - {file = "cryptography-42.0.8-cp37-abi3-win32.whl", hash = "sha256:a0c5b2b0585b6af82d7e385f55a8bc568abff8923af147ee3c07bd8b42cda8b2"}, - {file = "cryptography-42.0.8-cp37-abi3-win_amd64.whl", hash = "sha256:57080dee41209e556a9a4ce60d229244f7a66ef52750f813bfbe18959770cfba"}, - {file = "cryptography-42.0.8-cp39-abi3-macosx_10_12_universal2.whl", hash = "sha256:dea567d1b0e8bc5764b9443858b673b734100c2871dc93163f58c46a97a83d28"}, - {file = "cryptography-42.0.8-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c4783183f7cb757b73b2ae9aed6599b96338eb957233c58ca8f49a49cc32fd5e"}, - {file = "cryptography-42.0.8-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a0608251135d0e03111152e41f0cc2392d1e74e35703960d4190b2e0f4ca9c70"}, - {file = "cryptography-42.0.8-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:dc0fdf6787f37b1c6b08e6dfc892d9d068b5bdb671198c72072828b80bd5fe4c"}, - {file = "cryptography-42.0.8-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:9c0c1716c8447ee7dbf08d6db2e5c41c688544c61074b54fc4564196f55c25a7"}, - {file = "cryptography-42.0.8-cp39-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:fff12c88a672ab9c9c1cf7b0c80e3ad9e2ebd9d828d955c126be4fd3e5578c9e"}, - {file = "cryptography-42.0.8-cp39-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:cafb92b2bc622cd1aa6a1dce4b93307792633f4c5fe1f46c6b97cf67073ec961"}, - {file = "cryptography-42.0.8-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:31f721658a29331f895a5a54e7e82075554ccfb8b163a18719d342f5ffe5ecb1"}, - {file = "cryptography-42.0.8-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b297f90c5723d04bcc8265fc2a0f86d4ea2e0f7ab4b6994459548d3a6b992a14"}, - {file = "cryptography-42.0.8-cp39-abi3-win32.whl", hash = "sha256:2f88d197e66c65be5e42cd72e5c18afbfae3f741742070e3019ac8f4ac57262c"}, - {file = "cryptography-42.0.8-cp39-abi3-win_amd64.whl", hash = "sha256:fa76fbb7596cc5839320000cdd5d0955313696d9511debab7ee7278fc8b5c84a"}, - {file = "cryptography-42.0.8-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:ba4f0a211697362e89ad822e667d8d340b4d8d55fae72cdd619389fb5912eefe"}, - {file = "cryptography-42.0.8-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:81884c4d096c272f00aeb1f11cf62ccd39763581645b0812e99a91505fa48e0c"}, - {file = "cryptography-42.0.8-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:c9bb2ae11bfbab395bdd072985abde58ea9860ed84e59dbc0463a5d0159f5b71"}, - {file = "cryptography-42.0.8-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:7016f837e15b0a1c119d27ecd89b3515f01f90a8615ed5e9427e30d9cdbfed3d"}, - {file = "cryptography-42.0.8-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5a94eccb2a81a309806027e1670a358b99b8fe8bfe9f8d329f27d72c094dde8c"}, - {file = "cryptography-42.0.8-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:dec9b018df185f08483f294cae6ccac29e7a6e0678996587363dc352dc65c842"}, - {file = "cryptography-42.0.8-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:343728aac38decfdeecf55ecab3264b015be68fc2816ca800db649607aeee648"}, - {file = "cryptography-42.0.8-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:013629ae70b40af70c9a7a5db40abe5d9054e6f4380e50ce769947b73bf3caad"}, - {file = "cryptography-42.0.8.tar.gz", hash = "sha256:8d09d05439ce7baa8e9e95b07ec5b6c886f548deb7e0f69ef25f64b3bce842f2"}, + {file = "cryptography-43.0.0-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:64c3f16e2a4fc51c0d06af28441881f98c5d91009b8caaff40cf3548089e9c74"}, + {file = "cryptography-43.0.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3dcdedae5c7710b9f97ac6bba7e1052b95c7083c9d0e9df96e02a1932e777895"}, + {file = "cryptography-43.0.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d9a1eca329405219b605fac09ecfc09ac09e595d6def650a437523fcd08dd22"}, + {file = "cryptography-43.0.0-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:ea9e57f8ea880eeea38ab5abf9fbe39f923544d7884228ec67d666abd60f5a47"}, + {file = "cryptography-43.0.0-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:9a8d6802e0825767476f62aafed40532bd435e8a5f7d23bd8b4f5fd04cc80ecf"}, + {file = "cryptography-43.0.0-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:cc70b4b581f28d0a254d006f26949245e3657d40d8857066c2ae22a61222ef55"}, + {file = "cryptography-43.0.0-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:4a997df8c1c2aae1e1e5ac49c2e4f610ad037fc5a3aadc7b64e39dea42249431"}, + {file = "cryptography-43.0.0-cp37-abi3-win32.whl", hash = "sha256:6e2b11c55d260d03a8cf29ac9b5e0608d35f08077d8c087be96287f43af3ccdc"}, + {file = "cryptography-43.0.0-cp37-abi3-win_amd64.whl", hash = "sha256:31e44a986ceccec3d0498e16f3d27b2ee5fdf69ce2ab89b52eaad1d2f33d8778"}, + {file = "cryptography-43.0.0-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:7b3f5fe74a5ca32d4d0f302ffe6680fcc5c28f8ef0dc0ae8f40c0f3a1b4fca66"}, + {file = "cryptography-43.0.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac1955ce000cb29ab40def14fd1bbfa7af2017cca696ee696925615cafd0dce5"}, + {file = "cryptography-43.0.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:299d3da8e00b7e2b54bb02ef58d73cd5f55fb31f33ebbf33bd00d9aa6807df7e"}, + {file = "cryptography-43.0.0-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:ee0c405832ade84d4de74b9029bedb7b31200600fa524d218fc29bfa371e97f5"}, + {file = "cryptography-43.0.0-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:cb013933d4c127349b3948aa8aaf2f12c0353ad0eccd715ca789c8a0f671646f"}, + {file = "cryptography-43.0.0-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:fdcb265de28585de5b859ae13e3846a8e805268a823a12a4da2597f1f5afc9f0"}, + {file = "cryptography-43.0.0-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:2905ccf93a8a2a416f3ec01b1a7911c3fe4073ef35640e7ee5296754e30b762b"}, + {file = "cryptography-43.0.0-cp39-abi3-win32.whl", hash = "sha256:47ca71115e545954e6c1d207dd13461ab81f4eccfcb1345eac874828b5e3eaaf"}, + {file = "cryptography-43.0.0-cp39-abi3-win_amd64.whl", hash = "sha256:0663585d02f76929792470451a5ba64424acc3cd5227b03921dab0e2f27b1709"}, + {file = "cryptography-43.0.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:2c6d112bf61c5ef44042c253e4859b3cbbb50df2f78fa8fae6747a7814484a70"}, + {file = "cryptography-43.0.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:844b6d608374e7d08f4f6e6f9f7b951f9256db41421917dfb2d003dde4cd6b66"}, + {file = "cryptography-43.0.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:51956cf8730665e2bdf8ddb8da0056f699c1a5715648c1b0144670c1ba00b48f"}, + {file = "cryptography-43.0.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:aae4d918f6b180a8ab8bf6511a419473d107df4dbb4225c7b48c5c9602c38c7f"}, + {file = "cryptography-43.0.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:232ce02943a579095a339ac4b390fbbe97f5b5d5d107f8a08260ea2768be8cc2"}, + {file = "cryptography-43.0.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:5bcb8a5620008a8034d39bce21dc3e23735dfdb6a33a06974739bfa04f853947"}, + {file = "cryptography-43.0.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:08a24a7070b2b6804c1940ff0f910ff728932a9d0e80e7814234269f9d46d069"}, + {file = "cryptography-43.0.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:e9c5266c432a1e23738d178e51c2c7a5e2ddf790f248be939448c0ba2021f9d1"}, + {file = "cryptography-43.0.0.tar.gz", hash = "sha256:b88075ada2d51aa9f18283532c9f60e72170041bba88d7f37e49cbb10275299e"}, ] [package.dependencies] @@ -704,7 +699,7 @@ nox = ["nox"] pep8test = ["check-sdist", "click", "mypy", "ruff"] sdist = ["build"] ssh = ["bcrypt (>=3.1.5)"] -test = ["certifi", "pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-xdist"] +test = ["certifi", "cryptography-vectors (==43.0.0)", "pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-xdist"] test-randomorder = ["pytest-randomly"] [[package]] @@ -1005,13 +1000,13 @@ files = [ [[package]] name = "importlib-metadata" -version = "8.0.0" +version = "8.2.0" description = "Read metadata from Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "importlib_metadata-8.0.0-py3-none-any.whl", hash = "sha256:15584cf2b1bf449d98ff8a6ff1abef57bf20f3ac6454f431736cd3e660921b2f"}, - {file = "importlib_metadata-8.0.0.tar.gz", hash = "sha256:188bd24e4c346d3f0a933f275c2fec67050326a856b9a359881d7c2a697e8812"}, + {file = "importlib_metadata-8.2.0-py3-none-any.whl", hash = "sha256:11901fa0c2f97919b288679932bb64febaeacf289d18ac84dd68cb2e74213369"}, + {file = "importlib_metadata-8.2.0.tar.gz", hash = "sha256:72e8d4399996132204f9a16dcc751af254a48f8d1b20b9ff0f98d4a8f901e73d"}, ] [package.dependencies] @@ -1456,13 +1451,13 @@ test = ["jupyter-server (>=2.0.0)", "pytest (>=7.0)", "pytest-jupyter[server] (> [[package]] name = "jupyterlab" -version = "4.2.3" +version = "4.2.4" description = "JupyterLab computational environment" optional = false python-versions = ">=3.8" files = [ - {file = "jupyterlab-4.2.3-py3-none-any.whl", hash = "sha256:0b59d11808e84bb84105c73364edfa867dd475492429ab34ea388a52f2e2e596"}, - {file = "jupyterlab-4.2.3.tar.gz", hash = "sha256:df6e46969ea51d66815167f23d92f105423b7f1f06fa604d4f44aeb018c82c7b"}, + {file = "jupyterlab-4.2.4-py3-none-any.whl", hash = "sha256:807a7ec73637744f879e112060d4b9d9ebe028033b7a429b2d1f4fc523d00245"}, + {file = "jupyterlab-4.2.4.tar.gz", hash = "sha256:343a979fb9582fd08c8511823e320703281cd072a0049bcdafdc7afeda7f2537"}, ] [package.dependencies] @@ -1487,7 +1482,7 @@ dev = ["build", "bump2version", "coverage", "hatch", "pre-commit", "pytest-cov", docs = ["jsx-lexer", "myst-parser", "pydata-sphinx-theme (>=0.13.0)", "pytest", "pytest-check-links", "pytest-jupyter", "sphinx (>=1.8,<7.3.0)", "sphinx-copybutton"] docs-screenshots = ["altair (==5.3.0)", "ipython (==8.16.1)", "ipywidgets (==8.1.2)", "jupyterlab-geojson (==3.4.0)", "jupyterlab-language-pack-zh-cn (==4.1.post2)", "matplotlib (==3.8.3)", "nbconvert (>=7.0.0)", "pandas (==2.2.1)", "scipy (==1.12.0)", "vega-datasets (==0.9.0)"] test = ["coverage", "pytest (>=7.0)", "pytest-check-links (>=0.7)", "pytest-console-scripts", "pytest-cov", "pytest-jupyter (>=0.5.3)", "pytest-timeout", "pytest-tornasync", "requests", "requests-cache", "virtualenv"] -upgrade-extension = ["copier (>=8,<10)", "jinja2-time (<0.3)", "pydantic (<2.0)", "pyyaml-include (<2.0)", "tomli-w (<2.0)"] +upgrade-extension = ["copier (>=9,<10)", "jinja2-time (<0.3)", "pydantic (<3.0)", "pyyaml-include (<3.0)", "tomli-w (<2.0)"] [[package]] name = "jupyterlab-pygments" @@ -2456,13 +2451,13 @@ files = [ [[package]] name = "pure-eval" -version = "0.2.2" +version = "0.2.3" description = "Safely evaluate AST nodes without side effects" optional = false python-versions = "*" files = [ - {file = "pure_eval-0.2.2-py3-none-any.whl", hash = "sha256:01eaab343580944bc56080ebe0a674b39ec44a945e6d09ba7db3cb8cec289350"}, - {file = "pure_eval-0.2.2.tar.gz", hash = "sha256:2b45320af6dfaa1750f543d714b6d1c520a1688dec6fd24d339063ce0aaa9ac3"}, + {file = "pure_eval-0.2.3-py3-none-any.whl", hash = "sha256:1db8e35b67b3d218d818ae653e27f06c3aa420901fa7b081ca98cbedc874e0d0"}, + {file = "pure_eval-0.2.3.tar.gz", hash = "sha256:5f4e983f40564c576c7c8635ae88db5956bb2229d7e9237d03b3c0b0190eaf42"}, ] [package.extras] @@ -2949,137 +2944,141 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "rpds-py" -version = "0.19.0" +version = "0.19.1" description = "Python bindings to Rust's persistent data structures (rpds)" optional = false python-versions = ">=3.8" files = [ - {file = "rpds_py-0.19.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:fb37bd599f031f1a6fb9e58ec62864ccf3ad549cf14bac527dbfa97123edcca4"}, - {file = "rpds_py-0.19.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:3384d278df99ec2c6acf701d067147320b864ef6727405d6470838476e44d9e8"}, - {file = "rpds_py-0.19.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e54548e0be3ac117595408fd4ca0ac9278fde89829b0b518be92863b17ff67a2"}, - {file = "rpds_py-0.19.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8eb488ef928cdbc05a27245e52de73c0d7c72a34240ef4d9893fdf65a8c1a955"}, - {file = "rpds_py-0.19.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a5da93debdfe27b2bfc69eefb592e1831d957b9535e0943a0ee8b97996de21b5"}, - {file = "rpds_py-0.19.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:79e205c70afddd41f6ee79a8656aec738492a550247a7af697d5bd1aee14f766"}, - {file = "rpds_py-0.19.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:959179efb3e4a27610e8d54d667c02a9feaa86bbabaf63efa7faa4dfa780d4f1"}, - {file = "rpds_py-0.19.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a6e605bb9edcf010f54f8b6a590dd23a4b40a8cb141255eec2a03db249bc915b"}, - {file = "rpds_py-0.19.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:9133d75dc119a61d1a0ded38fb9ba40a00ef41697cc07adb6ae098c875195a3f"}, - {file = "rpds_py-0.19.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:dd36b712d35e757e28bf2f40a71e8f8a2d43c8b026d881aa0c617b450d6865c9"}, - {file = "rpds_py-0.19.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:354f3a91718489912f2e0fc331c24eaaf6a4565c080e00fbedb6015857c00582"}, - {file = "rpds_py-0.19.0-cp310-none-win32.whl", hash = "sha256:ebcbf356bf5c51afc3290e491d3722b26aaf5b6af3c1c7f6a1b757828a46e336"}, - {file = "rpds_py-0.19.0-cp310-none-win_amd64.whl", hash = "sha256:75a6076289b2df6c8ecb9d13ff79ae0cad1d5fb40af377a5021016d58cd691ec"}, - {file = "rpds_py-0.19.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:6d45080095e585f8c5097897313def60caa2046da202cdb17a01f147fb263b81"}, - {file = "rpds_py-0.19.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c5c9581019c96f865483d031691a5ff1cc455feb4d84fc6920a5ffc48a794d8a"}, - {file = "rpds_py-0.19.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1540d807364c84516417115c38f0119dfec5ea5c0dd9a25332dea60b1d26fc4d"}, - {file = "rpds_py-0.19.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9e65489222b410f79711dc3d2d5003d2757e30874096b2008d50329ea4d0f88c"}, - {file = "rpds_py-0.19.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9da6f400eeb8c36f72ef6646ea530d6d175a4f77ff2ed8dfd6352842274c1d8b"}, - {file = "rpds_py-0.19.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:37f46bb11858717e0efa7893c0f7055c43b44c103e40e69442db5061cb26ed34"}, - {file = "rpds_py-0.19.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:071d4adc734de562bd11d43bd134330fb6249769b2f66b9310dab7460f4bf714"}, - {file = "rpds_py-0.19.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9625367c8955e4319049113ea4f8fee0c6c1145192d57946c6ffcd8fe8bf48dd"}, - {file = "rpds_py-0.19.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:e19509145275d46bc4d1e16af0b57a12d227c8253655a46bbd5ec317e941279d"}, - {file = "rpds_py-0.19.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:4d438e4c020d8c39961deaf58f6913b1bf8832d9b6f62ec35bd93e97807e9cbc"}, - {file = "rpds_py-0.19.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:90bf55d9d139e5d127193170f38c584ed3c79e16638890d2e36f23aa1630b952"}, - {file = "rpds_py-0.19.0-cp311-none-win32.whl", hash = "sha256:8d6ad132b1bc13d05ffe5b85e7a01a3998bf3a6302ba594b28d61b8c2cf13aaf"}, - {file = "rpds_py-0.19.0-cp311-none-win_amd64.whl", hash = "sha256:7ec72df7354e6b7f6eb2a17fa6901350018c3a9ad78e48d7b2b54d0412539a67"}, - {file = "rpds_py-0.19.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:5095a7c838a8647c32aa37c3a460d2c48debff7fc26e1136aee60100a8cd8f68"}, - {file = "rpds_py-0.19.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6f2f78ef14077e08856e788fa482107aa602636c16c25bdf59c22ea525a785e9"}, - {file = "rpds_py-0.19.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b7cc6cb44f8636fbf4a934ca72f3e786ba3c9f9ba4f4d74611e7da80684e48d2"}, - {file = "rpds_py-0.19.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:cf902878b4af334a09de7a45badbff0389e7cf8dc2e4dcf5f07125d0b7c2656d"}, - {file = "rpds_py-0.19.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:688aa6b8aa724db1596514751ffb767766e02e5c4a87486ab36b8e1ebc1aedac"}, - {file = "rpds_py-0.19.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:57dbc9167d48e355e2569346b5aa4077f29bf86389c924df25c0a8b9124461fb"}, - {file = "rpds_py-0.19.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b4cf5a9497874822341c2ebe0d5850fed392034caadc0bad134ab6822c0925b"}, - {file = "rpds_py-0.19.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8a790d235b9d39c70a466200d506bb33a98e2ee374a9b4eec7a8ac64c2c261fa"}, - {file = "rpds_py-0.19.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1d16089dfa58719c98a1c06f2daceba6d8e3fb9b5d7931af4a990a3c486241cb"}, - {file = "rpds_py-0.19.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:bc9128e74fe94650367fe23f37074f121b9f796cabbd2f928f13e9661837296d"}, - {file = "rpds_py-0.19.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c8f77e661ffd96ff104bebf7d0f3255b02aa5d5b28326f5408d6284c4a8b3248"}, - {file = "rpds_py-0.19.0-cp312-none-win32.whl", hash = "sha256:5f83689a38e76969327e9b682be5521d87a0c9e5a2e187d2bc6be4765f0d4600"}, - {file = "rpds_py-0.19.0-cp312-none-win_amd64.whl", hash = "sha256:06925c50f86da0596b9c3c64c3837b2481337b83ef3519e5db2701df695453a4"}, - {file = "rpds_py-0.19.0-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:52e466bea6f8f3a44b1234570244b1cff45150f59a4acae3fcc5fd700c2993ca"}, - {file = "rpds_py-0.19.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:e21cc693045fda7f745c790cb687958161ce172ffe3c5719ca1764e752237d16"}, - {file = "rpds_py-0.19.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b31f059878eb1f5da8b2fd82480cc18bed8dcd7fb8fe68370e2e6285fa86da6"}, - {file = "rpds_py-0.19.0-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1dd46f309e953927dd018567d6a9e2fb84783963650171f6c5fe7e5c41fd5666"}, - {file = "rpds_py-0.19.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:34a01a4490e170376cd79258b7f755fa13b1a6c3667e872c8e35051ae857a92b"}, - {file = "rpds_py-0.19.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bcf426a8c38eb57f7bf28932e68425ba86def6e756a5b8cb4731d8e62e4e0223"}, - {file = "rpds_py-0.19.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f68eea5df6347d3f1378ce992d86b2af16ad7ff4dcb4a19ccdc23dea901b87fb"}, - {file = "rpds_py-0.19.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:dab8d921b55a28287733263c0e4c7db11b3ee22aee158a4de09f13c93283c62d"}, - {file = "rpds_py-0.19.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:6fe87efd7f47266dfc42fe76dae89060038f1d9cb911f89ae7e5084148d1cc08"}, - {file = "rpds_py-0.19.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:535d4b52524a961d220875688159277f0e9eeeda0ac45e766092bfb54437543f"}, - {file = "rpds_py-0.19.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:8b1a94b8afc154fbe36978a511a1f155f9bd97664e4f1f7a374d72e180ceb0ae"}, - {file = "rpds_py-0.19.0-cp38-none-win32.whl", hash = "sha256:7c98298a15d6b90c8f6e3caa6457f4f022423caa5fa1a1ca7a5e9e512bdb77a4"}, - {file = "rpds_py-0.19.0-cp38-none-win_amd64.whl", hash = "sha256:b0da31853ab6e58a11db3205729133ce0df26e6804e93079dee095be3d681dc1"}, - {file = "rpds_py-0.19.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:5039e3cef7b3e7a060de468a4a60a60a1f31786da94c6cb054e7a3c75906111c"}, - {file = "rpds_py-0.19.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ab1932ca6cb8c7499a4d87cb21ccc0d3326f172cfb6a64021a889b591bb3045c"}, - {file = "rpds_py-0.19.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f2afd2164a1e85226fcb6a1da77a5c8896c18bfe08e82e8ceced5181c42d2179"}, - {file = "rpds_py-0.19.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b1c30841f5040de47a0046c243fc1b44ddc87d1b12435a43b8edff7e7cb1e0d0"}, - {file = "rpds_py-0.19.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f757f359f30ec7dcebca662a6bd46d1098f8b9fb1fcd661a9e13f2e8ce343ba1"}, - {file = "rpds_py-0.19.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:15e65395a59d2e0e96caf8ee5389ffb4604e980479c32742936ddd7ade914b22"}, - {file = "rpds_py-0.19.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cb0f6eb3a320f24b94d177e62f4074ff438f2ad9d27e75a46221904ef21a7b05"}, - {file = "rpds_py-0.19.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b228e693a2559888790936e20f5f88b6e9f8162c681830eda303bad7517b4d5a"}, - {file = "rpds_py-0.19.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2575efaa5d949c9f4e2cdbe7d805d02122c16065bfb8d95c129372d65a291a0b"}, - {file = "rpds_py-0.19.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:5c872814b77a4e84afa293a1bee08c14daed1068b2bb1cc312edbf020bbbca2b"}, - {file = "rpds_py-0.19.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:850720e1b383df199b8433a20e02b25b72f0fded28bc03c5bd79e2ce7ef050be"}, - {file = "rpds_py-0.19.0-cp39-none-win32.whl", hash = "sha256:ce84a7efa5af9f54c0aa7692c45861c1667080814286cacb9958c07fc50294fb"}, - {file = "rpds_py-0.19.0-cp39-none-win_amd64.whl", hash = "sha256:1c26da90b8d06227d7769f34915913911222d24ce08c0ab2d60b354e2d9c7aff"}, - {file = "rpds_py-0.19.0-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:75969cf900d7be665ccb1622a9aba225cf386bbc9c3bcfeeab9f62b5048f4a07"}, - {file = "rpds_py-0.19.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:8445f23f13339da640d1be8e44e5baf4af97e396882ebbf1692aecd67f67c479"}, - {file = "rpds_py-0.19.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5a7c1062ef8aea3eda149f08120f10795835fc1c8bc6ad948fb9652a113ca55"}, - {file = "rpds_py-0.19.0-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:462b0c18fbb48fdbf980914a02ee38c423a25fcc4cf40f66bacc95a2d2d73bc8"}, - {file = "rpds_py-0.19.0-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3208f9aea18991ac7f2b39721e947bbd752a1abbe79ad90d9b6a84a74d44409b"}, - {file = "rpds_py-0.19.0-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c3444fe52b82f122d8a99bf66777aed6b858d392b12f4c317da19f8234db4533"}, - {file = "rpds_py-0.19.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88cb4bac7185a9f0168d38c01d7a00addece9822a52870eee26b8d5b61409213"}, - {file = "rpds_py-0.19.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6b130bd4163c93798a6b9bb96be64a7c43e1cec81126ffa7ffaa106e1fc5cef5"}, - {file = "rpds_py-0.19.0-pp310-pypy310_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:a707b158b4410aefb6b054715545bbb21aaa5d5d0080217290131c49c2124a6e"}, - {file = "rpds_py-0.19.0-pp310-pypy310_pp73-musllinux_1_2_i686.whl", hash = "sha256:dc9ac4659456bde7c567107556ab065801622396b435a3ff213daef27b495388"}, - {file = "rpds_py-0.19.0-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:81ea573aa46d3b6b3d890cd3c0ad82105985e6058a4baed03cf92518081eec8c"}, - {file = "rpds_py-0.19.0-pp38-pypy38_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3f148c3f47f7f29a79c38cc5d020edcb5ca780020fab94dbc21f9af95c463581"}, - {file = "rpds_py-0.19.0-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:b0906357f90784a66e89ae3eadc2654f36c580a7d65cf63e6a616e4aec3a81be"}, - {file = "rpds_py-0.19.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f629ecc2db6a4736b5ba95a8347b0089240d69ad14ac364f557d52ad68cf94b0"}, - {file = "rpds_py-0.19.0-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c6feacd1d178c30e5bc37184526e56740342fd2aa6371a28367bad7908d454fc"}, - {file = "rpds_py-0.19.0-pp38-pypy38_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae8b6068ee374fdfab63689be0963333aa83b0815ead5d8648389a8ded593378"}, - {file = "rpds_py-0.19.0-pp38-pypy38_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:78d57546bad81e0da13263e4c9ce30e96dcbe720dbff5ada08d2600a3502e526"}, - {file = "rpds_py-0.19.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8b6683a37338818646af718c9ca2a07f89787551057fae57c4ec0446dc6224b"}, - {file = "rpds_py-0.19.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e8481b946792415adc07410420d6fc65a352b45d347b78fec45d8f8f0d7496f0"}, - {file = "rpds_py-0.19.0-pp38-pypy38_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:bec35eb20792ea64c3c57891bc3ca0bedb2884fbac2c8249d9b731447ecde4fa"}, - {file = "rpds_py-0.19.0-pp38-pypy38_pp73-musllinux_1_2_i686.whl", hash = "sha256:aa5476c3e3a402c37779e95f7b4048db2cb5b0ed0b9d006983965e93f40fe05a"}, - {file = "rpds_py-0.19.0-pp38-pypy38_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:19d02c45f2507b489fd4df7b827940f1420480b3e2e471e952af4d44a1ea8e34"}, - {file = "rpds_py-0.19.0-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:a3e2fd14c5d49ee1da322672375963f19f32b3d5953f0615b175ff7b9d38daed"}, - {file = "rpds_py-0.19.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:93a91c2640645303e874eada51f4f33351b84b351a689d470f8108d0e0694210"}, - {file = "rpds_py-0.19.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e5b9fc03bf76a94065299d4a2ecd8dfbae4ae8e2e8098bbfa6ab6413ca267709"}, - {file = "rpds_py-0.19.0-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5a4b07cdf3f84310c08c1de2c12ddadbb7a77568bcb16e95489f9c81074322ed"}, - {file = "rpds_py-0.19.0-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ba0ed0dc6763d8bd6e5de5cf0d746d28e706a10b615ea382ac0ab17bb7388633"}, - {file = "rpds_py-0.19.0-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:474bc83233abdcf2124ed3f66230a1c8435896046caa4b0b5ab6013c640803cc"}, - {file = "rpds_py-0.19.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:329c719d31362355a96b435f4653e3b4b061fcc9eba9f91dd40804ca637d914e"}, - {file = "rpds_py-0.19.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ef9101f3f7b59043a34f1dccbb385ca760467590951952d6701df0da9893ca0c"}, - {file = "rpds_py-0.19.0-pp39-pypy39_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:0121803b0f424ee2109d6e1f27db45b166ebaa4b32ff47d6aa225642636cd834"}, - {file = "rpds_py-0.19.0-pp39-pypy39_pp73-musllinux_1_2_i686.whl", hash = "sha256:8344127403dea42f5970adccf6c5957a71a47f522171fafaf4c6ddb41b61703a"}, - {file = "rpds_py-0.19.0-pp39-pypy39_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:443cec402ddd650bb2b885113e1dcedb22b1175c6be223b14246a714b61cd521"}, - {file = "rpds_py-0.19.0.tar.gz", hash = "sha256:4fdc9afadbeb393b4bbbad75481e0ea78e4469f2e1d713a90811700830b553a9"}, + {file = "rpds_py-0.19.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:aaf71f95b21f9dc708123335df22e5a2fef6307e3e6f9ed773b2e0938cc4d491"}, + {file = "rpds_py-0.19.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ca0dda0c5715efe2ab35bb83f813f681ebcd2840d8b1b92bfc6fe3ab382fae4a"}, + {file = "rpds_py-0.19.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:81db2e7282cc0487f500d4db203edc57da81acde9e35f061d69ed983228ffe3b"}, + {file = "rpds_py-0.19.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1a8dfa125b60ec00c7c9baef945bb04abf8ac772d8ebefd79dae2a5f316d7850"}, + {file = "rpds_py-0.19.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:271accf41b02687cef26367c775ab220372ee0f4925591c6796e7c148c50cab5"}, + {file = "rpds_py-0.19.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f9bc4161bd3b970cd6a6fcda70583ad4afd10f2750609fb1f3ca9505050d4ef3"}, + {file = "rpds_py-0.19.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f0cf2a0dbb5987da4bd92a7ca727eadb225581dd9681365beba9accbe5308f7d"}, + {file = "rpds_py-0.19.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b5e28e56143750808c1c79c70a16519e9bc0a68b623197b96292b21b62d6055c"}, + {file = "rpds_py-0.19.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:c7af6f7b80f687b33a4cdb0a785a5d4de1fb027a44c9a049d8eb67d5bfe8a687"}, + {file = "rpds_py-0.19.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e429fc517a1c5e2a70d576077231538a98d59a45dfc552d1ac45a132844e6dfb"}, + {file = "rpds_py-0.19.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:d2dbd8f4990d4788cb122f63bf000357533f34860d269c1a8e90ae362090ff3a"}, + {file = "rpds_py-0.19.1-cp310-none-win32.whl", hash = "sha256:e0f9d268b19e8f61bf42a1da48276bcd05f7ab5560311f541d22557f8227b866"}, + {file = "rpds_py-0.19.1-cp310-none-win_amd64.whl", hash = "sha256:df7c841813f6265e636fe548a49664c77af31ddfa0085515326342a751a6ba51"}, + {file = "rpds_py-0.19.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:902cf4739458852fe917104365ec0efbea7d29a15e4276c96a8d33e6ed8ec137"}, + {file = "rpds_py-0.19.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f3d73022990ab0c8b172cce57c69fd9a89c24fd473a5e79cbce92df87e3d9c48"}, + {file = "rpds_py-0.19.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3837c63dd6918a24de6c526277910e3766d8c2b1627c500b155f3eecad8fad65"}, + {file = "rpds_py-0.19.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:cdb7eb3cf3deb3dd9e7b8749323b5d970052711f9e1e9f36364163627f96da58"}, + {file = "rpds_py-0.19.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:26ab43b6d65d25b1a333c8d1b1c2f8399385ff683a35ab5e274ba7b8bb7dc61c"}, + {file = "rpds_py-0.19.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:75130df05aae7a7ac171b3b5b24714cffeabd054ad2ebc18870b3aa4526eba23"}, + {file = "rpds_py-0.19.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c34f751bf67cab69638564eee34023909380ba3e0d8ee7f6fe473079bf93f09b"}, + {file = "rpds_py-0.19.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f2671cb47e50a97f419a02cd1e0c339b31de017b033186358db92f4d8e2e17d8"}, + {file = "rpds_py-0.19.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:3c73254c256081704dba0a333457e2fb815364018788f9b501efe7c5e0ada401"}, + {file = "rpds_py-0.19.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:4383beb4a29935b8fa28aca8fa84c956bf545cb0c46307b091b8d312a9150e6a"}, + {file = "rpds_py-0.19.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:dbceedcf4a9329cc665452db1aaf0845b85c666e4885b92ee0cddb1dbf7e052a"}, + {file = "rpds_py-0.19.1-cp311-none-win32.whl", hash = "sha256:f0a6d4a93d2a05daec7cb885157c97bbb0be4da739d6f9dfb02e101eb40921cd"}, + {file = "rpds_py-0.19.1-cp311-none-win_amd64.whl", hash = "sha256:c149a652aeac4902ecff2dd93c3b2681c608bd5208c793c4a99404b3e1afc87c"}, + {file = "rpds_py-0.19.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:56313be667a837ff1ea3508cebb1ef6681d418fa2913a0635386cf29cff35165"}, + {file = "rpds_py-0.19.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6d1d7539043b2b31307f2c6c72957a97c839a88b2629a348ebabe5aa8b626d6b"}, + {file = "rpds_py-0.19.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e1dc59a5e7bc7f44bd0c048681f5e05356e479c50be4f2c1a7089103f1621d5"}, + {file = "rpds_py-0.19.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b8f78398e67a7227aefa95f876481485403eb974b29e9dc38b307bb6eb2315ea"}, + {file = "rpds_py-0.19.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ef07a0a1d254eeb16455d839cef6e8c2ed127f47f014bbda64a58b5482b6c836"}, + {file = "rpds_py-0.19.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8124101e92c56827bebef084ff106e8ea11c743256149a95b9fd860d3a4f331f"}, + {file = "rpds_py-0.19.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:08ce9c95a0b093b7aec75676b356a27879901488abc27e9d029273d280438505"}, + {file = "rpds_py-0.19.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0b02dd77a2de6e49078c8937aadabe933ceac04b41c5dde5eca13a69f3cf144e"}, + {file = "rpds_py-0.19.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:4dd02e29c8cbed21a1875330b07246b71121a1c08e29f0ee3db5b4cfe16980c4"}, + {file = "rpds_py-0.19.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:9c7042488165f7251dc7894cd533a875d2875af6d3b0e09eda9c4b334627ad1c"}, + {file = "rpds_py-0.19.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:f809a17cc78bd331e137caa25262b507225854073fd319e987bd216bed911b7c"}, + {file = "rpds_py-0.19.1-cp312-none-win32.whl", hash = "sha256:3ddab996807c6b4227967fe1587febade4e48ac47bb0e2d3e7858bc621b1cace"}, + {file = "rpds_py-0.19.1-cp312-none-win_amd64.whl", hash = "sha256:32e0db3d6e4f45601b58e4ac75c6f24afbf99818c647cc2066f3e4b192dabb1f"}, + {file = "rpds_py-0.19.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:747251e428406b05fc86fee3904ee19550c4d2d19258cef274e2151f31ae9d38"}, + {file = "rpds_py-0.19.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:dc733d35f861f8d78abfaf54035461e10423422999b360966bf1c443cbc42705"}, + {file = "rpds_py-0.19.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bbda75f245caecff8faa7e32ee94dfaa8312a3367397975527f29654cd17a6ed"}, + {file = "rpds_py-0.19.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bd04d8cab16cab5b0a9ffc7d10f0779cf1120ab16c3925404428f74a0a43205a"}, + {file = "rpds_py-0.19.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e2d66eb41ffca6cc3c91d8387509d27ba73ad28371ef90255c50cb51f8953301"}, + {file = "rpds_py-0.19.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fdf4890cda3b59170009d012fca3294c00140e7f2abe1910e6a730809d0f3f9b"}, + {file = "rpds_py-0.19.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d1fa67ef839bad3815124f5f57e48cd50ff392f4911a9f3cf449d66fa3df62a5"}, + {file = "rpds_py-0.19.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b82c9514c6d74b89a370c4060bdb80d2299bc6857e462e4a215b4ef7aa7b090e"}, + {file = "rpds_py-0.19.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c7b07959866a6afb019abb9564d8a55046feb7a84506c74a6f197cbcdf8a208e"}, + {file = "rpds_py-0.19.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:4f580ae79d0b861dfd912494ab9d477bea535bfb4756a2269130b6607a21802e"}, + {file = "rpds_py-0.19.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:c6d20c8896c00775e6f62d8373aba32956aa0b850d02b5ec493f486c88e12859"}, + {file = "rpds_py-0.19.1-cp313-none-win32.whl", hash = "sha256:afedc35fe4b9e30ab240b208bb9dc8938cb4afe9187589e8d8d085e1aacb8309"}, + {file = "rpds_py-0.19.1-cp313-none-win_amd64.whl", hash = "sha256:1d4af2eb520d759f48f1073ad3caef997d1bfd910dc34e41261a595d3f038a94"}, + {file = "rpds_py-0.19.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:34bca66e2e3eabc8a19e9afe0d3e77789733c702c7c43cd008e953d5d1463fde"}, + {file = "rpds_py-0.19.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:24f8ae92c7fae7c28d0fae9b52829235df83f34847aa8160a47eb229d9666c7b"}, + {file = "rpds_py-0.19.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:71157f9db7f6bc6599a852852f3389343bea34315b4e6f109e5cbc97c1fb2963"}, + {file = "rpds_py-0.19.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1d494887d40dc4dd0d5a71e9d07324e5c09c4383d93942d391727e7a40ff810b"}, + {file = "rpds_py-0.19.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7b3661e6d4ba63a094138032c1356d557de5b3ea6fd3cca62a195f623e381c76"}, + {file = "rpds_py-0.19.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:97fbb77eaeb97591efdc654b8b5f3ccc066406ccfb3175b41382f221ecc216e8"}, + {file = "rpds_py-0.19.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4cc4bc73e53af8e7a42c8fd7923bbe35babacfa7394ae9240b3430b5dcf16b2a"}, + {file = "rpds_py-0.19.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:35af5e4d5448fa179fd7fff0bba0fba51f876cd55212f96c8bbcecc5c684ae5c"}, + {file = "rpds_py-0.19.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:3511f6baf8438326e351097cecd137eb45c5f019944fe0fd0ae2fea2fd26be39"}, + {file = "rpds_py-0.19.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:57863d16187995c10fe9cf911b897ed443ac68189179541734502353af33e693"}, + {file = "rpds_py-0.19.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:9e318e6786b1e750a62f90c6f7fa8b542102bdcf97c7c4de2a48b50b61bd36ec"}, + {file = "rpds_py-0.19.1-cp38-none-win32.whl", hash = "sha256:53dbc35808c6faa2ce3e48571f8f74ef70802218554884787b86a30947842a14"}, + {file = "rpds_py-0.19.1-cp38-none-win_amd64.whl", hash = "sha256:8df1c283e57c9cb4d271fdc1875f4a58a143a2d1698eb0d6b7c0d7d5f49c53a1"}, + {file = "rpds_py-0.19.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:e76c902d229a3aa9d5ceb813e1cbcc69bf5bda44c80d574ff1ac1fa3136dea71"}, + {file = "rpds_py-0.19.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:de1f7cd5b6b351e1afd7568bdab94934d656abe273d66cda0ceea43bbc02a0c2"}, + {file = "rpds_py-0.19.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:24fc5a84777cb61692d17988989690d6f34f7f95968ac81398d67c0d0994a897"}, + {file = "rpds_py-0.19.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:74129d5ffc4cde992d89d345f7f7d6758320e5d44a369d74d83493429dad2de5"}, + {file = "rpds_py-0.19.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5e360188b72f8080fefa3adfdcf3618604cc8173651c9754f189fece068d2a45"}, + {file = "rpds_py-0.19.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:13e6d4840897d4e4e6b2aa1443e3a8eca92b0402182aafc5f4ca1f5e24f9270a"}, + {file = "rpds_py-0.19.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f09529d2332264a902688031a83c19de8fda5eb5881e44233286b9c9ec91856d"}, + {file = "rpds_py-0.19.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0d4b52811dcbc1aba08fd88d475f75b4f6db0984ba12275d9bed1a04b2cae9b5"}, + {file = "rpds_py-0.19.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:dd635c2c4043222d80d80ca1ac4530a633102a9f2ad12252183bcf338c1b9474"}, + {file = "rpds_py-0.19.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:f35b34a5184d5e0cc360b61664c1c06e866aab077b5a7c538a3e20c8fcdbf90b"}, + {file = "rpds_py-0.19.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:d4ec0046facab83012d821b33cead742a35b54575c4edfb7ed7445f63441835f"}, + {file = "rpds_py-0.19.1-cp39-none-win32.whl", hash = "sha256:f5b8353ea1a4d7dfb59a7f45c04df66ecfd363bb5b35f33b11ea579111d4655f"}, + {file = "rpds_py-0.19.1-cp39-none-win_amd64.whl", hash = "sha256:1fb93d3486f793d54a094e2bfd9cd97031f63fcb5bc18faeb3dd4b49a1c06523"}, + {file = "rpds_py-0.19.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:7d5c7e32f3ee42f77d8ff1a10384b5cdcc2d37035e2e3320ded909aa192d32c3"}, + {file = "rpds_py-0.19.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:89cc8921a4a5028d6dd388c399fcd2eef232e7040345af3d5b16c04b91cf3c7e"}, + {file = "rpds_py-0.19.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bca34e913d27401bda2a6f390d0614049f5a95b3b11cd8eff80fe4ec340a1208"}, + {file = "rpds_py-0.19.1-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5953391af1405f968eb5701ebbb577ebc5ced8d0041406f9052638bafe52209d"}, + {file = "rpds_py-0.19.1-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:840e18c38098221ea6201f091fc5d4de6128961d2930fbbc96806fb43f69aec1"}, + {file = "rpds_py-0.19.1-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6d8b735c4d162dc7d86a9cf3d717f14b6c73637a1f9cd57fe7e61002d9cb1972"}, + {file = "rpds_py-0.19.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce757c7c90d35719b38fa3d4ca55654a76a40716ee299b0865f2de21c146801c"}, + {file = "rpds_py-0.19.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a9421b23c85f361a133aa7c5e8ec757668f70343f4ed8fdb5a4a14abd5437244"}, + {file = "rpds_py-0.19.1-pp310-pypy310_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:3b823be829407393d84ee56dc849dbe3b31b6a326f388e171555b262e8456cc1"}, + {file = "rpds_py-0.19.1-pp310-pypy310_pp73-musllinux_1_2_i686.whl", hash = "sha256:5e58b61dcbb483a442c6239c3836696b79f2cd8e7eec11e12155d3f6f2d886d1"}, + {file = "rpds_py-0.19.1-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:39d67896f7235b2c886fb1ee77b1491b77049dcef6fbf0f401e7b4cbed86bbd4"}, + {file = "rpds_py-0.19.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:8b32cd4ab6db50c875001ba4f5a6b30c0f42151aa1fbf9c2e7e3674893fb1dc4"}, + {file = "rpds_py-0.19.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:1c32e41de995f39b6b315d66c27dea3ef7f7c937c06caab4c6a79a5e09e2c415"}, + {file = "rpds_py-0.19.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:1a129c02b42d46758c87faeea21a9f574e1c858b9f358b6dd0bbd71d17713175"}, + {file = "rpds_py-0.19.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:346557f5b1d8fd9966059b7a748fd79ac59f5752cd0e9498d6a40e3ac1c1875f"}, + {file = "rpds_py-0.19.1-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:31e450840f2f27699d014cfc8865cc747184286b26d945bcea6042bb6aa4d26e"}, + {file = "rpds_py-0.19.1-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:01227f8b3e6c8961490d869aa65c99653df80d2f0a7fde8c64ebddab2b9b02fd"}, + {file = "rpds_py-0.19.1-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:69084fd29bfeff14816666c93a466e85414fe6b7d236cfc108a9c11afa6f7301"}, + {file = "rpds_py-0.19.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e4d2b88efe65544a7d5121b0c3b003ebba92bfede2ea3577ce548b69c5235185"}, + {file = "rpds_py-0.19.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6ea961a674172ed2235d990d7edf85d15d8dfa23ab8575e48306371c070cda67"}, + {file = "rpds_py-0.19.1-pp39-pypy39_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:5beffdbe766cfe4fb04f30644d822a1080b5359df7db3a63d30fa928375b2720"}, + {file = "rpds_py-0.19.1-pp39-pypy39_pp73-musllinux_1_2_i686.whl", hash = "sha256:720f3108fb1bfa32e51db58b832898372eb5891e8472a8093008010911e324c5"}, + {file = "rpds_py-0.19.1-pp39-pypy39_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:c2087dbb76a87ec2c619253e021e4fb20d1a72580feeaa6892b0b3d955175a71"}, + {file = "rpds_py-0.19.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:2ddd50f18ebc05ec29a0d9271e9dbe93997536da3546677f8ca00b76d477680c"}, + {file = "rpds_py-0.19.1.tar.gz", hash = "sha256:31dd5794837f00b46f4096aa8ccaa5972f73a938982e32ed817bb520c465e520"}, ] [[package]] name = "ruff" -version = "0.5.2" +version = "0.5.5" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.5.2-py3-none-linux_armv6l.whl", hash = "sha256:7bab8345df60f9368d5f4594bfb8b71157496b44c30ff035d1d01972e764d3be"}, - {file = "ruff-0.5.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:1aa7acad382ada0189dbe76095cf0a36cd0036779607c397ffdea16517f535b1"}, - {file = "ruff-0.5.2-py3-none-macosx_11_0_arm64.whl", hash = "sha256:aec618d5a0cdba5592c60c2dee7d9c865180627f1a4a691257dea14ac1aa264d"}, - {file = "ruff-0.5.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0b62adc5ce81780ff04077e88bac0986363e4a3260ad3ef11ae9c14aa0e67ef"}, - {file = "ruff-0.5.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:dc42ebf56ede83cb080a50eba35a06e636775649a1ffd03dc986533f878702a3"}, - {file = "ruff-0.5.2-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c15c6e9f88c67ffa442681365d11df38afb11059fc44238e71a9d9f1fd51de70"}, - {file = "ruff-0.5.2-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:d3de9a5960f72c335ef00763d861fc5005ef0644cb260ba1b5a115a102157251"}, - {file = "ruff-0.5.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fe5a968ae933e8f7627a7b2fc8893336ac2be0eb0aace762d3421f6e8f7b7f83"}, - {file = "ruff-0.5.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a04f54a9018f75615ae52f36ea1c5515e356e5d5e214b22609ddb546baef7132"}, - {file = "ruff-0.5.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1ed02fb52e3741f0738db5f93e10ae0fb5c71eb33a4f2ba87c9a2fa97462a649"}, - {file = "ruff-0.5.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:3cf8fe659f6362530435d97d738eb413e9f090e7e993f88711b0377fbdc99f60"}, - {file = "ruff-0.5.2-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:237a37e673e9f3cbfff0d2243e797c4862a44c93d2f52a52021c1a1b0899f846"}, - {file = "ruff-0.5.2-py3-none-musllinux_1_2_i686.whl", hash = "sha256:2a2949ce7c1cbd8317432ada80fe32156df825b2fd611688814c8557824ef060"}, - {file = "ruff-0.5.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:481af57c8e99da92ad168924fd82220266043c8255942a1cb87958b108ac9335"}, - {file = "ruff-0.5.2-py3-none-win32.whl", hash = "sha256:f1aea290c56d913e363066d83d3fc26848814a1fed3d72144ff9c930e8c7c718"}, - {file = "ruff-0.5.2-py3-none-win_amd64.whl", hash = "sha256:8532660b72b5d94d2a0a7a27ae7b9b40053662d00357bb2a6864dd7e38819084"}, - {file = "ruff-0.5.2-py3-none-win_arm64.whl", hash = "sha256:73439805c5cb68f364d826a5c5c4b6c798ded6b7ebaa4011f01ce6c94e4d5583"}, - {file = "ruff-0.5.2.tar.gz", hash = "sha256:2c0df2d2de685433794a14d8d2e240df619b748fbe3367346baa519d8e6f1ca2"}, + {file = "ruff-0.5.5-py3-none-linux_armv6l.whl", hash = "sha256:605d589ec35d1da9213a9d4d7e7a9c761d90bba78fc8790d1c5e65026c1b9eaf"}, + {file = "ruff-0.5.5-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:00817603822a3e42b80f7c3298c8269e09f889ee94640cd1fc7f9329788d7bf8"}, + {file = "ruff-0.5.5-py3-none-macosx_11_0_arm64.whl", hash = "sha256:187a60f555e9f865a2ff2c6984b9afeffa7158ba6e1eab56cb830404c942b0f3"}, + {file = "ruff-0.5.5-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fe26fc46fa8c6e0ae3f47ddccfbb136253c831c3289bba044befe68f467bfb16"}, + {file = "ruff-0.5.5-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4ad25dd9c5faac95c8e9efb13e15803cd8bbf7f4600645a60ffe17c73f60779b"}, + {file = "ruff-0.5.5-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f70737c157d7edf749bcb952d13854e8f745cec695a01bdc6e29c29c288fc36e"}, + {file = "ruff-0.5.5-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:cfd7de17cef6ab559e9f5ab859f0d3296393bc78f69030967ca4d87a541b97a0"}, + {file = "ruff-0.5.5-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a09b43e02f76ac0145f86a08e045e2ea452066f7ba064fd6b0cdccb486f7c3e7"}, + {file = "ruff-0.5.5-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d0b856cb19c60cd40198be5d8d4b556228e3dcd545b4f423d1ad812bfdca5884"}, + {file = "ruff-0.5.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3687d002f911e8a5faf977e619a034d159a8373514a587249cc00f211c67a091"}, + {file = "ruff-0.5.5-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:ac9dc814e510436e30d0ba535f435a7f3dc97f895f844f5b3f347ec8c228a523"}, + {file = "ruff-0.5.5-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:af9bdf6c389b5add40d89b201425b531e0a5cceb3cfdcc69f04d3d531c6be74f"}, + {file = "ruff-0.5.5-py3-none-musllinux_1_2_i686.whl", hash = "sha256:d40a8533ed545390ef8315b8e25c4bb85739b90bd0f3fe1280a29ae364cc55d8"}, + {file = "ruff-0.5.5-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:cab904683bf9e2ecbbe9ff235bfe056f0eba754d0168ad5407832928d579e7ab"}, + {file = "ruff-0.5.5-py3-none-win32.whl", hash = "sha256:696f18463b47a94575db635ebb4c178188645636f05e934fdf361b74edf1bb2d"}, + {file = "ruff-0.5.5-py3-none-win_amd64.whl", hash = "sha256:50f36d77f52d4c9c2f1361ccbfbd09099a1b2ea5d2b2222c586ab08885cf3445"}, + {file = "ruff-0.5.5-py3-none-win_arm64.whl", hash = "sha256:3191317d967af701f1b73a31ed5788795936e423b7acce82a2b63e26eb3e89d6"}, + {file = "ruff-0.5.5.tar.gz", hash = "sha256:cc5516bdb4858d972fbc31d246bdb390eab8df1a26e2353be2dbc0c2d7f5421a"}, ] [[package]] @@ -3132,18 +3131,19 @@ win32 = ["pywin32"] [[package]] name = "setuptools" -version = "70.3.0" +version = "72.1.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "setuptools-70.3.0-py3-none-any.whl", hash = "sha256:fe384da74336c398e0d956d1cae0669bc02eed936cdb1d49b57de1990dc11ffc"}, - {file = "setuptools-70.3.0.tar.gz", hash = "sha256:f171bab1dfbc86b132997f26a119f6056a57950d058587841a0082e8830f9dc5"}, + {file = "setuptools-72.1.0-py3-none-any.whl", hash = "sha256:5a03e1860cf56bb6ef48ce186b0e557fdba433237481a9a625176c2831be15d1"}, + {file = "setuptools-72.1.0.tar.gz", hash = "sha256:8d243eff56d095e5817f796ede6ae32941278f542e0f941867cc05ae52b162ec"}, ] [package.extras] +core = ["importlib-metadata (>=6)", "importlib-resources (>=5.10.2)", "jaraco.text (>=3.7)", "more-itertools (>=8.8)", "ordered-set (>=3.1.1)", "packaging (>=24)", "platformdirs (>=2.6.2)", "tomli (>=2.0.1)", "wheel (>=0.43.0)"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "jaraco.test", "mypy (==1.10.0)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.3.2)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "jaraco.test", "mypy (==1.11.*)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (<0.4)", "pytest-ruff (>=0.2.1)", "pytest-ruff (>=0.3.2)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] [[package]] name = "six" @@ -3191,13 +3191,13 @@ files = [ [[package]] name = "sphinx" -version = "7.4.4" +version = "7.4.7" description = "Python documentation generator" optional = false python-versions = ">=3.9" files = [ - {file = "sphinx-7.4.4-py3-none-any.whl", hash = "sha256:0b800d06701329cba601a40ab8c3d5afd8f7e3518f688dda61fd670effc327d2"}, - {file = "sphinx-7.4.4.tar.gz", hash = "sha256:43c911f997a4530b6cffd4ff8d5516591f6c60d178591f4406f0dd02282e3f64"}, + {file = "sphinx-7.4.7-py3-none-any.whl", hash = "sha256:c2419e2135d11f1951cd994d6eb18a1835bd8fdd8429f9ca375dc1f3281bd239"}, + {file = "sphinx-7.4.7.tar.gz", hash = "sha256:242f92a7ea7e6c5b406fdc2615413890ba9f699114a9c09192d7dfead2ee9cfe"}, ] [package.dependencies] @@ -3272,21 +3272,24 @@ test = ["coverage", "cython", "pytest", "pytest-cov", "setuptools"] [[package]] name = "sphinx-gallery" -version = "0.16.0" +version = "0.17.0" description = "A Sphinx extension that builds an HTML gallery of examples from any set of Python scripts." optional = false python-versions = ">=3.8" files = [ - {file = "sphinx_gallery-0.16.0-py3-none-any.whl", hash = "sha256:f5456514f4efb230a6f1db6241667774ca3ee8f15e9a7456678f1d1815118e60"}, - {file = "sphinx_gallery-0.16.0.tar.gz", hash = "sha256:3912765bc5e7b5451dc471ad50ead808a9752280b23fd2ec4277719a5ef68e42"}, + {file = "sphinx_gallery-0.17.0-py3-none-any.whl", hash = "sha256:245c02d5cd156d568e978a562091c871255affe41f1a52e9b9eb5023f891cdb9"}, + {file = "sphinx_gallery-0.17.0.tar.gz", hash = "sha256:cae4eb8317c7a316813e3ffdc13f92bcb932a54c360c07a94b60fced74a9fd3f"}, ] [package.dependencies] pillow = "*" -sphinx = ">=4" +sphinx = ">=5" [package.extras] +animations = ["sphinxcontrib-video"] +dev = ["absl-py", "graphviz", "intersphinx-registry", "ipython", "joblib", "jupyterlite-sphinx", "lxml", "matplotlib", "numpy", "packaging", "plotly", "pydata-sphinx-theme", "pytest", "pytest-coverage", "seaborn", "sphinxcontrib-video", "statsmodels"] jupyterlite = ["jupyterlite-sphinx"] +parallel = ["joblib"] recommender = ["numpy"] show-api-usage = ["graphviz"] show-memory = ["memory-profiler"] @@ -3312,49 +3315,49 @@ dev = ["bump2version", "sphinxcontrib-httpdomain", "transifex-client", "wheel"] [[package]] name = "sphinxcontrib-applehelp" -version = "1.0.8" +version = "2.0.0" description = "sphinxcontrib-applehelp is a Sphinx extension which outputs Apple help books" optional = false python-versions = ">=3.9" files = [ - {file = "sphinxcontrib_applehelp-1.0.8-py3-none-any.whl", hash = "sha256:cb61eb0ec1b61f349e5cc36b2028e9e7ca765be05e49641c97241274753067b4"}, - {file = "sphinxcontrib_applehelp-1.0.8.tar.gz", hash = "sha256:c40a4f96f3776c4393d933412053962fac2b84f4c99a7982ba42e09576a70619"}, + {file = "sphinxcontrib_applehelp-2.0.0-py3-none-any.whl", hash = "sha256:4cd3f0ec4ac5dd9c17ec65e9ab272c9b867ea77425228e68ecf08d6b28ddbdb5"}, + {file = "sphinxcontrib_applehelp-2.0.0.tar.gz", hash = "sha256:2f29ef331735ce958efa4734873f084941970894c6090408b079c61b2e1c06d1"}, ] [package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] +lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] standalone = ["Sphinx (>=5)"] test = ["pytest"] [[package]] name = "sphinxcontrib-devhelp" -version = "1.0.6" +version = "2.0.0" description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp documents" optional = false python-versions = ">=3.9" files = [ - {file = "sphinxcontrib_devhelp-1.0.6-py3-none-any.whl", hash = "sha256:6485d09629944511c893fa11355bda18b742b83a2b181f9a009f7e500595c90f"}, - {file = "sphinxcontrib_devhelp-1.0.6.tar.gz", hash = "sha256:9893fd3f90506bc4b97bdb977ceb8fbd823989f4316b28c3841ec128544372d3"}, + {file = "sphinxcontrib_devhelp-2.0.0-py3-none-any.whl", hash = "sha256:aefb8b83854e4b0998877524d1029fd3e6879210422ee3780459e28a1f03a8a2"}, + {file = "sphinxcontrib_devhelp-2.0.0.tar.gz", hash = "sha256:411f5d96d445d1d73bb5d52133377b4248ec79db5c793ce7dbe59e074b4dd1ad"}, ] [package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] +lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] standalone = ["Sphinx (>=5)"] test = ["pytest"] [[package]] name = "sphinxcontrib-htmlhelp" -version = "2.0.5" +version = "2.1.0" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" optional = false python-versions = ">=3.9" files = [ - {file = "sphinxcontrib_htmlhelp-2.0.5-py3-none-any.whl", hash = "sha256:393f04f112b4d2f53d93448d4bce35842f62b307ccdc549ec1585e950bc35e04"}, - {file = "sphinxcontrib_htmlhelp-2.0.5.tar.gz", hash = "sha256:0dc87637d5de53dd5eec3a6a01753b1ccf99494bd756aafecd74b4fa9e729015"}, + {file = "sphinxcontrib_htmlhelp-2.1.0-py3-none-any.whl", hash = "sha256:166759820b47002d22914d64a075ce08f4c46818e17cfc9470a9786b759b19f8"}, + {file = "sphinxcontrib_htmlhelp-2.1.0.tar.gz", hash = "sha256:c9e2916ace8aad64cc13a0d233ee22317f2b9025b9cf3295249fa985cc7082e9"}, ] [package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] +lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] standalone = ["Sphinx (>=5)"] test = ["html5lib", "pytest"] @@ -3388,33 +3391,33 @@ test = ["flake8", "mypy", "pytest"] [[package]] name = "sphinxcontrib-qthelp" -version = "1.0.7" +version = "2.0.0" description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp documents" optional = false python-versions = ">=3.9" files = [ - {file = "sphinxcontrib_qthelp-1.0.7-py3-none-any.whl", hash = "sha256:e2ae3b5c492d58fcbd73281fbd27e34b8393ec34a073c792642cd8e529288182"}, - {file = "sphinxcontrib_qthelp-1.0.7.tar.gz", hash = "sha256:053dedc38823a80a7209a80860b16b722e9e0209e32fea98c90e4e6624588ed6"}, + {file = "sphinxcontrib_qthelp-2.0.0-py3-none-any.whl", hash = "sha256:b18a828cdba941ccd6ee8445dbe72ffa3ef8cbe7505d8cd1fa0d42d3f2d5f3eb"}, + {file = "sphinxcontrib_qthelp-2.0.0.tar.gz", hash = "sha256:4fe7d0ac8fc171045be623aba3e2a8f613f8682731f9153bb2e40ece16b9bbab"}, ] [package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] +lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] standalone = ["Sphinx (>=5)"] -test = ["pytest"] +test = ["defusedxml (>=0.7.1)", "pytest"] [[package]] name = "sphinxcontrib-serializinghtml" -version = "1.1.10" +version = "2.0.0" description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)" optional = false python-versions = ">=3.9" files = [ - {file = "sphinxcontrib_serializinghtml-1.1.10-py3-none-any.whl", hash = "sha256:326369b8df80a7d2d8d7f99aa5ac577f51ea51556ed974e7716cfd4fca3f6cb7"}, - {file = "sphinxcontrib_serializinghtml-1.1.10.tar.gz", hash = "sha256:93f3f5dc458b91b192fe10c397e324f262cf163d79f3282c158e8436a2c4511f"}, + {file = "sphinxcontrib_serializinghtml-2.0.0-py3-none-any.whl", hash = "sha256:6e2cb0eef194e10c27ec0023bfeb25badbbb5868244cf5bc5bdc04e4464bf331"}, + {file = "sphinxcontrib_serializinghtml-2.0.0.tar.gz", hash = "sha256:e9d912827f872c029017a53f0ef2180b327c3f7fd23c87229f7a8e8b70031d4d"}, ] [package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] +lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] standalone = ["Sphinx (>=5)"] test = ["pytest"] @@ -3474,13 +3477,13 @@ typing = ["mypy (>=1.6,<2.0)", "traitlets (>=5.11.1)"] [[package]] name = "tesswcs" -version = "1.1.2" +version = "1.1.3" description = "" optional = false -python-versions = ">=3.9,<4.0" +python-versions = "<4.0,>=3.9" files = [ - {file = "tesswcs-1.1.2-py3-none-any.whl", hash = "sha256:46ff30f8338bc762f60cdba024b168b265d179a8f6c9ba762701411d5240c421"}, - {file = "tesswcs-1.1.2.tar.gz", hash = "sha256:0770763f9a0ada93c05d6e78ea7182474eebe92fda12eda0d30bc4ff6039db37"}, + {file = "tesswcs-1.1.3-py3-none-any.whl", hash = "sha256:9a183085b6dd5c6c660b765a315c35a92656129240d282dfbb60a1c0a24de469"}, + {file = "tesswcs-1.1.3.tar.gz", hash = "sha256:8a84ccdcc03c08aba6a33f6cdf921c1656919d064befd386d81f9254769cf95d"}, ] [package.dependencies] diff --git a/pyproject.toml b/pyproject.toml index 466683e..c3a27b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "lksearch" -version = "1.0.1" +version = "1.1.1" description = "A helpful little package to search for TESS/Kepler/K2 data" authors = ["TESS Science Support Center "] license = "MIT" diff --git a/src/lksearch/K2Search.py b/src/lksearch/K2Search.py index ac3b976..5dcbf0d 100644 --- a/src/lksearch/K2Search.py +++ b/src/lksearch/K2Search.py @@ -1,7 +1,6 @@ import pandas as pd from typing import Union, Optional import re -import logging import numpy as np from astropy import units as u @@ -11,9 +10,6 @@ pd.options.display.max_rows = 10 -log = logging.getLogger(__name__) - - class K2Search(MASTSearch): """ Search Class that queries mast for observations performed by the K2 diff --git a/src/lksearch/MASTSearch.py b/src/lksearch/MASTSearch.py index ac9342b..aa28a96 100644 --- a/src/lksearch/MASTSearch.py +++ b/src/lksearch/MASTSearch.py @@ -17,12 +17,10 @@ from .utils import SearchError, SearchWarning, suppress_stdout -from . import conf, config +from . import conf, config, log pd.options.display.max_rows = 10 -log = logging.getLogger(__name__) - class MASTSearch(object): """ @@ -90,9 +88,9 @@ def __init__( pipeline = np.atleast_1d(pipeline).tolist() self.search_pipeline = pipeline - if ("kepler" in (m.lower() for m in mission)) & (sequence != None): + if ("kepler" in (m.lower() for m in mission)) & (sequence is not None): log.warning( - f"Sequence not valid when searching for Kepler data. Setting sequence to None" + "Sequence not valid when searching for Kepler data. Setting sequence to None" ) sequence = None @@ -214,7 +212,7 @@ def uris(self): if conf.PREFER_CLOUD: cloud_uris = self.cloud_uris - mask = cloud_uris != None + mask = cloud_uris is not None uris[mask] = cloud_uris[mask] return uris @@ -584,7 +582,7 @@ def _search_obs( if filetype == "ffi": raise SearchError( - f"FFI search not implemented in MASTSearch. Please use TESSSearch." + "FFI search not implemented in MASTSearch. Please use TESSSearch." ) # Ensure mission is a list diff --git a/src/lksearch/TESSSearch.py b/src/lksearch/TESSSearch.py index a272aa4..c69ef62 100644 --- a/src/lksearch/TESSSearch.py +++ b/src/lksearch/TESSSearch.py @@ -2,7 +2,6 @@ import pandas as pd from typing import Union, Optional import re -import logging import os import numpy as np @@ -16,15 +15,13 @@ from copy import deepcopy from .MASTSearch import MASTSearch -from . import conf, config +from . import conf, config, log PREFER_CLOUD = conf.PREFER_CLOUD DOWNLOAD_CLOUD = conf.DOWNLOAD_CLOUD pd.options.display.max_rows = 10 -log = logging.getLogger(__name__) - class TESSSearch(MASTSearch): """ diff --git a/src/lksearch/__init__.py b/src/lksearch/__init__.py index f7ff2fb..3c7a682 100644 --- a/src/lksearch/__init__.py +++ b/src/lksearch/__init__.py @@ -1,9 +1,10 @@ #!/usr/bin/env python from __future__ import absolute_import from . import config as _config -from .version import __version__ +import logging import os +__version__ = "1.1.1" PACKAGEDIR = os.path.abspath(os.path.dirname(__file__)) @@ -78,8 +79,10 @@ class Conf(_config.ConfigNamespace): conf = Conf() +log = logging.getLogger("lksearch") -from .MASTSearch import MASTSearch -from .TESSSearch import TESSSearch -from .KeplerSearch import KeplerSearch -from .K2Search import K2Search +from .MASTSearch import MASTSearch #noqa +from .TESSSearch import TESSSearch #noqa +from .KeplerSearch import KeplerSearch #noqa +from .K2Search import K2Search #noqa +from .catalog import * #noqa diff --git a/src/lksearch/catalog.py b/src/lksearch/catalog.py new file mode 100644 index 0000000..f9db3de --- /dev/null +++ b/src/lksearch/catalog.py @@ -0,0 +1,355 @@ +"""Functions to search various catalogs for missions""" +from typing import Union +import numpy as np +from astropy.coordinates import Angle, SkyCoord, Distance +from astropy.table import Table +from astropy.time import Time +import astropy.units as u +from astroquery.vizier import Vizier +import pandas as pd + +import warnings + +__all__ = ['query_KIC', 'query_EPIC', 'query_TIC', 'query_gaia', 'query_catalog'] + +# This is a lits of VizieR catalogs and their input parameters to be used in the +# query_skycatalog function +_Catalog_Dictionary = { + "kic": { + "catalog": "V/133/kic", + "columns": ["KIC", "RAJ2000", "DEJ2000", "pmRA", "pmDE", "Plx", "kepmag"], + "column_filters": "kepmag", + "rename_in": ("KIC", "pmDE", "kepmag"), + "rename_out": ("ID", "pmDEC", "Kepler_Mag"), + "equinox":Time(2000, format="jyear", scale="tt"), + "prefix":"KIC" + }, + "epic": { + "catalog": "IV/34/epic", + "columns": ["ID", "RAJ2000", "DEJ2000", "pmRA", "pmDEC", "plx", "Kpmag"], + "column_filters": "Kpmag", + "rename_in": ("Kpmag", "plx"), + "rename_out": ("K2_Mag", 'Plx'), + "equinox":Time(2000, format="jyear", scale="tt"), + "prefix":"EPIC" + }, + "tic": { + "catalog": "IV/39/tic82", + "columns": ["TIC", "RAJ2000", "DEJ2000", "pmRA", "pmDE", "Plx", "Tmag"], + "column_filters": "Tmag", + "rename_in": ("TIC", "pmDE", "Tmag"), + "rename_out": ("ID", "pmDEC", "TESS_Mag"), + "equinox":Time(2000, format="jyear", scale="tt"), + "prefix":"TIC" + }, + "gaiadr3": { + "catalog": "I/355/gaiadr3", + "columns": ["DR3Name", "RAJ2000", "DEJ2000", "pmRA", "pmDE", "Plx", "Gmag"], + "column_filters": "Gmag", + "rename_in": ("DR3Name", "pmDE", "Gmag"), + "rename_out": ("ID", "pmDEC", "Gaia_G_Mag"), + "equinox":Time(2016, format="jyear", scale="tt"), + "prefix":None, + }, +} + + +def _apply_propermotion(table:Table, equinox:Time, epoch:Time): + """ + Returns an astropy table of sources with the proper motion correction applied + + Parameters: + ----------- + table : + astropy.table.Table which contains the coordinates of targets and proper motion values + equinox: astropy.time.Time + The equinox for the catalog + epoch : astropy.time.Time + Time of the observation - This is taken from the table R.A and Dec. values and re-formatted as an astropy.time.Time object + + Returns: + ------ + table : astropy.table.Table + Returns an astropy table with ID, corrected RA, corrected Dec, and Mag(?Some ppl might find this benifical for contamination reasons?) + """ + + # We need to remove any nan values from our proper motion list + # Doing this will allow objects which do not have proper motion to still be displayed + table["pmRA"] = np.ma.filled(table["pmRA"].astype(float), 0.0) + table["pmDEC"] = np.ma.filled(table["pmDEC"].astype(float), 0.0) + # If an object does not have a parallax then we treat it as if the object is an "infinite distance" + # and set the parallax to 1e-7 arcseconds or 10Mpc. + table["Plx"] = np.ma.filled(table["Plx"].astype(float), 1e-4) + + # Suppress warning caused by Astropy as noted in issue 111747 (https://github.com/astropy/astropy/issues/11747) + with warnings.catch_warnings(): + warnings.filterwarnings("ignore", message="negative parallaxes") + + # Get the input data from the table + c = SkyCoord( + ra=table["RAJ2000"], + dec=table["DEJ2000"], + distance=Distance(parallax=table["Plx"].quantity, allow_negative=True), + pm_ra_cosdec=table["pmRA"], + pm_dec=table["pmDEC"], + frame="icrs", + obstime=equinox, + ) + + # Suppress warning caused by Astropy as noted in issue 111747 (https://github.com/astropy/astropy/issues/11747) + with warnings.catch_warnings(): + warnings.filterwarnings("ignore", message="ERFA function") + warnings.filterwarnings("ignore", message="invalid value") + + # Calculate the new values + c1 = c.apply_space_motion(new_obstime=epoch) + + # Add new data corrected RA and Dec + table["RA"] = c1.ra.to(u.deg) + table["DEC"] = c1.dec.to(u.deg) + + # Get the index of the targets with zero proper motions + pmzero_index = np.where((table["pmRA"] == 0.0) & (table["pmDEC"] == 0.0)) + + # In those instances replace with J2000 values + table["RA"][pmzero_index] = table["RAJ2000"][pmzero_index] + table["DEC"][pmzero_index] = table["DEJ2000"][pmzero_index] + return table + + + +def query_catalog( + coord: SkyCoord, + epoch: Time, + catalog: str, + radius: Union[float, u.Quantity] = u.Quantity(100, "arcsecond"), + magnitude_limit: float = 18.0, +): + """Query a catalog for a single source location, obtain nearby sources + + Parameters: + ----------- + coord : astropy.coordinates.SkyCoord + Coordinates around which to do a radius query + epoch: astropy.time.Time + The time of observation in JD. + catalog: str + The catalog to query, either 'kepler', 'k2', or 'tess', 'gaia' + radius : float or astropy quantity + Radius in arcseconds to query + magnitude_limit : float + A value to limit the results in based on the Tmag/Kepler mag/K2 mag or Gaia G mag. Default, 18. + + Returns: + ------- + result: pd.DataFrame + A pandas dataframe of the sources within radius query, corrected for proper motion + """ + + # Check to make sure that user input is in the correct format + if not isinstance(coord, SkyCoord): + raise TypeError("Must pass an `astropy.coordinates.SkyCoord` object.") + if not isinstance(epoch, Time): + try: + epoch = Time(epoch, format='jd') + except ValueError: + raise TypeError("Must pass an `astropy.time.Time object`.") + raise TypeError("Must pass an `astropy.time.Time object`.") + if not coord.isscalar: + raise ValueError("Pass one target only.") + + # Here we check to make sure that the radius entered is in arcseconds + # This also means we do not need to specify arcseconds in our catalog query + try: + radius = u.Quantity(radius, "arcsecond") + except u.UnitConversionError: + raise + + # Check to make sure that the catalog provided by the user is valid for this function + if catalog.lower() not in _Catalog_Dictionary.keys(): + raise ValueError(f"Can not parse catalog name '{catalog}'") + catalog_meta = _Catalog_Dictionary[catalog.lower()] + + # Get the Vizier catalog name + catalog_name = catalog_meta["catalog"] + + # Get the appropriate column names and filters to be applied + filters = Vizier( + columns=catalog_meta["columns"], + column_filters={ + catalog_meta[ + "column_filters" + ]: f"<{magnitude_limit}" + }, + ) + + # The catalog can cut off at 50 - we dont want this to happen + filters.ROW_LIMIT = -1 + # Now query the catalog + result = filters.query_region(coord, catalog=catalog_name, radius=Angle(radius)) + if len(result) == 0: + return pd.DataFrame(columns=[*catalog_meta["columns"], 'RA', 'DEC', 'Separation', 'Relative_Flux']).rename({i:o for i, o in zip(catalog_meta["rename_in"], catalog_meta["rename_out"])}, axis=1).set_index("ID") + + result = result[catalog_name] + + # Rename the columns so that the output is uniform + result.rename_columns( + catalog_meta["rename_in"], + catalog_meta["rename_out"], + ) + + if catalog_meta['prefix'] is not None: + prefix = catalog_meta["prefix"] + result["ID"] = [f"{prefix} {id}"for id in result['ID']] + + # Based on the input coordinates pick the object with the mininmum separation as the reference star. + c1 = SkyCoord(result["RAJ2000"], result["DEJ2000"], unit="deg") + + sep = coord.separation(c1) + + # Find the object with the minimum separation - this is our target + ref_index = np.argmin(sep) + + # apply_propermotion + result = _apply_propermotion(result, equinox=catalog_meta["equinox"], epoch=epoch) + + # Now we want to repete but using the values corrected for proper motion + # First get the correct values for target + coord_pm_correct = SkyCoord( + result["RA"][ref_index], result["DEC"][ref_index], unit="deg" + ) + + c1_pm_correct = SkyCoord(result["RA"], result["DEC"], unit="deg") + + # Then calculate the separation based on pm corrected values + sep_pm_correct = coord_pm_correct.separation(c1_pm_correct) + + # Provide the separation in the output table + result["Separation"] = sep_pm_correct + + # Calculate the relative flux + result["Relative_Flux"] = 10**( + ( + [value for key, value in result.items() if "_Mag" in key][0] + - [value for key, value in result.items() if "_Mag" in key][0][ref_index] + ) + / -2.5 + ) + + # Now sort the table based on separation + result.sort(["Separation"]) + return result.to_pandas().set_index("ID") + +def query_KIC( + coord: SkyCoord, + epoch: Time, + radius: Union[float, u.Quantity] = u.Quantity(100, "arcsecond"), + magnitude_limit: float = 18.0, +): + """Query the Kepler Input Catalog for a single source location, obtain nearby sources + + Parameters: + ----------- + coord : astropy.coordinates.SkyCoord + Coordinates around which to do a radius query + epoch: astropy.time.Time + The time of observation in JD. + catalog: str + The catalog to query, either 'kepler', 'k2', or 'tess', 'gaia' + radius : float or astropy quantity + Radius in arcseconds to query + magnitude_limit : float + A value to limit the results in based on the Tmag/Kepler mag/K2 mag or Gaia G mag. Default, 18. + Returns: + ------- + result: pd.DataFrame + A pandas dataframe of the sources within radius query, corrected for proper motion + """ + if radius.unit == u.pixel: + radius = (radius * (4 * u.arcsecond/u.pixel)).to(u.arcsecond) + return query_catalog(coord=coord, epoch=epoch, catalog='kic', radius=radius, magnitude_limit=magnitude_limit) + +def query_TIC( + coord: SkyCoord, + epoch: Time, + radius: Union[float, u.Quantity] = u.Quantity(100, "arcsecond"), + magnitude_limit: float = 18.0, +): + """Query the TESS Input Catalog for a single source location, obtain nearby sources + + Parameters: + ----------- + coord : astropy.coordinates.SkyCoord + Coordinates around which to do a radius query + epoch: astropy.time.Time + The time of observation in JD. + catalog: str + The catalog to query, either 'kepler', 'k2', or 'tess', 'gaia' + radius : float or astropy quantity + Radius in arcseconds to query + magnitude_limit : float + A value to limit the results in based on the Tmag/Kepler mag/K2 mag or Gaia G mag. Default, 18. + Returns: + ------- + result: pd.DataFrame + A pandas dataframe of the sources within radius query, corrected for proper motion + """ + if radius.unit == u.pixel: + radius = (radius * (21 * u.arcsecond/u.pixel)).to(u.arcsecond) + return query_catalog(coord=coord, epoch=epoch, catalog='tic', radius=radius, magnitude_limit=magnitude_limit) + +def query_EPIC( + coord: SkyCoord, + epoch: Time, + radius: Union[float, u.Quantity] = u.Quantity(100, "arcsecond"), + magnitude_limit: float = 18.0, +): + """Query the Ecliptic Plane Input Catalog for a single source location, obtain nearby sources + + Parameters: + ----------- + coord : astropy.coordinates.SkyCoord + Coordinates around which to do a radius query + epoch: astropy.time.Time + The time of observation in JD. + catalog: str + The catalog to query, either 'kepler', 'k2', or 'tess', 'gaia' + radius : float or astropy quantity + Radius in arcseconds to query + magnitude_limit : float + A value to limit the results in based on the Tmag/Kepler mag/K2 mag or Gaia G mag. Default, 18. + Returns: + ------- + result: pd.DataFrame + A pandas dataframe of the sources within radius query, corrected for proper motion + """ + if radius.unit == u.pixel: + radius = (radius * (4 * u.arcsecond/u.pixel)).to(u.arcsecond) + return query_catalog(coord=coord, epoch=epoch, catalog='epic', radius=radius, magnitude_limit=magnitude_limit) + +def query_gaia( + coord: SkyCoord, + epoch: Time, + radius: Union[float, u.Quantity] = u.Quantity(100, "arcsecond"), + magnitude_limit: float = 18.0, +): + """Query the Gaia EDR3 catalog for a single source location, obtain nearby sources + + Parameters: + ----------- + coord : astropy.coordinates.SkyCoord + Coordinates around which to do a radius query + epoch: astropy.time.Time + The time of observation in JD. + catalog: str + The catalog to query, either 'kepler', 'k2', or 'tess', 'gaia' + radius : float or astropy quantity + Radius in arcseconds to query + magnitude_limit : float + A value to limit the results in based on the Tmag/Kepler mag/K2 mag or Gaia G mag. Default, 18. + Returns: + ------- + result: pd.DataFrame + A pandas dataframe of the sources within radius query, corrected for proper motion + """ + return query_catalog(coord=coord, epoch=epoch, catalog='gaiadr3', radius=radius, magnitude_limit=magnitude_limit) \ No newline at end of file diff --git a/src/lksearch/config/__init__.py b/src/lksearch/config/__init__.py index 0586a8d..05d0fae 100644 --- a/src/lksearch/config/__init__.py +++ b/src/lksearch/config/__init__.py @@ -2,10 +2,12 @@ import warnings import glob import shutil +import logging import astropy.config as _config ROOTNAME = "lksearch" +log = logging.getLogger(ROOTNAME) class ConfigNamespace(_config.ConfigNamespace): diff --git a/src/lksearch/version.py b/src/lksearch/version.py deleted file mode 100644 index 3083e9a..0000000 --- a/src/lksearch/version.py +++ /dev/null @@ -1,3 +0,0 @@ -# Store the version number in a separate file -# so that we can read it from setup.py without importing the package -__version__ = "1.0.1" diff --git a/tests/test_query_catalog.py b/tests/test_query_catalog.py new file mode 100644 index 0000000..36a7619 --- /dev/null +++ b/tests/test_query_catalog.py @@ -0,0 +1,101 @@ +"""Tests catalog querying""" +import numpy as np +from astropy.coordinates import SkyCoord +import pandas as pd +from astropy.time import Time +import astropy.units as u +from lksearch import query_catalog, query_EPIC, query_KIC, query_TIC, query_gaia +import pytest + +# Tests the region around TIC 228760807 which should return a catalog containing 4 objects. +c = SkyCoord(194.10141041659, -27.3905828803397, unit="deg") +epoch = Time(1569.4424277786259 + 2457000, scale="tdb", format="jd") + +def test_tic(): + catalog = query_catalog(coord=c, + epoch=epoch, + catalog="tic", + radius=u.Quantity(80, "arcsecond"), + magnitude_limit=18) + assert len(catalog) == 4 + + # Checks that an astropy Table is returned + assert isinstance(catalog, pd.DataFrame) + + # Test that the proper motion works + + assert np.isclose(catalog.iloc[0]["RA"], 194.10075230969787, atol=1e-6) + assert np.isclose(catalog.iloc[0]["DEC"], -27.390340343480744, atol=1e-6) + + # Test different epochs + catalog_new = query_catalog( + coord=c, epoch=Time(2461041.500, scale="tt", format="jd"), catalog="tic", radius=80, magnitude_limit=18 + ) + + assert np.isclose(catalog_new.iloc[0]["RA"], 194.10052070792756, atol=1e-6) + assert np.isclose(catalog_new.iloc[0]["DEC"], -27.390254988629433, atol=1e-6) + + # Test different epochs + catalog_new = query_TIC( + coord=c, epoch=Time(2461041.500, scale="tt", format="jd"), radius=4*u.pixel, magnitude_limit=18 + ) + + +def test_bad_catalog(): + # test the catalog type i.e., simbad is not included in our catalog list. + # Look at other tests to see if this is correct syntax + with pytest.raises(ValueError, match="Can not parse catalog name 'simbad'"): + query_catalog(coord=c, epoch=epoch, catalog="simbad", radius=80, magnitude_limit=18) + +def test_gaia(): + catalog_gaia = query_catalog( + coord=c, epoch=Time(1569.4424277786259 + 2457000, scale="tdb", format="jd"), catalog="gaiadr3", radius=80, magnitude_limit=18 + ) + + assert len(catalog_gaia) == 2 + + catalog_gaia = query_gaia( + coord=c, epoch=Time(1569.4424277786259 + 2457000, scale="tdb", format="jd"), radius=80, magnitude_limit=18 + ) + + +def test_kic(): + catalog_kepler = query_catalog( + coord=SkyCoord(285.679391, 50.2413, unit="deg"), + epoch=Time(120.5391465105713 + 2454833, scale="tdb", format="jd"), + catalog="kic", + radius=20, + magnitude_limit=18, + ) + assert len(catalog_kepler) == 5 + catalog_kepler = query_KIC( + coord=SkyCoord(285.679391, 50.2413, unit="deg"), + epoch=Time(120.5391465105713 + 2454833, scale="tdb", format="jd"), + radius=1*u.pixel, + magnitude_limit=18, + ) + +def test_epic(): + catalog_k2 = query_catalog( + coord=SkyCoord(172.560465, 7.588391, unit="deg"), + epoch=Time(1975.1781333280233 + 2454833, scale="tdb", format="jd"), + catalog="epic", + radius=20, + magnitude_limit=18, + ) + assert len(catalog_k2) == 1 + catalog_k2 = query_EPIC( + coord=SkyCoord(172.560465, 7.588391, unit="deg"), + epoch=Time(1975.1781333280233 + 2454833, scale="tdb", format="jd"), + radius=1*u.pixel, + magnitude_limit=18, + ) + +def test_empty(): + catalog = query_catalog(SkyCoord.from_name('Kepler-10'), + Time.now(), + 'epic', + radius=20*u.arcsecond, + magnitude_limit=18) + assert isinstance(catalog, pd.DataFrame) + assert len(catalog) == 0 \ No newline at end of file diff --git a/tests/test_search.py b/tests/test_search.py index 0a041ea..1017081 100644 --- a/tests/test_search.py +++ b/tests/test_search.py @@ -6,19 +6,13 @@ from numpy.testing import assert_almost_equal, assert_array_equal import numpy as np -import tempfile -from requests import HTTPError from astropy.coordinates import SkyCoord import astropy.units as u -from astropy.table import Table import pandas as pd -from pathlib import Path -from astropy.utils.data import get_pkg_data_filename -import shutil from lksearch.utils import SearchError, SearchWarning @@ -431,7 +425,6 @@ def test_split_k2_campaigns(): def test_FFI_retrieval(): """Can we find TESS individual FFI's""" - target = "Kepler 16b" assert len(TESSSearch("Kepler 16b").search_sector_ffis(14)) == 1241 @@ -458,15 +451,15 @@ class TestMASTSearchFilter: ), ) def test_target_name(self, target_name): - filter_results = self.results.filter_table(target_name=target_name) + self.results.filter_table(target_name=target_name) @pytest.mark.parametrize("limit", (0, 10, 1000)) def test_limit(self, limit): - filter_results = self.results.filter_table(limit=limit) + self.results.filter_table(limit=limit) @pytest.mark.parametrize("filetype", (0, "lightcurve")) def test_filetype(self, filetype): - filter_results = self.results.filter_table(filetype=filetype) + self.results.filter_table(filetype=filetype) @pytest.mark.parametrize( "exptime", @@ -485,33 +478,33 @@ def test_filetype(self, filetype): ), ) def test_exptime(self, exptime): - filter_results = self.results.filter_table(exptime=exptime) + self.results.filter_table(exptime=exptime) @pytest.mark.parametrize("distance", (0, 0.2, (0.2, 0.4))) def test_distance(self, distance): - filter_results = self.results.filter_table(distance=distance) + self.results.filter_table(distance=distance) @pytest.mark.parametrize("year", (0, 2013, (2000, 2020), [2013, 2019])) def test_year(self, year): - filter_results = self.results.filter_table(year=year) + self.results.filter_table(year=year) @pytest.mark.parametrize( "description", (0, "data", ["TPS", "report"], ("TPS", "report")) ) def test_description(self, description): - filter_results = self.results.filter_table(description=description) + self.results.filter_table(description=description) @pytest.mark.parametrize("pipeline", (0, "Kepler", "spoc", ["kepler", "spoc"])) def test_pipeline(self, pipeline): - filter_results = self.results.filter_table(pipeline=pipeline) + self.results.filter_table(pipeline=pipeline) @pytest.mark.parametrize("sequence", (0, 14, [14, 15])) def test_sequence(self, sequence): - filter_results = self.results.filter_table(sequence=sequence) + self.results.filter_table(sequence=sequence) @pytest.mark.parametrize("mission", (0, "Kepler", "Tess", ["Kepler", "Tess"])) def test_mission(self, mission): - filter_results = self.results.filter_table(mission=mission) + self.results.filter_table(mission=mission) def test_combination( self, @@ -549,7 +542,7 @@ def test_tess_clouduris(): # 17 products should be returned assert len(toi.cloud_uris) == 17 # 5 of them should have cloud uris - assert np.sum((toi.cloud_uris.values != None).astype(int)) == 5 + assert np.sum((toi.cloud_uris.values is not None).astype(int)) == 5 def test_tess_return_clouduri_not_download(): From e5f63ff6b54df71ba28eeee45e2e006d8c96f6d9 Mon Sep 17 00:00:00 2001 From: Christina Hedges Date: Mon, 29 Jul 2024 14:43:06 -0400 Subject: [PATCH 02/15] update ruff [skip ci] --- src/lksearch/K2Search.py | 1 + src/lksearch/__init__.py | 10 +-- src/lksearch/catalog.py | 120 ++++++++++++++++++++++++------------ tests/test_query_catalog.py | 63 +++++++++++++------ tests/test_search.py | 1 - 5 files changed, 132 insertions(+), 63 deletions(-) diff --git a/src/lksearch/K2Search.py b/src/lksearch/K2Search.py index 5dcbf0d..adad2a3 100644 --- a/src/lksearch/K2Search.py +++ b/src/lksearch/K2Search.py @@ -10,6 +10,7 @@ pd.options.display.max_rows = 10 + class K2Search(MASTSearch): """ Search Class that queries mast for observations performed by the K2 diff --git a/src/lksearch/__init__.py b/src/lksearch/__init__.py index 3c7a682..e784a5a 100644 --- a/src/lksearch/__init__.py +++ b/src/lksearch/__init__.py @@ -81,8 +81,8 @@ class Conf(_config.ConfigNamespace): conf = Conf() log = logging.getLogger("lksearch") -from .MASTSearch import MASTSearch #noqa -from .TESSSearch import TESSSearch #noqa -from .KeplerSearch import KeplerSearch #noqa -from .K2Search import K2Search #noqa -from .catalog import * #noqa +from .MASTSearch import MASTSearch # noqa +from .TESSSearch import TESSSearch # noqa +from .KeplerSearch import KeplerSearch # noqa +from .K2Search import K2Search # noqa +from .catalog import * # noqa diff --git a/src/lksearch/catalog.py b/src/lksearch/catalog.py index f9db3de..96be072 100644 --- a/src/lksearch/catalog.py +++ b/src/lksearch/catalog.py @@ -1,4 +1,5 @@ """Functions to search various catalogs for missions""" + from typing import Union import numpy as np from astropy.coordinates import Angle, SkyCoord, Distance @@ -10,7 +11,7 @@ import warnings -__all__ = ['query_KIC', 'query_EPIC', 'query_TIC', 'query_gaia', 'query_catalog'] +__all__ = ["query_KIC", "query_EPIC", "query_TIC", "query_gaia", "query_catalog"] # This is a lits of VizieR catalogs and their input parameters to be used in the # query_skycatalog function @@ -21,17 +22,17 @@ "column_filters": "kepmag", "rename_in": ("KIC", "pmDE", "kepmag"), "rename_out": ("ID", "pmDEC", "Kepler_Mag"), - "equinox":Time(2000, format="jyear", scale="tt"), - "prefix":"KIC" + "equinox": Time(2000, format="jyear", scale="tt"), + "prefix": "KIC", }, "epic": { "catalog": "IV/34/epic", "columns": ["ID", "RAJ2000", "DEJ2000", "pmRA", "pmDEC", "plx", "Kpmag"], "column_filters": "Kpmag", "rename_in": ("Kpmag", "plx"), - "rename_out": ("K2_Mag", 'Plx'), - "equinox":Time(2000, format="jyear", scale="tt"), - "prefix":"EPIC" + "rename_out": ("K2_Mag", "Plx"), + "equinox": Time(2000, format="jyear", scale="tt"), + "prefix": "EPIC", }, "tic": { "catalog": "IV/39/tic82", @@ -39,8 +40,8 @@ "column_filters": "Tmag", "rename_in": ("TIC", "pmDE", "Tmag"), "rename_out": ("ID", "pmDEC", "TESS_Mag"), - "equinox":Time(2000, format="jyear", scale="tt"), - "prefix":"TIC" + "equinox": Time(2000, format="jyear", scale="tt"), + "prefix": "TIC", }, "gaiadr3": { "catalog": "I/355/gaiadr3", @@ -48,13 +49,13 @@ "column_filters": "Gmag", "rename_in": ("DR3Name", "pmDE", "Gmag"), "rename_out": ("ID", "pmDEC", "Gaia_G_Mag"), - "equinox":Time(2016, format="jyear", scale="tt"), - "prefix":None, + "equinox": Time(2016, format="jyear", scale="tt"), + "prefix": None, }, } -def _apply_propermotion(table:Table, equinox:Time, epoch:Time): +def _apply_propermotion(table: Table, equinox: Time, epoch: Time): """ Returns an astropy table of sources with the proper motion correction applied @@ -84,7 +85,7 @@ def _apply_propermotion(table:Table, equinox:Time, epoch:Time): # Suppress warning caused by Astropy as noted in issue 111747 (https://github.com/astropy/astropy/issues/11747) with warnings.catch_warnings(): warnings.filterwarnings("ignore", message="negative parallaxes") - + # Get the input data from the table c = SkyCoord( ra=table["RAJ2000"], @@ -100,7 +101,7 @@ def _apply_propermotion(table:Table, equinox:Time, epoch:Time): with warnings.catch_warnings(): warnings.filterwarnings("ignore", message="ERFA function") warnings.filterwarnings("ignore", message="invalid value") - + # Calculate the new values c1 = c.apply_space_motion(new_obstime=epoch) @@ -117,7 +118,6 @@ def _apply_propermotion(table:Table, equinox:Time, epoch:Time): return table - def query_catalog( coord: SkyCoord, epoch: Time, @@ -132,7 +132,7 @@ def query_catalog( coord : astropy.coordinates.SkyCoord Coordinates around which to do a radius query epoch: astropy.time.Time - The time of observation in JD. + The time of observation in JD. catalog: str The catalog to query, either 'kepler', 'k2', or 'tess', 'gaia' radius : float or astropy quantity @@ -151,7 +151,7 @@ def query_catalog( raise TypeError("Must pass an `astropy.coordinates.SkyCoord` object.") if not isinstance(epoch, Time): try: - epoch = Time(epoch, format='jd') + epoch = Time(epoch, format="jd") except ValueError: raise TypeError("Must pass an `astropy.time.Time object`.") raise TypeError("Must pass an `astropy.time.Time object`.") @@ -176,11 +176,7 @@ def query_catalog( # Get the appropriate column names and filters to be applied filters = Vizier( columns=catalog_meta["columns"], - column_filters={ - catalog_meta[ - "column_filters" - ]: f"<{magnitude_limit}" - }, + column_filters={catalog_meta["column_filters"]: f"<{magnitude_limit}"}, ) # The catalog can cut off at 50 - we dont want this to happen @@ -188,8 +184,28 @@ def query_catalog( # Now query the catalog result = filters.query_region(coord, catalog=catalog_name, radius=Angle(radius)) if len(result) == 0: - return pd.DataFrame(columns=[*catalog_meta["columns"], 'RA', 'DEC', 'Separation', 'Relative_Flux']).rename({i:o for i, o in zip(catalog_meta["rename_in"], catalog_meta["rename_out"])}, axis=1).set_index("ID") - + return ( + pd.DataFrame( + columns=[ + *catalog_meta["columns"], + "RA", + "DEC", + "Separation", + "Relative_Flux", + ] + ) + .rename( + { + i: o + for i, o in zip( + catalog_meta["rename_in"], catalog_meta["rename_out"] + ) + }, + axis=1, + ) + .set_index("ID") + ) + result = result[catalog_name] # Rename the columns so that the output is uniform @@ -198,9 +214,9 @@ def query_catalog( catalog_meta["rename_out"], ) - if catalog_meta['prefix'] is not None: + if catalog_meta["prefix"] is not None: prefix = catalog_meta["prefix"] - result["ID"] = [f"{prefix} {id}"for id in result['ID']] + result["ID"] = [f"{prefix} {id}" for id in result["ID"]] # Based on the input coordinates pick the object with the mininmum separation as the reference star. c1 = SkyCoord(result["RAJ2000"], result["DEJ2000"], unit="deg") @@ -228,7 +244,7 @@ def query_catalog( result["Separation"] = sep_pm_correct # Calculate the relative flux - result["Relative_Flux"] = 10**( + result["Relative_Flux"] = 10 ** ( ( [value for key, value in result.items() if "_Mag" in key][0] - [value for key, value in result.items() if "_Mag" in key][0][ref_index] @@ -240,7 +256,8 @@ def query_catalog( result.sort(["Separation"]) return result.to_pandas().set_index("ID") -def query_KIC( + +def query_KIC( coord: SkyCoord, epoch: Time, radius: Union[float, u.Quantity] = u.Quantity(100, "arcsecond"), @@ -253,7 +270,7 @@ def query_KIC( coord : astropy.coordinates.SkyCoord Coordinates around which to do a radius query epoch: astropy.time.Time - The time of observation in JD. + The time of observation in JD. catalog: str The catalog to query, either 'kepler', 'k2', or 'tess', 'gaia' radius : float or astropy quantity @@ -266,8 +283,15 @@ def query_KIC( A pandas dataframe of the sources within radius query, corrected for proper motion """ if radius.unit == u.pixel: - radius = (radius * (4 * u.arcsecond/u.pixel)).to(u.arcsecond) - return query_catalog(coord=coord, epoch=epoch, catalog='kic', radius=radius, magnitude_limit=magnitude_limit) + radius = (radius * (4 * u.arcsecond / u.pixel)).to(u.arcsecond) + return query_catalog( + coord=coord, + epoch=epoch, + catalog="kic", + radius=radius, + magnitude_limit=magnitude_limit, + ) + def query_TIC( coord: SkyCoord, @@ -282,7 +306,7 @@ def query_TIC( coord : astropy.coordinates.SkyCoord Coordinates around which to do a radius query epoch: astropy.time.Time - The time of observation in JD. + The time of observation in JD. catalog: str The catalog to query, either 'kepler', 'k2', or 'tess', 'gaia' radius : float or astropy quantity @@ -295,8 +319,15 @@ def query_TIC( A pandas dataframe of the sources within radius query, corrected for proper motion """ if radius.unit == u.pixel: - radius = (radius * (21 * u.arcsecond/u.pixel)).to(u.arcsecond) - return query_catalog(coord=coord, epoch=epoch, catalog='tic', radius=radius, magnitude_limit=magnitude_limit) + radius = (radius * (21 * u.arcsecond / u.pixel)).to(u.arcsecond) + return query_catalog( + coord=coord, + epoch=epoch, + catalog="tic", + radius=radius, + magnitude_limit=magnitude_limit, + ) + def query_EPIC( coord: SkyCoord, @@ -311,7 +342,7 @@ def query_EPIC( coord : astropy.coordinates.SkyCoord Coordinates around which to do a radius query epoch: astropy.time.Time - The time of observation in JD. + The time of observation in JD. catalog: str The catalog to query, either 'kepler', 'k2', or 'tess', 'gaia' radius : float or astropy quantity @@ -324,8 +355,15 @@ def query_EPIC( A pandas dataframe of the sources within radius query, corrected for proper motion """ if radius.unit == u.pixel: - radius = (radius * (4 * u.arcsecond/u.pixel)).to(u.arcsecond) - return query_catalog(coord=coord, epoch=epoch, catalog='epic', radius=radius, magnitude_limit=magnitude_limit) + radius = (radius * (4 * u.arcsecond / u.pixel)).to(u.arcsecond) + return query_catalog( + coord=coord, + epoch=epoch, + catalog="epic", + radius=radius, + magnitude_limit=magnitude_limit, + ) + def query_gaia( coord: SkyCoord, @@ -340,7 +378,7 @@ def query_gaia( coord : astropy.coordinates.SkyCoord Coordinates around which to do a radius query epoch: astropy.time.Time - The time of observation in JD. + The time of observation in JD. catalog: str The catalog to query, either 'kepler', 'k2', or 'tess', 'gaia' radius : float or astropy quantity @@ -352,4 +390,10 @@ def query_gaia( result: pd.DataFrame A pandas dataframe of the sources within radius query, corrected for proper motion """ - return query_catalog(coord=coord, epoch=epoch, catalog='gaiadr3', radius=radius, magnitude_limit=magnitude_limit) \ No newline at end of file + return query_catalog( + coord=coord, + epoch=epoch, + catalog="gaiadr3", + radius=radius, + magnitude_limit=magnitude_limit, + ) diff --git a/tests/test_query_catalog.py b/tests/test_query_catalog.py index 36a7619..37d9b42 100644 --- a/tests/test_query_catalog.py +++ b/tests/test_query_catalog.py @@ -1,4 +1,5 @@ """Tests catalog querying""" + import numpy as np from astropy.coordinates import SkyCoord import pandas as pd @@ -11,12 +12,15 @@ c = SkyCoord(194.10141041659, -27.3905828803397, unit="deg") epoch = Time(1569.4424277786259 + 2457000, scale="tdb", format="jd") + def test_tic(): - catalog = query_catalog(coord=c, - epoch=epoch, - catalog="tic", - radius=u.Quantity(80, "arcsecond"), - magnitude_limit=18) + catalog = query_catalog( + coord=c, + epoch=epoch, + catalog="tic", + radius=u.Quantity(80, "arcsecond"), + magnitude_limit=18, + ) assert len(catalog) == 4 # Checks that an astropy Table is returned @@ -29,7 +33,11 @@ def test_tic(): # Test different epochs catalog_new = query_catalog( - coord=c, epoch=Time(2461041.500, scale="tt", format="jd"), catalog="tic", radius=80, magnitude_limit=18 + coord=c, + epoch=Time(2461041.500, scale="tt", format="jd"), + catalog="tic", + radius=80, + magnitude_limit=18, ) assert np.isclose(catalog_new.iloc[0]["RA"], 194.10052070792756, atol=1e-6) @@ -37,7 +45,10 @@ def test_tic(): # Test different epochs catalog_new = query_TIC( - coord=c, epoch=Time(2461041.500, scale="tt", format="jd"), radius=4*u.pixel, magnitude_limit=18 + coord=c, + epoch=Time(2461041.500, scale="tt", format="jd"), + radius=4 * u.pixel, + magnitude_limit=18, ) @@ -45,19 +56,29 @@ def test_bad_catalog(): # test the catalog type i.e., simbad is not included in our catalog list. # Look at other tests to see if this is correct syntax with pytest.raises(ValueError, match="Can not parse catalog name 'simbad'"): - query_catalog(coord=c, epoch=epoch, catalog="simbad", radius=80, magnitude_limit=18) + query_catalog( + coord=c, epoch=epoch, catalog="simbad", radius=80, magnitude_limit=18 + ) + def test_gaia(): catalog_gaia = query_catalog( - coord=c, epoch=Time(1569.4424277786259 + 2457000, scale="tdb", format="jd"), catalog="gaiadr3", radius=80, magnitude_limit=18 + coord=c, + epoch=Time(1569.4424277786259 + 2457000, scale="tdb", format="jd"), + catalog="gaiadr3", + radius=80, + magnitude_limit=18, ) assert len(catalog_gaia) == 2 catalog_gaia = query_gaia( - coord=c, epoch=Time(1569.4424277786259 + 2457000, scale="tdb", format="jd"), radius=80, magnitude_limit=18 + coord=c, + epoch=Time(1569.4424277786259 + 2457000, scale="tdb", format="jd"), + radius=80, + magnitude_limit=18, ) - + def test_kic(): catalog_kepler = query_catalog( @@ -71,10 +92,11 @@ def test_kic(): catalog_kepler = query_KIC( coord=SkyCoord(285.679391, 50.2413, unit="deg"), epoch=Time(120.5391465105713 + 2454833, scale="tdb", format="jd"), - radius=1*u.pixel, + radius=1 * u.pixel, magnitude_limit=18, ) + def test_epic(): catalog_k2 = query_catalog( coord=SkyCoord(172.560465, 7.588391, unit="deg"), @@ -87,15 +109,18 @@ def test_epic(): catalog_k2 = query_EPIC( coord=SkyCoord(172.560465, 7.588391, unit="deg"), epoch=Time(1975.1781333280233 + 2454833, scale="tdb", format="jd"), - radius=1*u.pixel, + radius=1 * u.pixel, magnitude_limit=18, ) + def test_empty(): - catalog = query_catalog(SkyCoord.from_name('Kepler-10'), - Time.now(), - 'epic', - radius=20*u.arcsecond, - magnitude_limit=18) + catalog = query_catalog( + SkyCoord.from_name("Kepler-10"), + Time.now(), + "epic", + radius=20 * u.arcsecond, + magnitude_limit=18, + ) assert isinstance(catalog, pd.DataFrame) - assert len(catalog) == 0 \ No newline at end of file + assert len(catalog) == 0 diff --git a/tests/test_search.py b/tests/test_search.py index 1017081..e4267cf 100644 --- a/tests/test_search.py +++ b/tests/test_search.py @@ -13,7 +13,6 @@ import pandas as pd - from lksearch.utils import SearchError, SearchWarning from lksearch import MASTSearch, TESSSearch, KeplerSearch, K2Search From 979fe41a00e7fa249fb4268ae1cfb52aa8a15a00 Mon Sep 17 00:00:00 2001 From: Christina Hedges Date: Mon, 29 Jul 2024 15:50:46 -0400 Subject: [PATCH 03/15] fix ci --- tests/test_search.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_search.py b/tests/test_search.py index e4267cf..c836f3b 100644 --- a/tests/test_search.py +++ b/tests/test_search.py @@ -541,7 +541,12 @@ def test_tess_clouduris(): # 17 products should be returned assert len(toi.cloud_uris) == 17 # 5 of them should have cloud uris - assert np.sum((toi.cloud_uris.values is not None).astype(int)) == 5 + assert ( + np.sum( + ([cloud_uri is not None for cloud_uri in toi.cloud_uris.values]).astype(int) + ) + == 5 + ) def test_tess_return_clouduri_not_download(): From 73b2a1e8ff854da43d2d787fecf8e67a8ae5cf0b Mon Sep 17 00:00:00 2001 From: Christina Hedges Date: Tue, 30 Jul 2024 09:47:47 -0400 Subject: [PATCH 04/15] added documentation --- .github/workflows/documentation.yml | 2 +- docs/apidoc.rst | 3 + docs/index.rst | 2 +- docs/tutorials/catalog-searches.ipynb | 652 ++++++++++++++++++ docs/tutorials/cloud-data-searches.ipynb | 179 +++++ ...ple_searches.ipynb => data-searches.ipynb} | 133 +--- docs/tutorials/index.rst | 20 + poetry.lock | 598 +++++++++++++++- pyproject.toml | 8 + src/lksearch/catalog.py | 235 ++++--- tests/test_query_catalog.py | 4 +- 11 files changed, 1580 insertions(+), 256 deletions(-) create mode 100644 docs/tutorials/catalog-searches.ipynb create mode 100644 docs/tutorials/cloud-data-searches.ipynb rename docs/tutorials/{Example_searches.ipynb => data-searches.ipynb} (95%) create mode 100644 docs/tutorials/index.rst diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 79f0e3f..e76389e 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -18,7 +18,7 @@ jobs: - name: Install dependencies run: | pip install poetry - poetry install --with dev + poetry install --with dev,cloud - name: Sphinx build run: | poetry run sphinx-build docs _build diff --git a/docs/apidoc.rst b/docs/apidoc.rst index 489465e..940e09e 100644 --- a/docs/apidoc.rst +++ b/docs/apidoc.rst @@ -15,5 +15,8 @@ API .. autoclass:: lksearch.TESSSearch :members: +.. automodule:: lksearch.catalog + :members: + .. automodule:: lksearch.config :members: \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index 99eb929..38e71d6 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -15,7 +15,7 @@ lksearch :hidden: Quickstart - tutorials/Example_searches + tutorials/index apidoc GetInvolved HowtoCite diff --git a/docs/tutorials/catalog-searches.ipynb b/docs/tutorials/catalog-searches.ipynb new file mode 100644 index 0000000..bfbfec6 --- /dev/null +++ b/docs/tutorials/catalog-searches.ipynb @@ -0,0 +1,652 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "8362de11", + "metadata": {}, + "source": [ + "# Catalog Searches Tutorial" + ] + }, + { + "cell_type": "markdown", + "id": "7139b45e-0981-48ce-a7c8-f57c27eacddb", + "metadata": {}, + "source": [ + "`lksearch` enables you to search through the catalogs associated with each mission, and Gaia. You can query:\n", + "\n", + "- The Kepler Input Catalog\n", + "- The Ecliptic Plane Input Catalog\n", + "- The TESS Input Catalog\n", + "- Gaia EDR3.\n", + "\n", + "`lksearch` will propagate the proper motion for you. Below are examples of each query." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "9f07ac77", + "metadata": {}, + "outputs": [], + "source": [ + "from lksearch.catalog import query_EPIC, query_KIC, query_TIC, query_gaia\n", + "from astropy.coordinates import SkyCoord\n", + "from astropy.time import Time\n", + "import astropy.units as u" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "fd0abec3-8b85-4812-aafb-ca13a94d306c", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
RADecSeparationRelative_FluxKepmag
ID
KIC 11904151285.6793850.2412990.0000001.00000010.961000
KIC 11904160285.6807650.2424935.3452140.00664416.405001
\n", + "
" + ], + "text/plain": [ + " RA Dec Separation Relative_Flux Kepmag\n", + "ID \n", + "KIC 11904151 285.67938 50.241299 0.000000 1.000000 10.961000\n", + "KIC 11904160 285.68076 50.242493 5.345214 0.006644 16.405001" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "c = SkyCoord.from_name('Kepler-10')\n", + "query_KIC(c)" + ] + }, + { + "cell_type": "markdown", + "id": "434ed1c5-979f-4c39-b866-a2c4b961d429", + "metadata": {}, + "source": [ + "By default, the catalog will query with an epoch of that is the default for the catalog. You can set the `epoch` keyword to a date in order to get `RA` and `Dec` at that date, given the proper motion." + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "e3499cc9-33b4-4d21-b734-ed6398539442", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
RADecSeparationRelative_FluxKepmag
ID
KIC 11904151285.6793850.2412990.0000001.00000010.961000
KIC 11904160285.6807650.2424935.3452140.00664416.405001
\n", + "
" + ], + "text/plain": [ + " RA Dec Separation Relative_Flux Kepmag\n", + "ID \n", + "KIC 11904151 285.67938 50.241299 0.000000 1.000000 10.961000\n", + "KIC 11904160 285.68076 50.242493 5.345214 0.006644 16.405001" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "c = SkyCoord.from_name('Kepler-10')\n", + "query_KIC(c, epoch=Time.now())" + ] + }, + { + "cell_type": "markdown", + "id": "0570848e-1281-4dcc-bc97-aabdef0584a5", + "metadata": {}, + "source": [ + "You can also pass a radius for your query. If you query each catalog directly you can set your query radius in units of pixels, otherwise you can use arcseconds." + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "37e4bc44-5a6c-4dbd-a4e0-31f0a8c98184", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
RADecSeparationRelative_FluxKepmag
ID
KIC 11904151285.6793850.2412990.0000001.00000010.961000
KIC 11904160285.6807650.2424935.3452140.00664416.405001
KIC 11904165285.6831750.2412078.7323900.00266017.399000
KIC 11904162285.6812450.24391610.3487930.00157617.966999
\n", + "
" + ], + "text/plain": [ + " RA Dec Separation Relative_Flux Kepmag\n", + "ID \n", + "KIC 11904151 285.67938 50.241299 0.000000 1.000000 10.961000\n", + "KIC 11904160 285.68076 50.242493 5.345214 0.006644 16.405001\n", + "KIC 11904165 285.68317 50.241207 8.732390 0.002660 17.399000\n", + "KIC 11904162 285.68124 50.243916 10.348793 0.001576 17.966999" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "c = SkyCoord.from_name('Kepler-10')\n", + "query_KIC(c, epoch=Time.now(), radius=3*u.pixel)" + ] + }, + { + "cell_type": "markdown", + "id": "b1b89482-e501-4f55-b307-888074e1b7cd", + "metadata": {}, + "source": [ + "You can query TIC" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "631f9a71-b0f2-4cb7-9ef3-565155c0fe16", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
RADecSeparationRelative_FluxTESSmag
ID
TIC 26113907184.257651-80.4665600.0000001.00000013.995
TIC 26113667984.304008-80.46195932.2280053597.4912115.105
\n", + "
" + ], + "text/plain": [ + " RA Dec Separation Relative_Flux TESSmag\n", + "ID \n", + "TIC 261139071 84.257651 -80.466560 0.000000 1.000000 13.995\n", + "TIC 261136679 84.304008 -80.461959 32.228005 3597.491211 5.105" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "c = SkyCoord.from_name('Pi Men c')\n", + "query_TIC(c, epoch=Time.now(), radius=2*u.pixel)" + ] + }, + { + "cell_type": "markdown", + "id": "a8e4e95b-5c0f-43bd-84b1-7c427fe482c1", + "metadata": {}, + "source": [ + "EPIC" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "e21a83c5-2975-4fde-a1a0-6d5fb031e95d", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
RADecSeparationRelative_FluxK2mag
ID
EPIC 201912552172.560467.5883910.01.012.473
\n", + "
" + ], + "text/plain": [ + " RA Dec Separation Relative_Flux K2mag\n", + "ID \n", + "EPIC 201912552 172.56046 7.588391 0.0 1.0 12.473" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "c = SkyCoord.from_name('K2-18')\n", + "query_EPIC(c)" + ] + }, + { + "cell_type": "markdown", + "id": "62473b20-a001-491a-9a2a-0502540cff42", + "metadata": {}, + "source": [ + "And Gaia in the same ways" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "2f18882e-a193-4629-9681-b36ea02af6d0", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
RADecSeparationRelative_FluxGmagBPmagRPmag
ID
Gaia DR3 2132155017099178624285.67935450.2414050.0000001.00000010.92003111.25350510.418263
Gaia DR3 2132155051458917632285.68021450.24994230.7979210.00169117.84948518.20978217.317846
Gaia DR3 2132155051458918144285.68592250.24991834.1765080.00557816.55381817.21398415.778805
\n", + "
" + ], + "text/plain": [ + " RA Dec Separation \\\n", + "ID \n", + "Gaia DR3 2132155017099178624 285.679354 50.241405 0.000000 \n", + "Gaia DR3 2132155051458917632 285.680214 50.249942 30.797921 \n", + "Gaia DR3 2132155051458918144 285.685922 50.249918 34.176508 \n", + "\n", + " Relative_Flux Gmag BPmag RPmag \n", + "ID \n", + "Gaia DR3 2132155017099178624 1.000000 10.920031 11.253505 10.418263 \n", + "Gaia DR3 2132155051458917632 0.001691 17.849485 18.209782 17.317846 \n", + "Gaia DR3 2132155051458918144 0.005578 16.553818 17.213984 15.778805 " + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "c = SkyCoord.from_name('Kepler-10')\n", + "query_gaia(c, epoch=Time.now(), radius=40*u.arcsecond)" + ] + }, + { + "cell_type": "markdown", + "id": "d20de587-7719-4b39-bc80-ab07a9800c8e", + "metadata": {}, + "source": [ + "Optionally, you can return the output of the search as an `astropy.coordinates.SkyCoord` object" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "id": "fb7fc90b-87ad-47a7-841f-402b2ff46867", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 29, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "c = SkyCoord.from_name('Kepler-10')\n", + "query_gaia(c, epoch=Time.now(), radius=40*u.arcsecond, return_skycoord=True)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.13" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/docs/tutorials/cloud-data-searches.ipynb b/docs/tutorials/cloud-data-searches.ipynb new file mode 100644 index 0000000..3a0bb4e --- /dev/null +++ b/docs/tutorials/cloud-data-searches.ipynb @@ -0,0 +1,179 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "e0dbfed3-0284-4144-9c0c-4ec132aa66f8", + "metadata": {}, + "source": [ + "# lksearch Cloud Configuration\n", + "\n", + "`lksearch` has three configuration parameters that are particularly relevant to cloud-based science platforms. These are:\n", + " - `CLOUD_ONLY`: Only Download cloud based data. If `False`, will download all data. If `True`, will only download data located on a cloud (Amazon S3) bucket\n", + " - `PREFER_CLOUD`: Prefer Cloud-based data product retrieval where available\n", + " - `DOWNLOAD_CLOUD`: Download cloud based data. If `False`, download() will return a pointer to the cloud based datainstead of downloading it - intended usage for cloud-based science platforms (e.g. TiKE)\n", + "\n", + "`CLOUD_ONLY` governs whether or not non-cloud based data will be possible to be downloaded. Many science files have both a cloud-based location (typically on Amazon S3) and a MAST archive location. By default this is `False`, and all products will be downloaded regardless of whether the file is available via cloud-hosting or MAST archive hosting. If `CLOUD_ONLY` is `True`, only files available for download on a cloud-based platform will be retrieved. This configuration parameter is passed through to the `~astroquery.mast` parameter of the same name. \n", + "\n", + "`PREFER_CLOUD` governs the default download behaviour in the event that a data product is available from both a cloud-based location and a MAST-hosted archive location. If `True` (default), then `lksearch` will preferentially download files from the cloud-host rather than the MAST-hosted Archive. This configuration parameter is passed through to the `~astroquery.mast` parameter of the same name. \n", + "\n", + "`DOWNLOAD_CLOUD` governs whether files that are hosted on the cloud are downloaded locally. If this value is `True` (default), cloud-hosted files are downloaded normally. If `False`, then files hosted on a cloud based platform are not downloaded, and a URI containing the path to the desired file on the cloud-host is returned instead of the local path to the file. This path can then be used to read the file remotely (see `~astropy.io.fits` [working with remote and cloud hosted files](https://docs.astropy.org/en/stable/io/fits/#working-with-remote-and-cloud-hosted-files:~:text=with%20large%20files-,Working%20with%20remote%20and%20cloud%2Dhosted%20files,-Unsigned%20integers) for more information). This ability may be most relevant when using `lksearch` on a cloud-based science platform where the remote read is very rapid and short-term local storage comparatively expensive. \n", + "\n", + "Using this `DOWNLOAD_CLOUD` functionality, we can find a cloud-hosted file and read it directly into memory like so:" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "ff63034a-75de-4bf4-bc74-931e472d9af3", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Downloading products: 100%|██████████████████████| 1/1 [00:00<00:00, 497.72it/s]\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Local PathStatusMessageURL
0s3://stpubdata/tess/public/tid/s0014/0000/0001...COMPLETELink to S3 bucket for remote readNone
\n", + "
" + ], + "text/plain": [ + " Local Path Status \\\n", + "0 s3://stpubdata/tess/public/tid/s0014/0000/0001... COMPLETE \n", + "\n", + " Message URL \n", + "0 Link to S3 bucket for remote read None " + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#First, lets update our configuration to not download a cloud-hosted file\n", + "from lksearch import Conf, TESSSearch\n", + "Conf.DOWNLOAD_CLOUD = False\n", + "\n", + "# Now, lets find some data. We use this target earlier in the tutorial. \n", + "toi = TESSSearch('TOI 1161')\n", + "\n", + "#What happens when we try to download it in our updated configuration? \n", + "cloud_result = toi.timeseries.mission_products[0].download()\n", + "cloud_result" + ] + }, + { + "cell_type": "markdown", + "id": "7bea0002-f5bf-4dcc-bb13-ac93da0d7585", + "metadata": {}, + "source": [ + "As we can see above, instead of downloading the above file we have instead returned an amazon S3 URI for its cloud hosted location. If we want to access the file, we can do it using the remote-read capabilities of `~astropy.io.fits`. \n", + "\n", + "(Note: to do this you will need to install `fsspec` and `s3fs`.)" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "6f4f92ad-e754-4e58-abf2-54d6fab0fd08", + "metadata": {}, + "outputs": [ + { + "ename": "ImportError", + "evalue": "Install s3fs to access S3", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", + "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/lksearch-f6dQEj8r-py3.9/lib/python3.9/site-packages/fsspec/registry.py:242\u001b[0m, in \u001b[0;36mget_filesystem_class\u001b[0;34m(protocol)\u001b[0m\n\u001b[1;32m 241\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 242\u001b[0m register_implementation(protocol, \u001b[43m_import_class\u001b[49m\u001b[43m(\u001b[49m\u001b[43mbit\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mclass\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m)\u001b[49m)\n\u001b[1;32m 243\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mImportError\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m e:\n", + "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/lksearch-f6dQEj8r-py3.9/lib/python3.9/site-packages/fsspec/registry.py:277\u001b[0m, in \u001b[0;36m_import_class\u001b[0;34m(fqp)\u001b[0m\n\u001b[1;32m 276\u001b[0m is_s3 \u001b[38;5;241m=\u001b[39m mod \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124ms3fs\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m--> 277\u001b[0m mod \u001b[38;5;241m=\u001b[39m \u001b[43mimportlib\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mimport_module\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmod\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 278\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m is_s3 \u001b[38;5;129;01mand\u001b[39;00m mod\u001b[38;5;241m.\u001b[39m__version__\u001b[38;5;241m.\u001b[39msplit(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m) \u001b[38;5;241m<\u001b[39m [\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m0\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m5\u001b[39m\u001b[38;5;124m\"\u001b[39m]:\n", + "File \u001b[0;32m~/miniforge3/lib/python3.9/importlib/__init__.py:127\u001b[0m, in \u001b[0;36mimport_module\u001b[0;34m(name, package)\u001b[0m\n\u001b[1;32m 126\u001b[0m level \u001b[38;5;241m+\u001b[39m\u001b[38;5;241m=\u001b[39m \u001b[38;5;241m1\u001b[39m\n\u001b[0;32m--> 127\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43m_bootstrap\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_gcd_import\u001b[49m\u001b[43m(\u001b[49m\u001b[43mname\u001b[49m\u001b[43m[\u001b[49m\u001b[43mlevel\u001b[49m\u001b[43m:\u001b[49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mpackage\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mlevel\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[0;32m:1030\u001b[0m, in \u001b[0;36m_gcd_import\u001b[0;34m(name, package, level)\u001b[0m\n", + "File \u001b[0;32m:1007\u001b[0m, in \u001b[0;36m_find_and_load\u001b[0;34m(name, import_)\u001b[0m\n", + "File \u001b[0;32m:984\u001b[0m, in \u001b[0;36m_find_and_load_unlocked\u001b[0;34m(name, import_)\u001b[0m\n", + "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 's3fs'", + "\nThe above exception was the direct cause of the following exception:\n", + "\u001b[0;31mImportError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[2], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mastropy\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mio\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mfits\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mfits\u001b[39;00m\n\u001b[0;32m----> 2\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m \u001b[43mfits\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mopen\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcloud_result\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mLocal Path\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mvalues\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;241;43m0\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43muse_fsspec\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mfsspec_kwargs\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m{\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43manon\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m}\u001b[49m\u001b[43m)\u001b[49m \u001b[38;5;28;01mas\u001b[39;00m hdu:\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m item \u001b[38;5;129;01min\u001b[39;00m hdu:\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28mprint\u001b[39m(item\u001b[38;5;241m.\u001b[39mfileinfo())\n", + "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/lksearch-f6dQEj8r-py3.9/lib/python3.9/site-packages/astropy/io/fits/hdu/hdulist.py:213\u001b[0m, in \u001b[0;36mfitsopen\u001b[0;34m(name, mode, memmap, save_backup, cache, lazy_load_hdus, ignore_missing_simple, use_fsspec, fsspec_kwargs, **kwargs)\u001b[0m\n\u001b[1;32m 210\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m name:\n\u001b[1;32m 211\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mEmpty filename: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mname\u001b[38;5;132;01m!r}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m)\n\u001b[0;32m--> 213\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mHDUList\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfromfile\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 214\u001b[0m \u001b[43m \u001b[49m\u001b[43mname\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 215\u001b[0m \u001b[43m \u001b[49m\u001b[43mmode\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 216\u001b[0m \u001b[43m \u001b[49m\u001b[43mmemmap\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 217\u001b[0m \u001b[43m \u001b[49m\u001b[43msave_backup\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 218\u001b[0m \u001b[43m \u001b[49m\u001b[43mcache\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 219\u001b[0m \u001b[43m \u001b[49m\u001b[43mlazy_load_hdus\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 220\u001b[0m \u001b[43m \u001b[49m\u001b[43mignore_missing_simple\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 221\u001b[0m \u001b[43m \u001b[49m\u001b[43muse_fsspec\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43muse_fsspec\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 222\u001b[0m \u001b[43m \u001b[49m\u001b[43mfsspec_kwargs\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mfsspec_kwargs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 223\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 224\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/lksearch-f6dQEj8r-py3.9/lib/python3.9/site-packages/astropy/io/fits/hdu/hdulist.py:476\u001b[0m, in \u001b[0;36mHDUList.fromfile\u001b[0;34m(cls, fileobj, mode, memmap, save_backup, cache, lazy_load_hdus, ignore_missing_simple, **kwargs)\u001b[0m\n\u001b[1;32m 457\u001b[0m \u001b[38;5;129m@classmethod\u001b[39m\n\u001b[1;32m 458\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mfromfile\u001b[39m(\n\u001b[1;32m 459\u001b[0m \u001b[38;5;28mcls\u001b[39m,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 467\u001b[0m \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs,\n\u001b[1;32m 468\u001b[0m ):\n\u001b[1;32m 469\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 470\u001b[0m \u001b[38;5;124;03m Creates an `HDUList` instance from a file-like object.\u001b[39;00m\n\u001b[1;32m 471\u001b[0m \n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 474\u001b[0m \u001b[38;5;124;03m documentation for details of the parameters accepted by this method).\u001b[39;00m\n\u001b[1;32m 475\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[0;32m--> 476\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mcls\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_readfrom\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 477\u001b[0m \u001b[43m \u001b[49m\u001b[43mfileobj\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mfileobj\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 478\u001b[0m \u001b[43m \u001b[49m\u001b[43mmode\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mmode\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 479\u001b[0m \u001b[43m \u001b[49m\u001b[43mmemmap\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mmemmap\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 480\u001b[0m \u001b[43m \u001b[49m\u001b[43msave_backup\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43msave_backup\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 481\u001b[0m \u001b[43m \u001b[49m\u001b[43mcache\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcache\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 482\u001b[0m \u001b[43m \u001b[49m\u001b[43mignore_missing_simple\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mignore_missing_simple\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 483\u001b[0m \u001b[43m \u001b[49m\u001b[43mlazy_load_hdus\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mlazy_load_hdus\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 484\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 485\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/lksearch-f6dQEj8r-py3.9/lib/python3.9/site-packages/astropy/io/fits/hdu/hdulist.py:1146\u001b[0m, in \u001b[0;36mHDUList._readfrom\u001b[0;34m(cls, fileobj, data, mode, memmap, cache, lazy_load_hdus, ignore_missing_simple, use_fsspec, fsspec_kwargs, **kwargs)\u001b[0m\n\u001b[1;32m 1143\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m fileobj \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m 1144\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(fileobj, _File):\n\u001b[1;32m 1145\u001b[0m \u001b[38;5;66;03m# instantiate a FITS file object (ffo)\u001b[39;00m\n\u001b[0;32m-> 1146\u001b[0m fileobj \u001b[38;5;241m=\u001b[39m \u001b[43m_File\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 1147\u001b[0m \u001b[43m \u001b[49m\u001b[43mfileobj\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1148\u001b[0m \u001b[43m \u001b[49m\u001b[43mmode\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mmode\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1149\u001b[0m \u001b[43m \u001b[49m\u001b[43mmemmap\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mmemmap\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1150\u001b[0m \u001b[43m \u001b[49m\u001b[43mcache\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcache\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1151\u001b[0m \u001b[43m \u001b[49m\u001b[43muse_fsspec\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43muse_fsspec\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1152\u001b[0m \u001b[43m \u001b[49m\u001b[43mfsspec_kwargs\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mfsspec_kwargs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1153\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1154\u001b[0m \u001b[38;5;66;03m# The Astropy mode is determined by the _File initializer if the\u001b[39;00m\n\u001b[1;32m 1155\u001b[0m \u001b[38;5;66;03m# supplied mode was None\u001b[39;00m\n\u001b[1;32m 1156\u001b[0m mode \u001b[38;5;241m=\u001b[39m fileobj\u001b[38;5;241m.\u001b[39mmode\n", + "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/lksearch-f6dQEj8r-py3.9/lib/python3.9/site-packages/astropy/io/fits/file.py:183\u001b[0m, in \u001b[0;36m_File.__init__\u001b[0;34m(self, fileobj, mode, memmap, overwrite, cache, use_fsspec, fsspec_kwargs)\u001b[0m\n\u001b[1;32m 179\u001b[0m \u001b[38;5;66;03m# Handle cloud-hosted files using the optional ``fsspec`` dependency\u001b[39;00m\n\u001b[1;32m 180\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m (use_fsspec \u001b[38;5;129;01mor\u001b[39;00m _requires_fsspec(fileobj)) \u001b[38;5;129;01mand\u001b[39;00m mode \u001b[38;5;241m!=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mostream\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m 181\u001b[0m \u001b[38;5;66;03m# Note: we don't use `get_readable_fileobj` as a context manager\u001b[39;00m\n\u001b[1;32m 182\u001b[0m \u001b[38;5;66;03m# because io.fits takes care of closing files itself\u001b[39;00m\n\u001b[0;32m--> 183\u001b[0m fileobj \u001b[38;5;241m=\u001b[39m \u001b[43mget_readable_fileobj\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 184\u001b[0m \u001b[43m \u001b[49m\u001b[43mfileobj\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 185\u001b[0m \u001b[43m \u001b[49m\u001b[43mencoding\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mbinary\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 186\u001b[0m \u001b[43m \u001b[49m\u001b[43muse_fsspec\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43muse_fsspec\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 187\u001b[0m \u001b[43m \u001b[49m\u001b[43mfsspec_kwargs\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mfsspec_kwargs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 188\u001b[0m \u001b[43m \u001b[49m\u001b[43mclose_files\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mFalse\u001b[39;49;00m\u001b[43m,\u001b[49m\n\u001b[1;32m 189\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[38;5;21;43m__enter__\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 191\u001b[0m \u001b[38;5;66;03m# Handle raw URLs\u001b[39;00m\n\u001b[1;32m 192\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m (\n\u001b[1;32m 193\u001b[0m \u001b[38;5;28misinstance\u001b[39m(fileobj, (\u001b[38;5;28mstr\u001b[39m, \u001b[38;5;28mbytes\u001b[39m))\n\u001b[1;32m 194\u001b[0m \u001b[38;5;129;01mand\u001b[39;00m mode \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;129;01min\u001b[39;00m (\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mostream\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mappend\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mupdate\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m 195\u001b[0m \u001b[38;5;129;01mand\u001b[39;00m _is_url(fileobj)\n\u001b[1;32m 196\u001b[0m ):\n", + "File \u001b[0;32m~/miniforge3/lib/python3.9/contextlib.py:119\u001b[0m, in \u001b[0;36m_GeneratorContextManager.__enter__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 117\u001b[0m \u001b[38;5;28;01mdel\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39margs, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mkwds, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mfunc\n\u001b[1;32m 118\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 119\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mnext\u001b[39;49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mgen\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 120\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mStopIteration\u001b[39;00m:\n\u001b[1;32m 121\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mRuntimeError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mgenerator didn\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mt yield\u001b[39m\u001b[38;5;124m\"\u001b[39m) \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n", + "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/lksearch-f6dQEj8r-py3.9/lib/python3.9/site-packages/astropy/utils/data.py:336\u001b[0m, in \u001b[0;36mget_readable_fileobj\u001b[0;34m(name_or_obj, encoding, cache, show_progress, remote_timeout, sources, http_headers, use_fsspec, fsspec_kwargs, close_files)\u001b[0m\n\u001b[1;32m 333\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mModuleNotFoundError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mplease install `fsspec` to open this file\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m 334\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mfsspec\u001b[39;00m \u001b[38;5;66;03m# local import because it is a niche dependency\u001b[39;00m\n\u001b[0;32m--> 336\u001b[0m openfileobj \u001b[38;5;241m=\u001b[39m \u001b[43mfsspec\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mopen\u001b[49m\u001b[43m(\u001b[49m\u001b[43mname_or_obj\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mfsspec_kwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 337\u001b[0m close_fds\u001b[38;5;241m.\u001b[39mappend(openfileobj)\n\u001b[1;32m 338\u001b[0m fileobj \u001b[38;5;241m=\u001b[39m openfileobj\u001b[38;5;241m.\u001b[39mopen()\n", + "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/lksearch-f6dQEj8r-py3.9/lib/python3.9/site-packages/fsspec/core.py:484\u001b[0m, in \u001b[0;36mopen\u001b[0;34m(urlpath, mode, compression, encoding, errors, protocol, newline, expand, **kwargs)\u001b[0m\n\u001b[1;32m 426\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"Given a path or paths, return one ``OpenFile`` object.\u001b[39;00m\n\u001b[1;32m 427\u001b[0m \n\u001b[1;32m 428\u001b[0m \u001b[38;5;124;03mParameters\u001b[39;00m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 481\u001b[0m \u001b[38;5;124;03m https://filesystem-spec.readthedocs.io/en/latest/api.html#other-known-implementations\u001b[39;00m\n\u001b[1;32m 482\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 483\u001b[0m expand \u001b[38;5;241m=\u001b[39m DEFAULT_EXPAND \u001b[38;5;28;01mif\u001b[39;00m expand \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;28;01melse\u001b[39;00m expand\n\u001b[0;32m--> 484\u001b[0m out \u001b[38;5;241m=\u001b[39m \u001b[43mopen_files\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 485\u001b[0m \u001b[43m \u001b[49m\u001b[43murlpath\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m[\u001b[49m\u001b[43murlpath\u001b[49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 486\u001b[0m \u001b[43m \u001b[49m\u001b[43mmode\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mmode\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 487\u001b[0m \u001b[43m \u001b[49m\u001b[43mcompression\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcompression\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 488\u001b[0m \u001b[43m \u001b[49m\u001b[43mencoding\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mencoding\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 489\u001b[0m \u001b[43m \u001b[49m\u001b[43merrors\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43merrors\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 490\u001b[0m \u001b[43m \u001b[49m\u001b[43mprotocol\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mprotocol\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 491\u001b[0m \u001b[43m \u001b[49m\u001b[43mnewline\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mnewline\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 492\u001b[0m \u001b[43m \u001b[49m\u001b[43mexpand\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexpand\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 493\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 494\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 495\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m out:\n\u001b[1;32m 496\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mFileNotFoundError\u001b[39;00m(urlpath)\n", + "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/lksearch-f6dQEj8r-py3.9/lib/python3.9/site-packages/fsspec/core.py:295\u001b[0m, in \u001b[0;36mopen_files\u001b[0;34m(urlpath, mode, compression, encoding, errors, name_function, num, protocol, newline, auto_mkdir, expand, **kwargs)\u001b[0m\n\u001b[1;32m 216\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mopen_files\u001b[39m(\n\u001b[1;32m 217\u001b[0m urlpath,\n\u001b[1;32m 218\u001b[0m mode\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mrb\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 228\u001b[0m \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs,\n\u001b[1;32m 229\u001b[0m ):\n\u001b[1;32m 230\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"Given a path or paths, return a list of ``OpenFile`` objects.\u001b[39;00m\n\u001b[1;32m 231\u001b[0m \n\u001b[1;32m 232\u001b[0m \u001b[38;5;124;03m For writing, a str path must contain the \"*\" character, which will be filled\u001b[39;00m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 293\u001b[0m \u001b[38;5;124;03m https://filesystem-spec.readthedocs.io/en/latest/api.html#other-known-implementations\u001b[39;00m\n\u001b[1;32m 294\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[0;32m--> 295\u001b[0m fs, fs_token, paths \u001b[38;5;241m=\u001b[39m \u001b[43mget_fs_token_paths\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 296\u001b[0m \u001b[43m \u001b[49m\u001b[43murlpath\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 297\u001b[0m \u001b[43m \u001b[49m\u001b[43mmode\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 298\u001b[0m \u001b[43m \u001b[49m\u001b[43mnum\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mnum\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 299\u001b[0m \u001b[43m \u001b[49m\u001b[43mname_function\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mname_function\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 300\u001b[0m \u001b[43m \u001b[49m\u001b[43mstorage_options\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 301\u001b[0m \u001b[43m \u001b[49m\u001b[43mprotocol\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mprotocol\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 302\u001b[0m \u001b[43m \u001b[49m\u001b[43mexpand\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexpand\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 303\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 304\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m fs\u001b[38;5;241m.\u001b[39mprotocol \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mfile\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m 305\u001b[0m fs\u001b[38;5;241m.\u001b[39mauto_mkdir \u001b[38;5;241m=\u001b[39m auto_mkdir\n", + "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/lksearch-f6dQEj8r-py3.9/lib/python3.9/site-packages/fsspec/core.py:648\u001b[0m, in \u001b[0;36mget_fs_token_paths\u001b[0;34m(urlpath, mode, num, name_function, storage_options, protocol, expand)\u001b[0m\n\u001b[1;32m 646\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m protocol:\n\u001b[1;32m 647\u001b[0m storage_options[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mprotocol\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m=\u001b[39m protocol\n\u001b[0;32m--> 648\u001b[0m chain \u001b[38;5;241m=\u001b[39m \u001b[43m_un_chain\u001b[49m\u001b[43m(\u001b[49m\u001b[43murlpath0\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mstorage_options\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;129;43;01mor\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43m{\u001b[49m\u001b[43m}\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 649\u001b[0m inkwargs \u001b[38;5;241m=\u001b[39m {}\n\u001b[1;32m 650\u001b[0m \u001b[38;5;66;03m# Reverse iterate the chain, creating a nested target_* structure\u001b[39;00m\n", + "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/lksearch-f6dQEj8r-py3.9/lib/python3.9/site-packages/fsspec/core.py:344\u001b[0m, in \u001b[0;36m_un_chain\u001b[0;34m(path, kwargs)\u001b[0m\n\u001b[1;32m 342\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m bit \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mreversed\u001b[39m(bits):\n\u001b[1;32m 343\u001b[0m protocol \u001b[38;5;241m=\u001b[39m kwargs\u001b[38;5;241m.\u001b[39mpop(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mprotocol\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;28;01mNone\u001b[39;00m) \u001b[38;5;129;01mor\u001b[39;00m split_protocol(bit)[\u001b[38;5;241m0\u001b[39m] \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mfile\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m--> 344\u001b[0m \u001b[38;5;28mcls\u001b[39m \u001b[38;5;241m=\u001b[39m \u001b[43mget_filesystem_class\u001b[49m\u001b[43m(\u001b[49m\u001b[43mprotocol\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 345\u001b[0m extra_kwargs \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mcls\u001b[39m\u001b[38;5;241m.\u001b[39m_get_kwargs_from_urls(bit)\n\u001b[1;32m 346\u001b[0m kws \u001b[38;5;241m=\u001b[39m kwargs\u001b[38;5;241m.\u001b[39mpop(protocol, {})\n", + "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/lksearch-f6dQEj8r-py3.9/lib/python3.9/site-packages/fsspec/registry.py:244\u001b[0m, in \u001b[0;36mget_filesystem_class\u001b[0;34m(protocol)\u001b[0m\n\u001b[1;32m 242\u001b[0m register_implementation(protocol, _import_class(bit[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mclass\u001b[39m\u001b[38;5;124m\"\u001b[39m]))\n\u001b[1;32m 243\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mImportError\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m e:\n\u001b[0;32m--> 244\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mImportError\u001b[39;00m(bit[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124merr\u001b[39m\u001b[38;5;124m\"\u001b[39m]) \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01me\u001b[39;00m\n\u001b[1;32m 245\u001b[0m \u001b[38;5;28mcls\u001b[39m \u001b[38;5;241m=\u001b[39m registry[protocol]\n\u001b[1;32m 246\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mgetattr\u001b[39m(\u001b[38;5;28mcls\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mprotocol\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;28;01mNone\u001b[39;00m) \u001b[38;5;129;01min\u001b[39;00m (\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mabstract\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;28;01mNone\u001b[39;00m):\n", + "\u001b[0;31mImportError\u001b[0m: Install s3fs to access S3" + ] + } + ], + "source": [ + "import astropy.io.fits as fits\n", + "with fits.open(cloud_result[\"Local Path\"].values[0], use_fsspec=True, fsspec_kwargs={\"anon\": True}) as hdu:\n", + " for item in hdu:\n", + " print(item.fileinfo())" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.13" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/docs/tutorials/Example_searches.ipynb b/docs/tutorials/data-searches.ipynb similarity index 95% rename from docs/tutorials/Example_searches.ipynb rename to docs/tutorials/data-searches.ipynb index 6b0686a..a9115fa 100644 --- a/docs/tutorials/Example_searches.ipynb +++ b/docs/tutorials/data-searches.ipynb @@ -5,7 +5,7 @@ "id": "8362de11", "metadata": {}, "source": [ - "# Tutorial" + "# Data Search Tutorial" ] }, { @@ -4735,135 +4735,6 @@ "source": [ "lkconfig.get_config_file()" ] - }, - { - "cell_type": "markdown", - "id": "edd120c1-cb63-462a-b997-f83f3da3c3ea", - "metadata": {}, - "source": [ - "#### lksearch Cloud Configuration\n", - "lksearch has three configuration parameters that are particularly relevant to cloud-based science platforms. These are:\n", - " - CLOUD_ONLY: Only Download cloud based data. If False, will download all data. If True, will only download data located on a cloud (Amazon S3) bucket\n", - " - PREFER_CLOUD: Prefer Cloud-based data product retrieval where available\n", - " - DDOWNLOAD_CLOUD: Download cloud based data.If False, download() will return a pointer to the cloud based datainstead of downloading it - intended usage for cloud-based science platforms (e.g. TIKE)\n", - "\n", - "CLOUD_ONLY governs whether or not non-cloud based data will be possible to be downloaded. Many science files have both a cloud-based location (typically on Amazon S3) and a MAST archive location. By default this is False, and all products will be downloaded regardless of whether the file is available via cloud-hosting or MAST archive hosting. If CLOUD_ONLY is True, only files available for download on a cloud-based platform will be retrieved. This configuration parameter is passed through to the `~astroquery.mast` parameter of the same name. \n", - "\n", - "PREFER_CLOUD governs the default download behaviour in the event that a data product is available from both a cloud-based location and a MAST-hosted archive location. If True (default), then lksearch will preferentially download files from the cloud-host rather than the MAST-hosted Archive. This configuration parameter is passed through to the `~astroquery.mast` parameter of the same name. \n", - "\n", - "DOWNLOAD_CLOUD governs whether files that are hosted on the cloud are downloaded locally. If this value is True (default), cloud-hosted files are downloaded normally. If False, then files hosted on a cloud based platform are not downloaded, and a URI containing the path to the desired file on the cloud-host is returned instead of the local path to the file. This path can then be used to read the file remotely (see `~astropy.io.fits` [working with remote and cloud hosted files](https://docs.astropy.org/en/stable/io/fits/#working-with-remote-and-cloud-hosted-files:~:text=with%20large%20files-,Working%20with%20remote%20and%20cloud%2Dhosted%20files,-Unsigned%20integers) for more information). This ability may be most relevant when using lksearch on a cloud-based science platform where the remote read is very rapid and short-term local storage comparatively expensive. \n", - "\n", - "Using this DOWNLOAD_CLOUD functionality, we can find a cloud-hosted file and read it directly into memory like so:" - ] - }, - { - "cell_type": "code", - "execution_count": 37, - "id": "745b341d-2c8a-4de4-8050-02c039f4e1ee", - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "pipeline products: 100%|███████████████████████████████████████████| 1/1 [00:00<00:00, 395.88it/s]\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
Local PathStatusMessageURL
0s3://stpubdata/tess/public/tid/s0014/0000/0001...COMPLETELink to S3 bucket for remote readNone
\n", - "
" - ], - "text/plain": [ - " Local Path Status \\\n", - "0 s3://stpubdata/tess/public/tid/s0014/0000/0001... COMPLETE \n", - "\n", - " Message URL \n", - "0 Link to S3 bucket for remote read None " - ] - }, - "execution_count": 37, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "#First, lets update our configuration to not download a cloud-hosted file\n", - "from lksearch import Conf\n", - "Conf.DOWNLOAD_CLOUD=False\n", - "\n", - "# Now, lets find some data. We use this target earlier in the tutorial. \n", - "toi = TESSSearch('TOI 1161')\n", - "\n", - "#What happens when we try to download it in our updated configuration? \n", - "cloud_result = toi.timeseries.mission_products[0].download()\n", - "cloud_result" - ] - }, - { - "cell_type": "markdown", - "id": "7027025a-7883-4c05-9659-ceda59ed79b4", - "metadata": {}, - "source": [ - "As we can see above, instead of downloading the above file we have instead returned an amazon S3 URI for its cloud hosted location. If we want to access the file, we can do it using the remote-read capabilities of `~astropy.io.fits`. " - ] - }, - { - "cell_type": "code", - "execution_count": 38, - "id": "244ccba1-3d75-427d-ae06-93abbbb5c12d", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'file': >, 'filemode': 'readonly', 'hdrLoc': 0, 'datLoc': 5760, 'datSpan': 0}\n", - "{'file': >, 'filemode': 'readonly', 'hdrLoc': 5760, 'datLoc': 20160, 'datSpan': 1935360}\n", - "{'file': >, 'filemode': 'readonly', 'hdrLoc': 1955520, 'datLoc': 1961280, 'datSpan': 2880}\n" - ] - } - ], - "source": [ - "import astropy.io.fits as fits\n", - "with fits.open(cloud_result[\"Local Path\"].values[0], use_fsspec=True, fsspec_kwargs={\"anon\": True}) as hdu:\n", - " for item in hdu:\n", - " print(item.fileinfo())" - ] } ], "metadata": { @@ -4882,7 +4753,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.3" + "version": "3.9.13" } }, "nbformat": 4, diff --git a/docs/tutorials/index.rst b/docs/tutorials/index.rst new file mode 100644 index 0000000..a81dd33 --- /dev/null +++ b/docs/tutorials/index.rst @@ -0,0 +1,20 @@ +.. _tutorials: + +Tutorials +========= + +1. Getting started with lksearch +-------------------------------- + +This set of tutorials will help you get started with lksearch. Click below to learn how to access data, access catalogs, and configure lksearch to use the cloud. + + +1.1. lksearch basics +~~~~~~~~~~~~~~~~~~~~ + +.. toctree:: + :maxdepth: 1 + + data-searches.ipynb + cloud-data-searches.ipynb + catalog-searches.ipynb \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index 24e58a7..cdc0e99 100644 --- a/poetry.lock +++ b/poetry.lock @@ -18,6 +18,151 @@ pygments = ">=1.5" dev = ["pillow", "pkginfo (>=1.10)", "playwright", "pre-commit", "setuptools", "twine (>=5.0)"] tests = ["hypothesis", "pytest"] +[[package]] +name = "aiobotocore" +version = "2.13.1" +description = "Async client for aws services using botocore and aiohttp" +optional = false +python-versions = ">=3.8" +files = [ + {file = "aiobotocore-2.13.1-py3-none-any.whl", hash = "sha256:1bef121b99841ee3cc788e4ed97c332ba32353b1f00e886d1beb3aae95520858"}, + {file = "aiobotocore-2.13.1.tar.gz", hash = "sha256:134f9606c2f91abde38cbc61c3241113e26ff244633e0c31abb7e09da3581c9b"}, +] + +[package.dependencies] +aiohttp = ">=3.9.2,<4.0.0" +aioitertools = ">=0.5.1,<1.0.0" +botocore = ">=1.34.70,<1.34.132" +wrapt = ">=1.10.10,<2.0.0" + +[package.extras] +awscli = ["awscli (>=1.32.70,<1.33.14)"] +boto3 = ["boto3 (>=1.34.70,<1.34.132)"] + +[[package]] +name = "aiohttp" +version = "3.9.5" +description = "Async http client/server framework (asyncio)" +optional = false +python-versions = ">=3.8" +files = [ + {file = "aiohttp-3.9.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:fcde4c397f673fdec23e6b05ebf8d4751314fa7c24f93334bf1f1364c1c69ac7"}, + {file = "aiohttp-3.9.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5d6b3f1fabe465e819aed2c421a6743d8debbde79b6a8600739300630a01bf2c"}, + {file = "aiohttp-3.9.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6ae79c1bc12c34082d92bf9422764f799aee4746fd7a392db46b7fd357d4a17a"}, + {file = "aiohttp-3.9.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4d3ebb9e1316ec74277d19c5f482f98cc65a73ccd5430540d6d11682cd857430"}, + {file = "aiohttp-3.9.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:84dabd95154f43a2ea80deffec9cb44d2e301e38a0c9d331cc4aa0166fe28ae3"}, + {file = "aiohttp-3.9.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c8a02fbeca6f63cb1f0475c799679057fc9268b77075ab7cf3f1c600e81dd46b"}, + {file = "aiohttp-3.9.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c26959ca7b75ff768e2776d8055bf9582a6267e24556bb7f7bd29e677932be72"}, + {file = "aiohttp-3.9.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:714d4e5231fed4ba2762ed489b4aec07b2b9953cf4ee31e9871caac895a839c0"}, + {file = "aiohttp-3.9.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e7a6a8354f1b62e15d48e04350f13e726fa08b62c3d7b8401c0a1314f02e3558"}, + {file = "aiohttp-3.9.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:c413016880e03e69d166efb5a1a95d40f83d5a3a648d16486592c49ffb76d0db"}, + {file = "aiohttp-3.9.5-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:ff84aeb864e0fac81f676be9f4685f0527b660f1efdc40dcede3c251ef1e867f"}, + {file = "aiohttp-3.9.5-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:ad7f2919d7dac062f24d6f5fe95d401597fbb015a25771f85e692d043c9d7832"}, + {file = "aiohttp-3.9.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:702e2c7c187c1a498a4e2b03155d52658fdd6fda882d3d7fbb891a5cf108bb10"}, + {file = "aiohttp-3.9.5-cp310-cp310-win32.whl", hash = "sha256:67c3119f5ddc7261d47163ed86d760ddf0e625cd6246b4ed852e82159617b5fb"}, + {file = "aiohttp-3.9.5-cp310-cp310-win_amd64.whl", hash = "sha256:471f0ef53ccedec9995287f02caf0c068732f026455f07db3f01a46e49d76bbb"}, + {file = "aiohttp-3.9.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:e0ae53e33ee7476dd3d1132f932eeb39bf6125083820049d06edcdca4381f342"}, + {file = "aiohttp-3.9.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c088c4d70d21f8ca5c0b8b5403fe84a7bc8e024161febdd4ef04575ef35d474d"}, + {file = "aiohttp-3.9.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:639d0042b7670222f33b0028de6b4e2fad6451462ce7df2af8aee37dcac55424"}, + {file = "aiohttp-3.9.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f26383adb94da5e7fb388d441bf09c61e5e35f455a3217bfd790c6b6bc64b2ee"}, + {file = "aiohttp-3.9.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:66331d00fb28dc90aa606d9a54304af76b335ae204d1836f65797d6fe27f1ca2"}, + {file = "aiohttp-3.9.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4ff550491f5492ab5ed3533e76b8567f4b37bd2995e780a1f46bca2024223233"}, + {file = "aiohttp-3.9.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f22eb3a6c1080d862befa0a89c380b4dafce29dc6cd56083f630073d102eb595"}, + {file = "aiohttp-3.9.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a81b1143d42b66ffc40a441379387076243ef7b51019204fd3ec36b9f69e77d6"}, + {file = "aiohttp-3.9.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:f64fd07515dad67f24b6ea4a66ae2876c01031de91c93075b8093f07c0a2d93d"}, + {file = "aiohttp-3.9.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:93e22add827447d2e26d67c9ac0161756007f152fdc5210277d00a85f6c92323"}, + {file = "aiohttp-3.9.5-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:55b39c8684a46e56ef8c8d24faf02de4a2b2ac60d26cee93bc595651ff545de9"}, + {file = "aiohttp-3.9.5-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4715a9b778f4293b9f8ae7a0a7cef9829f02ff8d6277a39d7f40565c737d3771"}, + {file = "aiohttp-3.9.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:afc52b8d969eff14e069a710057d15ab9ac17cd4b6753042c407dcea0e40bf75"}, + {file = "aiohttp-3.9.5-cp311-cp311-win32.whl", hash = "sha256:b3df71da99c98534be076196791adca8819761f0bf6e08e07fd7da25127150d6"}, + {file = "aiohttp-3.9.5-cp311-cp311-win_amd64.whl", hash = "sha256:88e311d98cc0bf45b62fc46c66753a83445f5ab20038bcc1b8a1cc05666f428a"}, + {file = "aiohttp-3.9.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:c7a4b7a6cf5b6eb11e109a9755fd4fda7d57395f8c575e166d363b9fc3ec4678"}, + {file = "aiohttp-3.9.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:0a158704edf0abcac8ac371fbb54044f3270bdbc93e254a82b6c82be1ef08f3c"}, + {file = "aiohttp-3.9.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d153f652a687a8e95ad367a86a61e8d53d528b0530ef382ec5aaf533140ed00f"}, + {file = "aiohttp-3.9.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:82a6a97d9771cb48ae16979c3a3a9a18b600a8505b1115cfe354dfb2054468b4"}, + {file = "aiohttp-3.9.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:60cdbd56f4cad9f69c35eaac0fbbdf1f77b0ff9456cebd4902f3dd1cf096464c"}, + {file = "aiohttp-3.9.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8676e8fd73141ded15ea586de0b7cda1542960a7b9ad89b2b06428e97125d4fa"}, + {file = "aiohttp-3.9.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:da00da442a0e31f1c69d26d224e1efd3a1ca5bcbf210978a2ca7426dfcae9f58"}, + {file = "aiohttp-3.9.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:18f634d540dd099c262e9f887c8bbacc959847cfe5da7a0e2e1cf3f14dbf2daf"}, + {file = "aiohttp-3.9.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:320e8618eda64e19d11bdb3bd04ccc0a816c17eaecb7e4945d01deee2a22f95f"}, + {file = "aiohttp-3.9.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:2faa61a904b83142747fc6a6d7ad8fccff898c849123030f8e75d5d967fd4a81"}, + {file = "aiohttp-3.9.5-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:8c64a6dc3fe5db7b1b4d2b5cb84c4f677768bdc340611eca673afb7cf416ef5a"}, + {file = "aiohttp-3.9.5-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:393c7aba2b55559ef7ab791c94b44f7482a07bf7640d17b341b79081f5e5cd1a"}, + {file = "aiohttp-3.9.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:c671dc117c2c21a1ca10c116cfcd6e3e44da7fcde37bf83b2be485ab377b25da"}, + {file = "aiohttp-3.9.5-cp312-cp312-win32.whl", hash = "sha256:5a7ee16aab26e76add4afc45e8f8206c95d1d75540f1039b84a03c3b3800dd59"}, + {file = "aiohttp-3.9.5-cp312-cp312-win_amd64.whl", hash = "sha256:5ca51eadbd67045396bc92a4345d1790b7301c14d1848feaac1d6a6c9289e888"}, + {file = "aiohttp-3.9.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:694d828b5c41255e54bc2dddb51a9f5150b4eefa9886e38b52605a05d96566e8"}, + {file = "aiohttp-3.9.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0605cc2c0088fcaae79f01c913a38611ad09ba68ff482402d3410bf59039bfb8"}, + {file = "aiohttp-3.9.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:4558e5012ee03d2638c681e156461d37b7a113fe13970d438d95d10173d25f78"}, + {file = "aiohttp-3.9.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9dbc053ac75ccc63dc3a3cc547b98c7258ec35a215a92bd9f983e0aac95d3d5b"}, + {file = "aiohttp-3.9.5-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4109adee842b90671f1b689901b948f347325045c15f46b39797ae1bf17019de"}, + {file = "aiohttp-3.9.5-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a6ea1a5b409a85477fd8e5ee6ad8f0e40bf2844c270955e09360418cfd09abac"}, + {file = "aiohttp-3.9.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f3c2890ca8c59ee683fd09adf32321a40fe1cf164e3387799efb2acebf090c11"}, + {file = "aiohttp-3.9.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3916c8692dbd9d55c523374a3b8213e628424d19116ac4308e434dbf6d95bbdd"}, + {file = "aiohttp-3.9.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8d1964eb7617907c792ca00b341b5ec3e01ae8c280825deadbbd678447b127e1"}, + {file = "aiohttp-3.9.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:d5ab8e1f6bee051a4bf6195e38a5c13e5e161cb7bad83d8854524798bd9fcd6e"}, + {file = "aiohttp-3.9.5-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:52c27110f3862a1afbcb2af4281fc9fdc40327fa286c4625dfee247c3ba90156"}, + {file = "aiohttp-3.9.5-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:7f64cbd44443e80094309875d4f9c71d0401e966d191c3d469cde4642bc2e031"}, + {file = "aiohttp-3.9.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8b4f72fbb66279624bfe83fd5eb6aea0022dad8eec62b71e7bf63ee1caadeafe"}, + {file = "aiohttp-3.9.5-cp38-cp38-win32.whl", hash = "sha256:6380c039ec52866c06d69b5c7aad5478b24ed11696f0e72f6b807cfb261453da"}, + {file = "aiohttp-3.9.5-cp38-cp38-win_amd64.whl", hash = "sha256:da22dab31d7180f8c3ac7c7635f3bcd53808f374f6aa333fe0b0b9e14b01f91a"}, + {file = "aiohttp-3.9.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:1732102949ff6087589408d76cd6dea656b93c896b011ecafff418c9661dc4ed"}, + {file = "aiohttp-3.9.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c6021d296318cb6f9414b48e6a439a7f5d1f665464da507e8ff640848ee2a58a"}, + {file = "aiohttp-3.9.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:239f975589a944eeb1bad26b8b140a59a3a320067fb3cd10b75c3092405a1372"}, + {file = "aiohttp-3.9.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3b7b30258348082826d274504fbc7c849959f1989d86c29bc355107accec6cfb"}, + {file = "aiohttp-3.9.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cd2adf5c87ff6d8b277814a28a535b59e20bfea40a101db6b3bdca7e9926bc24"}, + {file = "aiohttp-3.9.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e9a3d838441bebcf5cf442700e3963f58b5c33f015341f9ea86dcd7d503c07e2"}, + {file = "aiohttp-3.9.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e3a1ae66e3d0c17cf65c08968a5ee3180c5a95920ec2731f53343fac9bad106"}, + {file = "aiohttp-3.9.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9c69e77370cce2d6df5d12b4e12bdcca60c47ba13d1cbbc8645dd005a20b738b"}, + {file = "aiohttp-3.9.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0cbf56238f4bbf49dab8c2dc2e6b1b68502b1e88d335bea59b3f5b9f4c001475"}, + {file = "aiohttp-3.9.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:d1469f228cd9ffddd396d9948b8c9cd8022b6d1bf1e40c6f25b0fb90b4f893ed"}, + {file = "aiohttp-3.9.5-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:45731330e754f5811c314901cebdf19dd776a44b31927fa4b4dbecab9e457b0c"}, + {file = "aiohttp-3.9.5-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:3fcb4046d2904378e3aeea1df51f697b0467f2aac55d232c87ba162709478c46"}, + {file = "aiohttp-3.9.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8cf142aa6c1a751fcb364158fd710b8a9be874b81889c2bd13aa8893197455e2"}, + {file = "aiohttp-3.9.5-cp39-cp39-win32.whl", hash = "sha256:7b179eea70833c8dee51ec42f3b4097bd6370892fa93f510f76762105568cf09"}, + {file = "aiohttp-3.9.5-cp39-cp39-win_amd64.whl", hash = "sha256:38d80498e2e169bc61418ff36170e0aad0cd268da8b38a17c4cf29d254a8b3f1"}, + {file = "aiohttp-3.9.5.tar.gz", hash = "sha256:edea7d15772ceeb29db4aff55e482d4bcfb6ae160ce144f2682de02f6d693551"}, +] + +[package.dependencies] +aiosignal = ">=1.1.2" +async-timeout = {version = ">=4.0,<5.0", markers = "python_version < \"3.11\""} +attrs = ">=17.3.0" +frozenlist = ">=1.1.1" +multidict = ">=4.5,<7.0" +yarl = ">=1.0,<2.0" + +[package.extras] +speedups = ["Brotli", "aiodns", "brotlicffi"] + +[[package]] +name = "aioitertools" +version = "0.11.0" +description = "itertools and builtins for AsyncIO and mixed iterables" +optional = false +python-versions = ">=3.6" +files = [ + {file = "aioitertools-0.11.0-py3-none-any.whl", hash = "sha256:04b95e3dab25b449def24d7df809411c10e62aab0cbe31a50ca4e68748c43394"}, + {file = "aioitertools-0.11.0.tar.gz", hash = "sha256:42c68b8dd3a69c2bf7f2233bf7df4bb58b557bca5252ac02ed5187bbc67d6831"}, +] + +[package.dependencies] +typing_extensions = {version = ">=4.0", markers = "python_version < \"3.10\""} + +[[package]] +name = "aiosignal" +version = "1.3.1" +description = "aiosignal: a list of registered asynchronous callbacks" +optional = false +python-versions = ">=3.7" +files = [ + {file = "aiosignal-1.3.1-py3-none-any.whl", hash = "sha256:f8376fb07dd1e86a584e4fcdec80b36b7f81aac666ebc724e2c090300dd83b17"}, + {file = "aiosignal-1.3.1.tar.gz", hash = "sha256:54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc"}, +] + +[package.dependencies] +frozenlist = ">=1.1.0" + [[package]] name = "alabaster" version = "0.7.16" @@ -260,6 +405,17 @@ files = [ [package.dependencies] typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.11\""} +[[package]] +name = "async-timeout" +version = "4.0.3" +description = "Timeout context manager for asyncio programs" +optional = false +python-versions = ">=3.7" +files = [ + {file = "async-timeout-4.0.3.tar.gz", hash = "sha256:4640d96be84d82d02ed59ea2b7105a0f7b33abe8703703cd0ab0bf87c427522f"}, + {file = "async_timeout-4.0.3-py3-none-any.whl", hash = "sha256:7405140ff1230c310e51dc27b3145b9092d659ce68ff733fb0cefe3ee42be028"}, +] + [[package]] name = "attrs" version = "23.2.0" @@ -349,17 +505,17 @@ css = ["tinycss2 (>=1.1.0,<1.3)"] [[package]] name = "boto3" -version = "1.34.149" +version = "1.34.131" description = "The AWS SDK for Python" optional = false python-versions = ">=3.8" files = [ - {file = "boto3-1.34.149-py3-none-any.whl", hash = "sha256:11edeeacdd517bda3b7615b754d8440820cdc9ddd66794cc995a9693ddeaa3be"}, - {file = "boto3-1.34.149.tar.gz", hash = "sha256:f4e6489ba9dc7fb37d53e0e82dbc97f2cb0a4969ef3970e2c88b8f94023ae81a"}, + {file = "boto3-1.34.131-py3-none-any.whl", hash = "sha256:05e388cb937e82be70bfd7eb0c84cf8011ff35cf582a593873ac21675268683b"}, + {file = "boto3-1.34.131.tar.gz", hash = "sha256:dab8f72a6c4e62b4fd70da09e08a6b2a65ea2115b27dd63737142005776ef216"}, ] [package.dependencies] -botocore = ">=1.34.149,<1.35.0" +botocore = ">=1.34.131,<1.35.0" jmespath = ">=0.7.1,<2.0.0" s3transfer = ">=0.10.0,<0.11.0" @@ -368,13 +524,13 @@ crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] [[package]] name = "botocore" -version = "1.34.149" +version = "1.34.131" description = "Low-level, data-driven core of boto 3." optional = false python-versions = ">=3.8" files = [ - {file = "botocore-1.34.149-py3-none-any.whl", hash = "sha256:ae6c4be52eeee96f68c116b27d252bab069cd046d61a17cfe8e9da411cf22906"}, - {file = "botocore-1.34.149.tar.gz", hash = "sha256:2e1eb5ef40102a3d796bb3dd05f2ac5e8fb43fe1ff114b4f6d33153437f5a372"}, + {file = "botocore-1.34.131-py3-none-any.whl", hash = "sha256:13b011d7b206ce00727dcee26548fa3b550db9046d5a0e90ac25a6e6c8fde6ef"}, + {file = "botocore-1.34.131.tar.gz", hash = "sha256:502ddafe1d627fcf1e4c007c86454e5dd011dba7c58bd8e8a5368a79f3e387dc"}, ] [package.dependencies] @@ -899,6 +1055,131 @@ files = [ {file = "fqdn-1.5.1.tar.gz", hash = "sha256:105ed3677e767fb5ca086a0c1f4bb66ebc3c100be518f0e0d755d9eae164d89f"}, ] +[[package]] +name = "frozenlist" +version = "1.4.1" +description = "A list-like structure which implements collections.abc.MutableSequence" +optional = false +python-versions = ">=3.8" +files = [ + {file = "frozenlist-1.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f9aa1878d1083b276b0196f2dfbe00c9b7e752475ed3b682025ff20c1c1f51ac"}, + {file = "frozenlist-1.4.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:29acab3f66f0f24674b7dc4736477bcd4bc3ad4b896f5f45379a67bce8b96868"}, + {file = "frozenlist-1.4.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:74fb4bee6880b529a0c6560885fce4dc95936920f9f20f53d99a213f7bf66776"}, + {file = "frozenlist-1.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:590344787a90ae57d62511dd7c736ed56b428f04cd8c161fcc5e7232c130c69a"}, + {file = "frozenlist-1.4.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:068b63f23b17df8569b7fdca5517edef76171cf3897eb68beb01341131fbd2ad"}, + {file = "frozenlist-1.4.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5c849d495bf5154cd8da18a9eb15db127d4dba2968d88831aff6f0331ea9bd4c"}, + {file = "frozenlist-1.4.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9750cc7fe1ae3b1611bb8cfc3f9ec11d532244235d75901fb6b8e42ce9229dfe"}, + {file = "frozenlist-1.4.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a9b2de4cf0cdd5bd2dee4c4f63a653c61d2408055ab77b151c1957f221cabf2a"}, + {file = "frozenlist-1.4.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:0633c8d5337cb5c77acbccc6357ac49a1770b8c487e5b3505c57b949b4b82e98"}, + {file = "frozenlist-1.4.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:27657df69e8801be6c3638054e202a135c7f299267f1a55ed3a598934f6c0d75"}, + {file = "frozenlist-1.4.1-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:f9a3ea26252bd92f570600098783d1371354d89d5f6b7dfd87359d669f2109b5"}, + {file = "frozenlist-1.4.1-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:4f57dab5fe3407b6c0c1cc907ac98e8a189f9e418f3b6e54d65a718aaafe3950"}, + {file = "frozenlist-1.4.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:e02a0e11cf6597299b9f3bbd3f93d79217cb90cfd1411aec33848b13f5c656cc"}, + {file = "frozenlist-1.4.1-cp310-cp310-win32.whl", hash = "sha256:a828c57f00f729620a442881cc60e57cfcec6842ba38e1b19fd3e47ac0ff8dc1"}, + {file = "frozenlist-1.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:f56e2333dda1fe0f909e7cc59f021eba0d2307bc6f012a1ccf2beca6ba362439"}, + {file = "frozenlist-1.4.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:a0cb6f11204443f27a1628b0e460f37fb30f624be6051d490fa7d7e26d4af3d0"}, + {file = "frozenlist-1.4.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b46c8ae3a8f1f41a0d2ef350c0b6e65822d80772fe46b653ab6b6274f61d4a49"}, + {file = "frozenlist-1.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fde5bd59ab5357e3853313127f4d3565fc7dad314a74d7b5d43c22c6a5ed2ced"}, + {file = "frozenlist-1.4.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:722e1124aec435320ae01ee3ac7bec11a5d47f25d0ed6328f2273d287bc3abb0"}, + {file = "frozenlist-1.4.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2471c201b70d58a0f0c1f91261542a03d9a5e088ed3dc6c160d614c01649c106"}, + {file = "frozenlist-1.4.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c757a9dd70d72b076d6f68efdbb9bc943665ae954dad2801b874c8c69e185068"}, + {file = "frozenlist-1.4.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f146e0911cb2f1da549fc58fc7bcd2b836a44b79ef871980d605ec392ff6b0d2"}, + {file = "frozenlist-1.4.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f9c515e7914626b2a2e1e311794b4c35720a0be87af52b79ff8e1429fc25f19"}, + {file = "frozenlist-1.4.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:c302220494f5c1ebeb0912ea782bcd5e2f8308037b3c7553fad0e48ebad6ad82"}, + {file = "frozenlist-1.4.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:442acde1e068288a4ba7acfe05f5f343e19fac87bfc96d89eb886b0363e977ec"}, + {file = "frozenlist-1.4.1-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:1b280e6507ea8a4fa0c0a7150b4e526a8d113989e28eaaef946cc77ffd7efc0a"}, + {file = "frozenlist-1.4.1-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:fe1a06da377e3a1062ae5fe0926e12b84eceb8a50b350ddca72dc85015873f74"}, + {file = "frozenlist-1.4.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:db9e724bebd621d9beca794f2a4ff1d26eed5965b004a97f1f1685a173b869c2"}, + {file = "frozenlist-1.4.1-cp311-cp311-win32.whl", hash = "sha256:e774d53b1a477a67838a904131c4b0eef6b3d8a651f8b138b04f748fccfefe17"}, + {file = "frozenlist-1.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:fb3c2db03683b5767dedb5769b8a40ebb47d6f7f45b1b3e3b4b51ec8ad9d9825"}, + {file = "frozenlist-1.4.1-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:1979bc0aeb89b33b588c51c54ab0161791149f2461ea7c7c946d95d5f93b56ae"}, + {file = "frozenlist-1.4.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:cc7b01b3754ea68a62bd77ce6020afaffb44a590c2289089289363472d13aedb"}, + {file = "frozenlist-1.4.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c9c92be9fd329ac801cc420e08452b70e7aeab94ea4233a4804f0915c14eba9b"}, + {file = "frozenlist-1.4.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5c3894db91f5a489fc8fa6a9991820f368f0b3cbdb9cd8849547ccfab3392d86"}, + {file = "frozenlist-1.4.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ba60bb19387e13597fb059f32cd4d59445d7b18b69a745b8f8e5db0346f33480"}, + {file = "frozenlist-1.4.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8aefbba5f69d42246543407ed2461db31006b0f76c4e32dfd6f42215a2c41d09"}, + {file = "frozenlist-1.4.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:780d3a35680ced9ce682fbcf4cb9c2bad3136eeff760ab33707b71db84664e3a"}, + {file = "frozenlist-1.4.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9acbb16f06fe7f52f441bb6f413ebae6c37baa6ef9edd49cdd567216da8600cd"}, + {file = "frozenlist-1.4.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:23b701e65c7b36e4bf15546a89279bd4d8675faabc287d06bbcfac7d3c33e1e6"}, + {file = "frozenlist-1.4.1-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:3e0153a805a98f5ada7e09826255ba99fb4f7524bb81bf6b47fb702666484ae1"}, + {file = "frozenlist-1.4.1-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:dd9b1baec094d91bf36ec729445f7769d0d0cf6b64d04d86e45baf89e2b9059b"}, + {file = "frozenlist-1.4.1-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:1a4471094e146b6790f61b98616ab8e44f72661879cc63fa1049d13ef711e71e"}, + {file = "frozenlist-1.4.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:5667ed53d68d91920defdf4035d1cdaa3c3121dc0b113255124bcfada1cfa1b8"}, + {file = "frozenlist-1.4.1-cp312-cp312-win32.whl", hash = "sha256:beee944ae828747fd7cb216a70f120767fc9f4f00bacae8543c14a6831673f89"}, + {file = "frozenlist-1.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:64536573d0a2cb6e625cf309984e2d873979709f2cf22839bf2d61790b448ad5"}, + {file = "frozenlist-1.4.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:20b51fa3f588ff2fe658663db52a41a4f7aa6c04f6201449c6c7c476bd255c0d"}, + {file = "frozenlist-1.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:410478a0c562d1a5bcc2f7ea448359fcb050ed48b3c6f6f4f18c313a9bdb1826"}, + {file = "frozenlist-1.4.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:c6321c9efe29975232da3bd0af0ad216800a47e93d763ce64f291917a381b8eb"}, + {file = "frozenlist-1.4.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:48f6a4533887e189dae092f1cf981f2e3885175f7a0f33c91fb5b7b682b6bab6"}, + {file = "frozenlist-1.4.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6eb73fa5426ea69ee0e012fb59cdc76a15b1283d6e32e4f8dc4482ec67d1194d"}, + {file = "frozenlist-1.4.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fbeb989b5cc29e8daf7f976b421c220f1b8c731cbf22b9130d8815418ea45887"}, + {file = "frozenlist-1.4.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:32453c1de775c889eb4e22f1197fe3bdfe457d16476ea407472b9442e6295f7a"}, + {file = "frozenlist-1.4.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:693945278a31f2086d9bf3df0fe8254bbeaef1fe71e1351c3bd730aa7d31c41b"}, + {file = "frozenlist-1.4.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:1d0ce09d36d53bbbe566fe296965b23b961764c0bcf3ce2fa45f463745c04701"}, + {file = "frozenlist-1.4.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:3a670dc61eb0d0eb7080890c13de3066790f9049b47b0de04007090807c776b0"}, + {file = "frozenlist-1.4.1-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:dca69045298ce5c11fd539682cff879cc1e664c245d1c64da929813e54241d11"}, + {file = "frozenlist-1.4.1-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:a06339f38e9ed3a64e4c4e43aec7f59084033647f908e4259d279a52d3757d09"}, + {file = "frozenlist-1.4.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b7f2f9f912dca3934c1baec2e4585a674ef16fe00218d833856408c48d5beee7"}, + {file = "frozenlist-1.4.1-cp38-cp38-win32.whl", hash = "sha256:e7004be74cbb7d9f34553a5ce5fb08be14fb33bc86f332fb71cbe5216362a497"}, + {file = "frozenlist-1.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:5a7d70357e7cee13f470c7883a063aae5fe209a493c57d86eb7f5a6f910fae09"}, + {file = "frozenlist-1.4.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:bfa4a17e17ce9abf47a74ae02f32d014c5e9404b6d9ac7f729e01562bbee601e"}, + {file = "frozenlist-1.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b7e3ed87d4138356775346e6845cccbe66cd9e207f3cd11d2f0b9fd13681359d"}, + {file = "frozenlist-1.4.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c99169d4ff810155ca50b4da3b075cbde79752443117d89429595c2e8e37fed8"}, + {file = "frozenlist-1.4.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:edb678da49d9f72c9f6c609fbe41a5dfb9a9282f9e6a2253d5a91e0fc382d7c0"}, + {file = "frozenlist-1.4.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6db4667b187a6742b33afbbaf05a7bc551ffcf1ced0000a571aedbb4aa42fc7b"}, + {file = "frozenlist-1.4.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:55fdc093b5a3cb41d420884cdaf37a1e74c3c37a31f46e66286d9145d2063bd0"}, + {file = "frozenlist-1.4.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:82e8211d69a4f4bc360ea22cd6555f8e61a1bd211d1d5d39d3d228b48c83a897"}, + {file = "frozenlist-1.4.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:89aa2c2eeb20957be2d950b85974b30a01a762f3308cd02bb15e1ad632e22dc7"}, + {file = "frozenlist-1.4.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9d3e0c25a2350080e9319724dede4f31f43a6c9779be48021a7f4ebde8b2d742"}, + {file = "frozenlist-1.4.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7268252af60904bf52c26173cbadc3a071cece75f873705419c8681f24d3edea"}, + {file = "frozenlist-1.4.1-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:0c250a29735d4f15321007fb02865f0e6b6a41a6b88f1f523ca1596ab5f50bd5"}, + {file = "frozenlist-1.4.1-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:96ec70beabbd3b10e8bfe52616a13561e58fe84c0101dd031dc78f250d5128b9"}, + {file = "frozenlist-1.4.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:23b2d7679b73fe0e5a4560b672a39f98dfc6f60df63823b0a9970525325b95f6"}, + {file = "frozenlist-1.4.1-cp39-cp39-win32.whl", hash = "sha256:a7496bfe1da7fb1a4e1cc23bb67c58fab69311cc7d32b5a99c2007b4b2a0e932"}, + {file = "frozenlist-1.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:e6a20a581f9ce92d389a8c7d7c3dd47c81fd5d6e655c8dddf341e14aa48659d0"}, + {file = "frozenlist-1.4.1-py3-none-any.whl", hash = "sha256:04ced3e6a46b4cfffe20f9ae482818e34eba9b5fb0ce4056e4cc9b6e212d09b7"}, + {file = "frozenlist-1.4.1.tar.gz", hash = "sha256:c037a86e8513059a2613aaba4d817bb90b9d9b6b69aace3ce9c877e8c8ed402b"}, +] + +[[package]] +name = "fsspec" +version = "2024.6.1" +description = "File-system specification" +optional = false +python-versions = ">=3.8" +files = [ + {file = "fsspec-2024.6.1-py3-none-any.whl", hash = "sha256:3cb443f8bcd2efb31295a5b9fdb02aee81d8452c80d28f97a6d0959e6cee101e"}, + {file = "fsspec-2024.6.1.tar.gz", hash = "sha256:fad7d7e209dd4c1208e3bbfda706620e0da5142bebbd9c384afb95b07e798e49"}, +] + +[package.extras] +abfs = ["adlfs"] +adl = ["adlfs"] +arrow = ["pyarrow (>=1)"] +dask = ["dask", "distributed"] +dev = ["pre-commit", "ruff"] +doc = ["numpydoc", "sphinx", "sphinx-design", "sphinx-rtd-theme", "yarl"] +dropbox = ["dropbox", "dropboxdrivefs", "requests"] +full = ["adlfs", "aiohttp (!=4.0.0a0,!=4.0.0a1)", "dask", "distributed", "dropbox", "dropboxdrivefs", "fusepy", "gcsfs", "libarchive-c", "ocifs", "panel", "paramiko", "pyarrow (>=1)", "pygit2", "requests", "s3fs", "smbprotocol", "tqdm"] +fuse = ["fusepy"] +gcs = ["gcsfs"] +git = ["pygit2"] +github = ["requests"] +gs = ["gcsfs"] +gui = ["panel"] +hdfs = ["pyarrow (>=1)"] +http = ["aiohttp (!=4.0.0a0,!=4.0.0a1)"] +libarchive = ["libarchive-c"] +oci = ["ocifs"] +s3 = ["s3fs"] +sftp = ["paramiko"] +smb = ["smbprotocol"] +ssh = ["paramiko"] +test = ["aiohttp (!=4.0.0a0,!=4.0.0a1)", "numpy", "pytest", "pytest-asyncio (!=0.22.0)", "pytest-benchmark", "pytest-cov", "pytest-mock", "pytest-recording", "pytest-rerunfailures", "requests"] +test-downstream = ["aiobotocore (>=2.5.4,<3.0.0)", "dask-expr", "dask[dataframe,test]", "moto[server] (>4,<5)", "pytest-timeout", "xarray"] +test-full = ["adlfs", "aiohttp (!=4.0.0a0,!=4.0.0a1)", "cloudpickle", "dask", "distributed", "dropbox", "dropboxdrivefs", "fastparquet", "fusepy", "gcsfs", "jinja2", "kerchunk", "libarchive-c", "lz4", "notebook", "numpy", "ocifs", "pandas", "panel", "paramiko", "pyarrow", "pyarrow (>=1)", "pyftpdlib", "pygit2", "pytest", "pytest-asyncio (!=0.22.0)", "pytest-benchmark", "pytest-cov", "pytest-mock", "pytest-recording", "pytest-rerunfailures", "python-snappy", "requests", "smbprotocol", "tqdm", "urllib3", "zarr", "zstandard"] +tqdm = ["tqdm"] + [[package]] name = "h11" version = "0.14.0" @@ -1924,6 +2205,105 @@ files = [ {file = "more_itertools-10.3.0-py3-none-any.whl", hash = "sha256:ea6a02e24a9161e51faad17a8782b92a0df82c12c1c8886fec7f0c3fa1a1b320"}, ] +[[package]] +name = "multidict" +version = "6.0.5" +description = "multidict implementation" +optional = false +python-versions = ">=3.7" +files = [ + {file = "multidict-6.0.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:228b644ae063c10e7f324ab1ab6b548bdf6f8b47f3ec234fef1093bc2735e5f9"}, + {file = "multidict-6.0.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:896ebdcf62683551312c30e20614305f53125750803b614e9e6ce74a96232604"}, + {file = "multidict-6.0.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:411bf8515f3be9813d06004cac41ccf7d1cd46dfe233705933dd163b60e37600"}, + {file = "multidict-6.0.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1d147090048129ce3c453f0292e7697d333db95e52616b3793922945804a433c"}, + {file = "multidict-6.0.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:215ed703caf15f578dca76ee6f6b21b7603791ae090fbf1ef9d865571039ade5"}, + {file = "multidict-6.0.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7c6390cf87ff6234643428991b7359b5f59cc15155695deb4eda5c777d2b880f"}, + {file = "multidict-6.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:21fd81c4ebdb4f214161be351eb5bcf385426bf023041da2fd9e60681f3cebae"}, + {file = "multidict-6.0.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3cc2ad10255f903656017363cd59436f2111443a76f996584d1077e43ee51182"}, + {file = "multidict-6.0.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:6939c95381e003f54cd4c5516740faba40cf5ad3eeff460c3ad1d3e0ea2549bf"}, + {file = "multidict-6.0.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:220dd781e3f7af2c2c1053da9fa96d9cf3072ca58f057f4c5adaaa1cab8fc442"}, + {file = "multidict-6.0.5-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:766c8f7511df26d9f11cd3a8be623e59cca73d44643abab3f8c8c07620524e4a"}, + {file = "multidict-6.0.5-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:fe5d7785250541f7f5019ab9cba2c71169dc7d74d0f45253f8313f436458a4ef"}, + {file = "multidict-6.0.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c1c1496e73051918fcd4f58ff2e0f2f3066d1c76a0c6aeffd9b45d53243702cc"}, + {file = "multidict-6.0.5-cp310-cp310-win32.whl", hash = "sha256:7afcdd1fc07befad18ec4523a782cde4e93e0a2bf71239894b8d61ee578c1319"}, + {file = "multidict-6.0.5-cp310-cp310-win_amd64.whl", hash = "sha256:99f60d34c048c5c2fabc766108c103612344c46e35d4ed9ae0673d33c8fb26e8"}, + {file = "multidict-6.0.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:f285e862d2f153a70586579c15c44656f888806ed0e5b56b64489afe4a2dbfba"}, + {file = "multidict-6.0.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:53689bb4e102200a4fafa9de9c7c3c212ab40a7ab2c8e474491914d2305f187e"}, + {file = "multidict-6.0.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:612d1156111ae11d14afaf3a0669ebf6c170dbb735e510a7438ffe2369a847fd"}, + {file = "multidict-6.0.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7be7047bd08accdb7487737631d25735c9a04327911de89ff1b26b81745bd4e3"}, + {file = "multidict-6.0.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:de170c7b4fe6859beb8926e84f7d7d6c693dfe8e27372ce3b76f01c46e489fcf"}, + {file = "multidict-6.0.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:04bde7a7b3de05732a4eb39c94574db1ec99abb56162d6c520ad26f83267de29"}, + {file = "multidict-6.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:85f67aed7bb647f93e7520633d8f51d3cbc6ab96957c71272b286b2f30dc70ed"}, + {file = "multidict-6.0.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:425bf820055005bfc8aa9a0b99ccb52cc2f4070153e34b701acc98d201693733"}, + {file = "multidict-6.0.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d3eb1ceec286eba8220c26f3b0096cf189aea7057b6e7b7a2e60ed36b373b77f"}, + {file = "multidict-6.0.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:7901c05ead4b3fb75113fb1dd33eb1253c6d3ee37ce93305acd9d38e0b5f21a4"}, + {file = "multidict-6.0.5-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:e0e79d91e71b9867c73323a3444724d496c037e578a0e1755ae159ba14f4f3d1"}, + {file = "multidict-6.0.5-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:29bfeb0dff5cb5fdab2023a7a9947b3b4af63e9c47cae2a10ad58394b517fddc"}, + {file = "multidict-6.0.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e030047e85cbcedbfc073f71836d62dd5dadfbe7531cae27789ff66bc551bd5e"}, + {file = "multidict-6.0.5-cp311-cp311-win32.whl", hash = "sha256:2f4848aa3baa109e6ab81fe2006c77ed4d3cd1e0ac2c1fbddb7b1277c168788c"}, + {file = "multidict-6.0.5-cp311-cp311-win_amd64.whl", hash = "sha256:2faa5ae9376faba05f630d7e5e6be05be22913782b927b19d12b8145968a85ea"}, + {file = "multidict-6.0.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:51d035609b86722963404f711db441cf7134f1889107fb171a970c9701f92e1e"}, + {file = "multidict-6.0.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:cbebcd5bcaf1eaf302617c114aa67569dd3f090dd0ce8ba9e35e9985b41ac35b"}, + {file = "multidict-6.0.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2ffc42c922dbfddb4a4c3b438eb056828719f07608af27d163191cb3e3aa6cc5"}, + {file = "multidict-6.0.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ceb3b7e6a0135e092de86110c5a74e46bda4bd4fbfeeb3a3bcec79c0f861e450"}, + {file = "multidict-6.0.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:79660376075cfd4b2c80f295528aa6beb2058fd289f4c9252f986751a4cd0496"}, + {file = "multidict-6.0.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e4428b29611e989719874670fd152b6625500ad6c686d464e99f5aaeeaca175a"}, + {file = "multidict-6.0.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d84a5c3a5f7ce6db1f999fb9438f686bc2e09d38143f2d93d8406ed2dd6b9226"}, + {file = "multidict-6.0.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:76c0de87358b192de7ea9649beb392f107dcad9ad27276324c24c91774ca5271"}, + {file = "multidict-6.0.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:79a6d2ba910adb2cbafc95dad936f8b9386e77c84c35bc0add315b856d7c3abb"}, + {file = "multidict-6.0.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:92d16a3e275e38293623ebf639c471d3e03bb20b8ebb845237e0d3664914caef"}, + {file = "multidict-6.0.5-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:fb616be3538599e797a2017cccca78e354c767165e8858ab5116813146041a24"}, + {file = "multidict-6.0.5-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:14c2976aa9038c2629efa2c148022ed5eb4cb939e15ec7aace7ca932f48f9ba6"}, + {file = "multidict-6.0.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:435a0984199d81ca178b9ae2c26ec3d49692d20ee29bc4c11a2a8d4514c67eda"}, + {file = "multidict-6.0.5-cp312-cp312-win32.whl", hash = "sha256:9fe7b0653ba3d9d65cbe7698cca585bf0f8c83dbbcc710db9c90f478e175f2d5"}, + {file = "multidict-6.0.5-cp312-cp312-win_amd64.whl", hash = "sha256:01265f5e40f5a17f8241d52656ed27192be03bfa8764d88e8220141d1e4b3556"}, + {file = "multidict-6.0.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:19fe01cea168585ba0f678cad6f58133db2aa14eccaf22f88e4a6dccadfad8b3"}, + {file = "multidict-6.0.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6bf7a982604375a8d49b6cc1b781c1747f243d91b81035a9b43a2126c04766f5"}, + {file = "multidict-6.0.5-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:107c0cdefe028703fb5dafe640a409cb146d44a6ae201e55b35a4af8e95457dd"}, + {file = "multidict-6.0.5-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:403c0911cd5d5791605808b942c88a8155c2592e05332d2bf78f18697a5fa15e"}, + {file = "multidict-6.0.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aeaf541ddbad8311a87dd695ed9642401131ea39ad7bc8cf3ef3967fd093b626"}, + {file = "multidict-6.0.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e4972624066095e52b569e02b5ca97dbd7a7ddd4294bf4e7247d52635630dd83"}, + {file = "multidict-6.0.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d946b0a9eb8aaa590df1fe082cee553ceab173e6cb5b03239716338629c50c7a"}, + {file = "multidict-6.0.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:b55358304d7a73d7bdf5de62494aaf70bd33015831ffd98bc498b433dfe5b10c"}, + {file = "multidict-6.0.5-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:a3145cb08d8625b2d3fee1b2d596a8766352979c9bffe5d7833e0503d0f0b5e5"}, + {file = "multidict-6.0.5-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:d65f25da8e248202bd47445cec78e0025c0fe7582b23ec69c3b27a640dd7a8e3"}, + {file = "multidict-6.0.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:c9bf56195c6bbd293340ea82eafd0071cb3d450c703d2c93afb89f93b8386ccc"}, + {file = "multidict-6.0.5-cp37-cp37m-win32.whl", hash = "sha256:69db76c09796b313331bb7048229e3bee7928eb62bab5e071e9f7fcc4879caee"}, + {file = "multidict-6.0.5-cp37-cp37m-win_amd64.whl", hash = "sha256:fce28b3c8a81b6b36dfac9feb1de115bab619b3c13905b419ec71d03a3fc1423"}, + {file = "multidict-6.0.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:76f067f5121dcecf0d63a67f29080b26c43c71a98b10c701b0677e4a065fbd54"}, + {file = "multidict-6.0.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b82cc8ace10ab5bd93235dfaab2021c70637005e1ac787031f4d1da63d493c1d"}, + {file = "multidict-6.0.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5cb241881eefd96b46f89b1a056187ea8e9ba14ab88ba632e68d7a2ecb7aadf7"}, + {file = "multidict-6.0.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e8e94e6912639a02ce173341ff62cc1201232ab86b8a8fcc05572741a5dc7d93"}, + {file = "multidict-6.0.5-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:09a892e4a9fb47331da06948690ae38eaa2426de97b4ccbfafbdcbe5c8f37ff8"}, + {file = "multidict-6.0.5-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:55205d03e8a598cfc688c71ca8ea5f66447164efff8869517f175ea632c7cb7b"}, + {file = "multidict-6.0.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:37b15024f864916b4951adb95d3a80c9431299080341ab9544ed148091b53f50"}, + {file = "multidict-6.0.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f2a1dee728b52b33eebff5072817176c172050d44d67befd681609b4746e1c2e"}, + {file = "multidict-6.0.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:edd08e6f2f1a390bf137080507e44ccc086353c8e98c657e666c017718561b89"}, + {file = "multidict-6.0.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:60d698e8179a42ec85172d12f50b1668254628425a6bd611aba022257cac1386"}, + {file = "multidict-6.0.5-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:3d25f19500588cbc47dc19081d78131c32637c25804df8414463ec908631e453"}, + {file = "multidict-6.0.5-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:4cc0ef8b962ac7a5e62b9e826bd0cd5040e7d401bc45a6835910ed699037a461"}, + {file = "multidict-6.0.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:eca2e9d0cc5a889850e9bbd68e98314ada174ff6ccd1129500103df7a94a7a44"}, + {file = "multidict-6.0.5-cp38-cp38-win32.whl", hash = "sha256:4a6a4f196f08c58c59e0b8ef8ec441d12aee4125a7d4f4fef000ccb22f8d7241"}, + {file = "multidict-6.0.5-cp38-cp38-win_amd64.whl", hash = "sha256:0275e35209c27a3f7951e1ce7aaf93ce0d163b28948444bec61dd7badc6d3f8c"}, + {file = "multidict-6.0.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e7be68734bd8c9a513f2b0cfd508802d6609da068f40dc57d4e3494cefc92929"}, + {file = "multidict-6.0.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1d9ea7a7e779d7a3561aade7d596649fbecfa5c08a7674b11b423783217933f9"}, + {file = "multidict-6.0.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ea1456df2a27c73ce51120fa2f519f1bea2f4a03a917f4a43c8707cf4cbbae1a"}, + {file = "multidict-6.0.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cf590b134eb70629e350691ecca88eac3e3b8b3c86992042fb82e3cb1830d5e1"}, + {file = "multidict-6.0.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5c0631926c4f58e9a5ccce555ad7747d9a9f8b10619621f22f9635f069f6233e"}, + {file = "multidict-6.0.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dce1c6912ab9ff5f179eaf6efe7365c1f425ed690b03341911bf4939ef2f3046"}, + {file = "multidict-6.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0868d64af83169e4d4152ec612637a543f7a336e4a307b119e98042e852ad9c"}, + {file = "multidict-6.0.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:141b43360bfd3bdd75f15ed811850763555a251e38b2405967f8e25fb43f7d40"}, + {file = "multidict-6.0.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:7df704ca8cf4a073334e0427ae2345323613e4df18cc224f647f251e5e75a527"}, + {file = "multidict-6.0.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:6214c5a5571802c33f80e6c84713b2c79e024995b9c5897f794b43e714daeec9"}, + {file = "multidict-6.0.5-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:cd6c8fca38178e12c00418de737aef1261576bd1b6e8c6134d3e729a4e858b38"}, + {file = "multidict-6.0.5-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:e02021f87a5b6932fa6ce916ca004c4d441509d33bbdbeca70d05dff5e9d2479"}, + {file = "multidict-6.0.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ebd8d160f91a764652d3e51ce0d2956b38efe37c9231cd82cfc0bed2e40b581c"}, + {file = "multidict-6.0.5-cp39-cp39-win32.whl", hash = "sha256:04da1bb8c8dbadf2a18a452639771951c662c5ad03aefe4884775454be322c9b"}, + {file = "multidict-6.0.5-cp39-cp39-win_amd64.whl", hash = "sha256:d6f6d4f185481c9669b9447bf9d9cf3b95a0e9df9d169bbc17e363b7d5487755"}, + {file = "multidict-6.0.5-py3-none-any.whl", hash = "sha256:0d63c74e3d7ab26de115c49bffc92cc77ed23395303d496eae515d4204a625e7"}, + {file = "multidict-6.0.5.tar.gz", hash = "sha256:f7e301075edaf50500f0b341543c41194d8df3ae5caf4702f2095f3ca73dd8da"}, +] + [[package]] name = "nbclient" version = "0.10.0" @@ -3081,6 +3461,26 @@ files = [ {file = "ruff-0.5.5.tar.gz", hash = "sha256:cc5516bdb4858d972fbc31d246bdb390eab8df1a26e2353be2dbc0c2d7f5421a"}, ] +[[package]] +name = "s3fs" +version = "2024.6.1" +description = "Convenient Filesystem interface over S3" +optional = false +python-versions = ">=3.8" +files = [ + {file = "s3fs-2024.6.1-py3-none-any.whl", hash = "sha256:ecd20863437409eec1cbfff0b7df5e9772cf7c1926008efab2e17e46f6d52c63"}, + {file = "s3fs-2024.6.1.tar.gz", hash = "sha256:6c2106d6c34fbfbb88e3d20c6f3572896d5ee3d3512896696301c21a3c541bea"}, +] + +[package.dependencies] +aiobotocore = ">=2.5.4,<3.0.0" +aiohttp = "<4.0.0a0 || >4.0.0a0,<4.0.0a1 || >4.0.0a1" +fsspec = "==2024.6.1.*" + +[package.extras] +awscli = ["aiobotocore[awscli] (>=2.5.4,<3.0.0)"] +boto3 = ["aiobotocore[boto3] (>=2.5.4,<3.0.0)"] + [[package]] name = "s3transfer" version = "0.10.2" @@ -3721,6 +4121,188 @@ docs = ["Sphinx (>=6.0)", "myst-parser (>=2.0.0)", "sphinx-rtd-theme (>=1.1.0)"] optional = ["python-socks", "wsaccel"] test = ["websockets"] +[[package]] +name = "wrapt" +version = "1.16.0" +description = "Module for decorators, wrappers and monkey patching." +optional = false +python-versions = ">=3.6" +files = [ + {file = "wrapt-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ffa565331890b90056c01db69c0fe634a776f8019c143a5ae265f9c6bc4bd6d4"}, + {file = "wrapt-1.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e4fdb9275308292e880dcbeb12546df7f3e0f96c6b41197e0cf37d2826359020"}, + {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bb2dee3874a500de01c93d5c71415fcaef1d858370d405824783e7a8ef5db440"}, + {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2a88e6010048489cda82b1326889ec075a8c856c2e6a256072b28eaee3ccf487"}, + {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac83a914ebaf589b69f7d0a1277602ff494e21f4c2f743313414378f8f50a4cf"}, + {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:73aa7d98215d39b8455f103de64391cb79dfcad601701a3aa0dddacf74911d72"}, + {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:807cc8543a477ab7422f1120a217054f958a66ef7314f76dd9e77d3f02cdccd0"}, + {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:bf5703fdeb350e36885f2875d853ce13172ae281c56e509f4e6eca049bdfb136"}, + {file = "wrapt-1.16.0-cp310-cp310-win32.whl", hash = "sha256:f6b2d0c6703c988d334f297aa5df18c45e97b0af3679bb75059e0e0bd8b1069d"}, + {file = "wrapt-1.16.0-cp310-cp310-win_amd64.whl", hash = "sha256:decbfa2f618fa8ed81c95ee18a387ff973143c656ef800c9f24fb7e9c16054e2"}, + {file = "wrapt-1.16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1a5db485fe2de4403f13fafdc231b0dbae5eca4359232d2efc79025527375b09"}, + {file = "wrapt-1.16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:75ea7d0ee2a15733684badb16de6794894ed9c55aa5e9903260922f0482e687d"}, + {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a452f9ca3e3267cd4d0fcf2edd0d035b1934ac2bd7e0e57ac91ad6b95c0c6389"}, + {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:43aa59eadec7890d9958748db829df269f0368521ba6dc68cc172d5d03ed8060"}, + {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72554a23c78a8e7aa02abbd699d129eead8b147a23c56e08d08dfc29cfdddca1"}, + {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d2efee35b4b0a347e0d99d28e884dfd82797852d62fcd7ebdeee26f3ceb72cf3"}, + {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:6dcfcffe73710be01d90cae08c3e548d90932d37b39ef83969ae135d36ef3956"}, + {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:eb6e651000a19c96f452c85132811d25e9264d836951022d6e81df2fff38337d"}, + {file = "wrapt-1.16.0-cp311-cp311-win32.whl", hash = "sha256:66027d667efe95cc4fa945af59f92c5a02c6f5bb6012bff9e60542c74c75c362"}, + {file = "wrapt-1.16.0-cp311-cp311-win_amd64.whl", hash = "sha256:aefbc4cb0a54f91af643660a0a150ce2c090d3652cf4052a5397fb2de549cd89"}, + {file = "wrapt-1.16.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:5eb404d89131ec9b4f748fa5cfb5346802e5ee8836f57d516576e61f304f3b7b"}, + {file = "wrapt-1.16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9090c9e676d5236a6948330e83cb89969f433b1943a558968f659ead07cb3b36"}, + {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94265b00870aa407bd0cbcfd536f17ecde43b94fb8d228560a1e9d3041462d73"}, + {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f2058f813d4f2b5e3a9eb2eb3faf8f1d99b81c3e51aeda4b168406443e8ba809"}, + {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98b5e1f498a8ca1858a1cdbffb023bfd954da4e3fa2c0cb5853d40014557248b"}, + {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:14d7dc606219cdd7405133c713f2c218d4252f2a469003f8c46bb92d5d095d81"}, + {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:49aac49dc4782cb04f58986e81ea0b4768e4ff197b57324dcbd7699c5dfb40b9"}, + {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:418abb18146475c310d7a6dc71143d6f7adec5b004ac9ce08dc7a34e2babdc5c"}, + {file = "wrapt-1.16.0-cp312-cp312-win32.whl", hash = "sha256:685f568fa5e627e93f3b52fda002c7ed2fa1800b50ce51f6ed1d572d8ab3e7fc"}, + {file = "wrapt-1.16.0-cp312-cp312-win_amd64.whl", hash = "sha256:dcdba5c86e368442528f7060039eda390cc4091bfd1dca41e8046af7c910dda8"}, + {file = "wrapt-1.16.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d462f28826f4657968ae51d2181a074dfe03c200d6131690b7d65d55b0f360f8"}, + {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a33a747400b94b6d6b8a165e4480264a64a78c8a4c734b62136062e9a248dd39"}, + {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b3646eefa23daeba62643a58aac816945cadc0afaf21800a1421eeba5f6cfb9c"}, + {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ebf019be5c09d400cf7b024aa52b1f3aeebeff51550d007e92c3c1c4afc2a40"}, + {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:0d2691979e93d06a95a26257adb7bfd0c93818e89b1406f5a28f36e0d8c1e1fc"}, + {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:1acd723ee2a8826f3d53910255643e33673e1d11db84ce5880675954183ec47e"}, + {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:bc57efac2da352a51cc4658878a68d2b1b67dbe9d33c36cb826ca449d80a8465"}, + {file = "wrapt-1.16.0-cp36-cp36m-win32.whl", hash = "sha256:da4813f751142436b075ed7aa012a8778aa43a99f7b36afe9b742d3ed8bdc95e"}, + {file = "wrapt-1.16.0-cp36-cp36m-win_amd64.whl", hash = "sha256:6f6eac2360f2d543cc875a0e5efd413b6cbd483cb3ad7ebf888884a6e0d2e966"}, + {file = "wrapt-1.16.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a0ea261ce52b5952bf669684a251a66df239ec6d441ccb59ec7afa882265d593"}, + {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7bd2d7ff69a2cac767fbf7a2b206add2e9a210e57947dd7ce03e25d03d2de292"}, + {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9159485323798c8dc530a224bd3ffcf76659319ccc7bbd52e01e73bd0241a0c5"}, + {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a86373cf37cd7764f2201b76496aba58a52e76dedfaa698ef9e9688bfd9e41cf"}, + {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:73870c364c11f03ed072dda68ff7aea6d2a3a5c3fe250d917a429c7432e15228"}, + {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:b935ae30c6e7400022b50f8d359c03ed233d45b725cfdd299462f41ee5ffba6f"}, + {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:db98ad84a55eb09b3c32a96c576476777e87c520a34e2519d3e59c44710c002c"}, + {file = "wrapt-1.16.0-cp37-cp37m-win32.whl", hash = "sha256:9153ed35fc5e4fa3b2fe97bddaa7cbec0ed22412b85bcdaf54aeba92ea37428c"}, + {file = "wrapt-1.16.0-cp37-cp37m-win_amd64.whl", hash = "sha256:66dfbaa7cfa3eb707bbfcd46dab2bc6207b005cbc9caa2199bcbc81d95071a00"}, + {file = "wrapt-1.16.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1dd50a2696ff89f57bd8847647a1c363b687d3d796dc30d4dd4a9d1689a706f0"}, + {file = "wrapt-1.16.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:44a2754372e32ab315734c6c73b24351d06e77ffff6ae27d2ecf14cf3d229202"}, + {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e9723528b9f787dc59168369e42ae1c3b0d3fadb2f1a71de14531d321ee05b0"}, + {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dbed418ba5c3dce92619656802cc5355cb679e58d0d89b50f116e4a9d5a9603e"}, + {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:941988b89b4fd6b41c3f0bfb20e92bd23746579736b7343283297c4c8cbae68f"}, + {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6a42cd0cfa8ffc1915aef79cb4284f6383d8a3e9dcca70c445dcfdd639d51267"}, + {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:1ca9b6085e4f866bd584fb135a041bfc32cab916e69f714a7d1d397f8c4891ca"}, + {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d5e49454f19ef621089e204f862388d29e6e8d8b162efce05208913dde5b9ad6"}, + {file = "wrapt-1.16.0-cp38-cp38-win32.whl", hash = "sha256:c31f72b1b6624c9d863fc095da460802f43a7c6868c5dda140f51da24fd47d7b"}, + {file = "wrapt-1.16.0-cp38-cp38-win_amd64.whl", hash = "sha256:490b0ee15c1a55be9c1bd8609b8cecd60e325f0575fc98f50058eae366e01f41"}, + {file = "wrapt-1.16.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9b201ae332c3637a42f02d1045e1d0cccfdc41f1f2f801dafbaa7e9b4797bfc2"}, + {file = "wrapt-1.16.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:2076fad65c6736184e77d7d4729b63a6d1ae0b70da4868adeec40989858eb3fb"}, + {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c5cd603b575ebceca7da5a3a251e69561bec509e0b46e4993e1cac402b7247b8"}, + {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b47cfad9e9bbbed2339081f4e346c93ecd7ab504299403320bf85f7f85c7d46c"}, + {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f8212564d49c50eb4565e502814f694e240c55551a5f1bc841d4fcaabb0a9b8a"}, + {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:5f15814a33e42b04e3de432e573aa557f9f0f56458745c2074952f564c50e664"}, + {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db2e408d983b0e61e238cf579c09ef7020560441906ca990fe8412153e3b291f"}, + {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:edfad1d29c73f9b863ebe7082ae9321374ccb10879eeabc84ba3b69f2579d537"}, + {file = "wrapt-1.16.0-cp39-cp39-win32.whl", hash = "sha256:ed867c42c268f876097248e05b6117a65bcd1e63b779e916fe2e33cd6fd0d3c3"}, + {file = "wrapt-1.16.0-cp39-cp39-win_amd64.whl", hash = "sha256:eb1b046be06b0fce7249f1d025cd359b4b80fc1c3e24ad9eca33e0dcdb2e4a35"}, + {file = "wrapt-1.16.0-py3-none-any.whl", hash = "sha256:6906c4100a8fcbf2fa735f6059214bb13b97f75b1a61777fcf6432121ef12ef1"}, + {file = "wrapt-1.16.0.tar.gz", hash = "sha256:5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d"}, +] + +[[package]] +name = "yarl" +version = "1.9.4" +description = "Yet another URL library" +optional = false +python-versions = ">=3.7" +files = [ + {file = "yarl-1.9.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a8c1df72eb746f4136fe9a2e72b0c9dc1da1cbd23b5372f94b5820ff8ae30e0e"}, + {file = "yarl-1.9.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a3a6ed1d525bfb91b3fc9b690c5a21bb52de28c018530ad85093cc488bee2dd2"}, + {file = "yarl-1.9.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c38c9ddb6103ceae4e4498f9c08fac9b590c5c71b0370f98714768e22ac6fa66"}, + {file = "yarl-1.9.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d9e09c9d74f4566e905a0b8fa668c58109f7624db96a2171f21747abc7524234"}, + {file = "yarl-1.9.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b8477c1ee4bd47c57d49621a062121c3023609f7a13b8a46953eb6c9716ca392"}, + {file = "yarl-1.9.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d5ff2c858f5f6a42c2a8e751100f237c5e869cbde669a724f2062d4c4ef93551"}, + {file = "yarl-1.9.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:357495293086c5b6d34ca9616a43d329317feab7917518bc97a08f9e55648455"}, + {file = "yarl-1.9.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:54525ae423d7b7a8ee81ba189f131054defdb122cde31ff17477951464c1691c"}, + {file = "yarl-1.9.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:801e9264d19643548651b9db361ce3287176671fb0117f96b5ac0ee1c3530d53"}, + {file = "yarl-1.9.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e516dc8baf7b380e6c1c26792610230f37147bb754d6426462ab115a02944385"}, + {file = "yarl-1.9.4-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:7d5aaac37d19b2904bb9dfe12cdb08c8443e7ba7d2852894ad448d4b8f442863"}, + {file = "yarl-1.9.4-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:54beabb809ffcacbd9d28ac57b0db46e42a6e341a030293fb3185c409e626b8b"}, + {file = "yarl-1.9.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:bac8d525a8dbc2a1507ec731d2867025d11ceadcb4dd421423a5d42c56818541"}, + {file = "yarl-1.9.4-cp310-cp310-win32.whl", hash = "sha256:7855426dfbddac81896b6e533ebefc0af2f132d4a47340cee6d22cac7190022d"}, + {file = "yarl-1.9.4-cp310-cp310-win_amd64.whl", hash = "sha256:848cd2a1df56ddbffeb375535fb62c9d1645dde33ca4d51341378b3f5954429b"}, + {file = "yarl-1.9.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:35a2b9396879ce32754bd457d31a51ff0a9d426fd9e0e3c33394bf4b9036b099"}, + {file = "yarl-1.9.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4c7d56b293cc071e82532f70adcbd8b61909eec973ae9d2d1f9b233f3d943f2c"}, + {file = "yarl-1.9.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d8a1c6c0be645c745a081c192e747c5de06e944a0d21245f4cf7c05e457c36e0"}, + {file = "yarl-1.9.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4b3c1ffe10069f655ea2d731808e76e0f452fc6c749bea04781daf18e6039525"}, + {file = "yarl-1.9.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:549d19c84c55d11687ddbd47eeb348a89df9cb30e1993f1b128f4685cd0ebbf8"}, + {file = "yarl-1.9.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a7409f968456111140c1c95301cadf071bd30a81cbd7ab829169fb9e3d72eae9"}, + {file = "yarl-1.9.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e23a6d84d9d1738dbc6e38167776107e63307dfc8ad108e580548d1f2c587f42"}, + {file = "yarl-1.9.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d8b889777de69897406c9fb0b76cdf2fd0f31267861ae7501d93003d55f54fbe"}, + {file = "yarl-1.9.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:03caa9507d3d3c83bca08650678e25364e1843b484f19986a527630ca376ecce"}, + {file = "yarl-1.9.4-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:4e9035df8d0880b2f1c7f5031f33f69e071dfe72ee9310cfc76f7b605958ceb9"}, + {file = "yarl-1.9.4-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:c0ec0ed476f77db9fb29bca17f0a8fcc7bc97ad4c6c1d8959c507decb22e8572"}, + {file = "yarl-1.9.4-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:ee04010f26d5102399bd17f8df8bc38dc7ccd7701dc77f4a68c5b8d733406958"}, + {file = "yarl-1.9.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:49a180c2e0743d5d6e0b4d1a9e5f633c62eca3f8a86ba5dd3c471060e352ca98"}, + {file = "yarl-1.9.4-cp311-cp311-win32.whl", hash = "sha256:81eb57278deb6098a5b62e88ad8281b2ba09f2f1147c4767522353eaa6260b31"}, + {file = "yarl-1.9.4-cp311-cp311-win_amd64.whl", hash = "sha256:d1d2532b340b692880261c15aee4dc94dd22ca5d61b9db9a8a361953d36410b1"}, + {file = "yarl-1.9.4-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0d2454f0aef65ea81037759be5ca9947539667eecebca092733b2eb43c965a81"}, + {file = "yarl-1.9.4-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:44d8ffbb9c06e5a7f529f38f53eda23e50d1ed33c6c869e01481d3fafa6b8142"}, + {file = "yarl-1.9.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:aaaea1e536f98754a6e5c56091baa1b6ce2f2700cc4a00b0d49eca8dea471074"}, + {file = "yarl-1.9.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3777ce5536d17989c91696db1d459574e9a9bd37660ea7ee4d3344579bb6f129"}, + {file = "yarl-1.9.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9fc5fc1eeb029757349ad26bbc5880557389a03fa6ada41703db5e068881e5f2"}, + {file = "yarl-1.9.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ea65804b5dc88dacd4a40279af0cdadcfe74b3e5b4c897aa0d81cf86927fee78"}, + {file = "yarl-1.9.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa102d6d280a5455ad6a0f9e6d769989638718e938a6a0a2ff3f4a7ff8c62cc4"}, + {file = "yarl-1.9.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:09efe4615ada057ba2d30df871d2f668af661e971dfeedf0c159927d48bbeff0"}, + {file = "yarl-1.9.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:008d3e808d03ef28542372d01057fd09168419cdc8f848efe2804f894ae03e51"}, + {file = "yarl-1.9.4-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:6f5cb257bc2ec58f437da2b37a8cd48f666db96d47b8a3115c29f316313654ff"}, + {file = "yarl-1.9.4-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:992f18e0ea248ee03b5a6e8b3b4738850ae7dbb172cc41c966462801cbf62cf7"}, + {file = "yarl-1.9.4-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:0e9d124c191d5b881060a9e5060627694c3bdd1fe24c5eecc8d5d7d0eb6faabc"}, + {file = "yarl-1.9.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:3986b6f41ad22988e53d5778f91855dc0399b043fc8946d4f2e68af22ee9ff10"}, + {file = "yarl-1.9.4-cp312-cp312-win32.whl", hash = "sha256:4b21516d181cd77ebd06ce160ef8cc2a5e9ad35fb1c5930882baff5ac865eee7"}, + {file = "yarl-1.9.4-cp312-cp312-win_amd64.whl", hash = "sha256:a9bd00dc3bc395a662900f33f74feb3e757429e545d831eef5bb280252631984"}, + {file = "yarl-1.9.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:63b20738b5aac74e239622d2fe30df4fca4942a86e31bf47a81a0e94c14df94f"}, + {file = "yarl-1.9.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7d7f7de27b8944f1fee2c26a88b4dabc2409d2fea7a9ed3df79b67277644e17"}, + {file = "yarl-1.9.4-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c74018551e31269d56fab81a728f683667e7c28c04e807ba08f8c9e3bba32f14"}, + {file = "yarl-1.9.4-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ca06675212f94e7a610e85ca36948bb8fc023e458dd6c63ef71abfd482481aa5"}, + {file = "yarl-1.9.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5aef935237d60a51a62b86249839b51345f47564208c6ee615ed2a40878dccdd"}, + {file = "yarl-1.9.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2b134fd795e2322b7684155b7855cc99409d10b2e408056db2b93b51a52accc7"}, + {file = "yarl-1.9.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d25039a474c4c72a5ad4b52495056f843a7ff07b632c1b92ea9043a3d9950f6e"}, + {file = "yarl-1.9.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:f7d6b36dd2e029b6bcb8a13cf19664c7b8e19ab3a58e0fefbb5b8461447ed5ec"}, + {file = "yarl-1.9.4-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:957b4774373cf6f709359e5c8c4a0af9f6d7875db657adb0feaf8d6cb3c3964c"}, + {file = "yarl-1.9.4-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:d7eeb6d22331e2fd42fce928a81c697c9ee2d51400bd1a28803965883e13cead"}, + {file = "yarl-1.9.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:6a962e04b8f91f8c4e5917e518d17958e3bdee71fd1d8b88cdce74dd0ebbf434"}, + {file = "yarl-1.9.4-cp37-cp37m-win32.whl", hash = "sha256:f3bc6af6e2b8f92eced34ef6a96ffb248e863af20ef4fde9448cc8c9b858b749"}, + {file = "yarl-1.9.4-cp37-cp37m-win_amd64.whl", hash = "sha256:ad4d7a90a92e528aadf4965d685c17dacff3df282db1121136c382dc0b6014d2"}, + {file = "yarl-1.9.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:ec61d826d80fc293ed46c9dd26995921e3a82146feacd952ef0757236fc137be"}, + {file = "yarl-1.9.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8be9e837ea9113676e5754b43b940b50cce76d9ed7d2461df1af39a8ee674d9f"}, + {file = "yarl-1.9.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:bef596fdaa8f26e3d66af846bbe77057237cb6e8efff8cd7cc8dff9a62278bbf"}, + {file = "yarl-1.9.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d47552b6e52c3319fede1b60b3de120fe83bde9b7bddad11a69fb0af7db32f1"}, + {file = "yarl-1.9.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:84fc30f71689d7fc9168b92788abc977dc8cefa806909565fc2951d02f6b7d57"}, + {file = "yarl-1.9.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4aa9741085f635934f3a2583e16fcf62ba835719a8b2b28fb2917bb0537c1dfa"}, + {file = "yarl-1.9.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:206a55215e6d05dbc6c98ce598a59e6fbd0c493e2de4ea6cc2f4934d5a18d130"}, + {file = "yarl-1.9.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07574b007ee20e5c375a8fe4a0789fad26db905f9813be0f9fef5a68080de559"}, + {file = "yarl-1.9.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:5a2e2433eb9344a163aced6a5f6c9222c0786e5a9e9cac2c89f0b28433f56e23"}, + {file = "yarl-1.9.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:6ad6d10ed9b67a382b45f29ea028f92d25bc0bc1daf6c5b801b90b5aa70fb9ec"}, + {file = "yarl-1.9.4-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:6fe79f998a4052d79e1c30eeb7d6c1c1056ad33300f682465e1b4e9b5a188b78"}, + {file = "yarl-1.9.4-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:a825ec844298c791fd28ed14ed1bffc56a98d15b8c58a20e0e08c1f5f2bea1be"}, + {file = "yarl-1.9.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8619d6915b3b0b34420cf9b2bb6d81ef59d984cb0fde7544e9ece32b4b3043c3"}, + {file = "yarl-1.9.4-cp38-cp38-win32.whl", hash = "sha256:686a0c2f85f83463272ddffd4deb5e591c98aac1897d65e92319f729c320eece"}, + {file = "yarl-1.9.4-cp38-cp38-win_amd64.whl", hash = "sha256:a00862fb23195b6b8322f7d781b0dc1d82cb3bcac346d1e38689370cc1cc398b"}, + {file = "yarl-1.9.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:604f31d97fa493083ea21bd9b92c419012531c4e17ea6da0f65cacdcf5d0bd27"}, + {file = "yarl-1.9.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8a854227cf581330ffa2c4824d96e52ee621dd571078a252c25e3a3b3d94a1b1"}, + {file = "yarl-1.9.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ba6f52cbc7809cd8d74604cce9c14868306ae4aa0282016b641c661f981a6e91"}, + {file = "yarl-1.9.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a6327976c7c2f4ee6816eff196e25385ccc02cb81427952414a64811037bbc8b"}, + {file = "yarl-1.9.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8397a3817d7dcdd14bb266283cd1d6fc7264a48c186b986f32e86d86d35fbac5"}, + {file = "yarl-1.9.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e0381b4ce23ff92f8170080c97678040fc5b08da85e9e292292aba67fdac6c34"}, + {file = "yarl-1.9.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:23d32a2594cb5d565d358a92e151315d1b2268bc10f4610d098f96b147370136"}, + {file = "yarl-1.9.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ddb2a5c08a4eaaba605340fdee8fc08e406c56617566d9643ad8bf6852778fc7"}, + {file = "yarl-1.9.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:26a1dc6285e03f3cc9e839a2da83bcbf31dcb0d004c72d0730e755b33466c30e"}, + {file = "yarl-1.9.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:18580f672e44ce1238b82f7fb87d727c4a131f3a9d33a5e0e82b793362bf18b4"}, + {file = "yarl-1.9.4-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:29e0f83f37610f173eb7e7b5562dd71467993495e568e708d99e9d1944f561ec"}, + {file = "yarl-1.9.4-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:1f23e4fe1e8794f74b6027d7cf19dc25f8b63af1483d91d595d4a07eca1fb26c"}, + {file = "yarl-1.9.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:db8e58b9d79200c76956cefd14d5c90af54416ff5353c5bfd7cbe58818e26ef0"}, + {file = "yarl-1.9.4-cp39-cp39-win32.whl", hash = "sha256:c7224cab95645c7ab53791022ae77a4509472613e839dab722a72abe5a684575"}, + {file = "yarl-1.9.4-cp39-cp39-win_amd64.whl", hash = "sha256:824d6c50492add5da9374875ce72db7a0733b29c2394890aef23d533106e2b15"}, + {file = "yarl-1.9.4-py3-none-any.whl", hash = "sha256:928cecb0ef9d5a7946eb6ff58417ad2fe9375762382f1bf5c55e61645f2c43ad"}, + {file = "yarl-1.9.4.tar.gz", hash = "sha256:566db86717cf8080b99b58b083b773a908ae40f06681e87e589a976faf8246bf"}, +] + +[package.dependencies] +idna = ">=2.0" +multidict = ">=4.0" + [[package]] name = "zipp" version = "3.19.2" @@ -3739,4 +4321,4 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "517f3bfc9d310007ab5c43cf2825dc9a0f100f63629840b5c8a636a61caed676" +content-hash = "ee6a938188cb4a6b11f825f2f68ceb451bf4ded746df79f6b358531638ab7101" diff --git a/pyproject.toml b/pyproject.toml index c3a27b9..1ccf43f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,6 +17,14 @@ tesswcs = "^1.1.2" tqdm = "^4.50.0" boto3 = "^1.34.25" + +[tool.poetry.group.cloud] +optional = true + +[tool.poetry.group.cloud.dependencies] +fsspec = "^2024.6.1" +s3fs = "^2024.6.1" + [tool.poetry.group.dev] optional = true diff --git a/src/lksearch/catalog.py b/src/lksearch/catalog.py index 96be072..8133f1b 100644 --- a/src/lksearch/catalog.py +++ b/src/lksearch/catalog.py @@ -20,64 +20,67 @@ "catalog": "V/133/kic", "columns": ["KIC", "RAJ2000", "DEJ2000", "pmRA", "pmDE", "Plx", "kepmag"], "column_filters": "kepmag", - "rename_in": ("KIC", "pmDE", "kepmag"), - "rename_out": ("ID", "pmDEC", "Kepler_Mag"), + "rename_in": ["KIC", "kepmag"], + "rename_out": ["ID", "Kepmag"], "equinox": Time(2000, format="jyear", scale="tt"), "prefix": "KIC", + "default_mag":"Kepmag" }, "epic": { "catalog": "IV/34/epic", "columns": ["ID", "RAJ2000", "DEJ2000", "pmRA", "pmDEC", "plx", "Kpmag"], "column_filters": "Kpmag", - "rename_in": ("Kpmag", "plx"), - "rename_out": ("K2_Mag", "Plx"), + "rename_in": ["Kpmag", "pmDEC", "plx"], + "rename_out": ["K2mag", "pmDE", "Plx"], "equinox": Time(2000, format="jyear", scale="tt"), "prefix": "EPIC", + "default_mag":"K2mag" }, "tic": { "catalog": "IV/39/tic82", "columns": ["TIC", "RAJ2000", "DEJ2000", "pmRA", "pmDE", "Plx", "Tmag"], "column_filters": "Tmag", - "rename_in": ("TIC", "pmDE", "Tmag"), - "rename_out": ("ID", "pmDEC", "TESS_Mag"), + "rename_in": ["TIC", "Tmag"], + "rename_out": ["ID", "TESSmag"], "equinox": Time(2000, format="jyear", scale="tt"), "prefix": "TIC", + "default_mag":"TESSmag" }, "gaiadr3": { "catalog": "I/355/gaiadr3", - "columns": ["DR3Name", "RAJ2000", "DEJ2000", "pmRA", "pmDE", "Plx", "Gmag"], + "columns": ["DR3Name", "RAJ2000", "DEJ2000", "pmRA", "pmDE", "Plx", "Gmag", 'BPmag', 'RPmag'], "column_filters": "Gmag", - "rename_in": ("DR3Name", "pmDE", "Gmag"), - "rename_out": ("ID", "pmDEC", "Gaia_G_Mag"), + "rename_in": ["DR3Name"], + "rename_out": ["ID"], "equinox": Time(2016, format="jyear", scale="tt"), "prefix": None, + "default_mag":"Gmag" }, } -def _apply_propermotion(table: Table, equinox: Time, epoch: Time): +def _table_to_skycoord(table: Table, equinox: Time, epoch: Time): """ - Returns an astropy table of sources with the proper motion correction applied + Convert a table input to astropy.coordinates.SkyCoord object - Parameters: - ----------- - table : + Parameters + ---------- + table : astropy.table.Table astropy.table.Table which contains the coordinates of targets and proper motion values equinox: astropy.time.Time The equinox for the catalog epoch : astropy.time.Time - Time of the observation - This is taken from the table R.A and Dec. values and re-formatted as an astropy.time.Time object + Desired time of the observation - Returns: - ------ - table : astropy.table.Table - Returns an astropy table with ID, corrected RA, corrected Dec, and Mag(?Some ppl might find this benifical for contamination reasons?) + Returns + ------- + coords : astropy.coordinates.SkyCoord + SkyCoord object with RA, Dec, equinox, and proper motion parameters. """ - # We need to remove any nan values from our proper motion list # Doing this will allow objects which do not have proper motion to still be displayed table["pmRA"] = np.ma.filled(table["pmRA"].astype(float), 0.0) - table["pmDEC"] = np.ma.filled(table["pmDEC"].astype(float), 0.0) + table["pmDE"] = np.ma.filled(table["pmDE"].astype(float), 0.0) # If an object does not have a parallax then we treat it as if the object is an "infinite distance" # and set the parallax to 1e-7 arcseconds or 10Mpc. table["Plx"] = np.ma.filled(table["Plx"].astype(float), 1e-4) @@ -92,45 +95,40 @@ def _apply_propermotion(table: Table, equinox: Time, epoch: Time): dec=table["DEJ2000"], distance=Distance(parallax=table["Plx"].quantity, allow_negative=True), pm_ra_cosdec=table["pmRA"], - pm_dec=table["pmDEC"], + pm_dec=table["pmDE"], frame="icrs", obstime=equinox, ) # Suppress warning caused by Astropy as noted in issue 111747 (https://github.com/astropy/astropy/issues/11747) - with warnings.catch_warnings(): - warnings.filterwarnings("ignore", message="ERFA function") - warnings.filterwarnings("ignore", message="invalid value") - - # Calculate the new values - c1 = c.apply_space_motion(new_obstime=epoch) + if epoch != equinox: + with warnings.catch_warnings(): + warnings.filterwarnings("ignore", message="ERFA function") + warnings.filterwarnings("ignore", message="invalid value") + c = c.apply_space_motion(new_obstime=epoch) + return c - # Add new data corrected RA and Dec - table["RA"] = c1.ra.to(u.deg) - table["DEC"] = c1.dec.to(u.deg) - # Get the index of the targets with zero proper motions - pmzero_index = np.where((table["pmRA"] == 0.0) & (table["pmDEC"] == 0.0)) - - # In those instances replace with J2000 values - table["RA"][pmzero_index] = table["RAJ2000"][pmzero_index] - table["DEC"][pmzero_index] = table["DEJ2000"][pmzero_index] - return table +def _get_return_columns(columns): + """Convenience function to reorder columns and remove motion columns.""" + return ['RA', 'Dec', 'Separation', 'Relative_Flux', *list(set(columns) - set(['RA', 'Dec', 'RAJ2000', 'DEJ2000', 'Plx', 'pmRA', 'pmDE', 'Separation', 'Relative_Flux']))] def query_catalog( - coord: SkyCoord, + coord: Union[SkyCoord, str], epoch: Time, catalog: str, radius: Union[float, u.Quantity] = u.Quantity(100, "arcsecond"), magnitude_limit: float = 18.0, + return_skycoord: bool = False, ): - """Query a catalog for a single source location, obtain nearby sources + """ + Query a catalog for a single source location, obtain nearby sources - Parameters: - ----------- - coord : astropy.coordinates.SkyCoord - Coordinates around which to do a radius query + Parameters + ---------- + coord : astropy.coordinates.SkyCoord or string + Coordinates around which to do a radius query. If passed a string, will resolve using `from_name`. epoch: astropy.time.Time The time of observation in JD. catalog: str @@ -139,15 +137,19 @@ def query_catalog( Radius in arcseconds to query magnitude_limit : float A value to limit the results in based on the Tmag/Kepler mag/K2 mag or Gaia G mag. Default, 18. + return_skycoord: bool + Whether to return an astropy.coordinates.SkyCoord object. Default is False. - Returns: + Returns ------- - result: pd.DataFrame - A pandas dataframe of the sources within radius query, corrected for proper motion + result: pd.DataFrame or astropy.coordinates.SkyCoord + By default returns a pandas dataframe of the sources within radius query, corrected for proper motion. Optionally will return astropy.coordinates.SkyCoord object. """ # Check to make sure that user input is in the correct format if not isinstance(coord, SkyCoord): + if isinstance(coord, str): + coord = SkyCoord.from_name(coord) raise TypeError("Must pass an `astropy.coordinates.SkyCoord` object.") if not isinstance(epoch, Time): try: @@ -184,12 +186,12 @@ def query_catalog( # Now query the catalog result = filters.query_region(coord, catalog=catalog_name, radius=Angle(radius)) if len(result) == 0: - return ( + result = ( pd.DataFrame( columns=[ *catalog_meta["columns"], "RA", - "DEC", + "Dec", "Separation", "Relative_Flux", ] @@ -205,6 +207,7 @@ def query_catalog( ) .set_index("ID") ) + return result[_get_return_columns(result.columns)] result = result[catalog_name] @@ -218,66 +221,53 @@ def query_catalog( prefix = catalog_meta["prefix"] result["ID"] = [f"{prefix} {id}" for id in result["ID"]] - # Based on the input coordinates pick the object with the mininmum separation as the reference star. - c1 = SkyCoord(result["RAJ2000"], result["DEJ2000"], unit="deg") - - sep = coord.separation(c1) - - # Find the object with the minimum separation - this is our target - ref_index = np.argmin(sep) - - # apply_propermotion - result = _apply_propermotion(result, equinox=catalog_meta["equinox"], epoch=epoch) - - # Now we want to repete but using the values corrected for proper motion - # First get the correct values for target - coord_pm_correct = SkyCoord( - result["RA"][ref_index], result["DEC"][ref_index], unit="deg" - ) - - c1_pm_correct = SkyCoord(result["RA"], result["DEC"], unit="deg") - - # Then calculate the separation based on pm corrected values - sep_pm_correct = coord_pm_correct.separation(c1_pm_correct) - - # Provide the separation in the output table - result["Separation"] = sep_pm_correct + c = _table_to_skycoord(table=result, equinox=catalog_meta['equinox'], epoch=epoch) + ref_index = np.argmin(coord.separation(c).arcsecond) + sep = c[ref_index].separation(c) + + if return_skycoord: + s = np.argsort(sep.deg) + return c[s] + + result["RA"] = c.ra.deg + result["Dec"] = c.dec.deg + result["Separation"] = sep.arcsecond # Calculate the relative flux - result["Relative_Flux"] = 10 ** ( - ( - [value for key, value in result.items() if "_Mag" in key][0] - - [value for key, value in result.items() if "_Mag" in key][0][ref_index] - ) - / -2.5 - ) + result["Relative_Flux"] = 10 ** ((result[catalog_meta["default_mag"]] - result[catalog_meta["default_mag"]][ref_index])/-2.5) # Now sort the table based on separation result.sort(["Separation"]) - return result.to_pandas().set_index("ID") + result = result.to_pandas().set_index("ID") + return result[_get_return_columns(result.columns)] def query_KIC( coord: SkyCoord, - epoch: Time, - radius: Union[float, u.Quantity] = u.Quantity(100, "arcsecond"), + epoch: Time=Time(2000, format="jyear", scale="tt"), + radius: Union[float, u.Quantity] = u.Quantity(2, "pixel"), magnitude_limit: float = 18.0, + return_skycoord: bool = False, ): - """Query the Kepler Input Catalog for a single source location, obtain nearby sources + """ + Query the Kepler Input Catalog for a single source location, obtain nearby sources - Parameters: - ----------- + Parameters + ---------- coord : astropy.coordinates.SkyCoord Coordinates around which to do a radius query epoch: astropy.time.Time - The time of observation in JD. + The time of observation in JD. Defaults to J2000. catalog: str The catalog to query, either 'kepler', 'k2', or 'tess', 'gaia' radius : float or astropy quantity - Radius in arcseconds to query + Radius in arcseconds to query. Defaults to 2 pixels. magnitude_limit : float A value to limit the results in based on the Tmag/Kepler mag/K2 mag or Gaia G mag. Default, 18. - Returns: + return_skycoord: bool + Whether to return an astropy.coordinates.SkyCoord object. Default is False. + + Returns ------- result: pd.DataFrame A pandas dataframe of the sources within radius query, corrected for proper motion @@ -290,30 +280,36 @@ def query_KIC( catalog="kic", radius=radius, magnitude_limit=magnitude_limit, + return_skycoord=return_skycoord, ) def query_TIC( coord: SkyCoord, - epoch: Time, - radius: Union[float, u.Quantity] = u.Quantity(100, "arcsecond"), + epoch: Time=Time(2000, format="jyear", scale="tt"), + radius: Union[float, u.Quantity] = u.Quantity(2, "pixel"), magnitude_limit: float = 18.0, + return_skycoord: bool = False, ): - """Query the TESS Input Catalog for a single source location, obtain nearby sources + """ + Query the TESS Input Catalog for a single source location, obtain nearby sources - Parameters: - ----------- + Parameters + ---------- coord : astropy.coordinates.SkyCoord Coordinates around which to do a radius query epoch: astropy.time.Time - The time of observation in JD. + The time of observation in JD. Defaults to J2000. catalog: str The catalog to query, either 'kepler', 'k2', or 'tess', 'gaia' radius : float or astropy quantity - Radius in arcseconds to query + Radius in arcseconds to query. Defaults to 2 pixels. magnitude_limit : float A value to limit the results in based on the Tmag/Kepler mag/K2 mag or Gaia G mag. Default, 18. - Returns: + return_skycoord: bool + Whether to return an astropy.coordinates.SkyCoord object. Default is False. + + Returns ------- result: pd.DataFrame A pandas dataframe of the sources within radius query, corrected for proper motion @@ -326,30 +322,36 @@ def query_TIC( catalog="tic", radius=radius, magnitude_limit=magnitude_limit, + return_skycoord=return_skycoord, ) def query_EPIC( coord: SkyCoord, - epoch: Time, - radius: Union[float, u.Quantity] = u.Quantity(100, "arcsecond"), + epoch: Time=Time(2000, format="jyear", scale="tt"), + radius: Union[float, u.Quantity] = u.Quantity(2, "pixel"), magnitude_limit: float = 18.0, + return_skycoord: bool = False, ): - """Query the Ecliptic Plane Input Catalog for a single source location, obtain nearby sources + """ + Query the Ecliptic Plane Input Catalog for a single source location, obtain nearby sources - Parameters: - ----------- + Parameters + ---------- coord : astropy.coordinates.SkyCoord Coordinates around which to do a radius query epoch: astropy.time.Time - The time of observation in JD. + The time of observation in JD. Defaults to J2000. catalog: str The catalog to query, either 'kepler', 'k2', or 'tess', 'gaia' radius : float or astropy quantity - Radius in arcseconds to query + Radius in arcseconds to query. Defaults to 2 pixels. magnitude_limit : float A value to limit the results in based on the Tmag/Kepler mag/K2 mag or Gaia G mag. Default, 18. - Returns: + return_skycoord: bool + Whether to return an astropy.coordinates.SkyCoord object. Default is False. + + Returns ------- result: pd.DataFrame A pandas dataframe of the sources within radius query, corrected for proper motion @@ -362,30 +364,36 @@ def query_EPIC( catalog="epic", radius=radius, magnitude_limit=magnitude_limit, + return_skycoord=return_skycoord, ) def query_gaia( coord: SkyCoord, - epoch: Time, - radius: Union[float, u.Quantity] = u.Quantity(100, "arcsecond"), + epoch: Time=Time(2016, format="jyear", scale="tt"), + radius: Union[float, u.Quantity] = u.Quantity(10, "arcsecond"), magnitude_limit: float = 18.0, + return_skycoord: bool = False, ): - """Query the Gaia EDR3 catalog for a single source location, obtain nearby sources + """ + Query the Gaia EDR3 catalog for a single source location, obtain nearby sources - Parameters: - ----------- + Parameters + ---------- coord : astropy.coordinates.SkyCoord Coordinates around which to do a radius query epoch: astropy.time.Time - The time of observation in JD. + The time of observation in JD. Defaults to the epoch of Gaia DR3 (J2016). catalog: str The catalog to query, either 'kepler', 'k2', or 'tess', 'gaia' radius : float or astropy quantity - Radius in arcseconds to query + Radius in arcseconds to query. Defaults to 10 arcseconds. magnitude_limit : float A value to limit the results in based on the Tmag/Kepler mag/K2 mag or Gaia G mag. Default, 18. - Returns: + return_skycoord: bool + Whether to return an astropy.coordinates.SkyCoord object. Default is False. + + Returns ------- result: pd.DataFrame A pandas dataframe of the sources within radius query, corrected for proper motion @@ -396,4 +404,5 @@ def query_gaia( catalog="gaiadr3", radius=radius, magnitude_limit=magnitude_limit, + return_skycoord=return_skycoord, ) diff --git a/tests/test_query_catalog.py b/tests/test_query_catalog.py index 37d9b42..463e19d 100644 --- a/tests/test_query_catalog.py +++ b/tests/test_query_catalog.py @@ -29,7 +29,7 @@ def test_tic(): # Test that the proper motion works assert np.isclose(catalog.iloc[0]["RA"], 194.10075230969787, atol=1e-6) - assert np.isclose(catalog.iloc[0]["DEC"], -27.390340343480744, atol=1e-6) + assert np.isclose(catalog.iloc[0]["Dec"], -27.390340343480744, atol=1e-6) # Test different epochs catalog_new = query_catalog( @@ -41,7 +41,7 @@ def test_tic(): ) assert np.isclose(catalog_new.iloc[0]["RA"], 194.10052070792756, atol=1e-6) - assert np.isclose(catalog_new.iloc[0]["DEC"], -27.390254988629433, atol=1e-6) + assert np.isclose(catalog_new.iloc[0]["Dec"], -27.390254988629433, atol=1e-6) # Test different epochs catalog_new = query_TIC( From 7988abb238ec1db232519850c35fa7a7ed8d33a6 Mon Sep 17 00:00:00 2001 From: Christina Hedges Date: Tue, 30 Jul 2024 09:51:18 -0400 Subject: [PATCH 05/15] ruff --- src/lksearch/catalog.py | 67 ++++++++++++++++++++++++++++++++--------- 1 file changed, 52 insertions(+), 15 deletions(-) diff --git a/src/lksearch/catalog.py b/src/lksearch/catalog.py index 8133f1b..46fafba 100644 --- a/src/lksearch/catalog.py +++ b/src/lksearch/catalog.py @@ -24,7 +24,7 @@ "rename_out": ["ID", "Kepmag"], "equinox": Time(2000, format="jyear", scale="tt"), "prefix": "KIC", - "default_mag":"Kepmag" + "default_mag": "Kepmag", }, "epic": { "catalog": "IV/34/epic", @@ -34,7 +34,7 @@ "rename_out": ["K2mag", "pmDE", "Plx"], "equinox": Time(2000, format="jyear", scale="tt"), "prefix": "EPIC", - "default_mag":"K2mag" + "default_mag": "K2mag", }, "tic": { "catalog": "IV/39/tic82", @@ -44,17 +44,27 @@ "rename_out": ["ID", "TESSmag"], "equinox": Time(2000, format="jyear", scale="tt"), "prefix": "TIC", - "default_mag":"TESSmag" + "default_mag": "TESSmag", }, "gaiadr3": { "catalog": "I/355/gaiadr3", - "columns": ["DR3Name", "RAJ2000", "DEJ2000", "pmRA", "pmDE", "Plx", "Gmag", 'BPmag', 'RPmag'], + "columns": [ + "DR3Name", + "RAJ2000", + "DEJ2000", + "pmRA", + "pmDE", + "Plx", + "Gmag", + "BPmag", + "RPmag", + ], "column_filters": "Gmag", "rename_in": ["DR3Name"], "rename_out": ["ID"], "equinox": Time(2016, format="jyear", scale="tt"), "prefix": None, - "default_mag":"Gmag" + "default_mag": "Gmag", }, } @@ -75,7 +85,7 @@ def _table_to_skycoord(table: Table, equinox: Time, epoch: Time): Returns ------- coords : astropy.coordinates.SkyCoord - SkyCoord object with RA, Dec, equinox, and proper motion parameters. + SkyCoord object with RA, Dec, equinox, and proper motion parameters. """ # We need to remove any nan values from our proper motion list # Doing this will allow objects which do not have proper motion to still be displayed @@ -111,7 +121,28 @@ def _table_to_skycoord(table: Table, equinox: Time, epoch: Time): def _get_return_columns(columns): """Convenience function to reorder columns and remove motion columns.""" - return ['RA', 'Dec', 'Separation', 'Relative_Flux', *list(set(columns) - set(['RA', 'Dec', 'RAJ2000', 'DEJ2000', 'Plx', 'pmRA', 'pmDE', 'Separation', 'Relative_Flux']))] + return [ + "RA", + "Dec", + "Separation", + "Relative_Flux", + *list( + set(columns) + - set( + [ + "RA", + "Dec", + "RAJ2000", + "DEJ2000", + "Plx", + "pmRA", + "pmDE", + "Separation", + "Relative_Flux", + ] + ) + ), + ] def query_catalog( @@ -221,20 +252,26 @@ def query_catalog( prefix = catalog_meta["prefix"] result["ID"] = [f"{prefix} {id}" for id in result["ID"]] - c = _table_to_skycoord(table=result, equinox=catalog_meta['equinox'], epoch=epoch) + c = _table_to_skycoord(table=result, equinox=catalog_meta["equinox"], epoch=epoch) ref_index = np.argmin(coord.separation(c).arcsecond) sep = c[ref_index].separation(c) - + if return_skycoord: s = np.argsort(sep.deg) return c[s] - + result["RA"] = c.ra.deg result["Dec"] = c.dec.deg result["Separation"] = sep.arcsecond # Calculate the relative flux - result["Relative_Flux"] = 10 ** ((result[catalog_meta["default_mag"]] - result[catalog_meta["default_mag"]][ref_index])/-2.5) + result["Relative_Flux"] = 10 ** ( + ( + result[catalog_meta["default_mag"]] + - result[catalog_meta["default_mag"]][ref_index] + ) + / -2.5 + ) # Now sort the table based on separation result.sort(["Separation"]) @@ -244,7 +281,7 @@ def query_catalog( def query_KIC( coord: SkyCoord, - epoch: Time=Time(2000, format="jyear", scale="tt"), + epoch: Time = Time(2000, format="jyear", scale="tt"), radius: Union[float, u.Quantity] = u.Quantity(2, "pixel"), magnitude_limit: float = 18.0, return_skycoord: bool = False, @@ -286,7 +323,7 @@ def query_KIC( def query_TIC( coord: SkyCoord, - epoch: Time=Time(2000, format="jyear", scale="tt"), + epoch: Time = Time(2000, format="jyear", scale="tt"), radius: Union[float, u.Quantity] = u.Quantity(2, "pixel"), magnitude_limit: float = 18.0, return_skycoord: bool = False, @@ -328,7 +365,7 @@ def query_TIC( def query_EPIC( coord: SkyCoord, - epoch: Time=Time(2000, format="jyear", scale="tt"), + epoch: Time = Time(2000, format="jyear", scale="tt"), radius: Union[float, u.Quantity] = u.Quantity(2, "pixel"), magnitude_limit: float = 18.0, return_skycoord: bool = False, @@ -370,7 +407,7 @@ def query_EPIC( def query_gaia( coord: SkyCoord, - epoch: Time=Time(2016, format="jyear", scale="tt"), + epoch: Time = Time(2016, format="jyear", scale="tt"), radius: Union[float, u.Quantity] = u.Quantity(10, "arcsecond"), magnitude_limit: float = 18.0, return_skycoord: bool = False, From c1190c637b12e3dbed9ab79c433318ff3066b0aa Mon Sep 17 00:00:00 2001 From: Christina Hedges Date: Tue, 30 Jul 2024 09:54:45 -0400 Subject: [PATCH 06/15] hotfix name resolve [skip ci] --- src/lksearch/catalog.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lksearch/catalog.py b/src/lksearch/catalog.py index 46fafba..41980d0 100644 --- a/src/lksearch/catalog.py +++ b/src/lksearch/catalog.py @@ -181,7 +181,8 @@ def query_catalog( if not isinstance(coord, SkyCoord): if isinstance(coord, str): coord = SkyCoord.from_name(coord) - raise TypeError("Must pass an `astropy.coordinates.SkyCoord` object.") + else: + raise TypeError("Must pass an `astropy.coordinates.SkyCoord` object.") if not isinstance(epoch, Time): try: epoch = Time(epoch, format="jd") From e765afd228d0d097fa163168c621dbf01c99988b Mon Sep 17 00:00:00 2001 From: Christina Hedges Date: Mon, 5 Aug 2024 16:09:07 -0400 Subject: [PATCH 07/15] update docs --- docs/tutorials/catalog-searches.ipynb | 295 ++++++++++++++++++-------- src/lksearch/KeplerSearch.py | 3 - src/lksearch/catalog.py | 89 ++++++-- 3 files changed, 281 insertions(+), 106 deletions(-) diff --git a/docs/tutorials/catalog-searches.ipynb b/docs/tutorials/catalog-searches.ipynb index bfbfec6..b2ad4e1 100644 --- a/docs/tutorials/catalog-searches.ipynb +++ b/docs/tutorials/catalog-searches.ipynb @@ -36,9 +36,35 @@ "import astropy.units as u" ] }, + { + "cell_type": "markdown", + "id": "889a4743-c6ee-4cea-98ad-012aeaec9975", + "metadata": {}, + "source": [ + "Before we search we need a sky position to search. `lksearch` catalog queries use `astropy`'s `SkyCoord` as an input. We can either make one ourselves with an RA and Dec, or we can use the built in `from_name` method." + ] + }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 13, + "id": "f98f6097-1f3e-433b-8337-617978b86b9b", + "metadata": {}, + "outputs": [], + "source": [ + "c = SkyCoord.from_name('Kepler-10')" + ] + }, + { + "cell_type": "markdown", + "id": "6a752678-93a8-4848-9365-ff41e54ae094", + "metadata": {}, + "source": [ + "Now we have a position we want to query, we can query each catalog. For example, here is the query for KIC" + ] + }, + { + "cell_type": "code", + "execution_count": 14, "id": "fd0abec3-8b85-4812-aafb-ca13a94d306c", "metadata": {}, "outputs": [ @@ -68,6 +94,8 @@ " Separation\n", " Relative_Flux\n", " Kepmag\n", + " Teff\n", + " logg\n", " \n", " \n", " ID\n", @@ -76,6 +104,8 @@ " \n", " \n", " \n", + " \n", + " \n", " \n", " \n", " \n", @@ -86,6 +116,8 @@ " 0.000000\n", " 1.000000\n", " 10.961000\n", + " 5491\n", + " 4.467\n", " \n", " \n", " KIC 11904160\n", @@ -94,25 +126,31 @@ " 5.345214\n", " 0.006644\n", " 16.405001\n", + " <NA>\n", + " NaN\n", " \n", " \n", "\n", "" ], "text/plain": [ - " RA Dec Separation Relative_Flux Kepmag\n", - "ID \n", - "KIC 11904151 285.67938 50.241299 0.000000 1.000000 10.961000\n", - "KIC 11904160 285.68076 50.242493 5.345214 0.006644 16.405001" + " RA Dec Separation Relative_Flux Kepmag \\\n", + "ID \n", + "KIC 11904151 285.67938 50.241299 0.000000 1.000000 10.961000 \n", + "KIC 11904160 285.68076 50.242493 5.345214 0.006644 16.405001 \n", + "\n", + " Teff logg \n", + "ID \n", + "KIC 11904151 5491 4.467 \n", + "KIC 11904160 NaN " ] }, - "execution_count": 4, + "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "c = SkyCoord.from_name('Kepler-10')\n", "query_KIC(c)" ] }, @@ -126,7 +164,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 15, "id": "e3499cc9-33b4-4d21-b734-ed6398539442", "metadata": {}, "outputs": [ @@ -156,6 +194,8 @@ " Separation\n", " Relative_Flux\n", " Kepmag\n", + " Teff\n", + " logg\n", " \n", " \n", " ID\n", @@ -164,6 +204,8 @@ " \n", " \n", " \n", + " \n", + " \n", " \n", " \n", " \n", @@ -174,6 +216,8 @@ " 0.000000\n", " 1.000000\n", " 10.961000\n", + " 5491\n", + " 4.467\n", " \n", " \n", " KIC 11904160\n", @@ -182,25 +226,31 @@ " 5.345214\n", " 0.006644\n", " 16.405001\n", + " <NA>\n", + " NaN\n", " \n", " \n", "\n", "" ], "text/plain": [ - " RA Dec Separation Relative_Flux Kepmag\n", - "ID \n", - "KIC 11904151 285.67938 50.241299 0.000000 1.000000 10.961000\n", - "KIC 11904160 285.68076 50.242493 5.345214 0.006644 16.405001" + " RA Dec Separation Relative_Flux Kepmag \\\n", + "ID \n", + "KIC 11904151 285.67938 50.241299 0.000000 1.000000 10.961000 \n", + "KIC 11904160 285.68076 50.242493 5.345214 0.006644 16.405001 \n", + "\n", + " Teff logg \n", + "ID \n", + "KIC 11904151 5491 4.467 \n", + "KIC 11904160 NaN " ] }, - "execution_count": 5, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "c = SkyCoord.from_name('Kepler-10')\n", "query_KIC(c, epoch=Time.now())" ] }, @@ -214,7 +264,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 16, "id": "37e4bc44-5a6c-4dbd-a4e0-31f0a8c98184", "metadata": {}, "outputs": [ @@ -244,6 +294,8 @@ " Separation\n", " Relative_Flux\n", " Kepmag\n", + " Teff\n", + " logg\n", " \n", " \n", " ID\n", @@ -252,6 +304,8 @@ " \n", " \n", " \n", + " \n", + " \n", " \n", " \n", " \n", @@ -262,6 +316,8 @@ " 0.000000\n", " 1.000000\n", " 10.961000\n", + " 5491\n", + " 4.467\n", " \n", " \n", " KIC 11904160\n", @@ -270,6 +326,8 @@ " 5.345214\n", " 0.006644\n", " 16.405001\n", + " <NA>\n", + " NaN\n", " \n", " \n", " KIC 11904165\n", @@ -278,6 +336,8 @@ " 8.732390\n", " 0.002660\n", " 17.399000\n", + " <NA>\n", + " NaN\n", " \n", " \n", " KIC 11904162\n", @@ -286,27 +346,35 @@ " 10.348793\n", " 0.001576\n", " 17.966999\n", + " <NA>\n", + " NaN\n", " \n", " \n", "\n", "" ], "text/plain": [ - " RA Dec Separation Relative_Flux Kepmag\n", - "ID \n", - "KIC 11904151 285.67938 50.241299 0.000000 1.000000 10.961000\n", - "KIC 11904160 285.68076 50.242493 5.345214 0.006644 16.405001\n", - "KIC 11904165 285.68317 50.241207 8.732390 0.002660 17.399000\n", - "KIC 11904162 285.68124 50.243916 10.348793 0.001576 17.966999" + " RA Dec Separation Relative_Flux Kepmag \\\n", + "ID \n", + "KIC 11904151 285.67938 50.241299 0.000000 1.000000 10.961000 \n", + "KIC 11904160 285.68076 50.242493 5.345214 0.006644 16.405001 \n", + "KIC 11904165 285.68317 50.241207 8.732390 0.002660 17.399000 \n", + "KIC 11904162 285.68124 50.243916 10.348793 0.001576 17.966999 \n", + "\n", + " Teff logg \n", + "ID \n", + "KIC 11904151 5491 4.467 \n", + "KIC 11904160 NaN \n", + "KIC 11904165 NaN \n", + "KIC 11904162 NaN " ] }, - "execution_count": 6, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "c = SkyCoord.from_name('Kepler-10')\n", "query_KIC(c, epoch=Time.now(), radius=3*u.pixel)" ] }, @@ -320,7 +388,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 17, "id": "631f9a71-b0f2-4cb7-9ef3-565155c0fe16", "metadata": {}, "outputs": [ @@ -350,6 +418,10 @@ " Separation\n", " Relative_Flux\n", " TESSmag\n", + " Mass\n", + " Rad\n", + " Teff\n", + " logg\n", " \n", " \n", " ID\n", @@ -358,43 +430,87 @@ " \n", " \n", " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", " \n", - " TIC 261139071\n", - " 84.257651\n", - " -80.466560\n", - " 0.000000\n", + " TIC 1717218060\n", + " NaN\n", + " NaN\n", + " NaN\n", " 1.000000\n", - " 13.995\n", + " 17.403000\n", + " 1.030\n", + " 1.055\n", + " 5771.0\n", + " 4.4043\n", + " \n", + " \n", + " TIC 377780790\n", + " 285.679225\n", + " 50.241589\n", + " NaN\n", + " 589.385986\n", + " 10.477000\n", + " 1.017\n", + " 1.090\n", + " 5706.0\n", + " 4.3707\n", + " \n", + " \n", + " TIC 377780779\n", + " 285.685984\n", + " 50.249944\n", + " NaN\n", + " 4.157191\n", + " 15.856000\n", + " 0.700\n", + " 0.805\n", + " 4467.0\n", + " 4.4721\n", " \n", " \n", - " TIC 261136679\n", - " 84.304008\n", - " -80.461959\n", - " 32.228005\n", - " 3597.491211\n", - " 5.105\n", + " TIC 1717218059\n", + " NaN\n", + " NaN\n", + " NaN\n", + " 0.643872\n", + " 17.881001\n", + " 1.070\n", + " 0.810\n", + " 5895.0\n", + " 4.6506\n", " \n", " \n", "\n", "" ], "text/plain": [ - " RA Dec Separation Relative_Flux TESSmag\n", - "ID \n", - "TIC 261139071 84.257651 -80.466560 0.000000 1.000000 13.995\n", - "TIC 261136679 84.304008 -80.461959 32.228005 3597.491211 5.105" + " RA Dec Separation Relative_Flux TESSmag \\\n", + "ID \n", + "TIC 1717218060 NaN NaN NaN 1.000000 17.403000 \n", + "TIC 377780790 285.679225 50.241589 NaN 589.385986 10.477000 \n", + "TIC 377780779 285.685984 50.249944 NaN 4.157191 15.856000 \n", + "TIC 1717218059 NaN NaN NaN 0.643872 17.881001 \n", + "\n", + " Mass Rad Teff logg \n", + "ID \n", + "TIC 1717218060 1.030 1.055 5771.0 4.4043 \n", + "TIC 377780790 1.017 1.090 5706.0 4.3707 \n", + "TIC 377780779 0.700 0.805 4467.0 4.4721 \n", + "TIC 1717218059 1.070 0.810 5895.0 4.6506 " ] }, - "execution_count": 7, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "c = SkyCoord.from_name('Pi Men c')\n", "query_TIC(c, epoch=Time.now(), radius=2*u.pixel)" ] }, @@ -403,12 +519,12 @@ "id": "a8e4e95b-5c0f-43bd-84b1-7c427fe482c1", "metadata": {}, "source": [ - "EPIC" + "EPIC (Note Kepler-10 isn't inside EPIC, because it's outside the ecliptic plane!)" ] }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 21, "id": "e21a83c5-2975-4fde-a1a0-6d5fb031e95d", "metadata": {}, "outputs": [ @@ -438,6 +554,10 @@ " Separation\n", " Relative_Flux\n", " K2mag\n", + " Mass\n", + " Rad\n", + " Teff\n", + " logg\n", " \n", " \n", " ID\n", @@ -446,34 +566,29 @@ " \n", " \n", " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", - " \n", - " EPIC 201912552\n", - " 172.56046\n", - " 7.588391\n", - " 0.0\n", - " 1.0\n", - " 12.473\n", - " \n", " \n", "\n", "" ], "text/plain": [ - " RA Dec Separation Relative_Flux K2mag\n", - "ID \n", - "EPIC 201912552 172.56046 7.588391 0.0 1.0 12.473" + "Empty DataFrame\n", + "Columns: [RA, Dec, Separation, Relative_Flux, K2mag, Mass, Rad, Teff, logg]\n", + "Index: []" ] }, - "execution_count": 8, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "c = SkyCoord.from_name('K2-18')\n", "query_EPIC(c)" ] }, @@ -487,7 +602,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 22, "id": "2f18882e-a193-4629-9681-b36ea02af6d0", "metadata": {}, "outputs": [ @@ -516,9 +631,11 @@ " Dec\n", " Separation\n", " Relative_Flux\n", - " Gmag\n", " BPmag\n", + " Gmag\n", " RPmag\n", + " Teff\n", + " logg\n", " \n", " \n", " ID\n", @@ -529,38 +646,46 @@ " \n", " \n", " \n", + " \n", + " \n", " \n", " \n", " \n", " \n", " Gaia DR3 2132155017099178624\n", - " 285.679354\n", + " 285.679353\n", " 50.241405\n", " 0.000000\n", " 1.000000\n", - " 10.920031\n", " 11.253505\n", + " 10.920031\n", " 10.418263\n", + " 5595.8\n", + " 4.3544\n", " \n", " \n", " Gaia DR3 2132155051458917632\n", " 285.680214\n", " 50.249942\n", - " 30.797921\n", + " 30.797131\n", " 0.001691\n", - " 17.849485\n", " 18.209782\n", + " 17.849485\n", " 17.317846\n", + " 5424.7\n", + " 4.6774\n", " \n", " \n", " Gaia DR3 2132155051458918144\n", " 285.685922\n", " 50.249918\n", - " 34.176508\n", + " 34.176135\n", " 0.005578\n", - " 16.553818\n", " 17.213984\n", + " 16.553818\n", " 15.778805\n", + " NaN\n", + " NaN\n", " \n", " \n", "\n", @@ -569,24 +694,29 @@ "text/plain": [ " RA Dec Separation \\\n", "ID \n", - "Gaia DR3 2132155017099178624 285.679354 50.241405 0.000000 \n", - "Gaia DR3 2132155051458917632 285.680214 50.249942 30.797921 \n", - "Gaia DR3 2132155051458918144 285.685922 50.249918 34.176508 \n", + "Gaia DR3 2132155017099178624 285.679353 50.241405 0.000000 \n", + "Gaia DR3 2132155051458917632 285.680214 50.249942 30.797131 \n", + "Gaia DR3 2132155051458918144 285.685922 50.249918 34.176135 \n", "\n", - " Relative_Flux Gmag BPmag RPmag \n", - "ID \n", - "Gaia DR3 2132155017099178624 1.000000 10.920031 11.253505 10.418263 \n", - "Gaia DR3 2132155051458917632 0.001691 17.849485 18.209782 17.317846 \n", - "Gaia DR3 2132155051458918144 0.005578 16.553818 17.213984 15.778805 " + " Relative_Flux BPmag Gmag RPmag \\\n", + "ID \n", + "Gaia DR3 2132155017099178624 1.000000 11.253505 10.920031 10.418263 \n", + "Gaia DR3 2132155051458917632 0.001691 18.209782 17.849485 17.317846 \n", + "Gaia DR3 2132155051458918144 0.005578 17.213984 16.553818 15.778805 \n", + "\n", + " Teff logg \n", + "ID \n", + "Gaia DR3 2132155017099178624 5595.8 4.3544 \n", + "Gaia DR3 2132155051458917632 5424.7 4.6774 \n", + "Gaia DR3 2132155051458918144 NaN NaN " ] }, - "execution_count": 18, + "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "c = SkyCoord.from_name('Kepler-10')\n", "query_gaia(c, epoch=Time.now(), radius=40*u.arcsecond)" ] }, @@ -600,7 +730,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 23, "id": "fb7fc90b-87ad-47a7-841f-402b2ff46867", "metadata": {}, "outputs": [ @@ -608,22 +738,21 @@ "data": { "text/plain": [ "" + " [(-18.48303831, 41.38198289, 7.55624219e-05),\n", + " ( -1.51899991, -1.20300012, 5.29000945e-06),\n", + " ( 9.40200274, 5.81399557, 2.71497329e-05)]>" ] }, - "execution_count": 29, + "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "c = SkyCoord.from_name('Kepler-10')\n", "query_gaia(c, epoch=Time.now(), radius=40*u.arcsecond, return_skycoord=True)" ] } diff --git a/src/lksearch/KeplerSearch.py b/src/lksearch/KeplerSearch.py index d2d8896..4e5cc8c 100644 --- a/src/lksearch/KeplerSearch.py +++ b/src/lksearch/KeplerSearch.py @@ -1,7 +1,6 @@ import pandas as pd from typing import Union, Optional import re -import logging import numpy as np from astropy import units as u @@ -12,8 +11,6 @@ pd.options.display.max_rows = 10 -log = logging.getLogger(__name__) - class KeplerSearch(MASTSearch): """ diff --git a/src/lksearch/catalog.py b/src/lksearch/catalog.py index 41980d0..b34d841 100644 --- a/src/lksearch/catalog.py +++ b/src/lksearch/catalog.py @@ -18,7 +18,18 @@ _Catalog_Dictionary = { "kic": { "catalog": "V/133/kic", - "columns": ["KIC", "RAJ2000", "DEJ2000", "pmRA", "pmDE", "Plx", "kepmag"], + "columns": [ + "KIC", + "RAJ2000", + "DEJ2000", + "pmRA", + "pmDE", + "Plx", + "kepmag", + "Radius", + "Teff", + "logg", + ], "column_filters": "kepmag", "rename_in": ["KIC", "kepmag"], "rename_out": ["ID", "Kepmag"], @@ -28,7 +39,19 @@ }, "epic": { "catalog": "IV/34/epic", - "columns": ["ID", "RAJ2000", "DEJ2000", "pmRA", "pmDEC", "plx", "Kpmag"], + "columns": [ + "ID", + "RAJ2000", + "DEJ2000", + "pmRA", + "pmDEC", + "plx", + "Kpmag", + "logg", + "Teff", + "Rad", + "Mass", + ], "column_filters": "Kpmag", "rename_in": ["Kpmag", "pmDEC", "plx"], "rename_out": ["K2mag", "pmDE", "Plx"], @@ -38,7 +61,19 @@ }, "tic": { "catalog": "IV/39/tic82", - "columns": ["TIC", "RAJ2000", "DEJ2000", "pmRA", "pmDE", "Plx", "Tmag"], + "columns": [ + "TIC", + "RAJ2000", + "DEJ2000", + "pmRA", + "pmDE", + "Plx", + "Tmag", + "logg", + "Teff", + "Rad", + "Mass", + ], "column_filters": "Tmag", "rename_in": ["TIC", "Tmag"], "rename_out": ["ID", "TESSmag"], @@ -58,6 +93,8 @@ "Gmag", "BPmag", "RPmag", + "logg", + "Teff", ], "column_filters": "Gmag", "rename_in": ["DR3Name"], @@ -121,29 +158,41 @@ def _table_to_skycoord(table: Table, equinox: Time, epoch: Time): def _get_return_columns(columns): """Convenience function to reorder columns and remove motion columns.""" - return [ + + downselect_columns = list( + set(columns) + - set( + [ + "RA", + "Dec", + "RAJ2000", + "DEJ2000", + "Plx", + "pmRA", + "pmDE", + "Separation", + "Relative_Flux", + ] + ) + ) + + downselect_columns = np.hstack( + [ + np.sort([i for i in downselect_columns if i.endswith("mag")]), + np.sort([i for i in downselect_columns if not i.endswith("mag")]), + ] + ) + + new_columns = [ "RA", "Dec", "Separation", "Relative_Flux", - *list( - set(columns) - - set( - [ - "RA", - "Dec", - "RAJ2000", - "DEJ2000", - "Plx", - "pmRA", - "pmDE", - "Separation", - "Relative_Flux", - ] - ) - ), + *downselect_columns, ] + return new_columns + def query_catalog( coord: Union[SkyCoord, str], From 28725e3fbc9d2bb269fc5fc881b7ba4c48da6e39 Mon Sep 17 00:00:00 2001 From: Tyler Pritchard Date: Mon, 7 Oct 2024 15:18:45 -0400 Subject: [PATCH 08/15] pre-meeting commit --- src/lksearch/CatalogSearch.py | 551 ++++++++++++++++++ src/lksearch/__init__.py | 5 +- src/lksearch/catalog.py | 495 ---------------- ...catalog.py => test_catalogs_conesearch.py} | 96 +-- tests/test_catalogs_idsearch.py | 87 +++ .../{test_search.py => test_missionsearch.py} | 0 6 files changed, 701 insertions(+), 533 deletions(-) create mode 100644 src/lksearch/CatalogSearch.py delete mode 100644 src/lksearch/catalog.py rename tests/{test_query_catalog.py => test_catalogs_conesearch.py} (53%) create mode 100644 tests/test_catalogs_idsearch.py rename tests/{test_search.py => test_missionsearch.py} (100%) diff --git a/src/lksearch/CatalogSearch.py b/src/lksearch/CatalogSearch.py new file mode 100644 index 0000000..7452291 --- /dev/null +++ b/src/lksearch/CatalogSearch.py @@ -0,0 +1,551 @@ +"""Catalog class to search various catalogs for missions""" + +from typing import Union +import numpy as np + +from astropy.coordinates import Angle, SkyCoord, Distance +from astropy.table import Table +from astropy.time import Time +import astropy.units as u + +from astroquery.vizier import Vizier +from astroquery.utils.tap.core import TapPlus + +import pandas as pd + +import warnings + +# This is a lits of VizieR catalogs and their input parameters to be used in the +# query_skycatalog function +# TODO Should this be a Configuration Parameter? +_Catalog_Dictionary = { + "kic": { + "catalog": "V/133/kic", + "columns": [ + "KIC", + "RAJ2000", + "DEJ2000", + "pmRA", + "pmDE", + "Plx", + "kepmag", + "Radius", + "Teff", + "logg", + ], + "column_filters": "kepmag", + "rename_in": ["KIC", "kepmag"], + "rename_out": ["ID", "Kepmag"], + "equinox": Time(2000, format="jyear", scale="tt"), + "prefix": "KIC", + "default_mag": "Kepmag", + "default_id_column": "KIC", + "crossmatch_catalogs": "tic", # gaia->tess->Kepler? possible but convoluted + "crossmatch_type": "tic", + "crossmatch_columns": None, + }, + "epic": { + "catalog": "IV/34/epic", + "columns": [ + "ID", + "RAJ2000", + "DEJ2000", + "pmRA", + "pmDEC", + "plx", + "Kpmag", + "logg", + "Teff", + "Rad", + "Mass", + ], + "column_filters": "Kpmag", + "rename_in": ["Kpmag", "pmDEC", "plx"], + "rename_out": ["K2mag", "pmDE", "Plx"], + "equinox": Time(2000, format="jyear", scale="tt"), + "prefix": "EPIC", + "default_mag": "K2mag", + "default_id_column": "ID", + "crossmatch_catalogs": None, + }, + "tic": { + "catalog": "IV/39/tic82", + "columns": [ + "TIC", + "RAJ2000", + "DEJ2000", + "pmRA", + "pmDE", + "Plx", + "Tmag", + "logg", + "Teff", + "Rad", + "Mass", + ], + "column_filters": "Tmag", + "rename_in": ["TIC", "Tmag"], + "rename_out": ["ID", "TESSmag"], + "equinox": Time(2000, format="jyear", scale="tt"), + "prefix": "TIC", + "default_mag": "TESSmag", + "default_id_column": "TIC", + "crossmatch_catalogs": ["gaiadr3", "kic"], # WISE, TYCHO2 + "crossmatch_type": "column", + "crossmatch_column_id": {"kic": "KIC", "gaiadr3": "GAIA"}, + }, + "gaiadr3": { + "catalog": "I/355/gaiadr3", + "columns": [ + "DR3Name", + "RAJ2000", + "DEJ2000", + "pmRA", + "pmDE", + "Plx", + "Gmag", + "BPmag", + "RPmag", + "logg", + "Teff", + ], + "column_filters": "Gmag", + "rename_in": ["DR3Name"], + "rename_out": ["ID"], + "equinox": Time(2016, format="jyear", scale="tt"), + "prefix": None, + "default_mag": "Gmag", + "default_id_column": "Source", + "crossmatch_catalogs": ["tic", "kic"], + "crossmatch_type": "tic", + "crossmatch_column_id": None, + }, +} + +# Connect to the Vizier TAP server here so that we only do this once +VizTap = TapPlus(url="http://TAPVizieR.u-strasbg.fr/TAPVizieR/tap/") + +# TODO Swap this out with a configuration parameter maybe? +# Or None and Raise Exception +_default_catalog = "tic" + + +# Construct exact ID TAP queries for various surveys +def _get_TAP_Query(catalog: str, ID: str, max_results: int = None, id_column=None): + if catalog not in _Catalog_Dictionary.keys(): + raise ValueError(f"{catalog} not found in TAP catalogs list") + if max_results is None: + max_results = len(ID.split(",")) + if id_column is None: + id_column = _Catalog_Dictionary[catalog]["default_id_column"] + + query_model = f""" SELECT TOP {max_results} * + FROM "{_Catalog_Dictionary[catalog]["catalog"]}" + WHERE {id_column} IN({ID}) """ + + return query_model + + +def Query( + search_input: Union[str, SkyCoord, tuple, list[str, SkyCoord, tuple]], + catalog: str = None, + radius: Union[float, str] = None, + epoch: Time = None, +) -> None: + search_result = None + search_object, search_catalog = _parse_search_input(search_input, catalog=catalog) + if isinstance(search_object, SkyCoord): + search_result = QueryPosition( + search_object, catalog=search_catalog, radius=radius, epoch=epoch + ) + elif isinstance(search_object, str): + search_result = QueryID(search_object, catalog=search_catalog) + else: + raise TypeError("Unable to resolve catalog search type") + + return search_result + + +def _parse_search_input(search_input, catalog: str = None): + if isinstance(search_input, SkyCoord): + search_object = search_input + elif isinstance(search_input, tuple): + search_object = SkyCoord(search_input[0], search_input[1], unit="deg") + elif isinstance(search_input, str): + # Try to turn the passed string into a SkyCoord. + try: + search_object = SkyCoord(search_input) + except ValueError: + # If this fails assume we were given an object name + search_object = search_input + # If no catalog is specified, see if we can infer a preffered catalog + if catalog is None: + search_catalog, _ = _match_target_catalog(search_input) + else: + raise TypeError("Cannot Resolve type of search input") + + # If a catalog is passed make this the catalog to search + # Else use a default catalog(tic?) if none is assigned + if isinstance(catalog, str): + search_catalog = catalog + elif catalog is None: + search_catalog = None + return search_object, search_catalog + + +def _match_target_catalog(search_input): + if search_input.isnumeric(): + # If string is purelt numbers, make no assumptions + search_string = search_input + search_catalog = None + elif search_input[0:3].lower() == "tic": + search_catalog = "tic" + search_string = search_input[3:] + elif search_input[0:4].lower() == "tess": + search_catalog = "tic" + search_string = search_input[4:] + elif search_input[0:3].lower() == "kic": + search_catalog = "kic" + search_string = search_input[3:] + elif search_input[0:4].lower() == "kplr": + search_catalog = "kic" + search_string = search_input[4:] + elif search_input[0:4].lower() == "epic": + search_catalog = "epic" + search_string = search_input[4:] + elif search_input[0:4].lower() == "ktwo": + search_catalog = "epic" + search_string = search_input[4:] + elif search_input[0:7].lower() == "gaiadr3": + search_catalog = "gaiadr3" + search_string = search_input[7:] + elif search_input[0:4].lower() == "gaia" and search_input[4:6].lower() != "dr": + search_string = search_input[4:] + search_catalog = "gaiadr3" + else: + # If we cannot parse a catalog, make no assumptions + search_catalog = (None,) + search_string = search_input + return search_catalog, search_string + + +def _parse_id_list(search_object): + ids = [_parse_id(item)[0] for item in search_object] + id_list = ", ".join(str(id) for id in ids) + return id_list + + +def _parse_id(search_item): + if isinstance(search_item, int): + id = str(search_item) + scat = None + elif isinstance(search_item, str): + scat, id = _match_target_catalog(search_item) + else: + id = None + scat = None + + return id, scat + + +def QueryID( + search_object: Union[str, list[str]], + catalog: Union[str, int, list[str, int]] = None, + input_catalog: str = None, + max_results: int = None, +): + id_column = None + + if isinstance(search_object, list): + id_list = _parse_id_list(search_object) + else: + id_list, scat = _parse_id(search_object) + # IF we can figure out the soruce catalog from context - + # EG TIC Blah, assume the catalog to search is the catalog detected + # And th + if catalog is None and scat is not None: + catalog = scat + if input_catalog is None and scat is not None: + input_catalog = scat + + # Assuming a 1:1 match. TODO is this a bad assumption? + if max_results is None: + max_results = len(np.atleast_1d(search_object)) + + if catalog is not None and input_catalog is not None: + if catalog != input_catalog: + max_results = max_results * 10 + if input_catalog in np.atleast_1d( + _Catalog_Dictionary[catalog]["crossmatch_catalogs"] + ): + if _Catalog_Dictionary[catalog]["crossmatch_type"] == "tic": + # TIC is is crossmatched with gaiadr3/kic + # If KIC/gaia Info for a TIC Object is desired - search TIC to get KIC/gaia ids + # Then Search KIC + new_id_table = _QueryID( + "tic", id_list, max_results, id_column=id_column + ) + id_list = ", ".join( + new_id_table[ + _Catalog_Dictionary["tic"]["crossmatch_column_id"][catalog] + ] + .astype(str) + .values + ) + if _Catalog_Dictionary[catalog]["crossmatch_type"] == "column": + # TIC is is crossmatched with gaiadr3/kic + # If we want TIC Info for a gaiadr3/KIC source - match appropriate column in TIC + id_column = _Catalog_Dictionary[catalog]["crossmatch_column_id"][ + input_catalog + ] + else: + raise ValueError( + f"{input_catalog} does not have crossmatched IDs with {catalog}. {catalog} can be crossmatched with {_Catalog_Dictionary[catalog]["crossmatch_catalogs"]}" + ) + else: + if catalog is None: + catalog = _default_catalog + + results_table = _QueryID(catalog, id_list, max_results, id_column=id_column) + return results_table + + +def _QueryID(catalog: str, id_list: str, max_results: int, id_column: str = None): + query = _get_TAP_Query( + catalog, id_list, max_results=max_results, id_column=id_column + ) + if max_results > 1e3: + # we should chex max_results and if low do a synchronous query, if large async + job = VizTap.launch_job_async(query) + results_table = job.get_data() + else: + job = VizTap.launch_job(query) + results_table = job.get_data() + return results_table.to_pandas() + + +def QueryPosition( + search_input: Union[str, SkyCoord, tuple, list[str, SkyCoord, tuple]], + epoch: Union[str, Time] = None, + catalog: str = None, + radius: Union[float, u.Quantity] = u.Quantity(100, "arcsecond"), + magnitude_limit: float = 18.0, + return_skycoord: bool = False, +): + """ + Query a catalog for a single source location, obtain nearby sources + Parameters + ---------- + coord : astropy.coordinates.SkyCoord or string + Coordinates around which to do a radius query. If passed a string, will resolve using `from_name`. + epoch: astropy.time.Time + The time of observation in JD. + catalog: str + The catalog to query, either 'kepler', 'k2', or 'tess', 'gaia' + radius : float or astropy quantity + Radius in arcseconds to query + magnitude_limit : float + A value to limit the results in based on the Tmag/Kepler mag/K2 mag or Gaia G mag. Default, 18. + return_skycoord: bool + Whether to return an astropy.coordinates.SkyCoord object. Default is False. + Returns + ------- + result: pd.DataFrame or astropy.coordinates.SkyCoord + By default returns a pandas dataframe of the sources within radius query, corrected for proper motion. Optionally will return astropy.coordinates.SkyCoord object. + """ + + coord, search_catalog = _parse_search_input(search_input, catalog=catalog) + if search_catalog is None: + search_catalog = _default_catalog + # TODO this was made optional so we could try and intuit a catalog + # if we don't want a default we could raise an exception here instead + + # Check to make sure that user input is in the correct format + if not isinstance(coord, SkyCoord): + if isinstance(coord, str): + coord = SkyCoord.from_name(coord) + else: + raise TypeError(f"could not resolve {coord} to SkyCoord") + if epoch is not None: + if not isinstance(epoch, Time): + try: + epoch = Time(epoch, format="jd") + except ValueError: + raise TypeError( + "Must pass an `astropy.time.Time object` or parsable object." + ) + raise TypeError( + "Must pass an `astropy.time.Time object` or parsable object." + ) + if not coord.isscalar: + raise ValueError("must pass one target only.") + + # Here we check to make sure that the radius entered is in arcseconds + # This also means we do not need to specify arcseconds in our catalog query + # TODO The tests had pixscale in them - do we want this? + try: + radius = u.Quantity(radius, "arcsecond") + except u.UnitConversionError: + raise + + # Check to make sure that the catalog provided by the user is valid for this function + if search_catalog.lower() not in _Catalog_Dictionary.keys(): + raise ValueError(f"Can not parse catalog name '{catalog}'") + catalog_meta = _Catalog_Dictionary[search_catalog.lower()] + + # Get the Vizier catalog name + catalog_name = catalog_meta["catalog"] + + # Get the appropriate column names and filters to be applied + filters = Vizier( + columns=catalog_meta["columns"], + column_filters={catalog_meta["column_filters"]: f"<{magnitude_limit}"}, + ) + # The catalog can cut off at 50 - we dont want this to happen + filters.ROW_LIMIT = -1 + # Now query the catalog + result = filters.query_region(coord, catalog=catalog_name, radius=Angle(radius)) + if len(result) == 0: + result = ( + pd.DataFrame( + columns=[ + *catalog_meta["columns"], + "RA", + "Dec", + "Separation", + "Relative_Flux", + ] + ) + .rename( + { + i: o + for i, o in zip( + catalog_meta["rename_in"], catalog_meta["rename_out"] + ) + }, + axis=1, + ) + .set_index("ID") + ) + return result[_get_return_columns(result.columns)] + result = result[catalog_name] + # Rename the columns so that the output is uniform + result.rename_columns( + catalog_meta["rename_in"], + catalog_meta["rename_out"], + ) + if catalog_meta["prefix"] is not None: + prefix = catalog_meta["prefix"] + result["ID"] = [f"{prefix} {id}" for id in result["ID"]] + if epoch is None: + epoch = catalog_meta["equinox"] + c = _table_to_skycoord(table=result, equinox=catalog_meta["equinox"], epoch=epoch) + ref_index = np.argmin(coord.separation(c).arcsecond) + sep = c[ref_index].separation(c) + if return_skycoord: + s = np.argsort(sep.deg) + return c[s] + result["RA"] = c.ra.deg + result["Dec"] = c.dec.deg + result["Separation"] = sep.arcsecond + # Calculate the relative flux + result["Relative_Flux"] = 10 ** ( + ( + result[catalog_meta["default_mag"]] + - result[catalog_meta["default_mag"]][ref_index] + ) + / -2.5 + ) + # Now sort the table based on separation + result.sort(["Separation"]) + result = result.to_pandas().set_index("ID") + return result[_get_return_columns(result.columns)] + + +def _get_return_columns(columns): + """Convenience function to reorder columns and remove motion columns.""" + downselect_columns = list( + set(columns) + - set( + [ + "RA", + "Dec", + "RAJ2000", + "DEJ2000", + "Plx", + "pmRA", + "pmDE", + "Separation", + "Relative_Flux", + ] + ) + ) + downselect_columns = np.hstack( + [ + np.sort([i for i in downselect_columns if i.endswith("mag")]), + np.sort([i for i in downselect_columns if not i.endswith("mag")]), + ] + ) + new_columns = [ + "RA", + "Dec", + "Separation", + "Relative_Flux", + *downselect_columns, + ] + return new_columns + + +def _table_to_skycoord(table: Table, equinox: Time, epoch: Time): + """ + Convert a table input to astropy.coordinates.SkyCoord object + + Parameters + ---------- + table : astropy.table.Table + astropy.table.Table which contains the coordinates of targets and proper motion values + equinox: astropy.time.Time + The equinox for the catalog + epoch : astropy.time.Time + Desired time of the observation + + Returns + ------- + coords : astropy.coordinates.SkyCoord + SkyCoord object with RA, Dec, equinox, and proper motion parameters. + """ + # We need to remove any nan values from our proper motion list + # Doing this will allow objects which do not have proper motion to still be displayed + table["pmRA"] = np.ma.filled(table["pmRA"].astype(float), 0.0) + table["pmDE"] = np.ma.filled(table["pmDE"].astype(float), 0.0) + # If an object does not have a parallax then we treat it as if the object is an "infinite distance" + # and set the parallax to 1e-7 arcseconds or 10Mpc. + table["Plx"] = np.ma.filled(table["Plx"].astype(float), 1e-4) + + # Suppress warning caused by Astropy as noted in issue 111747 (https://github.com/astropy/astropy/issues/11747) + with warnings.catch_warnings(): + warnings.filterwarnings("ignore", message="negative parallaxes") + + # Get the input data from the table + c = SkyCoord( + ra=table["RAJ2000"], + dec=table["DEJ2000"], + distance=Distance(parallax=table["Plx"].quantity, allow_negative=True), + pm_ra_cosdec=table["pmRA"], + pm_dec=table["pmDE"], + frame="icrs", + obstime=equinox, + ) + + # Suppress warning caused by Astropy as noted in issue 111747 (https://github.com/astropy/astropy/issues/11747) + if epoch != equinox: + with warnings.catch_warnings(): + warnings.filterwarnings("ignore", message="ERFA function") + warnings.filterwarnings("ignore", message="invalid value") + c = c.apply_space_motion(new_obstime=epoch) + return c + + +class CatalogResult(pd.DataFrame): + def to_SkyCoord(self, equinox: Time, epoch: Time): + _table_to_skycoord(Table.from_pandas(self), equinox, epoch) diff --git a/src/lksearch/__init__.py b/src/lksearch/__init__.py index e784a5a..f0a660e 100644 --- a/src/lksearch/__init__.py +++ b/src/lksearch/__init__.py @@ -85,4 +85,7 @@ class Conf(_config.ConfigNamespace): from .TESSSearch import TESSSearch # noqa from .KeplerSearch import KeplerSearch # noqa from .K2Search import K2Search # noqa -from .catalog import * # noqa + +# from .catalog import * # noqa +# from .CatalogSearch import CatalogSearch # noqa +from . import CatalogSearch # noqa diff --git a/src/lksearch/catalog.py b/src/lksearch/catalog.py deleted file mode 100644 index b34d841..0000000 --- a/src/lksearch/catalog.py +++ /dev/null @@ -1,495 +0,0 @@ -"""Functions to search various catalogs for missions""" - -from typing import Union -import numpy as np -from astropy.coordinates import Angle, SkyCoord, Distance -from astropy.table import Table -from astropy.time import Time -import astropy.units as u -from astroquery.vizier import Vizier -import pandas as pd - -import warnings - -__all__ = ["query_KIC", "query_EPIC", "query_TIC", "query_gaia", "query_catalog"] - -# This is a lits of VizieR catalogs and their input parameters to be used in the -# query_skycatalog function -_Catalog_Dictionary = { - "kic": { - "catalog": "V/133/kic", - "columns": [ - "KIC", - "RAJ2000", - "DEJ2000", - "pmRA", - "pmDE", - "Plx", - "kepmag", - "Radius", - "Teff", - "logg", - ], - "column_filters": "kepmag", - "rename_in": ["KIC", "kepmag"], - "rename_out": ["ID", "Kepmag"], - "equinox": Time(2000, format="jyear", scale="tt"), - "prefix": "KIC", - "default_mag": "Kepmag", - }, - "epic": { - "catalog": "IV/34/epic", - "columns": [ - "ID", - "RAJ2000", - "DEJ2000", - "pmRA", - "pmDEC", - "plx", - "Kpmag", - "logg", - "Teff", - "Rad", - "Mass", - ], - "column_filters": "Kpmag", - "rename_in": ["Kpmag", "pmDEC", "plx"], - "rename_out": ["K2mag", "pmDE", "Plx"], - "equinox": Time(2000, format="jyear", scale="tt"), - "prefix": "EPIC", - "default_mag": "K2mag", - }, - "tic": { - "catalog": "IV/39/tic82", - "columns": [ - "TIC", - "RAJ2000", - "DEJ2000", - "pmRA", - "pmDE", - "Plx", - "Tmag", - "logg", - "Teff", - "Rad", - "Mass", - ], - "column_filters": "Tmag", - "rename_in": ["TIC", "Tmag"], - "rename_out": ["ID", "TESSmag"], - "equinox": Time(2000, format="jyear", scale="tt"), - "prefix": "TIC", - "default_mag": "TESSmag", - }, - "gaiadr3": { - "catalog": "I/355/gaiadr3", - "columns": [ - "DR3Name", - "RAJ2000", - "DEJ2000", - "pmRA", - "pmDE", - "Plx", - "Gmag", - "BPmag", - "RPmag", - "logg", - "Teff", - ], - "column_filters": "Gmag", - "rename_in": ["DR3Name"], - "rename_out": ["ID"], - "equinox": Time(2016, format="jyear", scale="tt"), - "prefix": None, - "default_mag": "Gmag", - }, -} - - -def _table_to_skycoord(table: Table, equinox: Time, epoch: Time): - """ - Convert a table input to astropy.coordinates.SkyCoord object - - Parameters - ---------- - table : astropy.table.Table - astropy.table.Table which contains the coordinates of targets and proper motion values - equinox: astropy.time.Time - The equinox for the catalog - epoch : astropy.time.Time - Desired time of the observation - - Returns - ------- - coords : astropy.coordinates.SkyCoord - SkyCoord object with RA, Dec, equinox, and proper motion parameters. - """ - # We need to remove any nan values from our proper motion list - # Doing this will allow objects which do not have proper motion to still be displayed - table["pmRA"] = np.ma.filled(table["pmRA"].astype(float), 0.0) - table["pmDE"] = np.ma.filled(table["pmDE"].astype(float), 0.0) - # If an object does not have a parallax then we treat it as if the object is an "infinite distance" - # and set the parallax to 1e-7 arcseconds or 10Mpc. - table["Plx"] = np.ma.filled(table["Plx"].astype(float), 1e-4) - - # Suppress warning caused by Astropy as noted in issue 111747 (https://github.com/astropy/astropy/issues/11747) - with warnings.catch_warnings(): - warnings.filterwarnings("ignore", message="negative parallaxes") - - # Get the input data from the table - c = SkyCoord( - ra=table["RAJ2000"], - dec=table["DEJ2000"], - distance=Distance(parallax=table["Plx"].quantity, allow_negative=True), - pm_ra_cosdec=table["pmRA"], - pm_dec=table["pmDE"], - frame="icrs", - obstime=equinox, - ) - - # Suppress warning caused by Astropy as noted in issue 111747 (https://github.com/astropy/astropy/issues/11747) - if epoch != equinox: - with warnings.catch_warnings(): - warnings.filterwarnings("ignore", message="ERFA function") - warnings.filterwarnings("ignore", message="invalid value") - c = c.apply_space_motion(new_obstime=epoch) - return c - - -def _get_return_columns(columns): - """Convenience function to reorder columns and remove motion columns.""" - - downselect_columns = list( - set(columns) - - set( - [ - "RA", - "Dec", - "RAJ2000", - "DEJ2000", - "Plx", - "pmRA", - "pmDE", - "Separation", - "Relative_Flux", - ] - ) - ) - - downselect_columns = np.hstack( - [ - np.sort([i for i in downselect_columns if i.endswith("mag")]), - np.sort([i for i in downselect_columns if not i.endswith("mag")]), - ] - ) - - new_columns = [ - "RA", - "Dec", - "Separation", - "Relative_Flux", - *downselect_columns, - ] - - return new_columns - - -def query_catalog( - coord: Union[SkyCoord, str], - epoch: Time, - catalog: str, - radius: Union[float, u.Quantity] = u.Quantity(100, "arcsecond"), - magnitude_limit: float = 18.0, - return_skycoord: bool = False, -): - """ - Query a catalog for a single source location, obtain nearby sources - - Parameters - ---------- - coord : astropy.coordinates.SkyCoord or string - Coordinates around which to do a radius query. If passed a string, will resolve using `from_name`. - epoch: astropy.time.Time - The time of observation in JD. - catalog: str - The catalog to query, either 'kepler', 'k2', or 'tess', 'gaia' - radius : float or astropy quantity - Radius in arcseconds to query - magnitude_limit : float - A value to limit the results in based on the Tmag/Kepler mag/K2 mag or Gaia G mag. Default, 18. - return_skycoord: bool - Whether to return an astropy.coordinates.SkyCoord object. Default is False. - - Returns - ------- - result: pd.DataFrame or astropy.coordinates.SkyCoord - By default returns a pandas dataframe of the sources within radius query, corrected for proper motion. Optionally will return astropy.coordinates.SkyCoord object. - """ - - # Check to make sure that user input is in the correct format - if not isinstance(coord, SkyCoord): - if isinstance(coord, str): - coord = SkyCoord.from_name(coord) - else: - raise TypeError("Must pass an `astropy.coordinates.SkyCoord` object.") - if not isinstance(epoch, Time): - try: - epoch = Time(epoch, format="jd") - except ValueError: - raise TypeError("Must pass an `astropy.time.Time object`.") - raise TypeError("Must pass an `astropy.time.Time object`.") - if not coord.isscalar: - raise ValueError("Pass one target only.") - - # Here we check to make sure that the radius entered is in arcseconds - # This also means we do not need to specify arcseconds in our catalog query - try: - radius = u.Quantity(radius, "arcsecond") - except u.UnitConversionError: - raise - - # Check to make sure that the catalog provided by the user is valid for this function - if catalog.lower() not in _Catalog_Dictionary.keys(): - raise ValueError(f"Can not parse catalog name '{catalog}'") - catalog_meta = _Catalog_Dictionary[catalog.lower()] - - # Get the Vizier catalog name - catalog_name = catalog_meta["catalog"] - - # Get the appropriate column names and filters to be applied - filters = Vizier( - columns=catalog_meta["columns"], - column_filters={catalog_meta["column_filters"]: f"<{magnitude_limit}"}, - ) - - # The catalog can cut off at 50 - we dont want this to happen - filters.ROW_LIMIT = -1 - # Now query the catalog - result = filters.query_region(coord, catalog=catalog_name, radius=Angle(radius)) - if len(result) == 0: - result = ( - pd.DataFrame( - columns=[ - *catalog_meta["columns"], - "RA", - "Dec", - "Separation", - "Relative_Flux", - ] - ) - .rename( - { - i: o - for i, o in zip( - catalog_meta["rename_in"], catalog_meta["rename_out"] - ) - }, - axis=1, - ) - .set_index("ID") - ) - return result[_get_return_columns(result.columns)] - - result = result[catalog_name] - - # Rename the columns so that the output is uniform - result.rename_columns( - catalog_meta["rename_in"], - catalog_meta["rename_out"], - ) - - if catalog_meta["prefix"] is not None: - prefix = catalog_meta["prefix"] - result["ID"] = [f"{prefix} {id}" for id in result["ID"]] - - c = _table_to_skycoord(table=result, equinox=catalog_meta["equinox"], epoch=epoch) - ref_index = np.argmin(coord.separation(c).arcsecond) - sep = c[ref_index].separation(c) - - if return_skycoord: - s = np.argsort(sep.deg) - return c[s] - - result["RA"] = c.ra.deg - result["Dec"] = c.dec.deg - result["Separation"] = sep.arcsecond - - # Calculate the relative flux - result["Relative_Flux"] = 10 ** ( - ( - result[catalog_meta["default_mag"]] - - result[catalog_meta["default_mag"]][ref_index] - ) - / -2.5 - ) - - # Now sort the table based on separation - result.sort(["Separation"]) - result = result.to_pandas().set_index("ID") - return result[_get_return_columns(result.columns)] - - -def query_KIC( - coord: SkyCoord, - epoch: Time = Time(2000, format="jyear", scale="tt"), - radius: Union[float, u.Quantity] = u.Quantity(2, "pixel"), - magnitude_limit: float = 18.0, - return_skycoord: bool = False, -): - """ - Query the Kepler Input Catalog for a single source location, obtain nearby sources - - Parameters - ---------- - coord : astropy.coordinates.SkyCoord - Coordinates around which to do a radius query - epoch: astropy.time.Time - The time of observation in JD. Defaults to J2000. - catalog: str - The catalog to query, either 'kepler', 'k2', or 'tess', 'gaia' - radius : float or astropy quantity - Radius in arcseconds to query. Defaults to 2 pixels. - magnitude_limit : float - A value to limit the results in based on the Tmag/Kepler mag/K2 mag or Gaia G mag. Default, 18. - return_skycoord: bool - Whether to return an astropy.coordinates.SkyCoord object. Default is False. - - Returns - ------- - result: pd.DataFrame - A pandas dataframe of the sources within radius query, corrected for proper motion - """ - if radius.unit == u.pixel: - radius = (radius * (4 * u.arcsecond / u.pixel)).to(u.arcsecond) - return query_catalog( - coord=coord, - epoch=epoch, - catalog="kic", - radius=radius, - magnitude_limit=magnitude_limit, - return_skycoord=return_skycoord, - ) - - -def query_TIC( - coord: SkyCoord, - epoch: Time = Time(2000, format="jyear", scale="tt"), - radius: Union[float, u.Quantity] = u.Quantity(2, "pixel"), - magnitude_limit: float = 18.0, - return_skycoord: bool = False, -): - """ - Query the TESS Input Catalog for a single source location, obtain nearby sources - - Parameters - ---------- - coord : astropy.coordinates.SkyCoord - Coordinates around which to do a radius query - epoch: astropy.time.Time - The time of observation in JD. Defaults to J2000. - catalog: str - The catalog to query, either 'kepler', 'k2', or 'tess', 'gaia' - radius : float or astropy quantity - Radius in arcseconds to query. Defaults to 2 pixels. - magnitude_limit : float - A value to limit the results in based on the Tmag/Kepler mag/K2 mag or Gaia G mag. Default, 18. - return_skycoord: bool - Whether to return an astropy.coordinates.SkyCoord object. Default is False. - - Returns - ------- - result: pd.DataFrame - A pandas dataframe of the sources within radius query, corrected for proper motion - """ - if radius.unit == u.pixel: - radius = (radius * (21 * u.arcsecond / u.pixel)).to(u.arcsecond) - return query_catalog( - coord=coord, - epoch=epoch, - catalog="tic", - radius=radius, - magnitude_limit=magnitude_limit, - return_skycoord=return_skycoord, - ) - - -def query_EPIC( - coord: SkyCoord, - epoch: Time = Time(2000, format="jyear", scale="tt"), - radius: Union[float, u.Quantity] = u.Quantity(2, "pixel"), - magnitude_limit: float = 18.0, - return_skycoord: bool = False, -): - """ - Query the Ecliptic Plane Input Catalog for a single source location, obtain nearby sources - - Parameters - ---------- - coord : astropy.coordinates.SkyCoord - Coordinates around which to do a radius query - epoch: astropy.time.Time - The time of observation in JD. Defaults to J2000. - catalog: str - The catalog to query, either 'kepler', 'k2', or 'tess', 'gaia' - radius : float or astropy quantity - Radius in arcseconds to query. Defaults to 2 pixels. - magnitude_limit : float - A value to limit the results in based on the Tmag/Kepler mag/K2 mag or Gaia G mag. Default, 18. - return_skycoord: bool - Whether to return an astropy.coordinates.SkyCoord object. Default is False. - - Returns - ------- - result: pd.DataFrame - A pandas dataframe of the sources within radius query, corrected for proper motion - """ - if radius.unit == u.pixel: - radius = (radius * (4 * u.arcsecond / u.pixel)).to(u.arcsecond) - return query_catalog( - coord=coord, - epoch=epoch, - catalog="epic", - radius=radius, - magnitude_limit=magnitude_limit, - return_skycoord=return_skycoord, - ) - - -def query_gaia( - coord: SkyCoord, - epoch: Time = Time(2016, format="jyear", scale="tt"), - radius: Union[float, u.Quantity] = u.Quantity(10, "arcsecond"), - magnitude_limit: float = 18.0, - return_skycoord: bool = False, -): - """ - Query the Gaia EDR3 catalog for a single source location, obtain nearby sources - - Parameters - ---------- - coord : astropy.coordinates.SkyCoord - Coordinates around which to do a radius query - epoch: astropy.time.Time - The time of observation in JD. Defaults to the epoch of Gaia DR3 (J2016). - catalog: str - The catalog to query, either 'kepler', 'k2', or 'tess', 'gaia' - radius : float or astropy quantity - Radius in arcseconds to query. Defaults to 10 arcseconds. - magnitude_limit : float - A value to limit the results in based on the Tmag/Kepler mag/K2 mag or Gaia G mag. Default, 18. - return_skycoord: bool - Whether to return an astropy.coordinates.SkyCoord object. Default is False. - - Returns - ------- - result: pd.DataFrame - A pandas dataframe of the sources within radius query, corrected for proper motion - """ - return query_catalog( - coord=coord, - epoch=epoch, - catalog="gaiadr3", - radius=radius, - magnitude_limit=magnitude_limit, - return_skycoord=return_skycoord, - ) diff --git a/tests/test_query_catalog.py b/tests/test_catalogs_conesearch.py similarity index 53% rename from tests/test_query_catalog.py rename to tests/test_catalogs_conesearch.py index 463e19d..da857ad 100644 --- a/tests/test_query_catalog.py +++ b/tests/test_catalogs_conesearch.py @@ -5,7 +5,7 @@ import pandas as pd from astropy.time import Time import astropy.units as u -from lksearch import query_catalog, query_EPIC, query_KIC, query_TIC, query_gaia +from lksearch.CatalogSearch import QueryPosition import pytest # Tests the region around TIC 228760807 which should return a catalog containing 4 objects. @@ -14,8 +14,8 @@ def test_tic(): - catalog = query_catalog( - coord=c, + catalog = QueryPosition( + c, epoch=epoch, catalog="tic", radius=u.Quantity(80, "arcsecond"), @@ -32,8 +32,8 @@ def test_tic(): assert np.isclose(catalog.iloc[0]["Dec"], -27.390340343480744, atol=1e-6) # Test different epochs - catalog_new = query_catalog( - coord=c, + catalog_new = QueryPosition( + c, epoch=Time(2461041.500, scale="tt", format="jd"), catalog="tic", radius=80, @@ -44,26 +44,26 @@ def test_tic(): assert np.isclose(catalog_new.iloc[0]["Dec"], -27.390254988629433, atol=1e-6) # Test different epochs - catalog_new = query_TIC( - coord=c, - epoch=Time(2461041.500, scale="tt", format="jd"), - radius=4 * u.pixel, - magnitude_limit=18, - ) + # removed due to pixel scale question + # catalog_new = QueryPosition( + # c, + # epoch=Time(2461041.500, scale="tt", format="jd"), + # radius=4 * u.pixel, + # magnitude_limit=18, + # catalog='tic', + # ) def test_bad_catalog(): # test the catalog type i.e., simbad is not included in our catalog list. # Look at other tests to see if this is correct syntax with pytest.raises(ValueError, match="Can not parse catalog name 'simbad'"): - query_catalog( - coord=c, epoch=epoch, catalog="simbad", radius=80, magnitude_limit=18 - ) + QueryPosition(c, epoch=epoch, catalog="simbad", radius=80, magnitude_limit=18) -def test_gaia(): - catalog_gaia = query_catalog( - coord=c, +def test_gaia_position(): + catalog_gaia = QueryPosition( + c, epoch=Time(1569.4424277786259 + 2457000, scale="tdb", format="jd"), catalog="gaiadr3", radius=80, @@ -72,55 +72,77 @@ def test_gaia(): assert len(catalog_gaia) == 2 - catalog_gaia = query_gaia( - coord=c, + catalog_gaia = QueryPosition( + c, epoch=Time(1569.4424277786259 + 2457000, scale="tdb", format="jd"), radius=80, magnitude_limit=18, + catalog="gaiadr3", ) def test_kic(): - catalog_kepler = query_catalog( - coord=SkyCoord(285.679391, 50.2413, unit="deg"), + catalog_kepler = QueryPosition( + SkyCoord(285.679391, 50.2413, unit="deg"), epoch=Time(120.5391465105713 + 2454833, scale="tdb", format="jd"), catalog="kic", radius=20, magnitude_limit=18, ) assert len(catalog_kepler) == 5 - catalog_kepler = query_KIC( - coord=SkyCoord(285.679391, 50.2413, unit="deg"), - epoch=Time(120.5391465105713 + 2454833, scale="tdb", format="jd"), - radius=1 * u.pixel, - magnitude_limit=18, - ) + # catalog_kepler = QueryPosition( + # SkyCoord(285.679391, 50.2413, unit="deg"), + # epoch=Time(120.5391465105713 + 2454833, scale="tdb", format="jd"), + # radius=1 * u.pixel, + # magnitude_limit=18, + # catalog='kic', + # ) def test_epic(): - catalog_k2 = query_catalog( - coord=SkyCoord(172.560465, 7.588391, unit="deg"), + catalog_k2 = QueryPosition( + SkyCoord(172.560465, 7.588391, unit="deg"), epoch=Time(1975.1781333280233 + 2454833, scale="tdb", format="jd"), catalog="epic", radius=20, magnitude_limit=18, ) assert len(catalog_k2) == 1 - catalog_k2 = query_EPIC( - coord=SkyCoord(172.560465, 7.588391, unit="deg"), - epoch=Time(1975.1781333280233 + 2454833, scale="tdb", format="jd"), - radius=1 * u.pixel, - magnitude_limit=18, - ) + # Temporarily removed due to pixel scale + # catalog_k2 = QueryPosition( + # SkyCoord(172.560465, 7.588391, unit="deg"), + # epoch=Time(1975.1781333280233 + 2454833, scale="tdb", format="jd"), + # radius=1 * u.pixel, + # magnitude_limit=18, + # catalog='epic', + # ) def test_empty(): - catalog = query_catalog( + catalog = QueryPosition( SkyCoord.from_name("Kepler-10"), Time.now(), - "epic", + catalog="epic", radius=20 * u.arcsecond, magnitude_limit=18, ) assert isinstance(catalog, pd.DataFrame) assert len(catalog) == 0 + + +def test_resolving(): + catalog = QueryPosition("Kepler 10", catalog="tic") + assert np.isclose(catalog["RA"].values[0], 285.679422) + assert np.isclose(catalog["Dec"].values[0], 50.241306) + + catalog = QueryPosition("19h02m43.03s +50d14m29.34s", catalog="tic") + assert np.isclose(catalog["RA"].values[0], 285.679422) + assert np.isclose(catalog["Dec"].values[0], 50.241306) + + catalog = QueryPosition("285.679422 50.241306", catalog="tic") + assert np.isclose(catalog["RA"].values[0], 285.679422) + assert np.isclose(catalog["Dec"].values[0], 50.241306) + + catalog = QueryPosition((285.679422, 50.241306), catalog="tic") + assert np.isclose(catalog["RA"].values[0], 285.679422) + assert np.isclose(catalog["Dec"].values[0], 50.241306) diff --git a/tests/test_catalogs_idsearch.py b/tests/test_catalogs_idsearch.py new file mode 100644 index 0000000..dc6e90a --- /dev/null +++ b/tests/test_catalogs_idsearch.py @@ -0,0 +1,87 @@ +"""Tests catalog id querying""" + +import numpy as np +from astropy.coordinates import SkyCoord +import pandas as pd +from astropy.time import Time +import astropy.units as u +from lksearch import CatalogSearch +import pytest + + +def test_id_query(): + tic = 299096513 + tic_result = CatalogSearch.QueryID(tic, catalog="tic") + assert len(tic_result == 1) + assert tic_result.TIC.values == tic + + kic = 12644769 + kic_result = CatalogSearch.QueryID(kic, catalog="kic") + assert len(kic_result == 1) + assert kic_result.KIC.values == kic + + epic = 201563164 + epic_result = CatalogSearch.QueryID(epic, catalog="epic") + assert len(epic_result == 1) + assert epic_result.ID.values == epic + + gaia = 2133452475178900736 + gaia_result = CatalogSearch.QueryID(gaia, catalog="gaiadr3") + assert len(gaia_result == 1) + assert gaia_result.Source.values == gaia + + +def name_disambiguation(string, key, target): + result = CatalogSearch.QueryID(string) + return len(result == 1) and result[key].values[0] == target + + +def test_name_disambiguation(): + tic = 902906874 + assert name_disambiguation(f"TIC {tic}", "TIC", tic) + assert name_disambiguation(f"TIC{tic}", "TIC", tic) + assert name_disambiguation(f"tess{tic}", "TIC", tic) + assert name_disambiguation(f"tess {tic}", "TIC", tic) + + kic = 12644769 + assert name_disambiguation(f"KIC {kic}", "KIC", kic) + assert name_disambiguation(f"KIC{kic}", "KIC", kic) + assert name_disambiguation(f"kplr{kic}", "KIC", kic) + assert name_disambiguation(f"kplr {kic}", "KIC", kic) + + epic = 201563164 + assert name_disambiguation(f"EPIC {epic}", "ID", epic) + assert name_disambiguation(f"EPIC{epic}", "ID", epic) + assert name_disambiguation(f"ktwo{epic}", "ID", epic) + assert name_disambiguation(f"ktwo {epic}", "ID", epic) + + gaiadr3 = 2133452475178900736 + assert name_disambiguation(f"gaiadr3 {gaiadr3 }", "Source", gaiadr3) + assert name_disambiguation(f"gaiadr3{gaiadr3}", "Source", gaiadr3) + assert name_disambiguation(f"GAIA{gaiadr3 }", "Source", gaiadr3) + assert name_disambiguation(f"GAIA {gaiadr3 }", "Source", gaiadr3) + + +def test_lists(): + sources = [2133452475178900736, 3201680999981276544] + assert len(CatalogSearch.QueryID(sources, catalog="gaiadr3")) == 2 + + +def test_crossmatch(): + result = CatalogSearch.QueryID("GAIA 2133452475178900736", catalog="tic") + assert len(result) == 1 + assert result["TIC"].values == 299096513 + + sources = [2133452475178900736, 3201680999981276544] + result = CatalogSearch.QueryID(sources, catalog="tic", input_catalog="gaiadr3") + assert len(result) == 2 + assert 299096513 in result["TIC"].values + assert 299096514 in result["TIC"].values + + result = CatalogSearch.QueryID("TIC 299096513", catalog="gaiadr3") + assert len(result) == 1 + assert result["Source"].values == 2133452475178900736 + + result = CatalogSearch.QueryID(f"KIC 12644769", catalog="tic") + assert len(result) == 1 + assert result["TIC"].values == 299096355 diff --git a/tests/test_search.py b/tests/test_missionsearch.py similarity index 100% rename from tests/test_search.py rename to tests/test_missionsearch.py From 8224ac302f85e0811e3747f7b21f1bea2abe04fe Mon Sep 17 00:00:00 2001 From: Tyler Pritchard Date: Tue, 15 Oct 2024 13:03:47 -0400 Subject: [PATCH 09/15] xmatch update --- docs/apidoc.rst | 2 +- docs/tutorials/catalog-searches.ipynb | 10 +-- docs/tutorials/cloud-data-searches.ipynb | 14 ++-- docs/tutorials/data-searches.ipynb | 34 +++++---- src/lksearch/CatalogSearch.py | 90 ++++++++++++++---------- tests/test_catalogs_conesearch.py | 25 ------- tests/test_catalogs_idsearch.py | 2 + 7 files changed, 88 insertions(+), 89 deletions(-) diff --git a/docs/apidoc.rst b/docs/apidoc.rst index 940e09e..15ce2e8 100644 --- a/docs/apidoc.rst +++ b/docs/apidoc.rst @@ -15,7 +15,7 @@ API .. autoclass:: lksearch.TESSSearch :members: -.. automodule:: lksearch.catalog +.. automodule:: lksearch.CatalogSearch :members: .. automodule:: lksearch.config diff --git a/docs/tutorials/catalog-searches.ipynb b/docs/tutorials/catalog-searches.ipynb index b2ad4e1..d3a05e7 100644 --- a/docs/tutorials/catalog-searches.ipynb +++ b/docs/tutorials/catalog-searches.ipynb @@ -51,7 +51,7 @@ "metadata": {}, "outputs": [], "source": [ - "c = SkyCoord.from_name('Kepler-10')" + "c = SkyCoord.from_name(\"Kepler-10\")" ] }, { @@ -375,7 +375,7 @@ } ], "source": [ - "query_KIC(c, epoch=Time.now(), radius=3*u.pixel)" + "query_KIC(c, epoch=Time.now(), radius=3 * u.pixel)" ] }, { @@ -511,7 +511,7 @@ } ], "source": [ - "query_TIC(c, epoch=Time.now(), radius=2*u.pixel)" + "query_TIC(c, epoch=Time.now(), radius=2 * u.pixel)" ] }, { @@ -717,7 +717,7 @@ } ], "source": [ - "query_gaia(c, epoch=Time.now(), radius=40*u.arcsecond)" + "query_gaia(c, epoch=Time.now(), radius=40 * u.arcsecond)" ] }, { @@ -753,7 +753,7 @@ } ], "source": [ - "query_gaia(c, epoch=Time.now(), radius=40*u.arcsecond, return_skycoord=True)" + "query_gaia(c, epoch=Time.now(), radius=40 * u.arcsecond, return_skycoord=True)" ] } ], diff --git a/docs/tutorials/cloud-data-searches.ipynb b/docs/tutorials/cloud-data-searches.ipynb index 3a0bb4e..473915b 100644 --- a/docs/tutorials/cloud-data-searches.ipynb +++ b/docs/tutorials/cloud-data-searches.ipynb @@ -87,14 +87,15 @@ } ], "source": [ - "#First, lets update our configuration to not download a cloud-hosted file\n", + "# First, lets update our configuration to not download a cloud-hosted file\n", "from lksearch import Conf, TESSSearch\n", + "\n", "Conf.DOWNLOAD_CLOUD = False\n", "\n", - "# Now, lets find some data. We use this target earlier in the tutorial. \n", - "toi = TESSSearch('TOI 1161')\n", + "# Now, lets find some data. We use this target earlier in the tutorial.\n", + "toi = TESSSearch(\"TOI 1161\")\n", "\n", - "#What happens when we try to download it in our updated configuration? \n", + "# What happens when we try to download it in our updated configuration?\n", "cloud_result = toi.timeseries.mission_products[0].download()\n", "cloud_result" ] @@ -149,7 +150,10 @@ ], "source": [ "import astropy.io.fits as fits\n", - "with fits.open(cloud_result[\"Local Path\"].values[0], use_fsspec=True, fsspec_kwargs={\"anon\": True}) as hdu:\n", + "\n", + "with fits.open(\n", + " cloud_result[\"Local Path\"].values[0], use_fsspec=True, fsspec_kwargs={\"anon\": True}\n", + ") as hdu:\n", " for item in hdu:\n", " print(item.fileinfo())" ] diff --git a/docs/tutorials/data-searches.ipynb b/docs/tutorials/data-searches.ipynb index a9115fa..5cd44e1 100644 --- a/docs/tutorials/data-searches.ipynb +++ b/docs/tutorials/data-searches.ipynb @@ -320,7 +320,7 @@ ], "source": [ "# Let's use this to check what mission(s) have observed this target\n", - "print(search_result.mission)\n" + "print(search_result.mission)" ] }, { @@ -338,7 +338,9 @@ } ], "source": [ - "print(f\"There are {sum(search_result.mission == 'TESS')} observations by TESS and {sum(search_result.mission == 'Kepler')} by Kepler\")\n" + "print(\n", + " f\"There are {sum(search_result.mission == 'TESS')} observations by TESS and {sum(search_result.mission == 'Kepler')} by Kepler\"\n", + ")" ] }, { @@ -974,8 +976,8 @@ } ], "source": [ - "# Search for TESS data only. This by default includes both HLSPs and FFI cutouts. \n", - "toi = TESSSearch('TOI 1161')\n", + "# Search for TESS data only. This by default includes both HLSPs and FFI cutouts.\n", + "toi = TESSSearch(\"TOI 1161\")\n", "toi" ] }, @@ -1593,7 +1595,7 @@ } ], "source": [ - "# Only return data validation products. These are PDFs generated automatically during transit searches. \n", + "# Only return data validation products. These are PDFs generated automatically during transit searches.\n", "toi_dv = toi.dvreports\n", "toi_dv" ] @@ -2187,7 +2189,7 @@ "source": [ "# Keep any data type, but only the shortest cadence available, which in this case is 2-minute data\n", "\n", - "toi_shortest = toi.filter_table(exptime='shortest')\n", + "toi_shortest = toi.filter_table(exptime=\"shortest\")\n", "toi_shortest" ] }, @@ -2394,7 +2396,7 @@ ], "source": [ "# You could also specify an exact exposure time or range in the form of a tuple (eg, (100,500))\n", - "toi_trange = toi.filter_table(exptime=(100,500))\n", + "toi_trange = toi.filter_table(exptime=(100, 500))\n", "toi_trange" ] }, @@ -2742,7 +2744,7 @@ } ], "source": [ - "toi_short_lcs = toi.timeseries.query_table('sector == 14 & exptime == 120')\n", + "toi_short_lcs = toi.timeseries.query_table(\"sector == 14 & exptime == 120\")\n", "toi_short_lcs" ] }, @@ -2903,7 +2905,7 @@ "search_result = TESSSearch(\"TOI 270\", hlsp=False)\n", "\n", "# You can filter two different ways to get the same result.\n", - "#search_result.filter_table(pipeline='TESScut')\n", + "# search_result.filter_table(pipeline='TESScut')\n", "search_result.tesscut" ] }, @@ -3695,7 +3697,7 @@ ], "source": [ "# What timeseries data is available?\n", - "kep = KeplerSearch('Kepler 137')\n", + "kep = KeplerSearch(\"Kepler 137\")\n", "kep" ] }, @@ -4020,7 +4022,7 @@ "source": [ "# You can download a subsection of results directly\n", "manifest = kep[:2].download()\n", - "print(manifest['Local Path'].values)" + "print(manifest[\"Local Path\"].values)" ] }, { @@ -4210,7 +4212,7 @@ ], "source": [ "# we can also filter the results by observing quarter\n", - "kep_quarters = kep.filter_table(quarter=[7,17])\n", + "kep_quarters = kep.filter_table(quarter=[7, 17])\n", "kep_quarters" ] }, @@ -4472,7 +4474,7 @@ "source": [ "# Download all lightcurves produced by HLSPs\n", "K2_HLSPs = K2.HLSPs\n", - "K2_HLSPs\n" + "K2_HLSPs" ] }, { @@ -4601,6 +4603,7 @@ ], "source": [ "from lksearch import config as lkconfig\n", + "\n", "lkconfig.get_cache_dir()" ] }, @@ -4621,6 +4624,7 @@ "outputs": [], "source": [ "import os\n", + "\n", "# The manifest returned by download() is a pandas DataFrame\n", "# We will access the first local path using iloc as so\n", "os.remove(manifest.iloc[0][\"Local Path\"])" @@ -4683,7 +4687,7 @@ "metadata": {}, "outputs": [], "source": [ - "lkconfig.create_config_file(overwrite = True)" + "lkconfig.create_config_file(overwrite=True)" ] }, { @@ -4753,7 +4757,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.13" + "version": "3.12.3" } }, "nbformat": 4, diff --git a/src/lksearch/CatalogSearch.py b/src/lksearch/CatalogSearch.py index 7452291..a49e3c9 100644 --- a/src/lksearch/CatalogSearch.py +++ b/src/lksearch/CatalogSearch.py @@ -17,7 +17,6 @@ # This is a lits of VizieR catalogs and their input parameters to be used in the # query_skycatalog function -# TODO Should this be a Configuration Parameter? _Catalog_Dictionary = { "kic": { "catalog": "V/133/kic", @@ -40,7 +39,10 @@ "prefix": "KIC", "default_mag": "Kepmag", "default_id_column": "KIC", - "crossmatch_catalogs": "tic", # gaia->tess->Kepler? possible but convoluted + "crossmatch_catalogs": [ + "tic", + "gaiadr3", + ], # gaia->tess->Kepler? possible but convoluted "crossmatch_type": "tic", "crossmatch_columns": None, }, @@ -92,7 +94,7 @@ "default_id_column": "TIC", "crossmatch_catalogs": ["gaiadr3", "kic"], # WISE, TYCHO2 "crossmatch_type": "column", - "crossmatch_column_id": {"kic": "KIC", "gaiadr3": "GAIA"}, + "crossmatch_column_id": {"kic": "KIC", "gaiadr3": "GAIA", "tic": "TIC"}, }, "gaiadr3": { "catalog": "I/355/gaiadr3", @@ -120,6 +122,14 @@ "crossmatch_type": "tic", "crossmatch_column_id": None, }, + "short": { + "SkyCoordDict": { + "ra": "RA", + "dec": "Dec", + "pmRA": "pmRA", + "pmDE": "pmDE", + } + }, } # Connect to the Vizier TAP server here so that we only do this once @@ -127,6 +137,7 @@ # TODO Swap this out with a configuration parameter maybe? # Or None and Raise Exception +# Make this an optional keword argument for debugging/doc _default_catalog = "tic" @@ -146,26 +157,6 @@ def _get_TAP_Query(catalog: str, ID: str, max_results: int = None, id_column=Non return query_model -def Query( - search_input: Union[str, SkyCoord, tuple, list[str, SkyCoord, tuple]], - catalog: str = None, - radius: Union[float, str] = None, - epoch: Time = None, -) -> None: - search_result = None - search_object, search_catalog = _parse_search_input(search_input, catalog=catalog) - if isinstance(search_object, SkyCoord): - search_result = QueryPosition( - search_object, catalog=search_catalog, radius=radius, epoch=epoch - ) - elif isinstance(search_object, str): - search_result = QueryID(search_object, catalog=search_catalog) - else: - raise TypeError("Unable to resolve catalog search type") - - return search_result - - def _parse_search_input(search_input, catalog: str = None): if isinstance(search_input, SkyCoord): search_object = search_input @@ -253,6 +244,8 @@ def QueryID( catalog: Union[str, int, list[str, int]] = None, input_catalog: str = None, max_results: int = None, + return_skycoord: bool = False, + epoch: Union[str, Time] = None, ): id_column = None @@ -280,10 +273,13 @@ def QueryID( ): if _Catalog_Dictionary[catalog]["crossmatch_type"] == "tic": # TIC is is crossmatched with gaiadr3/kic - # If KIC/gaia Info for a TIC Object is desired - search TIC to get KIC/gaia ids - # Then Search KIC + # If KIC data for a gaia source or vice versa is desired + # search TIC to get KIC/gaia ids then Search KIC /GAIA + source_id_column = _Catalog_Dictionary["tic"][ + "crossmatch_column_id" + ][input_catalog] new_id_table = _QueryID( - "tic", id_list, max_results, id_column=id_column + "tic", id_list, max_results, id_column=source_id_column ) id_list = ", ".join( new_id_table[ @@ -307,7 +303,10 @@ def QueryID( catalog = _default_catalog results_table = _QueryID(catalog, id_list, max_results, id_column=id_column) - return results_table + if return_skycoord: + _table_to_skycoord(results_table, epoch=epoch, catalog=catalog) + else: + return CatalogResult(results_table) def _QueryID(catalog: str, id_list: str, max_results: int, id_column: str = None): @@ -327,7 +326,7 @@ def _QueryID(catalog: str, id_list: str, max_results: int, id_column: str = None def QueryPosition( search_input: Union[str, SkyCoord, tuple, list[str, SkyCoord, tuple]], epoch: Union[str, Time] = None, - catalog: str = None, + catalog: str = "tic", radius: Union[float, u.Quantity] = u.Quantity(100, "arcsecond"), magnitude_limit: float = 18.0, return_skycoord: bool = False, @@ -355,10 +354,6 @@ def QueryPosition( """ coord, search_catalog = _parse_search_input(search_input, catalog=catalog) - if search_catalog is None: - search_catalog = _default_catalog - # TODO this was made optional so we could try and intuit a catalog - # if we don't want a default we could raise an exception here instead # Check to make sure that user input is in the correct format if not isinstance(coord, SkyCoord): @@ -382,7 +377,6 @@ def QueryPosition( # Here we check to make sure that the radius entered is in arcseconds # This also means we do not need to specify arcseconds in our catalog query - # TODO The tests had pixscale in them - do we want this? try: radius = u.Quantity(radius, "arcsecond") except u.UnitConversionError: @@ -439,7 +433,12 @@ def QueryPosition( result["ID"] = [f"{prefix} {id}" for id in result["ID"]] if epoch is None: epoch = catalog_meta["equinox"] - c = _table_to_skycoord(table=result, equinox=catalog_meta["equinox"], epoch=epoch) + c = _table_to_skycoord( + table=result, + equinox=catalog_meta["equinox"], + epoch=epoch, + catalog=search_catalog, + ) ref_index = np.argmin(coord.separation(c).arcsecond) sep = c[ref_index].separation(c) if return_skycoord: @@ -459,7 +458,7 @@ def QueryPosition( # Now sort the table based on separation result.sort(["Separation"]) result = result.to_pandas().set_index("ID") - return result[_get_return_columns(result.columns)] + return CatalogResult(result[_get_return_columns(result.columns)]) def _get_return_columns(columns): @@ -496,7 +495,9 @@ def _get_return_columns(columns): return new_columns -def _table_to_skycoord(table: Table, equinox: Time, epoch: Time): +def _table_to_skycoord( + table: Table, equinox: Time = None, epoch: Time = None, catalog=None +): """ Convert a table input to astropy.coordinates.SkyCoord object @@ -514,6 +515,19 @@ def _table_to_skycoord(table: Table, equinox: Time, epoch: Time): coords : astropy.coordinates.SkyCoord SkyCoord object with RA, Dec, equinox, and proper motion parameters. """ + + if equinox is None and catalog is not None: + equinox = _Catalog_Dictionary[catalog]["equinox"] + if epoch is None and catalog is not None: + epoch = equinox + + catlist = ["short", "tic", "kic", "epic", "gaiadr3"] + + RA_Keys = ["RA", "RAJ2000", "RA_ICRS"] + Dec_Keys = ["Dec", "DEJ2000", "DE_ICRS"] + pmRA_Keys = ["pmRA"] + pmDec_Keys = ["pmDE"] + # We need to remove any nan values from our proper motion list # Doing this will allow objects which do not have proper motion to still be displayed table["pmRA"] = np.ma.filled(table["pmRA"].astype(float), 0.0) @@ -547,5 +561,5 @@ def _table_to_skycoord(table: Table, equinox: Time, epoch: Time): class CatalogResult(pd.DataFrame): - def to_SkyCoord(self, equinox: Time, epoch: Time): - _table_to_skycoord(Table.from_pandas(self), equinox, epoch) + def to_SkyCoord(self, equinox: Time = None, epoch: Time = None): + return _table_to_skycoord(Table.from_pandas(self), equinox=equinox, epoch=epoch) diff --git a/tests/test_catalogs_conesearch.py b/tests/test_catalogs_conesearch.py index da857ad..ebec807 100644 --- a/tests/test_catalogs_conesearch.py +++ b/tests/test_catalogs_conesearch.py @@ -43,16 +43,6 @@ def test_tic(): assert np.isclose(catalog_new.iloc[0]["RA"], 194.10052070792756, atol=1e-6) assert np.isclose(catalog_new.iloc[0]["Dec"], -27.390254988629433, atol=1e-6) - # Test different epochs - # removed due to pixel scale question - # catalog_new = QueryPosition( - # c, - # epoch=Time(2461041.500, scale="tt", format="jd"), - # radius=4 * u.pixel, - # magnitude_limit=18, - # catalog='tic', - # ) - def test_bad_catalog(): # test the catalog type i.e., simbad is not included in our catalog list. @@ -90,13 +80,6 @@ def test_kic(): magnitude_limit=18, ) assert len(catalog_kepler) == 5 - # catalog_kepler = QueryPosition( - # SkyCoord(285.679391, 50.2413, unit="deg"), - # epoch=Time(120.5391465105713 + 2454833, scale="tdb", format="jd"), - # radius=1 * u.pixel, - # magnitude_limit=18, - # catalog='kic', - # ) def test_epic(): @@ -108,14 +91,6 @@ def test_epic(): magnitude_limit=18, ) assert len(catalog_k2) == 1 - # Temporarily removed due to pixel scale - # catalog_k2 = QueryPosition( - # SkyCoord(172.560465, 7.588391, unit="deg"), - # epoch=Time(1975.1781333280233 + 2454833, scale="tdb", format="jd"), - # radius=1 * u.pixel, - # magnitude_limit=18, - # catalog='epic', - # ) def test_empty(): diff --git a/tests/test_catalogs_idsearch.py b/tests/test_catalogs_idsearch.py index dc6e90a..73ce82c 100644 --- a/tests/test_catalogs_idsearch.py +++ b/tests/test_catalogs_idsearch.py @@ -85,3 +85,5 @@ def test_crossmatch(): result = CatalogSearch.QueryID(f"KIC 12644769", catalog="tic") assert len(result) == 1 assert result["TIC"].values == 299096355 + + # TODO Add KIC->GAIA vice versa From cc09089b465cd155f3929f58813a557da4c77447 Mon Sep 17 00:00:00 2001 From: Tyler Pritchard Date: Mon, 18 Nov 2024 23:13:53 -0500 Subject: [PATCH 10/15] updates, moved catalog dict to json file in data --- src/lksearch/CatalogSearch.py | 316 ++++++++++++++------------ src/lksearch/data/catalog_config.json | 140 ++++++++++++ tests/test_catalogs_conesearch.py | 6 +- 3 files changed, 319 insertions(+), 143 deletions(-) create mode 100644 src/lksearch/data/catalog_config.json diff --git a/src/lksearch/CatalogSearch.py b/src/lksearch/CatalogSearch.py index a49e3c9..d104e34 100644 --- a/src/lksearch/CatalogSearch.py +++ b/src/lksearch/CatalogSearch.py @@ -10,127 +10,138 @@ from astroquery.vizier import Vizier from astroquery.utils.tap.core import TapPlus +from astroquery.mast import MastClass +from astroquery.simbad import Simbad import pandas as pd import warnings +import time +import json + +from . import log # This is a lits of VizieR catalogs and their input parameters to be used in the # query_skycatalog function -_Catalog_Dictionary = { - "kic": { - "catalog": "V/133/kic", - "columns": [ - "KIC", - "RAJ2000", - "DEJ2000", - "pmRA", - "pmDE", - "Plx", - "kepmag", - "Radius", - "Teff", - "logg", - ], - "column_filters": "kepmag", - "rename_in": ["KIC", "kepmag"], - "rename_out": ["ID", "Kepmag"], - "equinox": Time(2000, format="jyear", scale="tt"), - "prefix": "KIC", - "default_mag": "Kepmag", - "default_id_column": "KIC", - "crossmatch_catalogs": [ - "tic", - "gaiadr3", - ], # gaia->tess->Kepler? possible but convoluted - "crossmatch_type": "tic", - "crossmatch_columns": None, - }, - "epic": { - "catalog": "IV/34/epic", - "columns": [ - "ID", - "RAJ2000", - "DEJ2000", - "pmRA", - "pmDEC", - "plx", - "Kpmag", - "logg", - "Teff", - "Rad", - "Mass", - ], - "column_filters": "Kpmag", - "rename_in": ["Kpmag", "pmDEC", "plx"], - "rename_out": ["K2mag", "pmDE", "Plx"], - "equinox": Time(2000, format="jyear", scale="tt"), - "prefix": "EPIC", - "default_mag": "K2mag", - "default_id_column": "ID", - "crossmatch_catalogs": None, - }, - "tic": { - "catalog": "IV/39/tic82", - "columns": [ - "TIC", - "RAJ2000", - "DEJ2000", - "pmRA", - "pmDE", - "Plx", - "Tmag", - "logg", - "Teff", - "Rad", - "Mass", - ], - "column_filters": "Tmag", - "rename_in": ["TIC", "Tmag"], - "rename_out": ["ID", "TESSmag"], - "equinox": Time(2000, format="jyear", scale="tt"), - "prefix": "TIC", - "default_mag": "TESSmag", - "default_id_column": "TIC", - "crossmatch_catalogs": ["gaiadr3", "kic"], # WISE, TYCHO2 - "crossmatch_type": "column", - "crossmatch_column_id": {"kic": "KIC", "gaiadr3": "GAIA", "tic": "TIC"}, - }, - "gaiadr3": { - "catalog": "I/355/gaiadr3", - "columns": [ - "DR3Name", - "RAJ2000", - "DEJ2000", - "pmRA", - "pmDE", - "Plx", - "Gmag", - "BPmag", - "RPmag", - "logg", - "Teff", - ], - "column_filters": "Gmag", - "rename_in": ["DR3Name"], - "rename_out": ["ID"], - "equinox": Time(2016, format="jyear", scale="tt"), - "prefix": None, - "default_mag": "Gmag", - "default_id_column": "Source", - "crossmatch_catalogs": ["tic", "kic"], - "crossmatch_type": "tic", - "crossmatch_column_id": None, - }, - "short": { - "SkyCoordDict": { - "ra": "RA", - "dec": "Dec", - "pmRA": "pmRA", - "pmDE": "pmDE", - } - }, -} +def _load_cat_config(): + with open('src/lksearch/data/catalog_config.json', 'r') as j: + cat_dict = json.loads(j.read()) + for key in cat_dict.keys(): + cat_dict[key]['equinox'] = Time(cat_dict[key]['equinox'], format="jyear", scale="tt") + return cat_dict + +_Catalog_Dictionary = _load_cat_config() +#{ +# "kic": { +# "catalog": "V/133/kic", +# "columns": [ +# "KIC", +# "RAJ2000", +# "DEJ2000", +# "pmRA", +# "pmDE", +# "Plx", +# "kepmag", +# "Radius", +# "Teff", +# "logg", +# ], +# "column_filters": "kepmag", +# "rename_in": ["KIC", "kepmag"], +# "rename_out": ["ID", "Kepmag"], +# "equinox": 2000,#Time(2000, format="jyear", scale="tt"), +# "prefix": "KIC", +# "default_mag": "Kepmag", +# "default_id_column": "KIC", +# "crossmatch_catalogs": [ +# "tic", +# "gaiadr3", +# ], # gaia->tess->Kepler? possible but convoluted +# "crossmatch_type": "tic", +# "crossmatch_columns": None, +## "SIMBAD_match_like": "ident.id LIKE KIC%", +# }, +# "epic": { +# "catalog": "IV/34/epic", +# "columns": [ +# "ID", +# "RAJ2000", +# "DEJ2000", +# "pmRA", +# "pmDEC", +# "plx", +# "Kpmag", +# "logg", +# "Teff", +# "Rad", +# "Mass", +# ], +# "column_filters": "Kpmag", +# "rename_in": ["Kpmag", "pmDEC", "plx"], +# "rename_out": ["K2mag", "pmDE", "Plx"], +# "equinox": 2000,#Time(2000, format="jyear", scale="tt"), +# "prefix": "EPIC", +# "default_mag": "K2mag", +# "default_id_column": "ID", +# "crossmatch_catalogs": None, +## "SIMBAD_match_like": "ident.id LIKE EPIC%", +# +# }, +# "tic": { +# "catalog": "IV/39/tic82", +# "columns": [ +# "TIC", +# "RAJ2000", +# "DEJ2000", +# "pmRA", +# "pmDE", +# "Plx", +# "Tmag", +# "logg", +# "Teff", +# "Rad", +# "Mass", +# ], +# "column_filters": "Tmag", +# "rename_in": ["TIC", "Tmag"], +# "rename_out": ["ID", "TESSmag"], +# "equinox": 2000,#Time(2000, format="jyear", scale="tt"), +# "prefix": "TIC", +# "default_mag": "TESSmag", +# "default_id_column": "TIC", +# "crossmatch_catalogs": ["gaiadr3", "kic"], # WISE, TYCHO2 +# "crossmatch_type": "column", +# "crossmatch_column_id": {"kic": "KIC", "gaiadr3": "GAIA", "tic": "TIC"}, +## "SIMBAD_match_like": "ident.id LIKE TIC%", +# }, +# "gaiadr3": { +# "catalog": "I/355/gaiadr3", +# "columns": [ +# "DR3Name", +# "RAJ2000", +# "DEJ2000", +# "pmRA", +# "pmDE", +# "Plx", +# "Gmag", +# "BPmag", +# "RPmag", +# "logg", +# "Teff", +# ], +# "column_filters": "Gmag", +# "rename_in": ["DR3Name"], +# "rename_out": ["ID"], +# "equinox": 2016,#Time(2016, format="jyear", scale="tt"), +# "prefix": None, +# "default_mag": "Gmag", +# "default_id_column": "Source", +# "crossmatch_catalogs": ["tic", "kic"], +# "crossmatch_type": "tic", +# "crossmatch_column_id": None, +## "SIMBAD_match_like": "ident.id LIKE Gaia DR3%", +# }, +#} # Connect to the Vizier TAP server here so that we only do this once VizTap = TapPlus(url="http://TAPVizieR.u-strasbg.fr/TAPVizieR/tap/") @@ -140,8 +151,33 @@ # Make this an optional keword argument for debugging/doc _default_catalog = "tic" +# use simbad to get name/ID crossmatches +def IDLookup(search_input: Union[str, list[str]], match_catalog: str = None): + match_list = _Catalog_Dictionary.keys() - 'short' +# match_str = None only usable in bleeding edge astroquery + + if (match_catalog is not None): + if(match_catalog.lower() in match_list): + match_str = _Catalog_Dictionary[match_catalog.lower()]["SIMBAD_match_like"] + + if(isinstance(search_input, list)): + result=[] + for item in search_input: + log.warning("Throttling query limit to Simbad's: max 5/s") + result_iter = _IDLookup(item) + time.sleep(0.2) + result.append(result_iter) + else: + result = _IDLookup(search_input) + + return result +def _IDLookup(search_item, match_str): # Construct exact ID TAP queries for various surveys +# result_table = Simbad.query_objectids(search_item, criteria = match_str) + result_table = Simbad.query_objectids(search_item) + return result_table + def _get_TAP_Query(catalog: str, ID: str, max_results: int = None, id_column=None): if catalog not in _Catalog_Dictionary.keys(): raise ValueError(f"{catalog} not found in TAP catalogs list") @@ -189,28 +225,28 @@ def _match_target_catalog(search_input): # If string is purelt numbers, make no assumptions search_string = search_input search_catalog = None - elif search_input[0:3].lower() == "tic": + elif search_input[0:3].strip().replace(' ','').lower() == "tic": search_catalog = "tic" search_string = search_input[3:] - elif search_input[0:4].lower() == "tess": + elif search_input[0:4].strip().replace(' ','').lower() == "tess": search_catalog = "tic" search_string = search_input[4:] - elif search_input[0:3].lower() == "kic": + elif search_input[0:3].strip().replace(' ','').lower() == "kic": search_catalog = "kic" search_string = search_input[3:] - elif search_input[0:4].lower() == "kplr": + elif search_input[0:4].strip().replace(' ','').lower() == "kplr": search_catalog = "kic" search_string = search_input[4:] - elif search_input[0:4].lower() == "epic": + elif search_input[0:4].strip().replace(' ','').lower() == "epic": search_catalog = "epic" search_string = search_input[4:] - elif search_input[0:4].lower() == "ktwo": + elif search_input[0:4].strip().replace(' ','').lower() == "ktwo": search_catalog = "epic" search_string = search_input[4:] - elif search_input[0:7].lower() == "gaiadr3": + elif search_input[0:7].strip().replace(' ','').lower() == "gaiadr3": search_catalog = "gaiadr3" search_string = search_input[7:] - elif search_input[0:4].lower() == "gaia" and search_input[4:6].lower() != "dr": + elif search_input[0:4].strip().replace(' ','').lower() == "gaia" and search_input[4:6].strip().replace(' ','').lower() != "dr": search_string = search_input[4:] search_catalog = "gaiadr3" else: @@ -240,7 +276,7 @@ def _parse_id(search_item): def QueryID( - search_object: Union[str, list[str]], + search_object: Union[str, int, list[str, int]], catalog: Union[str, int, list[str, int]] = None, input_catalog: str = None, max_results: int = None, @@ -286,7 +322,7 @@ def QueryID( _Catalog_Dictionary["tic"]["crossmatch_column_id"][catalog] ] .astype(str) - .values + #.values ) if _Catalog_Dictionary[catalog]["crossmatch_type"] == "column": # TIC is is crossmatched with gaiadr3/kic @@ -313,14 +349,17 @@ def _QueryID(catalog: str, id_list: str, max_results: int, id_column: str = None query = _get_TAP_Query( catalog, id_list, max_results=max_results, id_column=id_column ) - if max_results > 1e3: + async_limit = 1e3 + if max_results > async_limit: # we should chex max_results and if low do a synchronous query, if large async + log.warn(f"Warning: Queries over {async_limit} will be done asynchronously, and may take some time") job = VizTap.launch_job_async(query) + job.wait_for_job_end() results_table = job.get_data() else: job = VizTap.launch_job(query) results_table = job.get_data() - return results_table.to_pandas() + return results_table#.to_pandas() def QueryPosition( @@ -335,8 +374,9 @@ def QueryPosition( Query a catalog for a single source location, obtain nearby sources Parameters ---------- - coord : astropy.coordinates.SkyCoord or string - Coordinates around which to do a radius query. If passed a string, will resolve using `from_name`. + coord : astropy.coordinates.SkyCoord, string, tuple, or list thereof + Coordinates around which to do a radius query. If passed a string, will first try to resolve string as a coordinate using `~astropy.coordinates.SkyCoord`, + if this fails then tries to resolve the string as a name using '~astroquery.mast.MastClass.resolve_object'. epoch: astropy.time.Time The time of observation in JD. catalog: str @@ -358,7 +398,7 @@ def QueryPosition( # Check to make sure that user input is in the correct format if not isinstance(coord, SkyCoord): if isinstance(coord, str): - coord = SkyCoord.from_name(coord) + coord = MastClass().resolve_object(coord) else: raise TypeError(f"could not resolve {coord} to SkyCoord") if epoch is not None: @@ -401,7 +441,7 @@ def QueryPosition( result = filters.query_region(coord, catalog=catalog_name, radius=Angle(radius)) if len(result) == 0: result = ( - pd.DataFrame( + Table( columns=[ *catalog_meta["columns"], "RA", @@ -457,7 +497,8 @@ def QueryPosition( ) # Now sort the table based on separation result.sort(["Separation"]) - result = result.to_pandas().set_index("ID") + #return result + #result = result.to_pandas().set_index("ID") return CatalogResult(result[_get_return_columns(result.columns)]) @@ -516,18 +557,13 @@ def _table_to_skycoord( SkyCoord object with RA, Dec, equinox, and proper motion parameters. """ + if equinox is None and catalog is None: + _, catalog = _parse_id(table[0][0]) if equinox is None and catalog is not None: equinox = _Catalog_Dictionary[catalog]["equinox"] if epoch is None and catalog is not None: epoch = equinox - catlist = ["short", "tic", "kic", "epic", "gaiadr3"] - - RA_Keys = ["RA", "RAJ2000", "RA_ICRS"] - Dec_Keys = ["Dec", "DEJ2000", "DE_ICRS"] - pmRA_Keys = ["pmRA"] - pmDec_Keys = ["pmDE"] - # We need to remove any nan values from our proper motion list # Doing this will allow objects which do not have proper motion to still be displayed table["pmRA"] = np.ma.filled(table["pmRA"].astype(float), 0.0) @@ -560,6 +596,6 @@ def _table_to_skycoord( return c -class CatalogResult(pd.DataFrame): +class CatalogResult(Table): def to_SkyCoord(self, equinox: Time = None, epoch: Time = None): - return _table_to_skycoord(Table.from_pandas(self), equinox=equinox, epoch=epoch) + return _table_to_skycoord(Table(self), equinox=equinox, epoch=epoch) diff --git a/src/lksearch/data/catalog_config.json b/src/lksearch/data/catalog_config.json new file mode 100644 index 0000000..d4ec358 --- /dev/null +++ b/src/lksearch/data/catalog_config.json @@ -0,0 +1,140 @@ +{ + "kic": { + "catalog": "V/133/kic", + "columns": [ + "KIC", + "RAJ2000", + "DEJ2000", + "pmRA", + "pmDE", + "Plx", + "kepmag", + "Radius", + "Teff", + "logg" + ], + "column_filters": "kepmag", + "rename_in": [ + "KIC", + "kepmag" + ], + "rename_out": [ + "ID", + "Kepmag" + ], + "equinox": 2000, + "prefix": "KIC", + "default_mag": "Kepmag", + "default_id_column": "KIC", + "crossmatch_catalogs": [ + "tic", + "gaiadr3" + ], + "crossmatch_type": "tic", + "crossmatch_columns": null + }, + "epic": { + "catalog": "IV/34/epic", + "columns": [ + "ID", + "RAJ2000", + "DEJ2000", + "pmRA", + "pmDEC", + "plx", + "Kpmag", + "logg", + "Teff", + "Rad", + "Mass" + ], + "column_filters": "Kpmag", + "rename_in": [ + "Kpmag", + "pmDEC", + "plx" + ], + "rename_out": [ + "K2mag", + "pmDE", + "Plx" + ], + "equinox": 2000, + "prefix": "EPIC", + "default_mag": "K2mag", + "default_id_column": "ID", + "crossmatch_catalogs": null + }, + "tic": { + "catalog": "IV/39/tic82", + "columns": [ + "TIC", + "RAJ2000", + "DEJ2000", + "pmRA", + "pmDE", + "Plx", + "Tmag", + "logg", + "Teff", + "Rad", + "Mass" + ], + "column_filters": "Tmag", + "rename_in": [ + "TIC", + "Tmag" + ], + "rename_out": [ + "ID", + "TESSmag" + ], + "equinox": 2000, + "prefix": "TIC", + "default_mag": "TESSmag", + "default_id_column": "TIC", + "crossmatch_catalogs": [ + "gaiadr3", + "kic" + ], + "crossmatch_type": "column", + "crossmatch_column_id": { + "kic": "KIC", + "gaiadr3": "GAIA", + "tic": "TIC" + } + }, + "gaiadr3": { + "catalog": "I/355/gaiadr3", + "columns": [ + "DR3Name", + "RAJ2000", + "DEJ2000", + "pmRA", + "pmDE", + "Plx", + "Gmag", + "BPmag", + "RPmag", + "logg", + "Teff" + ], + "column_filters": "Gmag", + "rename_in": [ + "DR3Name" + ], + "rename_out": [ + "ID" + ], + "equinox": 2016, + "prefix": null, + "default_mag": "Gmag", + "default_id_column": "Source", + "crossmatch_catalogs": [ + "tic", + "kic" + ], + "crossmatch_type": "tic", + "crossmatch_column_id": null + } +} \ No newline at end of file diff --git a/tests/test_catalogs_conesearch.py b/tests/test_catalogs_conesearch.py index ebec807..d825bb8 100644 --- a/tests/test_catalogs_conesearch.py +++ b/tests/test_catalogs_conesearch.py @@ -2,7 +2,7 @@ import numpy as np from astropy.coordinates import SkyCoord -import pandas as pd +from astropy.table import Table from astropy.time import Time import astropy.units as u from lksearch.CatalogSearch import QueryPosition @@ -24,7 +24,7 @@ def test_tic(): assert len(catalog) == 4 # Checks that an astropy Table is returned - assert isinstance(catalog, pd.DataFrame) + assert isinstance(catalog, Table) # Test that the proper motion works @@ -101,7 +101,7 @@ def test_empty(): radius=20 * u.arcsecond, magnitude_limit=18, ) - assert isinstance(catalog, pd.DataFrame) + assert isinstance(catalog, Table) assert len(catalog) == 0 From fbe9dbaf669a4e86efe6ae0f8995bfb16d1f5cec Mon Sep 17 00:00:00 2001 From: Tyler Pritchard Date: Wed, 20 Nov 2024 00:01:50 -0500 Subject: [PATCH 11/15] tutorials and documentation updates --- docs/tutorials/catalog-searches.ipynb | 1368 ++++++++++++++-------- docs/tutorials/cloud-data-searches.ipynb | 325 ++++- docs/tutorials/data-searches.ipynb | 315 +---- docs/tutorials/index.rst | 7 +- src/lksearch/CatalogSearch.py | 340 +++--- tests/test_catalogs_conesearch.py | 46 +- tests/test_catalogs_idsearch.py | 38 +- 7 files changed, 1361 insertions(+), 1078 deletions(-) diff --git a/docs/tutorials/catalog-searches.ipynb b/docs/tutorials/catalog-searches.ipynb index d3a05e7..2a261e8 100644 --- a/docs/tutorials/catalog-searches.ipynb +++ b/docs/tutorials/catalog-searches.ipynb @@ -5,7 +5,7 @@ "id": "8362de11", "metadata": {}, "source": [ - "# Catalog Searches Tutorial" + "# How to Search for Catalog Data and IDs with lksearch" ] }, { @@ -20,7 +20,27 @@ "- The TESS Input Catalog\n", "- Gaia EDR3.\n", "\n", - "`lksearch` will propagate the proper motion for you. Below are examples of each query." + "`lksearch` has three main pieces of functionality - two ways of retrieving data from a catalog, and one for looking up catalog IDs.\n", + "\n", + "These are:\n", + " \n", + "- **A position cone-search** that searches for sources within a given radius from some position using `QueryPosition`\n", + "- **An exact ID lookup**, retrieving catalog rows where the catalog ID matches the search ID using `QueryID`\n", + "- **A way of looking up catalog IDs** given a common name or another catalog ID with `IDLookup`. \n", + "\n", + "`lksearch` also has the ability to crossmatch targets when doing an exact ID lookup between the TIC, KIC, and Gaia EDR3 catalogs because this crossmatch already exists in the TIC. \n", + "\n", + "`lksearch` will propagate the proper motion for you, and can optionally return a SkyCoordinate either directly from the Search or by using the `to_skycoord` property from the results table. \n", + "\n", + "Below are examples of each query." + ] + }, + { + "cell_type": "markdown", + "id": "b35a1450-2a06-4413-8796-e13fba1e74a8", + "metadata": {}, + "source": [ + "## Searching by Position" ] }, { @@ -30,7 +50,7 @@ "metadata": {}, "outputs": [], "source": [ - "from lksearch.catalog import query_EPIC, query_KIC, query_TIC, query_gaia\n", + "from lksearch import CatalogSearch\n", "from astropy.coordinates import SkyCoord\n", "from astropy.time import Time\n", "import astropy.units as u" @@ -46,7 +66,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 2, "id": "f98f6097-1f3e-433b-8337-617978b86b9b", "metadata": {}, "outputs": [], @@ -64,94 +84,45 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 3, "id": "fd0abec3-8b85-4812-aafb-ca13a94d306c", "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
RADecSeparationRelative_FluxKepmagTefflogg
ID
KIC 11904151285.6793850.2412990.0000001.00000010.96100054914.467
KIC 11904160285.6807650.2424935.3452140.00664416.405001<NA>NaN
\n", - "
" + "
CatalogResult length=5\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
IDRADecSeparationRelative_FluxpmRApmDEKepmagTefflogg
mas / yrmas / yrmagKlog(cm.s**-2)
str12float64float64float64float32float64float64float32int32float32
KIC 11904151285.6793850.2412990.01.00.00.010.96154914.467
KIC 11904160285.6807650.2424935.3452135059380710.00664354440.00.016.405----
KIC 11904158285.6804250.24571616.080461583713090.00542001430.00.016.626----
KIC 11904156285.6801550.25001131.413257260929460.0026717787-4.00.017.394----
KIC 11904148285.6772250.2590163.953185816782890.0171553720.00.015.37552864.640
" ], "text/plain": [ - " RA Dec Separation Relative_Flux Kepmag \\\n", - "ID \n", - "KIC 11904151 285.67938 50.241299 0.000000 1.000000 10.961000 \n", - "KIC 11904160 285.68076 50.242493 5.345214 0.006644 16.405001 \n", - "\n", - " Teff logg \n", - "ID \n", - "KIC 11904151 5491 4.467 \n", - "KIC 11904160 NaN " + "\n", + " ID RA Dec Separation Relative_Flux pmRA pmDE Kepmag Teff logg \n", + " mas / yr mas / yr mag K log(cm.s**-2)\n", + " str12 float64 float64 float64 float32 float64 float64 float32 int32 float32 \n", + "------------ --------- --------- ----------------- ------------- -------- -------- ------- ----- -------------\n", + "KIC 11904151 285.67938 50.241299 0.0 1.0 0.0 0.0 10.961 5491 4.467\n", + "KIC 11904160 285.68076 50.242493 5.345213505938071 0.0066435444 0.0 0.0 16.405 -- --\n", + "KIC 11904158 285.68042 50.245716 16.08046158371309 0.0054200143 0.0 0.0 16.626 -- --\n", + "KIC 11904156 285.68015 50.250011 31.41325726092946 0.0026717787 -4.0 0.0 17.394 -- --\n", + "KIC 11904148 285.67722 50.25901 63.95318581678289 0.017155372 0.0 0.0 15.375 5286 4.640" ] }, - "execution_count": 14, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "query_KIC(c)" + "CatalogSearch.QueryPosition(c, catalog=\"kic\", max_results=5)" ] }, { @@ -164,94 +135,45 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 4, "id": "e3499cc9-33b4-4d21-b734-ed6398539442", "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
RADecSeparationRelative_FluxKepmagTefflogg
ID
KIC 11904151285.6793850.2412990.0000001.00000010.96100054914.467
KIC 11904160285.6807650.2424935.3452140.00664416.405001<NA>NaN
\n", - "
" + "
CatalogResult length=5\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
IDRADecSeparationRelative_FluxpmRApmDEKepmagTefflogg
mas / yrmas / yrmagKlog(cm.s**-2)
str12float64float64float64float32float64float64float32int32float32
KIC 11904151285.6793850.2412990.01.00.00.010.96154914.467
KIC 11904160285.6807650.2424935.3452135059380710.00664354440.00.016.405----
KIC 11904158285.6804250.24571616.080461583713090.00542001430.00.016.626----
KIC 11904156285.680106756903450.2500109999919831.4077965703614230.0026717787-4.00.017.394----
KIC 11904148285.6772250.2590100000000163.953185816782890.0171553720.00.015.37552864.640
" ], "text/plain": [ - " RA Dec Separation Relative_Flux Kepmag \\\n", - "ID \n", - "KIC 11904151 285.67938 50.241299 0.000000 1.000000 10.961000 \n", - "KIC 11904160 285.68076 50.242493 5.345214 0.006644 16.405001 \n", - "\n", - " Teff logg \n", - "ID \n", - "KIC 11904151 5491 4.467 \n", - "KIC 11904160 NaN " + "\n", + " ID RA Dec Separation Relative_Flux pmRA pmDE Kepmag Teff logg \n", + " mas / yr mas / yr mag K log(cm.s**-2)\n", + " str12 float64 float64 float64 float32 float64 float64 float32 int32 float32 \n", + "------------ ----------------- ----------------- ------------------ ------------- -------- -------- ------- ----- -------------\n", + "KIC 11904151 285.67938 50.241299 0.0 1.0 0.0 0.0 10.961 5491 4.467\n", + "KIC 11904160 285.68076 50.242493 5.345213505938071 0.0066435444 0.0 0.0 16.405 -- --\n", + "KIC 11904158 285.68042 50.245716 16.08046158371309 0.0054200143 0.0 0.0 16.626 -- --\n", + "KIC 11904156 285.6801067569034 50.25001099999198 31.407796570361423 0.0026717787 -4.0 0.0 17.394 -- --\n", + "KIC 11904148 285.67722 50.25901000000001 63.95318581678289 0.017155372 0.0 0.0 15.375 5286 4.640" ] }, - "execution_count": 15, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "query_KIC(c, epoch=Time.now())" + "CatalogSearch.QueryPosition(c, epoch=Time.now(), catalog=\"kic\", max_results=5)" ] }, { @@ -264,118 +186,45 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 5, "id": "37e4bc44-5a6c-4dbd-a4e0-31f0a8c98184", "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
RADecSeparationRelative_FluxKepmagTefflogg
ID
KIC 11904151285.6793850.2412990.0000001.00000010.96100054914.467
KIC 11904160285.6807650.2424935.3452140.00664416.405001<NA>NaN
KIC 11904165285.6831750.2412078.7323900.00266017.399000<NA>NaN
KIC 11904162285.6812450.24391610.3487930.00157617.966999<NA>NaN
\n", - "
" + "
CatalogResult length=5\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
IDRADecSeparationRelative_FluxpmRApmDEKepmagTefflogg
mas / yrmas / yrmagKlog(cm.s**-2)
str12float64float64float64float32float64float64float32int32float32
KIC 11904151285.6793850.2412990.01.00.00.010.96154914.467
KIC 11904160285.6807650.2424935.3452135059380710.00664354440.00.016.405----
KIC 11904165285.6831750.2412078.7323901946832430.0026595010.00.017.399----
KIC 11904162285.6812450.2439159999999910.3487927664455910.00157616110.00.017.967----
KIC 11904158285.6804250.24571616.080461583713090.00542001430.00.016.626----
" ], "text/plain": [ - " RA Dec Separation Relative_Flux Kepmag \\\n", - "ID \n", - "KIC 11904151 285.67938 50.241299 0.000000 1.000000 10.961000 \n", - "KIC 11904160 285.68076 50.242493 5.345214 0.006644 16.405001 \n", - "KIC 11904165 285.68317 50.241207 8.732390 0.002660 17.399000 \n", - "KIC 11904162 285.68124 50.243916 10.348793 0.001576 17.966999 \n", - "\n", - " Teff logg \n", - "ID \n", - "KIC 11904151 5491 4.467 \n", - "KIC 11904160 NaN \n", - "KIC 11904165 NaN \n", - "KIC 11904162 NaN " + "\n", + " ID RA Dec Separation Relative_Flux pmRA pmDE Kepmag Teff logg \n", + " mas / yr mas / yr mag K log(cm.s**-2)\n", + " str12 float64 float64 float64 float32 float64 float64 float32 int32 float32 \n", + "------------ --------- ----------------- ------------------ ------------- -------- -------- ------- ----- -------------\n", + "KIC 11904151 285.67938 50.241299 0.0 1.0 0.0 0.0 10.961 5491 4.467\n", + "KIC 11904160 285.68076 50.242493 5.345213505938071 0.0066435444 0.0 0.0 16.405 -- --\n", + "KIC 11904165 285.68317 50.241207 8.732390194683243 0.002659501 0.0 0.0 17.399 -- --\n", + "KIC 11904162 285.68124 50.24391599999999 10.348792766445591 0.0015761611 0.0 0.0 17.967 -- --\n", + "KIC 11904158 285.68042 50.245716 16.08046158371309 0.0054200143 0.0 0.0 16.626 -- --" ] }, - "execution_count": 16, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "query_KIC(c, epoch=Time.now(), radius=3 * u.pixel)" + "CatalogSearch.QueryPosition(c, epoch=Time.now(), radius=30 * u.arcsec, catalog=\"kic\")" ] }, { @@ -388,130 +237,39 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 6, "id": "631f9a71-b0f2-4cb7-9ef3-565155c0fe16", "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
RADecSeparationRelative_FluxTESSmagMassRadTefflogg
ID
TIC 1717218060NaNNaNNaN1.00000017.4030001.0301.0555771.04.4043
TIC 377780790285.67922550.241589NaN589.38598610.4770001.0171.0905706.04.3707
TIC 377780779285.68598450.249944NaN4.15719115.8560000.7000.8054467.04.4721
TIC 1717218059NaNNaNNaN0.64387217.8810011.0700.8105895.04.6506
\n", - "
" + "
CatalogResult length=2\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
IDRADecSeparationRelative_FluxpmRApmDETESSmagMassRadTefflogg
mas / yrmas / yrmagsolMasssolRadKlog(cm.s**-2)
str14float64float64float64float32float64float64float32float32float64float64float32
TIC 377780790285.679222974123450.24159228918821nan915.37714-18.39441.44810.4771.0171.0905706.04.3707
TIC 1717218059nannannan1.0-2.227-1.20417.8811.0700.8105895.04.6506
" ], "text/plain": [ - " RA Dec Separation Relative_Flux TESSmag \\\n", - "ID \n", - "TIC 1717218060 NaN NaN NaN 1.000000 17.403000 \n", - "TIC 377780790 285.679225 50.241589 NaN 589.385986 10.477000 \n", - "TIC 377780779 285.685984 50.249944 NaN 4.157191 15.856000 \n", - "TIC 1717218059 NaN NaN NaN 0.643872 17.881001 \n", - "\n", - " Mass Rad Teff logg \n", - "ID \n", - "TIC 1717218060 1.030 1.055 5771.0 4.4043 \n", - "TIC 377780790 1.017 1.090 5706.0 4.3707 \n", - "TIC 377780779 0.700 0.805 4467.0 4.4721 \n", - "TIC 1717218059 1.070 0.810 5895.0 4.6506 " + "\n", + " ID RA Dec Separation Relative_Flux pmRA pmDE TESSmag Mass Rad Teff logg \n", + " mas / yr mas / yr mag solMass solRad K log(cm.s**-2)\n", + " str14 float64 float64 float64 float32 float64 float64 float32 float32 float64 float64 float32 \n", + "-------------- ----------------- ----------------- ---------- ------------- --------- --------- ------- ------- -------- ------- -------------\n", + " TIC 377780790 285.6792229741234 50.24159228918821 nan 915.37714 -18.394 41.448 10.477 1.017 1.090 5706.0 4.3707\n", + "TIC 1717218059 nan nan nan 1.0 -2.227 -1.204 17.881 1.070 0.810 5895.0 4.6506" ] }, - "execution_count": 17, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "query_TIC(c, epoch=Time.now(), radius=2 * u.pixel)" + "CatalogSearch.QueryPosition(c, epoch=Time.now(), radius=20 * u.arcsec, catalog=\"tic\")" ] }, { @@ -524,72 +282,33 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 7, "id": "e21a83c5-2975-4fde-a1a0-6d5fb031e95d", "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
RADecSeparationRelative_FluxK2magMassRadTefflogg
ID
\n", - "
" + "
Table length=0\n", + "\n", + "\n", + "\n", + "
RAJ2000DEJ2000pmRApmDEPlxK2magloggTeffRadMassRADecSeparationRelative_Flux
float64float64float64float64float64float64float64float64float64float64float64float64float64float64
" ], "text/plain": [ - "Empty DataFrame\n", - "Columns: [RA, Dec, Separation, Relative_Flux, K2mag, Mass, Rad, Teff, logg]\n", - "Index: []" + "\n", + "RAJ2000 DEJ2000 pmRA pmDE Plx K2mag logg Teff Rad Mass RA Dec Separation Relative_Flux\n", + "float64 float64 float64 float64 float64 float64 float64 float64 float64 float64 float64 float64 float64 float64 \n", + "------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ---------- -------------" ] }, - "execution_count": 21, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "query_EPIC(c)" + "CatalogSearch.QueryPosition(c, catalog=\"epic\")" ] }, { @@ -602,122 +321,43 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 8, "id": "2f18882e-a193-4629-9681-b36ea02af6d0", "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
\n", - "\n", - "
\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
RADecSeparationRelative_FluxBPmagGmagRPmagTefflogg
ID
Gaia DR3 2132155017099178624285.67935350.2414050.0000001.00000011.25350510.92003110.4182635595.84.3544
Gaia DR3 2132155051458917632285.68021450.24994230.7971310.00169118.20978217.84948517.3178465424.74.6774
Gaia DR3 2132155051458918144285.68592250.24991834.1761350.00557817.21398416.55381815.778805NaNNaN
\n", - "" + "
CatalogResult length=3\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
IDRADecSeparationRelative_FluxpmRApmDEBPmagGmagRPmagTefflogg
mas / yrmas / yrmagmagmagKlog(cm.s**-2)
str28float64float64float64float64float64float64float64float64float64float64float64
Gaia DR3 2132155017099178624285.679351118414350.241408153079270.01.0-18.48341.38211.25350510.92003110.4182635595.84.3544
Gaia DR3 2132155051458917632285.680213385120750.249941766243230.7850762847439480.0016912912421145657-1.519-1.20318.20978217.84948517.3178465424.74.6774
Gaia DR3 2132155051458918144285.685922896334450.2499188485123634.170441659817360.0055780859267139439.4025.81417.21398416.55381815.778805----
" ], "text/plain": [ - " RA Dec Separation \\\n", - "ID \n", - "Gaia DR3 2132155017099178624 285.679353 50.241405 0.000000 \n", - "Gaia DR3 2132155051458917632 285.680214 50.249942 30.797131 \n", - "Gaia DR3 2132155051458918144 285.685922 50.249918 34.176135 \n", - "\n", - " Relative_Flux BPmag Gmag RPmag \\\n", - "ID \n", - "Gaia DR3 2132155017099178624 1.000000 11.253505 10.920031 10.418263 \n", - "Gaia DR3 2132155051458917632 0.001691 18.209782 17.849485 17.317846 \n", - "Gaia DR3 2132155051458918144 0.005578 17.213984 16.553818 15.778805 \n", - "\n", - " Teff logg \n", - "ID \n", - "Gaia DR3 2132155017099178624 5595.8 4.3544 \n", - "Gaia DR3 2132155051458917632 5424.7 4.6774 \n", - "Gaia DR3 2132155051458918144 NaN NaN " + "\n", + " ID RA Dec Separation ... Gmag RPmag Teff logg \n", + " ... mag mag K log(cm.s**-2)\n", + " str28 float64 float64 float64 ... float64 float64 float64 float64 \n", + "---------------------------- ----------------- ----------------- ------------------ ... --------- --------- ------- -------------\n", + "Gaia DR3 2132155017099178624 285.6793511184143 50.24140815307927 0.0 ... 10.920031 10.418263 5595.8 4.3544\n", + "Gaia DR3 2132155051458917632 285.6802133851207 50.2499417662432 30.785076284743948 ... 17.849485 17.317846 5424.7 4.6774\n", + "Gaia DR3 2132155051458918144 285.6859228963344 50.24991884851236 34.17044165981736 ... 16.553818 15.778805 -- --" ] }, - "execution_count": 22, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "query_gaia(c, epoch=Time.now(), radius=40 * u.arcsecond)" + "CatalogSearch.QueryPosition(\n", + " c, epoch=Time.now(), radius=40 * u.arcsecond, catalog=\"gaiadr3\"\n", + ")" ] }, { @@ -730,7 +370,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 9, "id": "fb7fc90b-87ad-47a7-841f-402b2ff46867", "metadata": {}, "outputs": [ @@ -738,13 +378,656 @@ "data": { "text/plain": [ "" + " [(-18.48303961, 41.38198231, 7.81219820e-05),\n", + " ( -1.51899991, -1.20300012, 5.46920033e-06),\n", + " ( 9.40200283, 5.81399542, 2.80693881e-05)]>" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "CatalogSearch.QueryPosition(\n", + " c,\n", + " epoch=Time.now(),\n", + " radius=40 * u.arcsecond,\n", + " catalog=\"gaiadr3\",\n", + " return_skycoord=True,\n", + ")" + ] + }, + { + "cell_type": "markdown", + "id": "a29f3b6f-9ab3-4db5-aa9f-688f93cfc857", + "metadata": {}, + "source": [ + "You can also sub-select from the results table and then convert to a SkyCoordinate" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "502e05d8-f4ff-4089-91b2-e83dd9d0d5b2", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
CatalogResult length=3\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
IDRADecSeparationRelative_FluxpmRApmDEBPmagGmagRPmagTefflogg
mas / yrmas / yrmagmagmagKlog(cm.s**-2)
str28float64float64float64float64float64float64float64float64float64float64float64
Gaia DR3 2132155017099178624285.679351118414250.2414081530792840.01.0-18.48341.38211.25350510.92003110.4182635595.84.3544
Gaia DR3 2132155051458917632285.680213385120750.249941766243230.785076284695250.0016912912421145657-1.519-1.20318.20978217.84948517.3178465424.74.6774
Gaia DR3 2132155051458918144285.685922896334450.2499188485123734.1704416598752940.0055780859267139439.4025.81417.21398416.55381815.778805----
" + ], + "text/plain": [ + "\n", + " ID RA Dec Separation ... Gmag RPmag Teff logg \n", + " ... mag mag K log(cm.s**-2)\n", + " str28 float64 float64 float64 ... float64 float64 float64 float64 \n", + "---------------------------- ----------------- ------------------ ------------------ ... --------- --------- ------- -------------\n", + "Gaia DR3 2132155017099178624 285.6793511184142 50.241408153079284 0.0 ... 10.920031 10.418263 5595.8 4.3544\n", + "Gaia DR3 2132155051458917632 285.6802133851207 50.2499417662432 30.78507628469525 ... 17.849485 17.317846 5424.7 4.6774\n", + "Gaia DR3 2132155051458918144 285.6859228963344 50.24991884851237 34.170441659875294 ... 16.553818 15.778805 -- --" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "result = CatalogSearch.QueryPosition(\n", + " c, epoch=Time.now(), radius=40 * u.arcsecond, catalog=\"gaiadr3\"\n", + ")\n", + "result" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "2bcc497d-d927-4baf-a8df-85bd713e9b34", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "result.to_SkyCoord()" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "f20bea99-9f9f-4069-8947-9f55c7f2bd5c", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "result.to_SkyCoord()" + ] + }, + { + "cell_type": "markdown", + "id": "6f069335-fb49-4301-85cf-a32172e430fe", + "metadata": {}, + "source": [ + "## Searching by Catalog ID" + ] + }, + { + "cell_type": "markdown", + "id": "8a0f27fb-b981-4ca6-b3f1-6ef00a796057", + "metadata": {}, + "source": [ + "For TIC, KIC, EPIC, and Gaia DR3 - if we know the Catalog ID of a source we can use `QueryID` to return the data from that catalog for that id. For example, Kepler-10 above is also known as TIC 377780790. " + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "8f497117-9e06-471f-9420-2334203f64c3", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
CatalogResult length=1\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
TICRAJ2000DEJ2000HIPTYCUCAC4_2MASSobjIDWISEAGAIAAPASSKICS_GRefr_PospmRAe_pmRApmDEe_pmDEr_pmPlxe_Plxr_PlxGLONGLATELONELATBmage_BmagVmage_Vmagumage_umaggmage_gmagrmage_rmagimage_imagzmage_zmagJmage_JmagHmage_HmagKmage_Kmagq_2MASSW1mage_W1magW2mage_W2magW3mage_W3magW4mage_W4magGmage_GmagTmage_Tmagf_TmagFlagTeffs_Teffloggs_logg__M_H_e__M_H_Rads_RadMasss_Massrhos_rhoLClassLums_LumDists_DistE_B-V_s_E_B-V_NcontRcontDispm_TICPriore_E_B-V_E_E_B-V_f_E_B-V_e_MassE_Masse_RadE_Rade_rhoE_rhoe_loggE_logge_LumE_Lume_DistE_Distr_Diste_TeffE_Teffr_TeffBPmage_BPmagRPmage_RPmagq_Gaiar_Vmagr_BmagCliste_RAJ2000e_DEJ2000RAOdegDEOdege_RAOdege_DEOdegRadFlWDFlID
degdegmas / yrmas / yrmas / yrmas / yrmasmasdegdegdegdegmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagKKlog(cm.s**-2)log(cm.s**-2)log(Sun)log(Sun)RsunRsunMsunMsunSunSunLsunLsunpcpcmagmagmagmagMsunMsunRsunRsunSunSunlog(cm.s**-2)log(cm.s**-2)LsunLsunpcpcKKmagmagmagmagmasmasdegdegmasmas
int64float64float64int32objectobjectobjectint64objectint64int32int32objectobjectobjectfloat64float32float64float32objectfloat64float32objectfloat64float64float64float64float32float32float32float32float32float64float32float64float32float64float32float64float32float64float32float32float32float32float32float32objectfloat32float32float32float32float32float32float32float32float64float64float32float32objectobjectfloat32float32float32float32float32float32float64float32float32float32float64float64objectfloat64float64float64float64float32float32int32float64objectint64float64float32float32objectfloat32float32float32float32float64float64float32float32float64float64float64float64objectfloat32float32objectfloat64float64float64float64int16objectobjectobjectfloat64float64float64float64float64float64int16int16int32
377780790285.6794217923850.24130576642--702-06269519024305+5014286--J190243.03+501429.12132155017099178624--11904151STARtmgaia2tmgaia2-18.3940.04541.4480.046gaia25.36190.0233gaia280.4897343418918.81612807429303.7010258068871.8498786093212.2580.06711.0430.023--------------------9.8890.0229.5630.0259.4960.021AAA-222-111-000-0-09.440.0239.4910.029.4430.0299.4030.48210.91910.00031810.4770.006reredspect5706.0141.04.37070.0854-0.120.11.090.0611.0170.1280.78590.1845DWARF1.134140.03284185.5060.8080.01070.00372230.0101--0.0026680.00280.0046panstarrs0.1190.1380.0610.0610.15710.21190.10420.06660.035980.02970.8050.811bj2018125.2156.8spect11.27130.00100610.42730.0005851ucac4bpbj0.7672930.711508285.6792979640750.241484223590.0204740.02404310237087497
" + ], + "text/plain": [ + "\n", + " TIC RAJ2000 DEJ2000 HIP TYC UCAC4 _2MASS ... DEOdeg e_RAOdeg e_DEOdeg RadFl WDFl ID \n", + " deg deg ... deg mas mas \n", + " int64 float64 float64 int32 object object object ... float64 float64 float64 int16 int16 int32 \n", + "--------- --------------- -------------- ----- ------ ---------- ---------------- ... -------------- -------- -------- ----- ----- ---------\n", + "377780790 285.67942179238 50.24130576642 -- 702-062695 19024305+5014286 ... 50.24148422359 0.020474 0.024043 1 0 237087497" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "CatalogSearch.QueryID(\"TIC 377780790\")" + ] + }, + { + "cell_type": "markdown", + "id": "d3c8cec5-9925-49e1-bea8-3253bf669013", + "metadata": {}, + "source": [ + "... and KIC 11904151" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "a48bdf93-3ff3-43d6-befd-62390a536ac2", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
CatalogResult length=1\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
KICRAJ2000DEJ2000pmRApmDEPlxumaggmagrmagimagzmaggrmagd51magJmagHmagKmagkepmag_2Mkey_2MnameSCP-IDSCPkeycatkeyalcaltIDsgvcqpqaqfvTefflogg__Fe_H_E_B-V_AvR_
degdegmas / yrmas / yrmasmagmagmagmagmagmagmagmagmagmagmagKlog(cm.s**-2)log(Sun)magmagRsun
int32float64float64float64float64float64float32float32float32float32float32float32float32float32float32float32float32int32objectint32int32int32int16int32int16int16objectint16int16int16int32float32float32float32float32float32
11904151285.6793850.2412990.00.0----11.38810.9210.77810.729--11.1919.8889.5639.49610.9611065107578J19024305+50142861065107578--117326143-105815200SCP56254914.467-0.8120.0310.0950.98
" + ], + "text/plain": [ + "\n", + " KIC RAJ2000 DEJ2000 pmRA pmDE Plx umag gmag ... aq fv Teff logg __Fe_H_ E_B-V_ Av R_ \n", + " deg deg mas / yr mas / yr mas mag mag ... K log(cm.s**-2) log(Sun) mag mag Rsun \n", + " int32 float64 float64 float64 float64 float64 float32 float32 ... int16 int16 int32 float32 float32 float32 float32 float32\n", + "-------- --------- --------- -------- -------- ------- ------- ------- ... ----- ----- ----- ------------- -------- ------- ------- -------\n", + "11904151 285.67938 50.241299 0.0 0.0 -- -- 11.388 ... 6 2 5491 4.467 -0.812 0.031 0.095 0.98" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "CatalogSearch.QueryID(\"KIC 11904151\")" + ] + }, + { + "cell_type": "markdown", + "id": "582ac919-9e81-489a-86cb-fd841c8bc028", + "metadata": {}, + "source": [ + "... and Gaia DR3 2132155017099178624" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "6a6968f1-b8e9-400d-a7cf-273b982a6a26", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
CatalogResult length=1\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
DR3NameRA_ICRSDE_ICRSSolIDSourceRandomIe_RA_ICRSe_DE_ICRSPlxe_PlxRPlxPMpmRAe_pmRApmDEe_pmDERADEcorRAPlxcorRApmRAcorRApmDEcorDEPlxcorDEpmRAcorDEpmDEcorPlxpmRAcorPlxpmDEcorpmRApmDEcorNALNACNgALNbALgofALchi2ALepsisepsiSolvedAPFnueffpscole_pscolRApscolCorrDEpscolCorrPlxpscolCorrpmRApscolCorrpmDEpscolCorrMatchObsANperamaxMatchObsNewMatchObsMatchObsrmIPDgofhaIPDgofhpIPDfmpIPDfowRUWESDSk1SDSk2SDSk3SDSk4SDMk1SDMk2SDMk3SDMk4Dupo_GmagFGe_FGRFGGmage_Gmago_BPmagFBPe_FBPRFBPBPmage_BPmago_RPmagFRPe_FRPRFRPRPmage_RPmagE_BP_RP_NBPcontNBPblendNRPcontNRPblendModeBP-RPBP-GG-RPRVe_RVn_RVo_RVo_RVdRVNperRVS_NRVgofRVchi2RVTdurRVampRVtempTeffRVtemploggRVtemp_Fe_H_VatmparamVbroade_Vbroado_VbroadGRVSmage_GRVSmago_GRVSmagRVSS_NVarFlagGLONGLATELONELATQSOGalNSSXPcontXPsampRVSEpochPhEpochRVMCMCGSPMCMCMSCAndPQSOPGalPSSTeffb_TeffB_Teffloggb_loggB_logg__Fe_H_b__Fe_H_B__Fe_H_Distb_DistB_DistA0b_A0B_A0AGb_AGB_AGE_BP-RP_b_E_BP-RP_B_E_BP-RP_LibHIPdHIPnHIPf_HIPPS1coidPS1dPS1nPS1mPS1f_PS1SDSS13coidSDSS13dSDSS13nSDSS13mSDSS13f_SDSS13SKYM2dSKYM2nSKYM2mSKYM2f_SKYM2TYC2dTYC2f_TYC2TYC2moidnTYC2URAT1dURAT1f_URAT1URAT1oidnURAT1mURAT1AllWISEdAllWISEf_AllWISEAllWISEoidnAllWISEmAllWISEAPASS9coidAPASS9dAPASS9nAPASS9mAPASS9f_APASS9GSC23dGSC23f_GSC23GSC23coidnGSC23mGSC23RAVE5dRAVE5f_RAVE5RAVE5coidnRAVE5_2MASSd2MASSf_2MASS_2MASScoidn2MASSm2MASSRAVE6dRAVE6f_RAVE6RAVE6oidnRAVE6RAJ2000DEJ2000e_RAJ2000e_DEJ2000RADEcorJ2000
degdegmasmasmasmasmas / yrmas / yrmas / yrmas / yrmas / yrmas1 / um1 / um1 / ummasdegdegmagmagmagmagmagmagmagmagmagmagkm / skm / sdkm / sKlog(cm.s**-2)km / skm / smagmagdegdegdegdegKKKlog(cm.s**-2)log(cm.s**-2)log(cm.s**-2)pcpcpcmagmagmagmagmagmagmagmagmagmasmasmasmasmasmasmasmasmasmasmasmasdegdegmasmas
objectfloat64float64int64int64int64float32float32float64float32float64float64float64float32float64float64float32float32float32float32float32float32float32float32float32float32int16int16int16int16float64float64float64float64int16int16float32float32float32float32float32float32float32float32int16int16float64int16int16int16float64float64int16int16float32float64float64float64float64float64float32float32float32int16int16float64float64float64float64float64int16float64float64float64float64float64int16float64float64float64float64float64float64int16int16int16int16int16float64float64float64float32float32int16int16int16int16float64float64float64float64float32float32float32float32int16float64float64int16float64float64int16float64objectfloat64float64float64float64int16int16int16int16int16int16int16int16int16int16int16float64float64float64float32float32float32float32float32float32float32float32float32float64float64float64float32float32float32float32float32float32float32float32float32objectint32float64int16int16int64int64float64int16int16int16int32int64float64int16int16int16int32float64int16int16int16objectfloat64int16int32int16objectfloat64int16int32int16int16objectfloat64int16int32int16int16int32int32float64int16int16int16objectfloat64int16int32int16int16objectfloat64int16float64int16objectfloat64int16int32int16int16objectfloat64int16float64int16float64float64float64float64float32
Gaia DR3 2132155017099178624285.6792940153450.24148992495163614806892137676821321550170991786247127205410.00970.01055.36980.0103521.152145.322-18.4830.01241.3820.013-0.01390.0622-0.0681-0.17020.0472-0.1583-0.201-0.0394-0.1374-0.06913603603564-2.6955715.40110.08711.4633393101.551--------------41260.018997451810.0057575256124.68958000.899----------------0355807113.6601899.634568100.739710.9200310.00275939430541.4769106057224.459261918.127411.2535050.00284739539327.9908645798152.087173546.176810.4182630.0037921.202040000.8352410.3334740.501767-98.440.2411611460.55437-1.87652580.960951912.8372.435750.04.5-0.25222------10.2390540.0116811364.86836NOT_AVAILABLE80.4898821911918.81626758615303.7009956576571.850079083000111001100.00.00.9996615595.85594.45598.14.35444.35294.3558-0.2251-0.2294-0.2204185.2251184.8608185.60030.0010.00020.00250.00081e-040.00210.00041e-040.0011MARCS--------------------------------------------------URAT1-7022705030.0371424018090563910J190243.03+501429.10.064949865694524310------------N2E90004310.039655884409048410--------19024305+50142860.070933842983035910--------285.6794224542750.241306006410.1994790.217694-0.0523
" + ], + "text/plain": [ + "\n", + " DR3Name RA_ICRS DE_ICRS SolID ... DEJ2000 e_RAJ2000 e_DEJ2000 RADEcorJ2000\n", + " deg deg ... deg mas mas \n", + " object float64 float64 int64 ... float64 float64 float64 float32 \n", + "---------------------------- --------------- -------------- ------------------- ... -------------- --------- --------- ------------\n", + "Gaia DR3 2132155017099178624 285.67929401534 50.24148992495 1636148068921376768 ... 50.24130600641 0.199479 0.217694 -0.0523" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "CatalogSearch.QueryID(\"Gaia DR3 2132155017099178624\")" + ] + }, + { + "cell_type": "markdown", + "id": "da1850e6-7967-4814-92da-2c0927867a7e", + "metadata": {}, + "source": [ + "The TIC catalog has been cross-matched with the GAIA DR3 and KIC catalogs. `lksearch` can use this cross-matching to retrieve TIC/KIC/GAIA catalog info for any given TIC/KIC/GaiaDR3 source ID. The EPIC catalog is not included in this cross-matching. \n", + "\n", + "For Example, if we want the TIC info for Kepler-10, but only have the GAIA DR3Name above, we can get that like so:" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "068e7e8a-a634-4d19-9c3c-edf2312fd8d5", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
CatalogResult length=1\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
TICRAJ2000DEJ2000HIPTYCUCAC4_2MASSobjIDWISEAGAIAAPASSKICS_GRefr_PospmRAe_pmRApmDEe_pmDEr_pmPlxe_Plxr_PlxGLONGLATELONELATBmage_BmagVmage_Vmagumage_umaggmage_gmagrmage_rmagimage_imagzmage_zmagJmage_JmagHmage_HmagKmage_Kmagq_2MASSW1mage_W1magW2mage_W2magW3mage_W3magW4mage_W4magGmage_GmagTmage_Tmagf_TmagFlagTeffs_Teffloggs_logg__M_H_e__M_H_Rads_RadMasss_Massrhos_rhoLClassLums_LumDists_DistE_B-V_s_E_B-V_NcontRcontDispm_TICPriore_E_B-V_E_E_B-V_f_E_B-V_e_MassE_Masse_RadE_Rade_rhoE_rhoe_loggE_logge_LumE_Lume_DistE_Distr_Diste_TeffE_Teffr_TeffBPmage_BPmagRPmage_RPmagq_Gaiar_Vmagr_BmagCliste_RAJ2000e_DEJ2000RAOdegDEOdege_RAOdege_DEOdegRadFlWDFlID
degdegmas / yrmas / yrmas / yrmas / yrmasmasdegdegdegdegmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagKKlog(cm.s**-2)log(cm.s**-2)log(Sun)log(Sun)RsunRsunMsunMsunSunSunLsunLsunpcpcmagmagmagmagMsunMsunRsunRsunSunSunlog(cm.s**-2)log(cm.s**-2)LsunLsunpcpcKKmagmagmagmagmasmasdegdegmasmas
int64float64float64int32objectobjectobjectint64objectint64int32int32objectobjectobjectfloat64float32float64float32objectfloat64float32objectfloat64float64float64float64float32float32float32float32float32float64float32float64float32float64float32float64float32float64float32float32float32float32float32float32objectfloat32float32float32float32float32float32float32float32float64float64float32float32objectobjectfloat32float32float32float32float32float32float64float32float32float32float64float64objectfloat64float64float64float64float32float32int32float64objectint64float64float32float32objectfloat32float32float32float32float64float64float32float32float64float64float64float64objectfloat32float32objectfloat64float64float64float64int16objectobjectobjectfloat64float64float64float64float64float64int16int16int32
377780790285.6794217923850.24130576642--702-06269519024305+5014286--J190243.03+501429.12132155017099178624--11904151STARtmgaia2tmgaia2-18.3940.04541.4480.046gaia25.36190.0233gaia280.4897343418918.81612807429303.7010258068871.8498786093212.2580.06711.0430.023--------------------9.8890.0229.5630.0259.4960.021AAA-222-111-000-0-09.440.0239.4910.029.4430.0299.4030.48210.91910.00031810.4770.006reredspect5706.0141.04.37070.0854-0.120.11.090.0611.0170.1280.78590.1845DWARF1.134140.03284185.5060.8080.01070.00372230.0101--0.0026680.00280.0046panstarrs0.1190.1380.0610.0610.15710.21190.10420.06660.035980.02970.8050.811bj2018125.2156.8spect11.27130.00100610.42730.0005851ucac4bpbj0.7672930.711508285.6792979640750.241484223590.0204740.02404310237087497
" + ], + "text/plain": [ + "\n", + " TIC RAJ2000 DEJ2000 HIP TYC UCAC4 _2MASS ... DEOdeg e_RAOdeg e_DEOdeg RadFl WDFl ID \n", + " deg deg ... deg mas mas \n", + " int64 float64 float64 int32 object object object ... float64 float64 float64 int16 int16 int32 \n", + "--------- --------------- -------------- ----- ------ ---------- ---------------- ... -------------- -------- -------- ----- ----- ---------\n", + "377780790 285.67942179238 50.24130576642 -- 702-062695 19024305+5014286 ... 50.24148422359 0.020474 0.024043 1 0 237087497" + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "CatalogSearch.QueryID(\"Gaia DR3 2132155017099178624\", catalog=\"tic\")" + ] + }, + { + "cell_type": "markdown", + "id": "2d613dbe-1b6a-4ce2-8104-2050e22800eb", + "metadata": {}, + "source": [ + "We can also supply an integer ID, but if so we MUST specify what catalog to search" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "5c1b473b-cdda-4f4f-8f54-0d3ba79df22a", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
CatalogResult length=1\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
DR3NameRA_ICRSDE_ICRSSolIDSourceRandomIe_RA_ICRSe_DE_ICRSPlxe_PlxRPlxPMpmRAe_pmRApmDEe_pmDERADEcorRAPlxcorRApmRAcorRApmDEcorDEPlxcorDEpmRAcorDEpmDEcorPlxpmRAcorPlxpmDEcorpmRApmDEcorNALNACNgALNbALgofALchi2ALepsisepsiSolvedAPFnueffpscole_pscolRApscolCorrDEpscolCorrPlxpscolCorrpmRApscolCorrpmDEpscolCorrMatchObsANperamaxMatchObsNewMatchObsMatchObsrmIPDgofhaIPDgofhpIPDfmpIPDfowRUWESDSk1SDSk2SDSk3SDSk4SDMk1SDMk2SDMk3SDMk4Dupo_GmagFGe_FGRFGGmage_Gmago_BPmagFBPe_FBPRFBPBPmage_BPmago_RPmagFRPe_FRPRFRPRPmage_RPmagE_BP_RP_NBPcontNBPblendNRPcontNRPblendModeBP-RPBP-GG-RPRVe_RVn_RVo_RVo_RVdRVNperRVS_NRVgofRVchi2RVTdurRVampRVtempTeffRVtemploggRVtemp_Fe_H_VatmparamVbroade_Vbroado_VbroadGRVSmage_GRVSmago_GRVSmagRVSS_NVarFlagGLONGLATELONELATQSOGalNSSXPcontXPsampRVSEpochPhEpochRVMCMCGSPMCMCMSCAndPQSOPGalPSSTeffb_TeffB_Teffloggb_loggB_logg__Fe_H_b__Fe_H_B__Fe_H_Distb_DistB_DistA0b_A0B_A0AGb_AGB_AGE_BP-RP_b_E_BP-RP_B_E_BP-RP_LibHIPdHIPnHIPf_HIPPS1coidPS1dPS1nPS1mPS1f_PS1SDSS13coidSDSS13dSDSS13nSDSS13mSDSS13f_SDSS13SKYM2dSKYM2nSKYM2mSKYM2f_SKYM2TYC2dTYC2f_TYC2TYC2moidnTYC2URAT1dURAT1f_URAT1URAT1oidnURAT1mURAT1AllWISEdAllWISEf_AllWISEAllWISEoidnAllWISEmAllWISEAPASS9coidAPASS9dAPASS9nAPASS9mAPASS9f_APASS9GSC23dGSC23f_GSC23GSC23coidnGSC23mGSC23RAVE5dRAVE5f_RAVE5RAVE5coidnRAVE5_2MASSd2MASSf_2MASS_2MASScoidn2MASSm2MASSRAVE6dRAVE6f_RAVE6RAVE6oidnRAVE6RAJ2000DEJ2000e_RAJ2000e_DEJ2000RADEcorJ2000
degdegmasmasmasmasmas / yrmas / yrmas / yrmas / yrmas / yrmas1 / um1 / um1 / ummasdegdegmagmagmagmagmagmagmagmagmagmagkm / skm / sdkm / sKlog(cm.s**-2)km / skm / smagmagdegdegdegdegKKKlog(cm.s**-2)log(cm.s**-2)log(cm.s**-2)pcpcpcmagmagmagmagmagmagmagmagmagmasmasmasmasmasmasmasmasmasmasmasmasdegdegmasmas
objectfloat64float64int64int64int64float32float32float64float32float64float64float64float32float64float64float32float32float32float32float32float32float32float32float32float32int16int16int16int16float64float64float64float64int16int16float32float32float32float32float32float32float32float32int16int16float64int16int16int16float64float64int16int16float32float64float64float64float64float64float32float32float32int16int16float64float64float64float64float64int16float64float64float64float64float64int16float64float64float64float64float64float64int16int16int16int16int16float64float64float64float32float32int16int16int16int16float64float64float64float64float32float32float32float32int16float64float64int16float64float64int16float64objectfloat64float64float64float64int16int16int16int16int16int16int16int16int16int16int16float64float64float64float32float32float32float32float32float32float32float32float32float64float64float64float32float32float32float32float32float32float32float32float32objectint32float64int16int16int64int64float64int16int16int16int32int64float64int16int16int16int32float64int16int16int16objectfloat64int16int32int16objectfloat64int16int32int16int16objectfloat64int16int32int16int16int32int32float64int16int16int16objectfloat64int16int32int16int16objectfloat64int16float64int16objectfloat64int16int32int16int16objectfloat64int16float64int16float64float64float64float64float32
Gaia DR3 2132155017099178624285.6792940153450.24148992495163614806892137676821321550170991786247127205410.00970.01055.36980.0103521.152145.322-18.4830.01241.3820.013-0.01390.0622-0.0681-0.17020.0472-0.1583-0.201-0.0394-0.1374-0.06913603603564-2.6955715.40110.08711.4633393101.551--------------41260.018997451810.0057575256124.68958000.899----------------0355807113.6601899.634568100.739710.9200310.00275939430541.4769106057224.459261918.127411.2535050.00284739539327.9908645798152.087173546.176810.4182630.0037921.202040000.8352410.3334740.501767-98.440.2411611460.55437-1.87652580.960951912.8372.435750.04.5-0.25222------10.2390540.0116811364.86836NOT_AVAILABLE80.4898821911918.81626758615303.7009956576571.850079083000111001100.00.00.9996615595.85594.45598.14.35444.35294.3558-0.2251-0.2294-0.2204185.2251184.8608185.60030.0010.00020.00250.00081e-040.00210.00041e-040.0011MARCS--------------------------------------------------URAT1-7022705030.0371424018090563910J190243.03+501429.10.064949865694524310------------N2E90004310.039655884409048410--------19024305+50142860.070933842983035910--------285.6794224542750.241306006410.1994790.217694-0.0523
" + ], + "text/plain": [ + "\n", + " DR3Name RA_ICRS DE_ICRS SolID ... DEJ2000 e_RAJ2000 e_DEJ2000 RADEcorJ2000\n", + " deg deg ... deg mas mas \n", + " object float64 float64 int64 ... float64 float64 float64 float32 \n", + "---------------------------- --------------- -------------- ------------------- ... -------------- --------- --------- ------------\n", + "Gaia DR3 2132155017099178624 285.67929401534 50.24148992495 1636148068921376768 ... 50.24130600641 0.199479 0.217694 -0.0523" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "CatalogSearch.QueryID(\"2132155017099178624\", catalog=\"gaiadr3\")" + ] + }, + { + "cell_type": "markdown", + "id": "6a0f83b9-74ad-424d-8a0e-a412ba5044f1", + "metadata": {}, + "source": [ + "If we specify an integer and wish to use our limited cross-match, we can do that by specifying both the `input_catalog` and `catalog` parameters" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "d1209696-e696-4162-84e6-d1061f49f152", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
CatalogResult length=1\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
TICRAJ2000DEJ2000HIPTYCUCAC4_2MASSobjIDWISEAGAIAAPASSKICS_GRefr_PospmRAe_pmRApmDEe_pmDEr_pmPlxe_Plxr_PlxGLONGLATELONELATBmage_BmagVmage_Vmagumage_umaggmage_gmagrmage_rmagimage_imagzmage_zmagJmage_JmagHmage_HmagKmage_Kmagq_2MASSW1mage_W1magW2mage_W2magW3mage_W3magW4mage_W4magGmage_GmagTmage_Tmagf_TmagFlagTeffs_Teffloggs_logg__M_H_e__M_H_Rads_RadMasss_Massrhos_rhoLClassLums_LumDists_DistE_B-V_s_E_B-V_NcontRcontDispm_TICPriore_E_B-V_E_E_B-V_f_E_B-V_e_MassE_Masse_RadE_Rade_rhoE_rhoe_loggE_logge_LumE_Lume_DistE_Distr_Diste_TeffE_Teffr_TeffBPmage_BPmagRPmage_RPmagq_Gaiar_Vmagr_BmagCliste_RAJ2000e_DEJ2000RAOdegDEOdege_RAOdege_DEOdegRadFlWDFlID
degdegmas / yrmas / yrmas / yrmas / yrmasmasdegdegdegdegmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagKKlog(cm.s**-2)log(cm.s**-2)log(Sun)log(Sun)RsunRsunMsunMsunSunSunLsunLsunpcpcmagmagmagmagMsunMsunRsunRsunSunSunlog(cm.s**-2)log(cm.s**-2)LsunLsunpcpcKKmagmagmagmagmasmasdegdegmasmas
int64float64float64int32objectobjectobjectint64objectint64int32int32objectobjectobjectfloat64float32float64float32objectfloat64float32objectfloat64float64float64float64float32float32float32float32float32float64float32float64float32float64float32float64float32float64float32float32float32float32float32float32objectfloat32float32float32float32float32float32float32float32float64float64float32float32objectobjectfloat32float32float32float32float32float32float64float32float32float32float64float64objectfloat64float64float64float64float32float32int32float64objectint64float64float32float32objectfloat32float32float32float32float64float64float32float32float64float64float64float64objectfloat32float32objectfloat64float64float64float64int16objectobjectobjectfloat64float64float64float64float64float64int16int16int32
377780790285.6794217923850.24130576642--702-06269519024305+5014286--J190243.03+501429.12132155017099178624--11904151STARtmgaia2tmgaia2-18.3940.04541.4480.046gaia25.36190.0233gaia280.4897343418918.81612807429303.7010258068871.8498786093212.2580.06711.0430.023--------------------9.8890.0229.5630.0259.4960.021AAA-222-111-000-0-09.440.0239.4910.029.4430.0299.4030.48210.91910.00031810.4770.006reredspect5706.0141.04.37070.0854-0.120.11.090.0611.0170.1280.78590.1845DWARF1.134140.03284185.5060.8080.01070.00372230.0101--0.0026680.00280.0046panstarrs0.1190.1380.0610.0610.15710.21190.10420.06660.035980.02970.8050.811bj2018125.2156.8spect11.27130.00100610.42730.0005851ucac4bpbj0.7672930.711508285.6792979640750.241484223590.0204740.02404310237087497
" + ], + "text/plain": [ + "\n", + " TIC RAJ2000 DEJ2000 HIP TYC UCAC4 _2MASS ... DEOdeg e_RAOdeg e_DEOdeg RadFl WDFl ID \n", + " deg deg ... deg mas mas \n", + " int64 float64 float64 int32 object object object ... float64 float64 float64 int16 int16 int32 \n", + "--------- --------------- -------------- ----- ------ ---------- ---------------- ... -------------- -------- -------- ----- ----- ---------\n", + "377780790 285.67942179238 50.24130576642 -- 702-062695 19024305+5014286 ... 50.24148422359 0.020474 0.024043 1 0 237087497" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "CatalogSearch.QueryID(\"2132155017099178624\", catalog=\"tic\", input_catalog=\"gaiadr3\")" + ] + }, + { + "cell_type": "markdown", + "id": "97df2dd7-f970-496a-ad3e-6cc30ca0bd47", + "metadata": {}, + "source": [ + "We can also search for multiple IDS from a single catalog and get a table of all of the resulting catalog entries" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "5ff097ae-9182-4075-b9d0-1fa500c673f2", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
CatalogResult length=10\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
TICRAJ2000DEJ2000HIPTYCUCAC4_2MASSobjIDWISEAGAIAAPASSKICS_GRefr_PospmRAe_pmRApmDEe_pmDEr_pmPlxe_Plxr_PlxGLONGLATELONELATBmage_BmagVmage_Vmagumage_umaggmage_gmagrmage_rmagimage_imagzmage_zmagJmage_JmagHmage_HmagKmage_Kmagq_2MASSW1mage_W1magW2mage_W2magW3mage_W3magW4mage_W4magGmage_GmagTmage_Tmagf_TmagFlagTeffs_Teffloggs_logg__M_H_e__M_H_Rads_RadMasss_Massrhos_rhoLClassLums_LumDists_DistE_B-V_s_E_B-V_NcontRcontDispm_TICPriore_E_B-V_E_E_B-V_f_E_B-V_e_MassE_Masse_RadE_Rade_rhoE_rhoe_loggE_logge_LumE_Lume_DistE_Distr_Diste_TeffE_Teffr_TeffBPmage_BPmagRPmage_RPmagq_Gaiar_Vmagr_BmagCliste_RAJ2000e_DEJ2000RAOdegDEOdege_RAOdege_DEOdegRadFlWDFlID
degdegmas / yrmas / yrmas / yrmas / yrmasmasdegdegdegdegmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagKKlog(cm.s**-2)log(cm.s**-2)log(Sun)log(Sun)RsunRsunMsunMsunSunSunLsunLsunpcpcmagmagmagmagMsunMsunRsunRsunSunSunlog(cm.s**-2)log(cm.s**-2)LsunLsunpcpcKKmagmagmagmagmasmasdegdegmasmas
int64float64float64int32objectobjectobjectint64objectint64int32int32objectobjectobjectfloat64float32float64float32objectfloat64float32objectfloat64float64float64float64float32float32float32float32float32float64float32float64float32float64float32float64float32float64float32float32float32float32float32float32objectfloat32float32float32float32float32float32float32float32float64float64float32float32objectobjectfloat32float32float32float32float32float32float64float32float32float32float64float64objectfloat64float64float64float64float32float32int32float64objectint64float64float32float32objectfloat32float32float32float32float64float64float32float32float64float64float64float64objectfloat32float32objectfloat64float64float64float64int16objectobjectobjectfloat64float64float64float64float64float64int16int16int32
27916356296.8372413228948.23993319637--692-06846019472094+4814238--J194720.94+481423.920866368849805143045446630110874614STARtmgaia2tmgaia20.9610.0258.4290.026gaia21.67470.0145gaia281.6926611242811.35938157922320.4248552396167.0399591638814.0510.17513.2860.08--------------------12.0010.02111.7060.01911.6340.019AAA-222-111-000-0-011.5850.02211.6430.02111.4940.1418.965--13.17140.00028612.6880.007reredspect5613.0107.74.1960.0760.270.11.3150.060.990.1320.43560.0899DWARF1.545820.04946587.0395.02850.03970.00385600.2498--0.0004380.00260.0051panstarrs0.1020.1610.0460.0730.06090.11890.0890.0630.06440.034524.9865.071bj201889.9125.6spect13.56170.00156312.63460.0008561ucac4apassdr90.4316610.4011296.8372475374448.239969488670.0113930.01438610338972619
28230919297.7093644026348.08086037921976573561-02092-1691-07031619505021+4804508--20865122278510238725447013310748390STARtmgaia2tmgaia2125.9840.041232.9880.045gaia226.45080.0234gaia281.8337033827110.77238081693321.5480360574766.6294416635910.5560.1419.460.03--------------------7.6080.0297.1310.0217.0090.02AAA-111-111-000-0-0----------------9.150980.0002938.5080.006gbprpspect4777.6112.94.56310.08650.29960.05270.760.0480.770.0881.75510.4368DWARF0.271010.0090337.76470.03370.00.06270.0186--0.0109430.00.00.0760.10.0510.0450.41860.4550.08050.09250.009810.008250.03360.0337bj2018107.4118.4spect9.743740.0016528.465070.0018911hipvmagapassdr90.6895150.697757297.7101763266148.081863524850.0192710.02414110347873767
120571842285.5739767104538.40088256878--643-06546419021775+38240321237668734687445781J190217.77+382402.92099925719951103872--3323887STARtmgaia2tmgaia22.4910.028-14.7130.032gaia21.56290.017gaia268.9801725839814.48977564696295.2792335119660.4806247453614.570.06613.9220.0815.9850.00614.9410.00415.5520.01414.3430.00614.1270.00512.710.02112.3910.02112.3370.021AAA-222-111-000-0-012.1240.02312.2020.02212.5850.4068.956--13.78090.00026813.3270.008reredspect5754.025.04.4082--0.030.11.05--1.03--0.8887--DWARF1.08963--628.2576.74350.0744--------------panstarrs------------------------bj2018----spect14.13680.00179413.27080.0010581ucac4bpbj0.4607960.495197285.5739903944538.4008192220.0130080.01627910236288245
121660904288.5815096966241.08982373933--656-07064919141956+4105233--J191419.55+410523.12102117871259036672517305625780885STARtmgaia2tmgaia2-2.9560.05-20.950.042gaia21.05550.0235gaia272.4778865776413.46282680277301.3640157284462.520479832713.620.02913.0080.103--------------------11.8330.0211.6010.02211.5350.02AAA-222-111-000-0-011.510.02311.5510.02211.6710.1588.917--12.86490.00031812.4530.006reredspect5974.0149.13.84280.08540.170.12.0810.1261.10.140.1220.0298DWARF4.970420.28158922.56220.1720.04110.00314140.2234--0.0002180.00270.0034panstarrs0.1160.1630.1170.1350.0280.03160.09690.0740.241370.3217919.73920.605bj2018172.0126.2spect13.17710.00155912.39380.0011631ucac4apassdr90.8309820.646732288.5814928103141.08973354010.0216240.0205910259926978
123233041281.2881207132942.4510809768--663-07008118450914+4227038--J184509.14+422703.92116730994965905280523881346922244STARtmgaia2tmgaia22.1960.0233.8410.027gaia20.94980.0139gaia271.658909564619.01274738026290.0665312952565.1059535987613.8040.05113.5980.069--------------------12.5760.02312.3240.01812.2930.016AAA-222-111-000-0-012.2610.02312.2670.02312.2580.269.395--13.52990.00026413.1450.007reredspect6179.025.04.1117---0.050.11.582--1.18--0.2982--DWARF3.28562--1021.8714.5750.0413--------------panstarrs------------------------bj2018----spect13.8180.00226913.08620.0008891ucac4apassdr90.3880890.420084281.2881335303442.45109751530.0110650.01416110214866427
268823307299.4070353400344.03505264692--671-08090019573768+4402061--J195737.69+440206.02079018300195390464524897528191672STARtmgaia2tmgaia2-0.2020.036-3.2380.031gaia21.08290.0202gaia278.866408404867.7426709449319.8182442805662.4815434543914.1610.0613.3250.092--------------------12.1150.02911.8630.03211.7690.025AAA-222-111-000-0-011.6830.02211.7410.02110.7410.0648.5040.22913.22630.00028612.7660.012reredspect6295.0102.64.02620.08290.070.11.7820.0871.230.1850.21740.0476DWARF4.491780.32251899.77716.47750.15720.01368280.0723--2.6e-050.00820.0191panstarrs0.150.220.0930.0810.0330.06220.11240.05350.301660.3433616.18116.774bj2018118.287.1spect13.58440.00103612.70230.0011061ucac4apassdr90.6054370.487757299.4070341306344.03503870420.0186130.01631410363112972
350814622285.6154089155750.13575104429--701-06485719022767+5008087--J190227.69+500808.72132152916856093952--11853905STARtmgaia2tmgaia26.0030.0394.6720.043gaia22.02090.0243gaia280.3701312980518.818353468303.4615677118871.7648358611913.2090.06712.2850.057--------------------11.1220.02310.8360.03110.8050.023AAA-222-111-000-0-010.7440.02310.7780.0210.6820.0629.323--12.15770.00015211.7270.006reredspect5772.0103.44.04530.07080.120.11.5950.0681.030.1280.25370.0491DWARF2.54470.09216487.9165.82950.01840.00261990.1009--0.000640.00290.0024panstarrs0.1490.1070.0670.0690.04810.05010.06720.07440.087130.097195.7615.898bj2018114.692.2spect12.49730.00161211.67590.0006811ucac4bpbj0.6709020.662993285.6154492364250.13577115890.0191690.02492510237044605
377780790285.6794217923850.24130576642--702-06269519024305+5014286--J190243.03+501429.12132155017099178624--11904151STARtmgaia2tmgaia2-18.3940.04541.4480.046gaia25.36190.0233gaia280.4897343418918.81612807429303.7010258068871.8498786093212.2580.06711.0430.023--------------------9.8890.0229.5630.0259.4960.021AAA-222-111-000-0-09.440.0239.4910.029.4430.0299.4030.48210.91910.00031810.4770.006reredspect5706.0141.04.37070.0854-0.120.11.090.0611.0170.1280.78590.1845DWARF1.134140.03284185.5060.8080.01070.00372230.0101--0.0026680.00280.0046panstarrs0.1190.1380.0610.0610.15710.21190.10420.06660.035980.02970.8050.811bj2018125.2156.8spect11.27130.00100610.42730.0005851ucac4bpbj0.7672930.711508285.6792979640750.241484223590.0204740.02404310237087497
399860444286.8084913216749.31641413759--3549-02811-1697-06416519071403+4918590--J190714.04+491859.02131314401800665344--11446443STARtmgaia2tmgaia25.2190.0431.6190.043gaia24.61540.0224gaia279.8486325059517.80791470607304.8328695743570.7295159925711.8550.16411.2540.011--------------------10.2320.029.920.0269.8460.022AAA-222-111-000-0-09.7810.0239.7920.029.7460.0338.8040.2711.28190.00047210.8540.006reredspect5854.0101.64.44820.0708-0.030.11.0160.041.0570.1341.00750.1961DWARF1.092460.03271215.321.04450.01380.00481850.0348--0.0022090.00670.0028panstarrs0.1450.1220.040.040.15820.2340.05560.08590.033210.032211.0391.05bj201898.2105.1spect11.60450.00130510.78950.0013851tycho2v3tycho2b30.734770.672364286.8085257890349.316421108420.0197260.02282910245833148
424865156292.2473075548347.96950451412--3547-01402-1690-06827319285935+4758102--J192859.33+475810.321292563952119840005444452410666592STARtmgaia2tmgaia2-18.2810.0388.910.037gaia22.90310.0206gaia280.0329364083713.9752873836312.8683330638668.1239085978810.9640.09910.4810.007--------------------9.5550.039.3440.0299.3340.018AAA-222-111-000-0-09.2750.0239.30.029.2820.0268.928--10.36540.00039310.0270.006reredspect6532.2109.23.96820.08170.23260.02611.9940.0811.3470.2170.170.0365DWARF6.519250.28161341.0792.4140.02930.00453650.0139--0.0012750.00310.006panstarrs0.1810.2530.0890.0740.04080.03230.08030.0830.259250.303972.3972.431bj201895.0123.4spect10.62750.0012279.985870.0011311tycho2v3tycho2b30.6459830.573522292.2471899929747.969542876940.0176490.0198310290881018
" + ], + "text/plain": [ + "\n", + " TIC RAJ2000 DEJ2000 HIP TYC UCAC4 ... DEOdeg e_RAOdeg e_DEOdeg RadFl WDFl ID \n", + " deg deg ... deg mas mas \n", + " int64 float64 float64 int32 object object ... float64 float64 float64 int16 int16 int32 \n", + "--------- --------------- -------------- ----- ------------ ---------- ... -------------- -------- -------- ----- ----- ---------\n", + " 27916356 296.83724132289 48.23993319637 -- 692-068460 ... 48.23996948867 0.011393 0.014386 1 0 338972619\n", + " 28230919 297.70936440263 48.08086037921 97657 3561-02092-1 691-070316 ... 48.08186352485 0.019271 0.024141 1 0 347873767\n", + "120571842 285.57397671045 38.40088256878 -- 643-065464 ... 38.400819222 0.013008 0.016279 1 0 236288245\n", + "121660904 288.58150969662 41.08982373933 -- 656-070649 ... 41.0897335401 0.021624 0.02059 1 0 259926978\n", + "123233041 281.28812071329 42.4510809768 -- 663-070081 ... 42.4510975153 0.011065 0.014161 1 0 214866427\n", + "268823307 299.40703534003 44.03505264692 -- 671-080900 ... 44.0350387042 0.018613 0.016314 1 0 363112972\n", + "350814622 285.61540891557 50.13575104429 -- 701-064857 ... 50.1357711589 0.019169 0.024925 1 0 237044605\n", + "377780790 285.67942179238 50.24130576642 -- 702-062695 ... 50.24148422359 0.020474 0.024043 1 0 237087497\n", + "399860444 286.80849132167 49.31641413759 -- 3549-02811-1 697-064165 ... 49.31642110842 0.019726 0.022829 1 0 245833148\n", + "424865156 292.24730755483 47.96950451412 -- 3547-01402-1 690-068273 ... 47.96954287694 0.017649 0.01983 1 0 290881018" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Kepler Objects 1-10\n", + "idlist = [\n", + " \"TIC 399860444\",\n", + " \"TIC 424865156\",\n", + " \"TIC 28230919\",\n", + " \"TIC 350814622\",\n", + " \"TIC 268823307\",\n", + " \"TIC 27916356\",\n", + " \"TIC 121660904\",\n", + " \"TIC 123233041\",\n", + " \"TIC 120571842\",\n", + " \"TIC 377780790\",\n", + "]\n", + "CatalogSearch.QueryID(idlist, catalog=\"tic\")" + ] + }, + { + "cell_type": "markdown", + "id": "f9a35a25-cde5-4810-87e9-2c83a7249481", + "metadata": {}, + "source": [ + "Large queries (over one thousand objects) will be performed asynchronously and may take some time. " + ] + }, + { + "cell_type": "markdown", + "id": "6cde6883-77d6-4fa4-854f-8bff08743144", + "metadata": {}, + "source": [ + "Like `QueryPosition`, These results can also be returned as `astropy SkyCoord` objects. " + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "id": "57f90e43-e171-4e32-a2f9-80eac85b0ccd", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "CatalogSearch.QueryID(\"TIC 377780790\", return_skycoord=True)" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "ea580933-9961-4c47-aca6-1d4a037c802d", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "result = CatalogSearch.QueryID(\"TIC 377780790\")\n", + "result.to_SkyCoord()" + ] + }, + { + "cell_type": "markdown", + "id": "b5b2bcc0-a0a7-4167-976c-9ddaf2abfde9", + "metadata": {}, + "source": [ + "## Looking up Catalog IDs" + ] + }, + { + "cell_type": "markdown", + "id": "6a171db2-9c22-4e01-bd26-9509c5bb4a1c", + "metadata": {}, + "source": [ + "We have also included a limited way of looking up catalog IDs using other known IDs. This functionality wraps the `astroquery.simbad.Simbad.query_objectids` functionality. " + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "7299501b-112f-419d-af24-3553a3586365", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
Table length=14\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
id
object
LAMOST J190243.11+501428.7
AP J19024305+5014286
Gaia DR3 2132155017099178624
TIC 377780790
SPOCS 4268
Gaia DR2 2132155017099178624
Kepler-10
UCAC3 281-142262
2MASS J19024305+5014286
PPMX J190243.0+501428
USNO-B1.0 1402-00324696
GSC 03549-00354
KOI-72
KIC 11904151
" + ], + "text/plain": [ + "\n", + " id \n", + " object \n", + "----------------------------\n", + " LAMOST J190243.11+501428.7\n", + " AP J19024305+5014286\n", + "Gaia DR3 2132155017099178624\n", + " TIC 377780790\n", + " SPOCS 4268\n", + "Gaia DR2 2132155017099178624\n", + " Kepler-10\n", + " UCAC3 281-142262\n", + " 2MASS J19024305+5014286\n", + " PPMX J190243.0+501428\n", + " USNO-B1.0 1402-00324696\n", + " GSC 03549-00354\n", + " KOI-72\n", + " KIC 11904151" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "CatalogSearch.IDLookup(\"Kepler 10\")" + ] + }, + { + "cell_type": "markdown", + "id": "600430bf-96d1-4f13-ba4b-6cc17b575f10", + "metadata": {}, + "source": [ + "It is based off of joining IDs across Simbad tables, and is useful but not comprehensive as it relies upon published works to do the ID crossmatching. That means that you may run into situations where not all assosciations have been made, eg. for this EPIC ID:" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "f8755caf-b19b-4972-ad97-afbe7bb09890", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
Table length=7\n", + "
\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
id
object
Gaia DR3 3796414192429498880
LBQS 1145+0145
WD 1145+017
SDSS J114833.62+012859.4
EPIC 201563164
HE 1145+0145
Gaia DR2 3796414192429498880
" + ], + "text/plain": [ + "\n", + " id \n", + " object \n", + "----------------------------\n", + "Gaia DR3 3796414192429498880\n", + " LBQS 1145+0145\n", + " WD 1145+017\n", + " SDSS J114833.62+012859.4\n", + " EPIC 201563164\n", + " HE 1145+0145\n", + "Gaia DR2 3796414192429498880" ] }, "execution_count": 23, @@ -753,8 +1036,59 @@ } ], "source": [ - "query_gaia(c, epoch=Time.now(), radius=40 * u.arcsecond, return_skycoord=True)" + "CatalogSearch.IDLookup(\"EPIC 201563164\")" + ] + }, + { + "cell_type": "markdown", + "id": "8203f0ee-83e3-4781-bd4d-70bbd6806b91", + "metadata": {}, + "source": [ + "We can see above that this EPIC ID has a Gaia DR3 ID assosciated with it, and we know that GAIA DR3 and TIC are crossmatched, but the TIC ID is not reported. To retrieve the TIC ID we can use the GAIA DR3 ID above and QueryID" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "833a1cd8-4f09-4c59-bca4-fc20e6b3eb5e", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
CatalogResult length=1\n", + "
\n", + "\n", + "\n", + "\n", + "\n", + "
TICRAJ2000DEJ2000HIPTYCUCAC4_2MASSobjIDWISEAGAIAAPASSKICS_GRefr_PospmRAe_pmRApmDEe_pmDEr_pmPlxe_Plxr_PlxGLONGLATELONELATBmage_BmagVmage_Vmagumage_umaggmage_gmagrmage_rmagimage_imagzmage_zmagJmage_JmagHmage_HmagKmage_Kmagq_2MASSW1mage_W1magW2mage_W2magW3mage_W3magW4mage_W4magGmage_GmagTmage_Tmagf_TmagFlagTeffs_Teffloggs_logg__M_H_e__M_H_Rads_RadMasss_Massrhos_rhoLClassLums_LumDists_DistE_B-V_s_E_B-V_NcontRcontDispm_TICPriore_E_B-V_E_E_B-V_f_E_B-V_e_MassE_Masse_RadE_Rade_rhoE_rhoe_loggE_logge_LumE_Lume_DistE_Distr_Diste_TeffE_Teffr_TeffBPmage_BPmagRPmage_RPmagq_Gaiar_Vmagr_BmagCliste_RAJ2000e_DEJ2000RAOdegDEOdege_RAOdege_DEOdegRadFlWDFlID
degdegmas / yrmas / yrmas / yrmas / yrmasmasdegdegdegdegmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagKKlog(cm.s**-2)log(cm.s**-2)log(Sun)log(Sun)RsunRsunMsunMsunSunSunLsunLsunpcpcmagmagmagmagMsunMsunRsunRsunSunSunlog(cm.s**-2)log(cm.s**-2)LsunLsunpcpcKKmagmagmagmagmasmasdegdegmasmas
int64float64float64int32objectobjectobjectint64objectint64int32int32objectobjectobjectfloat64float32float64float32objectfloat64float32objectfloat64float64float64float64float32float32float32float32float32float64float32float64float32float64float32float64float32float64float32float32float32float32float32float32objectfloat32float32float32float32float32float32float32float32float64float64float32float32objectobjectfloat32float32float32float32float32float32float64float32float32float32float64float64objectfloat64float64float64float64float32float32int32float64objectint64float64float32float32objectfloat32float32float32float32float64float64float32float32float64float64float64float64objectfloat32float32objectfloat64float64float64float64int16objectobjectobjectfloat64float64float64float64float64float64int16int16int32
902906874177.140124015041.48317268714----3796414192429498880----STARgaia2gaia2-43.710.242-4.1020.134gaia27.05850.1234gaia2269.8500485668560.25223135972176.786469757970.22389926894----17.190.046------------------------------------------------17.16710.00169717.330.012rered----------------------------141.1662.47850.01460.0094--------0.00660.0122panstarrs--------------------2.4362.521bj2018----17.03930.01208317.23420.0096131gaia23.7598262.071664177.139935758291.483155026790.1158320.070643-11144272311
" + ], + "text/plain": [ + "\n", + " TIC RAJ2000 DEJ2000 HIP TYC UCAC4 _2MASS ... RAOdeg DEOdeg e_RAOdeg e_DEOdeg RadFl WDFl ID \n", + " deg deg ... deg deg mas mas \n", + " int64 float64 float64 int32 object object object ... float64 float64 float64 float64 int16 int16 int32 \n", + "--------- --------------- ------------- ----- ------ ------ ------ ... --------------- ------------- -------- -------- ----- ----- ---------\n", + "902906874 177.14012401504 1.48317268714 -- ... 177.13993575829 1.48315502679 0.115832 0.070643 -1 1 144272311" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "CatalogSearch.QueryID(\"Gaia DR3 3796414192429498880\", catalog=\"tic\")" ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d50f54a2-2990-45b2-985a-680efe830760", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { @@ -773,7 +1107,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.13" + "version": "3.12.3" } }, "nbformat": 4, diff --git a/docs/tutorials/cloud-data-searches.ipynb b/docs/tutorials/cloud-data-searches.ipynb index 473915b..90d7402 100644 --- a/docs/tutorials/cloud-data-searches.ipynb +++ b/docs/tutorials/cloud-data-searches.ipynb @@ -5,8 +5,271 @@ "id": "e0dbfed3-0284-4144-9c0c-4ec132aa66f8", "metadata": {}, "source": [ - "# lksearch Cloud Configuration\n", + "# lksearch Configuration and working with Cloud Data\n", + "lksearch has a `config` class and configuration file that can be used to configure the default behaviour of the package including how lksearch treats cloud data and where (or if) local files are cached. " + ] + }, + { + "cell_type": "markdown", + "id": "80410c2f-64ac-4aa9-9c0a-77d65a448f49", + "metadata": {}, + "source": [ + "## lksearch File Download and Cache\n", + "The `lksearch` file cache is a directory where files are downloaded to. This directory also serves as a cache directory, and if a file matching the name of the file to be downloaded exists we treat this as a cached file and by default do not overwrite the current file on disk. \n", + "\n", + "The default file download and cache directory is located at:\n", + "`~/.lksearch/cache`\n", + "\n", + "This can be verified using the get_cache_dir convenience function in the config sub-module, e.g.:" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "24045f63-26b7-48dc-938e-f4e6eaf436ae", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'/Users/tapritc2/.lksearch/cache'" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from lksearch import config as lkconfig\n", + "\n", + "lkconfig.get_cache_dir()" + ] + }, + { + "cell_type": "markdown", + "id": "71100a2a-d8bc-4788-b5a2-316c21c765b1", + "metadata": {}, + "source": [ + "### Clearing the Cache & Corrupted Files\n", + "If you wish to delete an individual file that you downloaded (for example, if you are concerned that a previously downloaded file is corrupted), the easiest way to do that is using the `Local Path` information in the manifest returned by the `.download()` function." + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "dd4060e3-bab0-406f-a76f-d4e4fe6f35ea", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Downloading products: 100%|████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.94it/s]\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Local PathStatusMessageURL
0/Users/tapritc2/.lksearch/cache/mastDownload/H...COMPLETENoneNone
1/Users/tapritc2/.lksearch/cache/mastDownload/H...COMPLETENoneNone
2/Users/tapritc2/.lksearch/cache/mastDownload/H...COMPLETENoneNone
\n", + "
" + ], + "text/plain": [ + " Local Path Status Message URL\n", + "0 /Users/tapritc2/.lksearch/cache/mastDownload/H... COMPLETE None None\n", + "1 /Users/tapritc2/.lksearch/cache/mastDownload/H... COMPLETE None None\n", + "2 /Users/tapritc2/.lksearch/cache/mastDownload/H... COMPLETE None None" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import os\n", + "from lksearch import K2Search\n", "\n", + "##First lets download a few files\n", + "manifest = K2Search(\"K2-18\").HLSPs.timeseries.download()\n", + "manifest" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "6ce478f4-f0e4-4853-a2e4-b34a90d1c26d", + "metadata": {}, + "outputs": [], + "source": [ + "# The manifest returned by download() is a pandas DataFrame\n", + "# We will access the first local path using iloc as so\n", + "os.remove(manifest.iloc[0][\"Local Path\"])" + ] + }, + { + "cell_type": "markdown", + "id": "2de81d86-b2e2-4698-8522-7d3da13daff8", + "metadata": {}, + "source": [ + "If you want to clear *everything* from your cache, you can use the `config.clearcache()` function to completely empty your cache of downloaded files. by default this will run in \"test\" mode and print what you will be deleting. To confirm deletion, run with `test=False` optional parameter. " + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "bc7a176f-ae42-49fe-a0cd-ce3444ee61e7", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Running in test mode, rerun with test=False to clear cache\n", + "removing /Users/tapritc2/.lksearch/cache/mastDownload/TESS\n", + "removing /Users/tapritc2/.lksearch/cache/mastDownload/K2\n", + "removing /Users/tapritc2/.lksearch/cache/mastDownload/Kepler\n", + "removing /Users/tapritc2/.lksearch/cache/mastDownload/TESSCut\n", + "removing /Users/tapritc2/.lksearch/cache/mastDownload/HLSP\n" + ] + } + ], + "source": [ + "lkconfig.clearcache()" + ] + }, + { + "cell_type": "markdown", + "id": "0e5adafe-cbb4-4423-b5f0-164071077119", + "metadata": {}, + "source": [ + "**Passing `test=False` will then fully delete the above directories** \n", + "\n", + "e.g. `lkconfig.clearcache(test=False)`" + ] + }, + { + "cell_type": "markdown", + "id": "e5782847-4de5-40b0-aab5-78d75d0a0c8e", + "metadata": {}, + "source": [ + "### lksearch Configuration and Configuration File\n", + "lksearch has a number of configuration parameters, these are contained in the `~lksearch.Conf` [class](https://lightkurve.github.io/lksearch/apidoc.html#lksearch.Conf). One can modify these parameters for a given python session by updating the values in the Conf class. To modify these configuration parameters default values, lksearch also has an optional configuration file that is built on-top of `~astropy.config` using `~astropy.config.ConfigNamespace`. This file does not exist by default, but a default version can be created using the `config.create_config_file` helper function. Modifications to the values in this file will then update the default `~lksearch.Conf` values. " + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "6662b57f-70d9-4a1f-82f4-79ea56c3d7c8", + "metadata": {}, + "outputs": [], + "source": [ + "lkconfig.create_config_file(overwrite=True)" + ] + }, + { + "cell_type": "markdown", + "id": "36de9527-3ba9-492c-8687-6a48d23b9e5f", + "metadata": {}, + "source": [ + "This file can be found in the below location. To edit this, please see the astropy.config documentation. " + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "1d114c6a-bf53-4212-94c0-8309a3a12895", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'/Users/tapritc2/.lksearch/config'" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "lkconfig.get_config_dir()" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "54d1962b-a74c-407f-9d69-3e048b239a7c", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'/Users/tapritc2/.lksearch/config/lksearch.cfg'" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "lkconfig.get_config_file()" + ] + }, + { + "cell_type": "markdown", + "id": "72533d4f-c8af-4085-9f9c-50f01955f118", + "metadata": {}, + "source": [ + "## lksearch Cloud Configuration\n", "`lksearch` has three configuration parameters that are particularly relevant to cloud-based science platforms. These are:\n", " - `CLOUD_ONLY`: Only Download cloud based data. If `False`, will download all data. If `True`, will only download data located on a cloud (Amazon S3) bucket\n", " - `PREFER_CLOUD`: Prefer Cloud-based data product retrieval where available\n", @@ -18,12 +281,12 @@ "\n", "`DOWNLOAD_CLOUD` governs whether files that are hosted on the cloud are downloaded locally. If this value is `True` (default), cloud-hosted files are downloaded normally. If `False`, then files hosted on a cloud based platform are not downloaded, and a URI containing the path to the desired file on the cloud-host is returned instead of the local path to the file. This path can then be used to read the file remotely (see `~astropy.io.fits` [working with remote and cloud hosted files](https://docs.astropy.org/en/stable/io/fits/#working-with-remote-and-cloud-hosted-files:~:text=with%20large%20files-,Working%20with%20remote%20and%20cloud%2Dhosted%20files,-Unsigned%20integers) for more information). This ability may be most relevant when using `lksearch` on a cloud-based science platform where the remote read is very rapid and short-term local storage comparatively expensive. \n", "\n", - "Using this `DOWNLOAD_CLOUD` functionality, we can find a cloud-hosted file and read it directly into memory like so:" + "Using this `DOWNLOAD_CLOUD` functionality, we can find a cloud-hosted file and read it directly into memory like so:\"" ] }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 8, "id": "ff63034a-75de-4bf4-bc74-931e472d9af3", "metadata": {}, "outputs": [ @@ -31,7 +294,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "Downloading products: 100%|██████████████████████| 1/1 [00:00<00:00, 497.72it/s]\n" + "Downloading products: 100%|███████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 584.16it/s]\n" ] }, { @@ -81,7 +344,7 @@ "0 Link to S3 bucket for remote read None " ] }, - "execution_count": 1, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -112,39 +375,17 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 9, "id": "6f4f92ad-e754-4e58-abf2-54d6fab0fd08", "metadata": {}, "outputs": [ { - "ename": "ImportError", - "evalue": "Install s3fs to access S3", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", - "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/lksearch-f6dQEj8r-py3.9/lib/python3.9/site-packages/fsspec/registry.py:242\u001b[0m, in \u001b[0;36mget_filesystem_class\u001b[0;34m(protocol)\u001b[0m\n\u001b[1;32m 241\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 242\u001b[0m register_implementation(protocol, \u001b[43m_import_class\u001b[49m\u001b[43m(\u001b[49m\u001b[43mbit\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mclass\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m)\u001b[49m)\n\u001b[1;32m 243\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mImportError\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m e:\n", - "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/lksearch-f6dQEj8r-py3.9/lib/python3.9/site-packages/fsspec/registry.py:277\u001b[0m, in \u001b[0;36m_import_class\u001b[0;34m(fqp)\u001b[0m\n\u001b[1;32m 276\u001b[0m is_s3 \u001b[38;5;241m=\u001b[39m mod \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124ms3fs\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m--> 277\u001b[0m mod \u001b[38;5;241m=\u001b[39m \u001b[43mimportlib\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mimport_module\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmod\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 278\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m is_s3 \u001b[38;5;129;01mand\u001b[39;00m mod\u001b[38;5;241m.\u001b[39m__version__\u001b[38;5;241m.\u001b[39msplit(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m) \u001b[38;5;241m<\u001b[39m [\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m0\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m5\u001b[39m\u001b[38;5;124m\"\u001b[39m]:\n", - "File \u001b[0;32m~/miniforge3/lib/python3.9/importlib/__init__.py:127\u001b[0m, in \u001b[0;36mimport_module\u001b[0;34m(name, package)\u001b[0m\n\u001b[1;32m 126\u001b[0m level \u001b[38;5;241m+\u001b[39m\u001b[38;5;241m=\u001b[39m \u001b[38;5;241m1\u001b[39m\n\u001b[0;32m--> 127\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43m_bootstrap\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_gcd_import\u001b[49m\u001b[43m(\u001b[49m\u001b[43mname\u001b[49m\u001b[43m[\u001b[49m\u001b[43mlevel\u001b[49m\u001b[43m:\u001b[49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mpackage\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mlevel\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m:1030\u001b[0m, in \u001b[0;36m_gcd_import\u001b[0;34m(name, package, level)\u001b[0m\n", - "File \u001b[0;32m:1007\u001b[0m, in \u001b[0;36m_find_and_load\u001b[0;34m(name, import_)\u001b[0m\n", - "File \u001b[0;32m:984\u001b[0m, in \u001b[0;36m_find_and_load_unlocked\u001b[0;34m(name, import_)\u001b[0m\n", - "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 's3fs'", - "\nThe above exception was the direct cause of the following exception:\n", - "\u001b[0;31mImportError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[2], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mastropy\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mio\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mfits\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mfits\u001b[39;00m\n\u001b[0;32m----> 2\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m \u001b[43mfits\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mopen\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcloud_result\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mLocal Path\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mvalues\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;241;43m0\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43muse_fsspec\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mfsspec_kwargs\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m{\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43manon\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m}\u001b[49m\u001b[43m)\u001b[49m \u001b[38;5;28;01mas\u001b[39;00m hdu:\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m item \u001b[38;5;129;01min\u001b[39;00m hdu:\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28mprint\u001b[39m(item\u001b[38;5;241m.\u001b[39mfileinfo())\n", - "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/lksearch-f6dQEj8r-py3.9/lib/python3.9/site-packages/astropy/io/fits/hdu/hdulist.py:213\u001b[0m, in \u001b[0;36mfitsopen\u001b[0;34m(name, mode, memmap, save_backup, cache, lazy_load_hdus, ignore_missing_simple, use_fsspec, fsspec_kwargs, **kwargs)\u001b[0m\n\u001b[1;32m 210\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m name:\n\u001b[1;32m 211\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mEmpty filename: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mname\u001b[38;5;132;01m!r}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m)\n\u001b[0;32m--> 213\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mHDUList\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfromfile\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 214\u001b[0m \u001b[43m \u001b[49m\u001b[43mname\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 215\u001b[0m \u001b[43m \u001b[49m\u001b[43mmode\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 216\u001b[0m \u001b[43m \u001b[49m\u001b[43mmemmap\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 217\u001b[0m \u001b[43m \u001b[49m\u001b[43msave_backup\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 218\u001b[0m \u001b[43m \u001b[49m\u001b[43mcache\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 219\u001b[0m \u001b[43m \u001b[49m\u001b[43mlazy_load_hdus\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 220\u001b[0m \u001b[43m \u001b[49m\u001b[43mignore_missing_simple\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 221\u001b[0m \u001b[43m \u001b[49m\u001b[43muse_fsspec\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43muse_fsspec\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 222\u001b[0m \u001b[43m \u001b[49m\u001b[43mfsspec_kwargs\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mfsspec_kwargs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 223\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 224\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/lksearch-f6dQEj8r-py3.9/lib/python3.9/site-packages/astropy/io/fits/hdu/hdulist.py:476\u001b[0m, in \u001b[0;36mHDUList.fromfile\u001b[0;34m(cls, fileobj, mode, memmap, save_backup, cache, lazy_load_hdus, ignore_missing_simple, **kwargs)\u001b[0m\n\u001b[1;32m 457\u001b[0m \u001b[38;5;129m@classmethod\u001b[39m\n\u001b[1;32m 458\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mfromfile\u001b[39m(\n\u001b[1;32m 459\u001b[0m \u001b[38;5;28mcls\u001b[39m,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 467\u001b[0m \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs,\n\u001b[1;32m 468\u001b[0m ):\n\u001b[1;32m 469\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 470\u001b[0m \u001b[38;5;124;03m Creates an `HDUList` instance from a file-like object.\u001b[39;00m\n\u001b[1;32m 471\u001b[0m \n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 474\u001b[0m \u001b[38;5;124;03m documentation for details of the parameters accepted by this method).\u001b[39;00m\n\u001b[1;32m 475\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[0;32m--> 476\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mcls\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_readfrom\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 477\u001b[0m \u001b[43m \u001b[49m\u001b[43mfileobj\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mfileobj\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 478\u001b[0m \u001b[43m \u001b[49m\u001b[43mmode\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mmode\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 479\u001b[0m \u001b[43m \u001b[49m\u001b[43mmemmap\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mmemmap\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 480\u001b[0m \u001b[43m \u001b[49m\u001b[43msave_backup\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43msave_backup\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 481\u001b[0m \u001b[43m \u001b[49m\u001b[43mcache\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcache\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 482\u001b[0m \u001b[43m \u001b[49m\u001b[43mignore_missing_simple\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mignore_missing_simple\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 483\u001b[0m \u001b[43m \u001b[49m\u001b[43mlazy_load_hdus\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mlazy_load_hdus\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 484\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 485\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/lksearch-f6dQEj8r-py3.9/lib/python3.9/site-packages/astropy/io/fits/hdu/hdulist.py:1146\u001b[0m, in \u001b[0;36mHDUList._readfrom\u001b[0;34m(cls, fileobj, data, mode, memmap, cache, lazy_load_hdus, ignore_missing_simple, use_fsspec, fsspec_kwargs, **kwargs)\u001b[0m\n\u001b[1;32m 1143\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m fileobj \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m 1144\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(fileobj, _File):\n\u001b[1;32m 1145\u001b[0m \u001b[38;5;66;03m# instantiate a FITS file object (ffo)\u001b[39;00m\n\u001b[0;32m-> 1146\u001b[0m fileobj \u001b[38;5;241m=\u001b[39m \u001b[43m_File\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 1147\u001b[0m \u001b[43m \u001b[49m\u001b[43mfileobj\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1148\u001b[0m \u001b[43m \u001b[49m\u001b[43mmode\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mmode\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1149\u001b[0m \u001b[43m \u001b[49m\u001b[43mmemmap\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mmemmap\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1150\u001b[0m \u001b[43m \u001b[49m\u001b[43mcache\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcache\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1151\u001b[0m \u001b[43m \u001b[49m\u001b[43muse_fsspec\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43muse_fsspec\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1152\u001b[0m \u001b[43m \u001b[49m\u001b[43mfsspec_kwargs\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mfsspec_kwargs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1153\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1154\u001b[0m \u001b[38;5;66;03m# The Astropy mode is determined by the _File initializer if the\u001b[39;00m\n\u001b[1;32m 1155\u001b[0m \u001b[38;5;66;03m# supplied mode was None\u001b[39;00m\n\u001b[1;32m 1156\u001b[0m mode \u001b[38;5;241m=\u001b[39m fileobj\u001b[38;5;241m.\u001b[39mmode\n", - "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/lksearch-f6dQEj8r-py3.9/lib/python3.9/site-packages/astropy/io/fits/file.py:183\u001b[0m, in \u001b[0;36m_File.__init__\u001b[0;34m(self, fileobj, mode, memmap, overwrite, cache, use_fsspec, fsspec_kwargs)\u001b[0m\n\u001b[1;32m 179\u001b[0m \u001b[38;5;66;03m# Handle cloud-hosted files using the optional ``fsspec`` dependency\u001b[39;00m\n\u001b[1;32m 180\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m (use_fsspec \u001b[38;5;129;01mor\u001b[39;00m _requires_fsspec(fileobj)) \u001b[38;5;129;01mand\u001b[39;00m mode \u001b[38;5;241m!=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mostream\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m 181\u001b[0m \u001b[38;5;66;03m# Note: we don't use `get_readable_fileobj` as a context manager\u001b[39;00m\n\u001b[1;32m 182\u001b[0m \u001b[38;5;66;03m# because io.fits takes care of closing files itself\u001b[39;00m\n\u001b[0;32m--> 183\u001b[0m fileobj \u001b[38;5;241m=\u001b[39m \u001b[43mget_readable_fileobj\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 184\u001b[0m \u001b[43m \u001b[49m\u001b[43mfileobj\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 185\u001b[0m \u001b[43m \u001b[49m\u001b[43mencoding\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mbinary\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 186\u001b[0m \u001b[43m \u001b[49m\u001b[43muse_fsspec\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43muse_fsspec\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 187\u001b[0m \u001b[43m \u001b[49m\u001b[43mfsspec_kwargs\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mfsspec_kwargs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 188\u001b[0m \u001b[43m \u001b[49m\u001b[43mclose_files\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mFalse\u001b[39;49;00m\u001b[43m,\u001b[49m\n\u001b[1;32m 189\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[38;5;21;43m__enter__\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 191\u001b[0m \u001b[38;5;66;03m# Handle raw URLs\u001b[39;00m\n\u001b[1;32m 192\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m (\n\u001b[1;32m 193\u001b[0m \u001b[38;5;28misinstance\u001b[39m(fileobj, (\u001b[38;5;28mstr\u001b[39m, \u001b[38;5;28mbytes\u001b[39m))\n\u001b[1;32m 194\u001b[0m \u001b[38;5;129;01mand\u001b[39;00m mode \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;129;01min\u001b[39;00m (\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mostream\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mappend\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mupdate\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m 195\u001b[0m \u001b[38;5;129;01mand\u001b[39;00m _is_url(fileobj)\n\u001b[1;32m 196\u001b[0m ):\n", - "File \u001b[0;32m~/miniforge3/lib/python3.9/contextlib.py:119\u001b[0m, in \u001b[0;36m_GeneratorContextManager.__enter__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 117\u001b[0m \u001b[38;5;28;01mdel\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39margs, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mkwds, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mfunc\n\u001b[1;32m 118\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 119\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mnext\u001b[39;49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mgen\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 120\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mStopIteration\u001b[39;00m:\n\u001b[1;32m 121\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mRuntimeError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mgenerator didn\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mt yield\u001b[39m\u001b[38;5;124m\"\u001b[39m) \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n", - "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/lksearch-f6dQEj8r-py3.9/lib/python3.9/site-packages/astropy/utils/data.py:336\u001b[0m, in \u001b[0;36mget_readable_fileobj\u001b[0;34m(name_or_obj, encoding, cache, show_progress, remote_timeout, sources, http_headers, use_fsspec, fsspec_kwargs, close_files)\u001b[0m\n\u001b[1;32m 333\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mModuleNotFoundError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mplease install `fsspec` to open this file\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m 334\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mfsspec\u001b[39;00m \u001b[38;5;66;03m# local import because it is a niche dependency\u001b[39;00m\n\u001b[0;32m--> 336\u001b[0m openfileobj \u001b[38;5;241m=\u001b[39m \u001b[43mfsspec\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mopen\u001b[49m\u001b[43m(\u001b[49m\u001b[43mname_or_obj\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mfsspec_kwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 337\u001b[0m close_fds\u001b[38;5;241m.\u001b[39mappend(openfileobj)\n\u001b[1;32m 338\u001b[0m fileobj \u001b[38;5;241m=\u001b[39m openfileobj\u001b[38;5;241m.\u001b[39mopen()\n", - "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/lksearch-f6dQEj8r-py3.9/lib/python3.9/site-packages/fsspec/core.py:484\u001b[0m, in \u001b[0;36mopen\u001b[0;34m(urlpath, mode, compression, encoding, errors, protocol, newline, expand, **kwargs)\u001b[0m\n\u001b[1;32m 426\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"Given a path or paths, return one ``OpenFile`` object.\u001b[39;00m\n\u001b[1;32m 427\u001b[0m \n\u001b[1;32m 428\u001b[0m \u001b[38;5;124;03mParameters\u001b[39;00m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 481\u001b[0m \u001b[38;5;124;03m https://filesystem-spec.readthedocs.io/en/latest/api.html#other-known-implementations\u001b[39;00m\n\u001b[1;32m 482\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 483\u001b[0m expand \u001b[38;5;241m=\u001b[39m DEFAULT_EXPAND \u001b[38;5;28;01mif\u001b[39;00m expand \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;28;01melse\u001b[39;00m expand\n\u001b[0;32m--> 484\u001b[0m out \u001b[38;5;241m=\u001b[39m \u001b[43mopen_files\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 485\u001b[0m \u001b[43m \u001b[49m\u001b[43murlpath\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m[\u001b[49m\u001b[43murlpath\u001b[49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 486\u001b[0m \u001b[43m \u001b[49m\u001b[43mmode\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mmode\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 487\u001b[0m \u001b[43m \u001b[49m\u001b[43mcompression\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcompression\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 488\u001b[0m \u001b[43m \u001b[49m\u001b[43mencoding\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mencoding\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 489\u001b[0m \u001b[43m \u001b[49m\u001b[43merrors\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43merrors\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 490\u001b[0m \u001b[43m \u001b[49m\u001b[43mprotocol\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mprotocol\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 491\u001b[0m \u001b[43m \u001b[49m\u001b[43mnewline\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mnewline\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 492\u001b[0m \u001b[43m \u001b[49m\u001b[43mexpand\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexpand\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 493\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 494\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 495\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m out:\n\u001b[1;32m 496\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mFileNotFoundError\u001b[39;00m(urlpath)\n", - "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/lksearch-f6dQEj8r-py3.9/lib/python3.9/site-packages/fsspec/core.py:295\u001b[0m, in \u001b[0;36mopen_files\u001b[0;34m(urlpath, mode, compression, encoding, errors, name_function, num, protocol, newline, auto_mkdir, expand, **kwargs)\u001b[0m\n\u001b[1;32m 216\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mopen_files\u001b[39m(\n\u001b[1;32m 217\u001b[0m urlpath,\n\u001b[1;32m 218\u001b[0m mode\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mrb\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 228\u001b[0m \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs,\n\u001b[1;32m 229\u001b[0m ):\n\u001b[1;32m 230\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"Given a path or paths, return a list of ``OpenFile`` objects.\u001b[39;00m\n\u001b[1;32m 231\u001b[0m \n\u001b[1;32m 232\u001b[0m \u001b[38;5;124;03m For writing, a str path must contain the \"*\" character, which will be filled\u001b[39;00m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 293\u001b[0m \u001b[38;5;124;03m https://filesystem-spec.readthedocs.io/en/latest/api.html#other-known-implementations\u001b[39;00m\n\u001b[1;32m 294\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[0;32m--> 295\u001b[0m fs, fs_token, paths \u001b[38;5;241m=\u001b[39m \u001b[43mget_fs_token_paths\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 296\u001b[0m \u001b[43m \u001b[49m\u001b[43murlpath\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 297\u001b[0m \u001b[43m \u001b[49m\u001b[43mmode\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 298\u001b[0m \u001b[43m \u001b[49m\u001b[43mnum\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mnum\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 299\u001b[0m \u001b[43m \u001b[49m\u001b[43mname_function\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mname_function\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 300\u001b[0m \u001b[43m \u001b[49m\u001b[43mstorage_options\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 301\u001b[0m \u001b[43m \u001b[49m\u001b[43mprotocol\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mprotocol\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 302\u001b[0m \u001b[43m \u001b[49m\u001b[43mexpand\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexpand\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 303\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 304\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m fs\u001b[38;5;241m.\u001b[39mprotocol \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mfile\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m 305\u001b[0m fs\u001b[38;5;241m.\u001b[39mauto_mkdir \u001b[38;5;241m=\u001b[39m auto_mkdir\n", - "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/lksearch-f6dQEj8r-py3.9/lib/python3.9/site-packages/fsspec/core.py:648\u001b[0m, in \u001b[0;36mget_fs_token_paths\u001b[0;34m(urlpath, mode, num, name_function, storage_options, protocol, expand)\u001b[0m\n\u001b[1;32m 646\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m protocol:\n\u001b[1;32m 647\u001b[0m storage_options[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mprotocol\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m=\u001b[39m protocol\n\u001b[0;32m--> 648\u001b[0m chain \u001b[38;5;241m=\u001b[39m \u001b[43m_un_chain\u001b[49m\u001b[43m(\u001b[49m\u001b[43murlpath0\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mstorage_options\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;129;43;01mor\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43m{\u001b[49m\u001b[43m}\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 649\u001b[0m inkwargs \u001b[38;5;241m=\u001b[39m {}\n\u001b[1;32m 650\u001b[0m \u001b[38;5;66;03m# Reverse iterate the chain, creating a nested target_* structure\u001b[39;00m\n", - "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/lksearch-f6dQEj8r-py3.9/lib/python3.9/site-packages/fsspec/core.py:344\u001b[0m, in \u001b[0;36m_un_chain\u001b[0;34m(path, kwargs)\u001b[0m\n\u001b[1;32m 342\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m bit \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mreversed\u001b[39m(bits):\n\u001b[1;32m 343\u001b[0m protocol \u001b[38;5;241m=\u001b[39m kwargs\u001b[38;5;241m.\u001b[39mpop(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mprotocol\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;28;01mNone\u001b[39;00m) \u001b[38;5;129;01mor\u001b[39;00m split_protocol(bit)[\u001b[38;5;241m0\u001b[39m] \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mfile\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m--> 344\u001b[0m \u001b[38;5;28mcls\u001b[39m \u001b[38;5;241m=\u001b[39m \u001b[43mget_filesystem_class\u001b[49m\u001b[43m(\u001b[49m\u001b[43mprotocol\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 345\u001b[0m extra_kwargs \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mcls\u001b[39m\u001b[38;5;241m.\u001b[39m_get_kwargs_from_urls(bit)\n\u001b[1;32m 346\u001b[0m kws \u001b[38;5;241m=\u001b[39m kwargs\u001b[38;5;241m.\u001b[39mpop(protocol, {})\n", - "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/lksearch-f6dQEj8r-py3.9/lib/python3.9/site-packages/fsspec/registry.py:244\u001b[0m, in \u001b[0;36mget_filesystem_class\u001b[0;34m(protocol)\u001b[0m\n\u001b[1;32m 242\u001b[0m register_implementation(protocol, _import_class(bit[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mclass\u001b[39m\u001b[38;5;124m\"\u001b[39m]))\n\u001b[1;32m 243\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mImportError\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m e:\n\u001b[0;32m--> 244\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mImportError\u001b[39;00m(bit[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124merr\u001b[39m\u001b[38;5;124m\"\u001b[39m]) \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01me\u001b[39;00m\n\u001b[1;32m 245\u001b[0m \u001b[38;5;28mcls\u001b[39m \u001b[38;5;241m=\u001b[39m registry[protocol]\n\u001b[1;32m 246\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mgetattr\u001b[39m(\u001b[38;5;28mcls\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mprotocol\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;28;01mNone\u001b[39;00m) \u001b[38;5;129;01min\u001b[39;00m (\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mabstract\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;28;01mNone\u001b[39;00m):\n", - "\u001b[0;31mImportError\u001b[0m: Install s3fs to access S3" + "name": "stdout", + "output_type": "stream", + "text": [ + "{'file': >, 'filemode': 'readonly', 'hdrLoc': 0, 'datLoc': 5760, 'datSpan': 0}\n", + "{'file': >, 'filemode': 'readonly', 'hdrLoc': 5760, 'datLoc': 20160, 'datSpan': 1935360}\n", + "{'file': >, 'filemode': 'readonly', 'hdrLoc': 1955520, 'datLoc': 1961280, 'datSpan': 2880}\n" ] } ], @@ -157,6 +398,20 @@ " for item in hdu:\n", " print(item.fileinfo())" ] + }, + { + "cell_type": "markdown", + "id": "8d43578c-b414-4ea3-aa8e-1da55e5f548f", + "metadata": {}, + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "726de463-2a7f-4a51-88b6-f7abe59b3082", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { @@ -175,7 +430,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.13" + "version": "3.12.3" } }, "nbformat": 4, diff --git a/docs/tutorials/data-searches.ipynb b/docs/tutorials/data-searches.ipynb index 17ffe02..192f07f 100644 --- a/docs/tutorials/data-searches.ipynb +++ b/docs/tutorials/data-searches.ipynb @@ -5,7 +5,7 @@ "id": "8362de11", "metadata": {}, "source": [ - "# Data Search Tutorial" + "# How to Search for TESS/Kepler/K2 Mission Data with lksearch" ] }, { @@ -4559,319 +4559,6 @@ "manifest = K2_HLSPs.timeseries.download()\n", "manifest" ] - }, - { - "cell_type": "markdown", - "id": "a42fd1bd-f70a-4db9-b483-3a39f4787d4c", - "metadata": {}, - "source": [ - "## Configuration and Caching\n", - "\n", - "`lksearch` has a default file download location that serves as the file cache, and an optional configuration file that can be created and used to overwrite the default values" - ] - }, - { - "cell_type": "markdown", - "id": "03f52bd0-c5d3-4974-9b3a-dfd0c3d1a248", - "metadata": {}, - "source": [ - "### lksearch File Download and Cache\n", - "The `lksearch` file cache is a directory where files are downloaded to. This directory also serves as a cache directory, and if a file matching the name of the file to be downloaded exists we treat this as a cached file and by default do not overwrite the current file on disk. \n", - "\n", - "The default file download and cache directory is located at:\n", - "`~/.lksearch/cache`\n", - "\n", - "This can be verified using the get_cache_dir convenience function in the config sub-module, e.g.:" - ] - }, - { - "cell_type": "code", - "execution_count": 31, - "id": "5ebda13a-0051-48c7-8272-e6aa3040f4b2", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'/Users/tapritc2/.lksearch/cache'" - ] - }, - "execution_count": 31, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "from lksearch import config as lkconfig\n", - "\n", - "lkconfig.get_cache_dir()" - ] - }, - { - "cell_type": "markdown", - "id": "e70e062e-d0f8-45e0-b01a-06cec8da54e5", - "metadata": {}, - "source": [ - "#### Clearing the Cache & Corrupted Files\n", - "If you wish to delete an individual file that you downloaded (for example, if you are concerned that a previously downloaded file is corrupted), the easiest way to do that is using the `Local Path` information in the manifest returned by the `.download()` function." - ] - }, - { - "cell_type": "code", - "execution_count": 32, - "id": "6e6625e2-c1c2-40fb-8fd2-fa3633cf3722", - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "\n", - "# The manifest returned by download() is a pandas DataFrame\n", - "# We will access the first local path using iloc as so\n", - "os.remove(manifest.iloc[0][\"Local Path\"])" - ] - }, - { - "cell_type": "markdown", - "id": "7ffa2d24-eba6-48fd-9f59-12a348dcb08d", - "metadata": {}, - "source": [ - "If you want to clear *everything* from your cache, you can use the `config.clearcache()` function to completely empty your cache of downloaded files. by default this will run in \"test\" mode and print what you will be deleting. To confirm deletion, run with `test=False` optional parameter. " - ] - }, - { - "cell_type": "code", - "execution_count": 33, - "id": "1345bf88-74be-4aea-96c9-512ab31b349b", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Running in test mode, rerun with test=False to clear cache\n", - "removing /Users/tapritc2/.lksearch/cache/mastDownload/TESS\n", - "removing /Users/tapritc2/.lksearch/cache/mastDownload/K2\n", - "removing /Users/tapritc2/.lksearch/cache/mastDownload/Kepler\n", - "removing /Users/tapritc2/.lksearch/cache/mastDownload/TESSCut\n", - "removing /Users/tapritc2/.lksearch/cache/mastDownload/HLSP\n" - ] - } - ], - "source": [ - "lkconfig.clearcache()" - ] - }, - { - "cell_type": "markdown", - "id": "6291a748-1e67-41b1-8049-57aabe2b744b", - "metadata": {}, - "source": [ - "**Passing `test=False` will then fully delete the above directories** \n", - "\n", - "e.g. `lkconfig.clearcache(test=False)`" - ] - }, - { - "cell_type": "markdown", - "id": "9adc419e-91b3-41bc-bc40-d37b5c628ebe", - "metadata": {}, - "source": [ - "### lksearch Configuration and Configuration File\n", - "lksearch has a number of configuration parameters, these are contained in the `~lksearch.Conf` [class](https://lightkurve.github.io/lksearch/apidoc.html#lksearch.Conf). One can modify these parameters for a given python session by updating the values in the Conf class. To modify these configuration parameters default values, lksearch also has an optional configuration file that is built on-top of `~astropy.config` using `~astropy.config.ConfigNamespace`. This file does not exist by default, but a default version can be created using the `config.create_config_file` helper function. Modifications to the values in this file will then update the default `~lksearch.Conf` values. " - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "id": "345bb5e5-7b13-4ee8-9a08-c85de036ace4", - "metadata": {}, - "outputs": [], - "source": [ - "lkconfig.create_config_file(overwrite=True)" - ] - }, - { - "cell_type": "markdown", - "id": "1561451f-d3c0-4df9-bdb9-343b63e0f136", - "metadata": {}, - "source": [ - "This file can be found in the below location. To edit this, please see the astropy.config documentation. " - ] - }, - { - "cell_type": "code", - "execution_count": 35, - "id": "be7bc33c-eb6c-4ce7-81f8-d98076581cc4", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'/Users/tapritc2/.lksearch/config'" - ] - }, - "execution_count": 35, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "lkconfig.get_config_dir()" - ] - }, - { - "cell_type": "code", - "execution_count": 36, - "id": "341857e6-aa78-4cc6-b68d-79fca23f7e63", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'/Users/tapritc2/.lksearch/config/lksearch.cfg'" - ] - }, - "execution_count": 36, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "lkconfig.get_config_file()" - ] - }, - { - "cell_type": "markdown", - "id": "edd120c1-cb63-462a-b997-f83f3da3c3ea", - "metadata": {}, - "source": [ - "#### lksearch Cloud Configuration\n", - "lksearch has three configuration parameters that are particularly relevant to cloud-based science platforms. These are:\n", - " - CLOUD_ONLY: Only Download cloud based data. If False, will download all data. If True, will only download data located on a cloud (Amazon S3) bucket\n", - " - PREFER_CLOUD: Prefer Cloud-based data product retrieval where available\n", - " - DDOWNLOAD_CLOUD: Download cloud based data.If False, download() will return a pointer to the cloud based datainstead of downloading it - intended usage for cloud-based science platforms (e.g. TIKE)\n", - "\n", - "CLOUD_ONLY governs whether or not non-cloud based data will be possible to be downloaded. Many science files have both a cloud-based location (typically on Amazon S3) and a MAST archive location. By default this is False, and all products will be downloaded regardless of whether the file is available via cloud-hosting or MAST archive hosting. If CLOUD_ONLY is True, only files available for download on a cloud-based platform will be retrieved. This configuration parameter is passed through to the `~astroquery.mast` parameter of the same name. \n", - "\n", - "PREFER_CLOUD governs the default download behaviour in the event that a data product is available from both a cloud-based location and a MAST-hosted archive location. If True (default), then lksearch will preferentially download files from the cloud-host rather than the MAST-hosted Archive. This configuration parameter is passed through to the `~astroquery.mast` parameter of the same name. \n", - "\n", - "DOWNLOAD_CLOUD governs whether files that are hosted on the cloud are downloaded locally. If this value is True (default), cloud-hosted files are downloaded normally. If False, then files hosted on a cloud based platform are not downloaded, and a URI containing the path to the desired file on the cloud-host is returned instead of the local path to the file. This path can then be used to read the file remotely (see `~astropy.io.fits` [working with remote and cloud hosted files](https://docs.astropy.org/en/stable/io/fits/#working-with-remote-and-cloud-hosted-files:~:text=with%20large%20files-,Working%20with%20remote%20and%20cloud%2Dhosted%20files,-Unsigned%20integers) for more information). This ability may be most relevant when using lksearch on a cloud-based science platform where the remote read is very rapid and short-term local storage comparatively expensive. \n", - "\n", - "Using this DOWNLOAD_CLOUD functionality, we can find a cloud-hosted file and read it directly into memory like so:" - ] - }, - { - "cell_type": "code", - "execution_count": 37, - "id": "745b341d-2c8a-4de4-8050-02c039f4e1ee", - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "pipeline products: 100%|███████████████████████████████████████████| 1/1 [00:00<00:00, 395.88it/s]\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
Local PathStatusMessageURL
0s3://stpubdata/tess/public/tid/s0014/0000/0001...COMPLETELink to S3 bucket for remote readNone
\n", - "
" - ], - "text/plain": [ - " Local Path Status \\\n", - "0 s3://stpubdata/tess/public/tid/s0014/0000/0001... COMPLETE \n", - "\n", - " Message URL \n", - "0 Link to S3 bucket for remote read None " - ] - }, - "execution_count": 37, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# First, lets update our configuration to not download a cloud-hosted file\n", - "from lksearch import Conf\n", - "\n", - "Conf.DOWNLOAD_CLOUD = False\n", - "\n", - "# Now, lets find some data. We use this target earlier in the tutorial.\n", - "toi = TESSSearch(\"TOI 1161\")\n", - "\n", - "# What happens when we try to download it in our updated configuration?\n", - "cloud_result = toi.timeseries.mission_products[0].download()\n", - "cloud_result" - ] - }, - { - "cell_type": "markdown", - "id": "7027025a-7883-4c05-9659-ceda59ed79b4", - "metadata": {}, - "source": [ - "As we can see above, instead of downloading the above file we have instead returned an amazon S3 URI for its cloud hosted location. If we want to access the file, we can do it using the remote-read capabilities of `~astropy.io.fits`. " - ] - }, - { - "cell_type": "code", - "execution_count": 38, - "id": "244ccba1-3d75-427d-ae06-93abbbb5c12d", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'file': >, 'filemode': 'readonly', 'hdrLoc': 0, 'datLoc': 5760, 'datSpan': 0}\n", - "{'file': >, 'filemode': 'readonly', 'hdrLoc': 5760, 'datLoc': 20160, 'datSpan': 1935360}\n", - "{'file': >, 'filemode': 'readonly', 'hdrLoc': 1955520, 'datLoc': 1961280, 'datSpan': 2880}\n" - ] - } - ], - "source": [ - "import astropy.io.fits as fits\n", - "\n", - "with fits.open(\n", - " cloud_result[\"Local Path\"].values[0], use_fsspec=True, fsspec_kwargs={\"anon\": True}\n", - ") as hdu:\n", - " for item in hdu:\n", - " print(item.fileinfo())" - ] } ], "metadata": { diff --git a/docs/tutorials/index.rst b/docs/tutorials/index.rst index a81dd33..67f1753 100644 --- a/docs/tutorials/index.rst +++ b/docs/tutorials/index.rst @@ -9,12 +9,9 @@ Tutorials This set of tutorials will help you get started with lksearch. Click below to learn how to access data, access catalogs, and configure lksearch to use the cloud. -1.1. lksearch basics -~~~~~~~~~~~~~~~~~~~~ - .. toctree:: - :maxdepth: 1 + :maxdepth: 2 data-searches.ipynb + catalog-searches.ipynb cloud-data-searches.ipynb - catalog-searches.ipynb \ No newline at end of file diff --git a/src/lksearch/CatalogSearch.py b/src/lksearch/CatalogSearch.py index d104e34..bf61f6e 100644 --- a/src/lksearch/CatalogSearch.py +++ b/src/lksearch/CatalogSearch.py @@ -20,128 +20,22 @@ import json from . import log +from . import PACKAGEDIR + # This is a lits of VizieR catalogs and their input parameters to be used in the # query_skycatalog function def _load_cat_config(): - with open('src/lksearch/data/catalog_config.json', 'r') as j: + with open(f"{PACKAGEDIR}/data/catalog_config.json", "r") as j: cat_dict = json.loads(j.read()) for key in cat_dict.keys(): - cat_dict[key]['equinox'] = Time(cat_dict[key]['equinox'], format="jyear", scale="tt") + cat_dict[key]["equinox"] = Time( + cat_dict[key]["equinox"], format="jyear", scale="tt" + ) return cat_dict + _Catalog_Dictionary = _load_cat_config() -#{ -# "kic": { -# "catalog": "V/133/kic", -# "columns": [ -# "KIC", -# "RAJ2000", -# "DEJ2000", -# "pmRA", -# "pmDE", -# "Plx", -# "kepmag", -# "Radius", -# "Teff", -# "logg", -# ], -# "column_filters": "kepmag", -# "rename_in": ["KIC", "kepmag"], -# "rename_out": ["ID", "Kepmag"], -# "equinox": 2000,#Time(2000, format="jyear", scale="tt"), -# "prefix": "KIC", -# "default_mag": "Kepmag", -# "default_id_column": "KIC", -# "crossmatch_catalogs": [ -# "tic", -# "gaiadr3", -# ], # gaia->tess->Kepler? possible but convoluted -# "crossmatch_type": "tic", -# "crossmatch_columns": None, -## "SIMBAD_match_like": "ident.id LIKE KIC%", -# }, -# "epic": { -# "catalog": "IV/34/epic", -# "columns": [ -# "ID", -# "RAJ2000", -# "DEJ2000", -# "pmRA", -# "pmDEC", -# "plx", -# "Kpmag", -# "logg", -# "Teff", -# "Rad", -# "Mass", -# ], -# "column_filters": "Kpmag", -# "rename_in": ["Kpmag", "pmDEC", "plx"], -# "rename_out": ["K2mag", "pmDE", "Plx"], -# "equinox": 2000,#Time(2000, format="jyear", scale="tt"), -# "prefix": "EPIC", -# "default_mag": "K2mag", -# "default_id_column": "ID", -# "crossmatch_catalogs": None, -## "SIMBAD_match_like": "ident.id LIKE EPIC%", -# -# }, -# "tic": { -# "catalog": "IV/39/tic82", -# "columns": [ -# "TIC", -# "RAJ2000", -# "DEJ2000", -# "pmRA", -# "pmDE", -# "Plx", -# "Tmag", -# "logg", -# "Teff", -# "Rad", -# "Mass", -# ], -# "column_filters": "Tmag", -# "rename_in": ["TIC", "Tmag"], -# "rename_out": ["ID", "TESSmag"], -# "equinox": 2000,#Time(2000, format="jyear", scale="tt"), -# "prefix": "TIC", -# "default_mag": "TESSmag", -# "default_id_column": "TIC", -# "crossmatch_catalogs": ["gaiadr3", "kic"], # WISE, TYCHO2 -# "crossmatch_type": "column", -# "crossmatch_column_id": {"kic": "KIC", "gaiadr3": "GAIA", "tic": "TIC"}, -## "SIMBAD_match_like": "ident.id LIKE TIC%", -# }, -# "gaiadr3": { -# "catalog": "I/355/gaiadr3", -# "columns": [ -# "DR3Name", -# "RAJ2000", -# "DEJ2000", -# "pmRA", -# "pmDE", -# "Plx", -# "Gmag", -# "BPmag", -# "RPmag", -# "logg", -# "Teff", -# ], -# "column_filters": "Gmag", -# "rename_in": ["DR3Name"], -# "rename_out": ["ID"], -# "equinox": 2016,#Time(2016, format="jyear", scale="tt"), -# "prefix": None, -# "default_mag": "Gmag", -# "default_id_column": "Source", -# "crossmatch_catalogs": ["tic", "kic"], -# "crossmatch_type": "tic", -# "crossmatch_column_id": None, -## "SIMBAD_match_like": "ident.id LIKE Gaia DR3%", -# }, -#} # Connect to the Vizier TAP server here so that we only do this once VizTap = TapPlus(url="http://TAPVizieR.u-strasbg.fr/TAPVizieR/tap/") @@ -151,33 +45,52 @@ def _load_cat_config(): # Make this an optional keword argument for debugging/doc _default_catalog = "tic" + # use simbad to get name/ID crossmatches def IDLookup(search_input: Union[str, list[str]], match_catalog: str = None): - match_list = _Catalog_Dictionary.keys() - 'short' -# match_str = None only usable in bleeding edge astroquery + match_list = _Catalog_Dictionary.keys() + """Uses the Simbad name resolver and ids to disambiguate the search_input string or list. + + Parameters + ---------- + search_input: Union[str, list[str]] + A string or list of strings to query simbad for ID disambiguation + + match_catalog: str = None + Short name of catalog to parse the simbad id results for + + Returns + ------- + result: Table, list[Table] + Results from the `~astroquery.simbad.Simbad` ID query in `~astropy.table.Table` format. + + """ + # match_str = None only usable in bleeding edge astroquery - if (match_catalog is not None): - if(match_catalog.lower() in match_list): + if match_catalog is not None: + if match_catalog.lower() in match_list: match_str = _Catalog_Dictionary[match_catalog.lower()]["SIMBAD_match_like"] - if(isinstance(search_input, list)): - result=[] + if isinstance(search_input, list): + result = [] for item in search_input: - log.warning("Throttling query limit to Simbad's: max 5/s") + log.warning("Throttling query limit to Simbad's: max 5/s") result_iter = _IDLookup(item) time.sleep(0.2) result.append(result_iter) else: result = _IDLookup(search_input) - + return result -def _IDLookup(search_item, match_str): -# Construct exact ID TAP queries for various surveys -# result_table = Simbad.query_objectids(search_item, criteria = match_str) + +def _IDLookup(search_item): + # Construct exact ID TAP queries for various surveys + # result_table = Simbad.query_objectids(search_item, criteria = match_str) result_table = Simbad.query_objectids(search_item) return result_table + def _get_TAP_Query(catalog: str, ID: str, max_results: int = None, id_column=None): if catalog not in _Catalog_Dictionary.keys(): raise ValueError(f"{catalog} not found in TAP catalogs list") @@ -221,33 +134,34 @@ def _parse_search_input(search_input, catalog: str = None): def _match_target_catalog(search_input): + search = search_input.strip().replace(" ", "").lower() if search_input.isnumeric(): # If string is purelt numbers, make no assumptions search_string = search_input search_catalog = None - elif search_input[0:3].strip().replace(' ','').lower() == "tic": + elif search[0:3] == "tic": search_catalog = "tic" - search_string = search_input[3:] - elif search_input[0:4].strip().replace(' ','').lower() == "tess": + search_string = search[3:] + elif search[0:4] == "tess": search_catalog = "tic" - search_string = search_input[4:] - elif search_input[0:3].strip().replace(' ','').lower() == "kic": + search_string = search[4:] + elif search[0:3] == "kic": search_catalog = "kic" - search_string = search_input[3:] - elif search_input[0:4].strip().replace(' ','').lower() == "kplr": + search_string = search[3:] + elif search[0:4] == "kplr": search_catalog = "kic" - search_string = search_input[4:] - elif search_input[0:4].strip().replace(' ','').lower() == "epic": + search_string = search[4:] + elif search[0:4] == "epic": search_catalog = "epic" - search_string = search_input[4:] - elif search_input[0:4].strip().replace(' ','').lower() == "ktwo": + search_string = search[4:] + elif search[0:4] == "ktwo": search_catalog = "epic" - search_string = search_input[4:] - elif search_input[0:7].strip().replace(' ','').lower() == "gaiadr3": + search_string = search[4:] + elif search[0:7] == "gaiadr3": search_catalog = "gaiadr3" - search_string = search_input[7:] - elif search_input[0:4].strip().replace(' ','').lower() == "gaia" and search_input[4:6].strip().replace(' ','').lower() != "dr": - search_string = search_input[4:] + search_string = search[7:] + elif search[0:4] == "gaia" and search_input[4:6] != "dr": + search_string = search[4:] search_catalog = "gaiadr3" else: # If we cannot parse a catalog, make no assumptions @@ -277,12 +191,46 @@ def _parse_id(search_item): def QueryID( search_object: Union[str, int, list[str, int]], - catalog: Union[str, int, list[str, int]] = None, + catalog: str = None, input_catalog: str = None, max_results: int = None, return_skycoord: bool = False, epoch: Union[str, Time] = None, ): + """Searches a catalog (TIC, KIC, EPIC, or GAIA DR3) for an exact ID match and + returns the assosciated catalog rows. A limited cross-match between the TIC, KIC, and gaiadr3 + catalogs is possible using the catalog, and input_catalog optional parameters. + + Parameters + ---------- + search_object : Union[str, int, list[str, int]] + A string or integer, or list of strings or integers, that represents + a list of IDs from a single catalog to match. If an integer is supplied the + catalog optional parameter must be specified. + catalog : str, optional + Catalog to search for an ID match to. If no input_catalog is + specified catalog and input_catalog are assumed to be the same. + If search_object is a string and catalog and is None, search_object is + parsed to try and determine the catalog, by default None + input_catalog : str, optional + _description_, by default None + max_results : int, optional + limits the maximum rows to return, by default None + return_skycoord : bool, optional + If true, an `~astropy.coordinates.SkyCoord` objects is returned for each + row in the result table, by default False + epoch : Union[str, Time], optional + If a return_skycoord is True, epoch can be used to specify the epoch for the + returned SkyCoord object, by default None + + Returns + ------- + results_table: Union[Table, SkyCoord, list[SkyCoord]] + `~astropy.table.Table` object containing the rows of the catalog with IDs matching the search_input. + If return_skycoord is set to True, a `~astropy.coordinates.SkyCoord` object or list of `~astropy.coordinates.SkyCoord` objects + is instead returned. + + """ id_column = None if isinstance(search_object, list): @@ -320,9 +268,8 @@ def QueryID( id_list = ", ".join( new_id_table[ _Catalog_Dictionary["tic"]["crossmatch_column_id"][catalog] - ] - .astype(str) - #.values + ].astype(str) + # .values ) if _Catalog_Dictionary[catalog]["crossmatch_type"] == "column": # TIC is is crossmatched with gaiadr3/kic @@ -340,7 +287,7 @@ def QueryID( results_table = _QueryID(catalog, id_list, max_results, id_column=id_column) if return_skycoord: - _table_to_skycoord(results_table, epoch=epoch, catalog=catalog) + return _table_to_skycoord(results_table, epoch=epoch, catalog=catalog) else: return CatalogResult(results_table) @@ -352,14 +299,16 @@ def _QueryID(catalog: str, id_list: str, max_results: int, id_column: str = None async_limit = 1e3 if max_results > async_limit: # we should chex max_results and if low do a synchronous query, if large async - log.warn(f"Warning: Queries over {async_limit} will be done asynchronously, and may take some time") + log.warn( + f"Warning: Queries over {async_limit} will be done asynchronously, and may take some time" + ) job = VizTap.launch_job_async(query) job.wait_for_job_end() results_table = job.get_data() else: job = VizTap.launch_job(query) results_table = job.get_data() - return results_table#.to_pandas() + return results_table # .to_pandas() def QueryPosition( @@ -368,6 +317,7 @@ def QueryPosition( catalog: str = "tic", radius: Union[float, u.Quantity] = u.Quantity(100, "arcsecond"), magnitude_limit: float = 18.0, + max_results: int = None, return_skycoord: bool = False, ): """ @@ -375,8 +325,7 @@ def QueryPosition( Parameters ---------- coord : astropy.coordinates.SkyCoord, string, tuple, or list thereof - Coordinates around which to do a radius query. If passed a string, will first try to resolve string as a coordinate using `~astropy.coordinates.SkyCoord`, - if this fails then tries to resolve the string as a name using '~astroquery.mast.MastClass.resolve_object'. + Coordinates around which to do a radius query. If passed a string, will first try to resolve string as a coordinate using `~astropy.coordinates.SkyCoord`, if this fails then tries to resolve the string as a name using '~astroquery.mast.MastClass.resolve_object'. epoch: astropy.time.Time The time of observation in JD. catalog: str @@ -389,8 +338,9 @@ def QueryPosition( Whether to return an astropy.coordinates.SkyCoord object. Default is False. Returns ------- - result: pd.DataFrame or astropy.coordinates.SkyCoord + result: Table or astropy.coordinates.SkyCoord By default returns a pandas dataframe of the sources within radius query, corrected for proper motion. Optionally will return astropy.coordinates.SkyCoord object. + """ coord, search_catalog = _parse_search_input(search_input, catalog=catalog) @@ -436,32 +386,37 @@ def QueryPosition( column_filters={catalog_meta["column_filters"]: f"<{magnitude_limit}"}, ) # The catalog can cut off at 50 - we dont want this to happen - filters.ROW_LIMIT = -1 + if max_results is not None: + filters.ROW_LIMIT = max_results + else: + filters.ROW_LIMIT = -1 # Now query the catalog result = filters.query_region(coord, catalog=catalog_name, radius=Angle(radius)) if len(result) == 0: - result = ( - Table( - columns=[ - *catalog_meta["columns"], - "RA", - "Dec", - "Separation", - "Relative_Flux", - ] - ) - .rename( - { - i: o - for i, o in zip( - catalog_meta["rename_in"], catalog_meta["rename_out"] - ) - }, - axis=1, - ) - .set_index("ID") + # Make an empty Table + empty_table = pd.DataFrame( + columns=[ + *catalog_meta["columns"], + "ID", + "RA", + "Dec", + "Separation", + "Relative_Flux", + ] + ) + # Make Sure Columns are consistently renamed for the catalog + empty_table = empty_table.rename( + { + i: o + for i, o in zip(catalog_meta["rename_in"], catalog_meta["rename_out"]) + }, + axis=1, ) - return result[_get_return_columns(result.columns)] + # Make sure we have an index set + empty_table = empty_table.set_index("ID") + empty_table = Table.from_pandas(empty_table) + return empty_table + result = result[catalog_name] # Rename the columns so that the output is uniform result.rename_columns( @@ -497,8 +452,8 @@ def QueryPosition( ) # Now sort the table based on separation result.sort(["Separation"]) - #return result - #result = result.to_pandas().set_index("ID") + # return result + # result = result.to_pandas().set_index("ID") return CatalogResult(result[_get_return_columns(result.columns)]) @@ -508,6 +463,7 @@ def _get_return_columns(columns): set(columns) - set( [ + "ID", "RA", "Dec", "RAJ2000", @@ -527,10 +483,13 @@ def _get_return_columns(columns): ] ) new_columns = [ + "ID", "RA", "Dec", "Separation", "Relative_Flux", + "pmRA", + "pmDE", *downselect_columns, ] return new_columns @@ -538,7 +497,7 @@ def _get_return_columns(columns): def _table_to_skycoord( table: Table, equinox: Time = None, epoch: Time = None, catalog=None -): +) -> SkyCoord: """ Convert a table input to astropy.coordinates.SkyCoord object @@ -566,20 +525,39 @@ def _table_to_skycoord( # We need to remove any nan values from our proper motion list # Doing this will allow objects which do not have proper motion to still be displayed - table["pmRA"] = np.ma.filled(table["pmRA"].astype(float), 0.0) - table["pmDE"] = np.ma.filled(table["pmDE"].astype(float), 0.0) + if "pmRA" in table.keys(): + table["pmRA"] = np.ma.filled(table["pmRA"].astype(float), 0.0) + else: + table["pmRA"] = 0.0 * u.mas / u.yr + + if "pmDE" in table.keys(): + table["pmDE"] = np.ma.filled(table["pmDE"].astype(float), 0.0) + else: + table["pmDE"] = 0.0 * u.mas / u.yr + # If an object does not have a parallax then we treat it as if the object is an "infinite distance" # and set the parallax to 1e-7 arcseconds or 10Mpc. - table["Plx"] = np.ma.filled(table["Plx"].astype(float), 1e-4) - + if "Plx" in table.keys(): + table["Plx"] = np.ma.filled(table["Plx"].astype(float), 1e-4) + else: + table["Plx"] = 1e-4 * u.mas + + if "RAJ2000" in table.keys() and "DEJ2000" in table.keys(): + ra = table["RAJ2000"] + dec = table["DEJ2000"] + elif "RA" in table.keys() and "Dec" in table.keys(): + ra = table["RA"] * u.deg + dec = table["Dec"] * u.deg + else: + raise KeyError("RA, DEC Disambiguation failed") # Suppress warning caused by Astropy as noted in issue 111747 (https://github.com/astropy/astropy/issues/11747) with warnings.catch_warnings(): warnings.filterwarnings("ignore", message="negative parallaxes") # Get the input data from the table c = SkyCoord( - ra=table["RAJ2000"], - dec=table["DEJ2000"], + ra=ra, + dec=dec, distance=Distance(parallax=table["Plx"].quantity, allow_negative=True), pm_ra_cosdec=table["pmRA"], pm_dec=table["pmDE"], diff --git a/tests/test_catalogs_conesearch.py b/tests/test_catalogs_conesearch.py index d825bb8..cb96fd3 100644 --- a/tests/test_catalogs_conesearch.py +++ b/tests/test_catalogs_conesearch.py @@ -28,8 +28,8 @@ def test_tic(): # Test that the proper motion works - assert np.isclose(catalog.iloc[0]["RA"], 194.10075230969787, atol=1e-6) - assert np.isclose(catalog.iloc[0]["Dec"], -27.390340343480744, atol=1e-6) + assert np.isclose(catalog[0]["RA"], 194.10075230969787, atol=1e-6) + assert np.isclose(catalog[0]["Dec"], -27.390340343480744, atol=1e-6) # Test different epochs catalog_new = QueryPosition( @@ -40,8 +40,8 @@ def test_tic(): magnitude_limit=18, ) - assert np.isclose(catalog_new.iloc[0]["RA"], 194.10052070792756, atol=1e-6) - assert np.isclose(catalog_new.iloc[0]["Dec"], -27.390254988629433, atol=1e-6) + assert np.isclose(catalog_new[0]["RA"], 194.10052070792756, atol=1e-6) + assert np.isclose(catalog_new[0]["Dec"], -27.390254988629433, atol=1e-6) def test_bad_catalog(): @@ -107,17 +107,39 @@ def test_empty(): def test_resolving(): catalog = QueryPosition("Kepler 10", catalog="tic") - assert np.isclose(catalog["RA"].values[0], 285.679422) - assert np.isclose(catalog["Dec"].values[0], 50.241306) + assert np.isclose(catalog["RA"][0], 285.679422) + assert np.isclose(catalog["Dec"][0], 50.241306) catalog = QueryPosition("19h02m43.03s +50d14m29.34s", catalog="tic") - assert np.isclose(catalog["RA"].values[0], 285.679422) - assert np.isclose(catalog["Dec"].values[0], 50.241306) + assert np.isclose(catalog["RA"][0], 285.679422) + assert np.isclose(catalog["Dec"][0], 50.241306) catalog = QueryPosition("285.679422 50.241306", catalog="tic") - assert np.isclose(catalog["RA"].values[0], 285.679422) - assert np.isclose(catalog["Dec"].values[0], 50.241306) + assert np.isclose(catalog["RA"][0], 285.679422) + assert np.isclose(catalog["Dec"][0], 50.241306) catalog = QueryPosition((285.679422, 50.241306), catalog="tic") - assert np.isclose(catalog["RA"].values[0], 285.679422) - assert np.isclose(catalog["Dec"].values[0], 50.241306) + assert np.isclose(catalog["RA"][0], 285.679422) + assert np.isclose(catalog["Dec"][0], 50.241306) + + +def test_skycoord(): + sc = QueryPosition( + c, + epoch=epoch, + catalog="tic", + radius=u.Quantity(80, "arcsecond"), + magnitude_limit=18, + return_skycoord=True, + ) + assert isinstance(sc, SkyCoord) + + sc = QueryPosition( + c, + epoch=epoch, + catalog="tic", + radius=u.Quantity(80, "arcsecond"), + magnitude_limit=18, + ).to_SkyCoord() + + assert isinstance(sc, SkyCoord) diff --git a/tests/test_catalogs_idsearch.py b/tests/test_catalogs_idsearch.py index 73ce82c..442d2ea 100644 --- a/tests/test_catalogs_idsearch.py +++ b/tests/test_catalogs_idsearch.py @@ -12,28 +12,28 @@ def test_id_query(): tic = 299096513 tic_result = CatalogSearch.QueryID(tic, catalog="tic") - assert len(tic_result == 1) - assert tic_result.TIC.values == tic + assert len(tic_result) == 1 + assert tic_result["TIC"] == tic kic = 12644769 kic_result = CatalogSearch.QueryID(kic, catalog="kic") - assert len(kic_result == 1) - assert kic_result.KIC.values == kic + assert len(kic_result) == 1 + assert kic_result["KIC"] == kic epic = 201563164 epic_result = CatalogSearch.QueryID(epic, catalog="epic") - assert len(epic_result == 1) - assert epic_result.ID.values == epic + assert len(epic_result) == 1 + assert epic_result["ID"] == epic gaia = 2133452475178900736 gaia_result = CatalogSearch.QueryID(gaia, catalog="gaiadr3") - assert len(gaia_result == 1) - assert gaia_result.Source.values == gaia + assert len(gaia_result) == 1 + assert gaia_result["Source"] == gaia def name_disambiguation(string, key, target): result = CatalogSearch.QueryID(string) - return len(result == 1) and result[key].values[0] == target + return (len(result) == 1) and result[key][0] == target def test_name_disambiguation(): @@ -70,20 +70,30 @@ def test_lists(): def test_crossmatch(): result = CatalogSearch.QueryID("GAIA 2133452475178900736", catalog="tic") assert len(result) == 1 - assert result["TIC"].values == 299096513 + assert result["TIC"] == 299096513 sources = [2133452475178900736, 3201680999981276544] result = CatalogSearch.QueryID(sources, catalog="tic", input_catalog="gaiadr3") assert len(result) == 2 - assert 299096513 in result["TIC"].values - assert 299096514 in result["TIC"].values + assert 299096513 in result["TIC"] + assert 299096514 in result["TIC"] result = CatalogSearch.QueryID("TIC 299096513", catalog="gaiadr3") assert len(result) == 1 - assert result["Source"].values == 2133452475178900736 + assert result["Source"] == 2133452475178900736 result = CatalogSearch.QueryID(f"KIC 12644769", catalog="tic") assert len(result) == 1 - assert result["TIC"].values == 299096355 + assert result["TIC"] == 299096355 # TODO Add KIC->GAIA vice versa + + +def test_skycoord(): + tic = 299096513 + tic_result = CatalogSearch.QueryID(tic, catalog="tic") + sc = tic_result.to_SkyCoord() + assert isinstance(sc, SkyCoord) + + sc = CatalogSearch.QueryID(tic, catalog="tic", return_skycoord=True) + assert isinstance(sc, SkyCoord) From 06db26292de82f4c2516154e9d2a18923c1aa1d8 Mon Sep 17 00:00:00 2001 From: Tyler Pritchard Date: Wed, 20 Nov 2024 15:47:12 -0500 Subject: [PATCH 12/15] updated idlooklup filtering and docs --- docs/tutorials/catalog-searches.ipynb | 233 +++++++++++++++++++------- src/lksearch/CatalogSearch.py | 61 +++++-- 2 files changed, 226 insertions(+), 68 deletions(-) diff --git a/docs/tutorials/catalog-searches.ipynb b/docs/tutorials/catalog-searches.ipynb index 2a261e8..55161a3 100644 --- a/docs/tutorials/catalog-searches.ipynb +++ b/docs/tutorials/catalog-searches.ipynb @@ -92,7 +92,7 @@ "data": { "text/html": [ "
CatalogResult length=5\n", - "\n", + "
\n", "\n", "\n", "\n", @@ -143,14 +143,14 @@ "data": { "text/html": [ "
CatalogResult length=5\n", - "
IDRADecSeparationRelative_FluxpmRApmDEKepmagTefflogg
mas / yrmas / yrmagKlog(cm.s**-2)
str12float64float64float64float32float64float64float32int32float32
\n", + "
\n", "\n", "\n", "\n", "\n", "\n", "\n", - "\n", + "\n", "\n", "
IDRADecSeparationRelative_FluxpmRApmDEKepmagTefflogg
mas / yrmas / yrmagKlog(cm.s**-2)
str12float64float64float64float32float64float64float32int32float32
KIC 11904151285.6793850.2412990.01.00.00.010.96154914.467
KIC 11904160285.6807650.2424935.3452135059380710.00664354440.00.016.405----
KIC 11904158285.6804250.24571616.080461583713090.00542001430.00.016.626----
KIC 11904156285.680106756903450.2500109999919831.4077965703614230.0026717787-4.00.017.394----
KIC 11904156285.680106753689350.2500109999919831.4077961761870230.0026717787-4.00.017.394----
KIC 11904148285.6772250.2590100000000163.953185816782890.0171553720.00.015.37552864.640
" ], @@ -163,7 +163,7 @@ "KIC 11904151 285.67938 50.241299 0.0 1.0 0.0 0.0 10.961 5491 4.467\n", "KIC 11904160 285.68076 50.242493 5.345213505938071 0.0066435444 0.0 0.0 16.405 -- --\n", "KIC 11904158 285.68042 50.245716 16.08046158371309 0.0054200143 0.0 0.0 16.626 -- --\n", - "KIC 11904156 285.6801067569034 50.25001099999198 31.407796570361423 0.0026717787 -4.0 0.0 17.394 -- --\n", + "KIC 11904156 285.6801067536893 50.25001099999198 31.407796176187023 0.0026717787 -4.0 0.0 17.394 -- --\n", "KIC 11904148 285.67722 50.25901000000001 63.95318581678289 0.017155372 0.0 0.0 15.375 5286 4.640" ] }, @@ -194,7 +194,7 @@ "data": { "text/html": [ "
CatalogResult length=5\n", - "\n", + "
\n", "\n", "\n", "\n", @@ -245,22 +245,22 @@ "data": { "text/html": [ "
CatalogResult length=2\n", - "
IDRADecSeparationRelative_FluxpmRApmDEKepmagTefflogg
mas / yrmas / yrmagKlog(cm.s**-2)
str12float64float64float64float32float64float64float32int32float32
\n", + "
\n", "\n", "\n", "\n", - "\n", + "\n", "\n", "
IDRADecSeparationRelative_FluxpmRApmDETESSmagMassRadTefflogg
mas / yrmas / yrmagsolMasssolRadKlog(cm.s**-2)
str14float64float64float64float32float64float64float32float32float64float64float32
TIC 377780790285.679222974123450.24159228918821nan915.37714-18.39441.44810.4771.0171.0905706.04.3707
TIC 377780790285.679222959345650.241592310484634nan915.37714-18.39441.44810.4771.0171.0905706.04.3707
TIC 1717218059nannannan1.0-2.227-1.20417.8811.0700.8105895.04.6506
" ], "text/plain": [ "\n", - " ID RA Dec Separation Relative_Flux pmRA pmDE TESSmag Mass Rad Teff logg \n", - " mas / yr mas / yr mag solMass solRad K log(cm.s**-2)\n", - " str14 float64 float64 float64 float32 float64 float64 float32 float32 float64 float64 float32 \n", - "-------------- ----------------- ----------------- ---------- ------------- --------- --------- ------- ------- -------- ------- -------------\n", - " TIC 377780790 285.6792229741234 50.24159228918821 nan 915.37714 -18.394 41.448 10.477 1.017 1.090 5706.0 4.3707\n", - "TIC 1717218059 nan nan nan 1.0 -2.227 -1.204 17.881 1.070 0.810 5895.0 4.6506" + " ID RA Dec Separation Relative_Flux pmRA pmDE TESSmag Mass Rad Teff logg \n", + " mas / yr mas / yr mag solMass solRad K log(cm.s**-2)\n", + " str14 float64 float64 float64 float32 float64 float64 float32 float32 float64 float64 float32 \n", + "-------------- ----------------- ------------------ ---------- ------------- --------- --------- ------- ------- -------- ------- -------------\n", + " TIC 377780790 285.6792229593456 50.241592310484634 nan 915.37714 -18.394 41.448 10.477 1.017 1.090 5706.0 4.3707\n", + "TIC 1717218059 nan nan nan 1.0 -2.227 -1.204 17.881 1.070 0.810 5895.0 4.6506" ] }, "execution_count": 6, @@ -290,7 +290,7 @@ "data": { "text/html": [ "
Table length=0\n", - "\n", + "
\n", "\n", "\n", "
RAJ2000DEJ2000pmRApmDEPlxK2magloggTeffRadMassRADecSeparationRelative_Flux
float64float64float64float64float64float64float64float64float64float64float64float64float64float64
" @@ -329,24 +329,24 @@ "data": { "text/html": [ "
CatalogResult length=3\n", - "\n", + "
\n", "\n", "\n", "\n", - "\n", - "\n", - "\n", + "\n", + "\n", + "\n", "
IDRADecSeparationRelative_FluxpmRApmDEBPmagGmagRPmagTefflogg
mas / yrmas / yrmagmagmagKlog(cm.s**-2)
str28float64float64float64float64float64float64float64float64float64float64float64
Gaia DR3 2132155017099178624285.679351118414350.241408153079270.01.0-18.48341.38211.25350510.92003110.4182635595.84.3544
Gaia DR3 2132155051458917632285.680213385120750.249941766243230.7850762847439480.0016912912421145657-1.519-1.20318.20978217.84948517.3178465424.74.6774
Gaia DR3 2132155051458918144285.685922896334450.2499188485123634.170441659817360.0055780859267139439.4025.81417.21398416.55381815.778805----
Gaia DR3 2132155017099178624285.679351103565250.241408174341810.01.0-18.48341.38211.25350510.92003110.4182635595.84.3544
Gaia DR3 2132155051458917632285.6802133839001450.2499417656250830.784999701525970.0016912912421145657-1.519-1.20318.20978217.84948517.3178465424.74.6774
Gaia DR3 2132155051458918144285.685922903889250.24991885149966534.1704055046562440.0055780859267139439.4025.81417.21398416.55381815.778805----
" ], "text/plain": [ "\n", - " ID RA Dec Separation ... Gmag RPmag Teff logg \n", - " ... mag mag K log(cm.s**-2)\n", - " str28 float64 float64 float64 ... float64 float64 float64 float64 \n", - "---------------------------- ----------------- ----------------- ------------------ ... --------- --------- ------- -------------\n", - "Gaia DR3 2132155017099178624 285.6793511184143 50.24140815307927 0.0 ... 10.920031 10.418263 5595.8 4.3544\n", - "Gaia DR3 2132155051458917632 285.6802133851207 50.2499417662432 30.785076284743948 ... 17.849485 17.317846 5424.7 4.6774\n", - "Gaia DR3 2132155051458918144 285.6859228963344 50.24991884851236 34.17044165981736 ... 16.553818 15.778805 -- --" + " ID RA Dec Separation ... Gmag RPmag Teff logg \n", + " ... mag mag K log(cm.s**-2)\n", + " str28 float64 float64 float64 ... float64 float64 float64 float64 \n", + "---------------------------- ------------------ ------------------ ------------------ ... --------- --------- ------- -------------\n", + "Gaia DR3 2132155017099178624 285.6793511035652 50.24140817434181 0.0 ... 10.920031 10.418263 5595.8 4.3544\n", + "Gaia DR3 2132155051458917632 285.68021338390014 50.24994176562508 30.78499970152597 ... 17.849485 17.317846 5424.7 4.6774\n", + "Gaia DR3 2132155051458918144 285.6859229038892 50.249918851499665 34.170405504656244 ... 16.553818 15.778805 -- --" ] }, "execution_count": 8, @@ -378,13 +378,13 @@ "data": { "text/plain": [ "" + " [(-18.48303962, 41.38198231, 7.81382436e-05),\n", + " ( -1.51899991, -1.20300012, 5.47033878e-06),\n", + " ( 9.40200283, 5.81399542, 2.80752310e-05)]>" ] }, "execution_count": 9, @@ -420,24 +420,24 @@ "data": { "text/html": [ "
CatalogResult length=3\n", - "\n", + "
\n", "\n", "\n", "\n", - "\n", - "\n", - "\n", + "\n", + "\n", + "\n", "
IDRADecSeparationRelative_FluxpmRApmDEBPmagGmagRPmagTefflogg
mas / yrmas / yrmagmagmagKlog(cm.s**-2)
str28float64float64float64float64float64float64float64float64float64float64float64
Gaia DR3 2132155017099178624285.679351118414250.2414081530792840.01.0-18.48341.38211.25350510.92003110.4182635595.84.3544
Gaia DR3 2132155051458917632285.680213385120750.249941766243230.785076284695250.0016912912421145657-1.519-1.20318.20978217.84948517.3178465424.74.6774
Gaia DR3 2132155051458918144285.685922896334450.2499188485123734.1704416598752940.0055780859267139439.4025.81417.21398416.55381815.778805----
Gaia DR3 2132155017099178624285.679351103565250.2414081743418140.01.0-18.48341.38211.25350510.92003110.4182635595.84.3544
Gaia DR3 2132155051458917632285.6802133839001450.2499417656250830.7849997014802630.0016912912421145657-1.519-1.20318.20978217.84948517.3178465424.74.6774
Gaia DR3 2132155051458918144285.685922903889250.24991885149966534.170405504635710.0055780859267139439.4025.81417.21398416.55381815.778805----
" ], "text/plain": [ "\n", - " ID RA Dec Separation ... Gmag RPmag Teff logg \n", - " ... mag mag K log(cm.s**-2)\n", - " str28 float64 float64 float64 ... float64 float64 float64 float64 \n", - "---------------------------- ----------------- ------------------ ------------------ ... --------- --------- ------- -------------\n", - "Gaia DR3 2132155017099178624 285.6793511184142 50.241408153079284 0.0 ... 10.920031 10.418263 5595.8 4.3544\n", - "Gaia DR3 2132155051458917632 285.6802133851207 50.2499417662432 30.78507628469525 ... 17.849485 17.317846 5424.7 4.6774\n", - "Gaia DR3 2132155051458918144 285.6859228963344 50.24991884851237 34.170441659875294 ... 16.553818 15.778805 -- --" + " ID RA Dec Separation ... Gmag RPmag Teff logg \n", + " ... mag mag K log(cm.s**-2)\n", + " str28 float64 float64 float64 ... float64 float64 float64 float64 \n", + "---------------------------- ------------------ ------------------ ------------------ ... --------- --------- ------- -------------\n", + "Gaia DR3 2132155017099178624 285.6793511035652 50.241408174341814 0.0 ... 10.920031 10.418263 5595.8 4.3544\n", + "Gaia DR3 2132155051458917632 285.68021338390014 50.24994176562508 30.784999701480263 ... 17.849485 17.317846 5424.7 4.6774\n", + "Gaia DR3 2132155051458918144 285.6859229038892 50.249918851499665 34.17040550463571 ... 16.553818 15.778805 -- --" ] }, "execution_count": 10, @@ -462,8 +462,8 @@ "data": { "text/plain": [ "" @@ -488,8 +488,8 @@ "data": { "text/plain": [ "" @@ -530,7 +530,7 @@ "data": { "text/html": [ "
CatalogResult length=1\n", - "\n", + "
\n", "\n", "\n", "\n", @@ -573,7 +573,7 @@ "data": { "text/html": [ "
CatalogResult length=1\n", - "
TICRAJ2000DEJ2000HIPTYCUCAC4_2MASSobjIDWISEAGAIAAPASSKICS_GRefr_PospmRAe_pmRApmDEe_pmDEr_pmPlxe_Plxr_PlxGLONGLATELONELATBmage_BmagVmage_Vmagumage_umaggmage_gmagrmage_rmagimage_imagzmage_zmagJmage_JmagHmage_HmagKmage_Kmagq_2MASSW1mage_W1magW2mage_W2magW3mage_W3magW4mage_W4magGmage_GmagTmage_Tmagf_TmagFlagTeffs_Teffloggs_logg__M_H_e__M_H_Rads_RadMasss_Massrhos_rhoLClassLums_LumDists_DistE_B-V_s_E_B-V_NcontRcontDispm_TICPriore_E_B-V_E_E_B-V_f_E_B-V_e_MassE_Masse_RadE_Rade_rhoE_rhoe_loggE_logge_LumE_Lume_DistE_Distr_Diste_TeffE_Teffr_TeffBPmage_BPmagRPmage_RPmagq_Gaiar_Vmagr_BmagCliste_RAJ2000e_DEJ2000RAOdegDEOdege_RAOdege_DEOdegRadFlWDFlID
degdegmas / yrmas / yrmas / yrmas / yrmasmasdegdegdegdegmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagKKlog(cm.s**-2)log(cm.s**-2)log(Sun)log(Sun)RsunRsunMsunMsunSunSunLsunLsunpcpcmagmagmagmagMsunMsunRsunRsunSunSunlog(cm.s**-2)log(cm.s**-2)LsunLsunpcpcKKmagmagmagmagmasmasdegdegmasmas
int64float64float64int32objectobjectobjectint64objectint64int32int32objectobjectobjectfloat64float32float64float32objectfloat64float32objectfloat64float64float64float64float32float32float32float32float32float64float32float64float32float64float32float64float32float64float32float32float32float32float32float32objectfloat32float32float32float32float32float32float32float32float64float64float32float32objectobjectfloat32float32float32float32float32float32float64float32float32float32float64float64objectfloat64float64float64float64float32float32int32float64objectint64float64float32float32objectfloat32float32float32float32float64float64float32float32float64float64float64float64objectfloat32float32objectfloat64float64float64float64int16objectobjectobjectfloat64float64float64float64float64float64int16int16int32
\n", + "
\n", "\n", "\n", "\n", @@ -616,7 +616,7 @@ "data": { "text/html": [ "
CatalogResult length=1\n", - "
KICRAJ2000DEJ2000pmRApmDEPlxumaggmagrmagimagzmaggrmagd51magJmagHmagKmagkepmag_2Mkey_2MnameSCP-IDSCPkeycatkeyalcaltIDsgvcqpqaqfvTefflogg__Fe_H_E_B-V_AvR_
degdegmas / yrmas / yrmasmagmagmagmagmagmagmagmagmagmagmagKlog(cm.s**-2)log(Sun)magmagRsun
int32float64float64float64float64float64float32float32float32float32float32float32float32float32float32float32float32int32objectint32int32int32int16int32int16int16objectint16int16int16int32float32float32float32float32float32
\n", + "
\n", "\n", "\n", "\n", @@ -661,7 +661,7 @@ "data": { "text/html": [ "
CatalogResult length=1\n", - "
DR3NameRA_ICRSDE_ICRSSolIDSourceRandomIe_RA_ICRSe_DE_ICRSPlxe_PlxRPlxPMpmRAe_pmRApmDEe_pmDERADEcorRAPlxcorRApmRAcorRApmDEcorDEPlxcorDEpmRAcorDEpmDEcorPlxpmRAcorPlxpmDEcorpmRApmDEcorNALNACNgALNbALgofALchi2ALepsisepsiSolvedAPFnueffpscole_pscolRApscolCorrDEpscolCorrPlxpscolCorrpmRApscolCorrpmDEpscolCorrMatchObsANperamaxMatchObsNewMatchObsMatchObsrmIPDgofhaIPDgofhpIPDfmpIPDfowRUWESDSk1SDSk2SDSk3SDSk4SDMk1SDMk2SDMk3SDMk4Dupo_GmagFGe_FGRFGGmage_Gmago_BPmagFBPe_FBPRFBPBPmage_BPmago_RPmagFRPe_FRPRFRPRPmage_RPmagE_BP_RP_NBPcontNBPblendNRPcontNRPblendModeBP-RPBP-GG-RPRVe_RVn_RVo_RVo_RVdRVNperRVS_NRVgofRVchi2RVTdurRVampRVtempTeffRVtemploggRVtemp_Fe_H_VatmparamVbroade_Vbroado_VbroadGRVSmage_GRVSmago_GRVSmagRVSS_NVarFlagGLONGLATELONELATQSOGalNSSXPcontXPsampRVSEpochPhEpochRVMCMCGSPMCMCMSCAndPQSOPGalPSSTeffb_TeffB_Teffloggb_loggB_logg__Fe_H_b__Fe_H_B__Fe_H_Distb_DistB_DistA0b_A0B_A0AGb_AGB_AGE_BP-RP_b_E_BP-RP_B_E_BP-RP_LibHIPdHIPnHIPf_HIPPS1coidPS1dPS1nPS1mPS1f_PS1SDSS13coidSDSS13dSDSS13nSDSS13mSDSS13f_SDSS13SKYM2dSKYM2nSKYM2mSKYM2f_SKYM2TYC2dTYC2f_TYC2TYC2moidnTYC2URAT1dURAT1f_URAT1URAT1oidnURAT1mURAT1AllWISEdAllWISEf_AllWISEAllWISEoidnAllWISEmAllWISEAPASS9coidAPASS9dAPASS9nAPASS9mAPASS9f_APASS9GSC23dGSC23f_GSC23GSC23coidnGSC23mGSC23RAVE5dRAVE5f_RAVE5RAVE5coidnRAVE5_2MASSd2MASSf_2MASS_2MASScoidn2MASSm2MASSRAVE6dRAVE6f_RAVE6RAVE6oidnRAVE6RAJ2000DEJ2000e_RAJ2000e_DEJ2000RADEcorJ2000
degdegmasmasmasmasmas / yrmas / yrmas / yrmas / yrmas / yrmas1 / um1 / um1 / ummasdegdegmagmagmagmagmagmagmagmagmagmagkm / skm / sdkm / sKlog(cm.s**-2)km / skm / smagmagdegdegdegdegKKKlog(cm.s**-2)log(cm.s**-2)log(cm.s**-2)pcpcpcmagmagmagmagmagmagmagmagmagmasmasmasmasmasmasmasmasmasmasmasmasdegdegmasmas
objectfloat64float64int64int64int64float32float32float64float32float64float64float64float32float64float64float32float32float32float32float32float32float32float32float32float32int16int16int16int16float64float64float64float64int16int16float32float32float32float32float32float32float32float32int16int16float64int16int16int16float64float64int16int16float32float64float64float64float64float64float32float32float32int16int16float64float64float64float64float64int16float64float64float64float64float64int16float64float64float64float64float64float64int16int16int16int16int16float64float64float64float32float32int16int16int16int16float64float64float64float64float32float32float32float32int16float64float64int16float64float64int16float64objectfloat64float64float64float64int16int16int16int16int16int16int16int16int16int16int16float64float64float64float32float32float32float32float32float32float32float32float32float64float64float64float32float32float32float32float32float32float32float32float32objectint32float64int16int16int64int64float64int16int16int16int32int64float64int16int16int16int32float64int16int16int16objectfloat64int16int32int16objectfloat64int16int32int16int16objectfloat64int16int32int16int16int32int32float64int16int16int16objectfloat64int16int32int16int16objectfloat64int16float64int16objectfloat64int16int32int16int16objectfloat64int16float64int16float64float64float64float64float32
\n", + "
\n", "\n", "\n", "\n", @@ -704,7 +704,7 @@ "data": { "text/html": [ "
CatalogResult length=1\n", - "
TICRAJ2000DEJ2000HIPTYCUCAC4_2MASSobjIDWISEAGAIAAPASSKICS_GRefr_PospmRAe_pmRApmDEe_pmDEr_pmPlxe_Plxr_PlxGLONGLATELONELATBmage_BmagVmage_Vmagumage_umaggmage_gmagrmage_rmagimage_imagzmage_zmagJmage_JmagHmage_HmagKmage_Kmagq_2MASSW1mage_W1magW2mage_W2magW3mage_W3magW4mage_W4magGmage_GmagTmage_Tmagf_TmagFlagTeffs_Teffloggs_logg__M_H_e__M_H_Rads_RadMasss_Massrhos_rhoLClassLums_LumDists_DistE_B-V_s_E_B-V_NcontRcontDispm_TICPriore_E_B-V_E_E_B-V_f_E_B-V_e_MassE_Masse_RadE_Rade_rhoE_rhoe_loggE_logge_LumE_Lume_DistE_Distr_Diste_TeffE_Teffr_TeffBPmage_BPmagRPmage_RPmagq_Gaiar_Vmagr_BmagCliste_RAJ2000e_DEJ2000RAOdegDEOdege_RAOdege_DEOdegRadFlWDFlID
degdegmas / yrmas / yrmas / yrmas / yrmasmasdegdegdegdegmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagKKlog(cm.s**-2)log(cm.s**-2)log(Sun)log(Sun)RsunRsunMsunMsunSunSunLsunLsunpcpcmagmagmagmagMsunMsunRsunRsunSunSunlog(cm.s**-2)log(cm.s**-2)LsunLsunpcpcKKmagmagmagmagmasmasdegdegmasmas
int64float64float64int32objectobjectobjectint64objectint64int32int32objectobjectobjectfloat64float32float64float32objectfloat64float32objectfloat64float64float64float64float32float32float32float32float32float64float32float64float32float64float32float64float32float64float32float32float32float32float32float32objectfloat32float32float32float32float32float32float32float32float64float64float32float32objectobjectfloat32float32float32float32float32float32float64float32float32float32float64float64objectfloat64float64float64float64float32float32int32float64objectint64float64float32float32objectfloat32float32float32float32float64float64float32float32float64float64float64float64objectfloat32float32objectfloat64float64float64float64int16objectobjectobjectfloat64float64float64float64float64float64int16int16int32
\n", + "
\n", "\n", "\n", "\n", @@ -747,7 +747,7 @@ "data": { "text/html": [ "
CatalogResult length=1\n", - "
DR3NameRA_ICRSDE_ICRSSolIDSourceRandomIe_RA_ICRSe_DE_ICRSPlxe_PlxRPlxPMpmRAe_pmRApmDEe_pmDERADEcorRAPlxcorRApmRAcorRApmDEcorDEPlxcorDEpmRAcorDEpmDEcorPlxpmRAcorPlxpmDEcorpmRApmDEcorNALNACNgALNbALgofALchi2ALepsisepsiSolvedAPFnueffpscole_pscolRApscolCorrDEpscolCorrPlxpscolCorrpmRApscolCorrpmDEpscolCorrMatchObsANperamaxMatchObsNewMatchObsMatchObsrmIPDgofhaIPDgofhpIPDfmpIPDfowRUWESDSk1SDSk2SDSk3SDSk4SDMk1SDMk2SDMk3SDMk4Dupo_GmagFGe_FGRFGGmage_Gmago_BPmagFBPe_FBPRFBPBPmage_BPmago_RPmagFRPe_FRPRFRPRPmage_RPmagE_BP_RP_NBPcontNBPblendNRPcontNRPblendModeBP-RPBP-GG-RPRVe_RVn_RVo_RVo_RVdRVNperRVS_NRVgofRVchi2RVTdurRVampRVtempTeffRVtemploggRVtemp_Fe_H_VatmparamVbroade_Vbroado_VbroadGRVSmage_GRVSmago_GRVSmagRVSS_NVarFlagGLONGLATELONELATQSOGalNSSXPcontXPsampRVSEpochPhEpochRVMCMCGSPMCMCMSCAndPQSOPGalPSSTeffb_TeffB_Teffloggb_loggB_logg__Fe_H_b__Fe_H_B__Fe_H_Distb_DistB_DistA0b_A0B_A0AGb_AGB_AGE_BP-RP_b_E_BP-RP_B_E_BP-RP_LibHIPdHIPnHIPf_HIPPS1coidPS1dPS1nPS1mPS1f_PS1SDSS13coidSDSS13dSDSS13nSDSS13mSDSS13f_SDSS13SKYM2dSKYM2nSKYM2mSKYM2f_SKYM2TYC2dTYC2f_TYC2TYC2moidnTYC2URAT1dURAT1f_URAT1URAT1oidnURAT1mURAT1AllWISEdAllWISEf_AllWISEAllWISEoidnAllWISEmAllWISEAPASS9coidAPASS9dAPASS9nAPASS9mAPASS9f_APASS9GSC23dGSC23f_GSC23GSC23coidnGSC23mGSC23RAVE5dRAVE5f_RAVE5RAVE5coidnRAVE5_2MASSd2MASSf_2MASS_2MASScoidn2MASSm2MASSRAVE6dRAVE6f_RAVE6RAVE6oidnRAVE6RAJ2000DEJ2000e_RAJ2000e_DEJ2000RADEcorJ2000
degdegmasmasmasmasmas / yrmas / yrmas / yrmas / yrmas / yrmas1 / um1 / um1 / ummasdegdegmagmagmagmagmagmagmagmagmagmagkm / skm / sdkm / sKlog(cm.s**-2)km / skm / smagmagdegdegdegdegKKKlog(cm.s**-2)log(cm.s**-2)log(cm.s**-2)pcpcpcmagmagmagmagmagmagmagmagmagmasmasmasmasmasmasmasmasmasmasmasmasdegdegmasmas
objectfloat64float64int64int64int64float32float32float64float32float64float64float64float32float64float64float32float32float32float32float32float32float32float32float32float32int16int16int16int16float64float64float64float64int16int16float32float32float32float32float32float32float32float32int16int16float64int16int16int16float64float64int16int16float32float64float64float64float64float64float32float32float32int16int16float64float64float64float64float64int16float64float64float64float64float64int16float64float64float64float64float64float64int16int16int16int16int16float64float64float64float32float32int16int16int16int16float64float64float64float64float32float32float32float32int16float64float64int16float64float64int16float64objectfloat64float64float64float64int16int16int16int16int16int16int16int16int16int16int16float64float64float64float32float32float32float32float32float32float32float32float32float64float64float64float32float32float32float32float32float32float32float32float32objectint32float64int16int16int64int64float64int16int16int16int32int64float64int16int16int16int32float64int16int16int16objectfloat64int16int32int16objectfloat64int16int32int16int16objectfloat64int16int32int16int16int32int32float64int16int16int16objectfloat64int16int32int16int16objectfloat64int16float64int16objectfloat64int16int32int16int16objectfloat64int16float64int16float64float64float64float64float32
\n", + "
\n", "\n", "\n", "\n", @@ -790,7 +790,7 @@ "data": { "text/html": [ "
CatalogResult length=10\n", - "
TICRAJ2000DEJ2000HIPTYCUCAC4_2MASSobjIDWISEAGAIAAPASSKICS_GRefr_PospmRAe_pmRApmDEe_pmDEr_pmPlxe_Plxr_PlxGLONGLATELONELATBmage_BmagVmage_Vmagumage_umaggmage_gmagrmage_rmagimage_imagzmage_zmagJmage_JmagHmage_HmagKmage_Kmagq_2MASSW1mage_W1magW2mage_W2magW3mage_W3magW4mage_W4magGmage_GmagTmage_Tmagf_TmagFlagTeffs_Teffloggs_logg__M_H_e__M_H_Rads_RadMasss_Massrhos_rhoLClassLums_LumDists_DistE_B-V_s_E_B-V_NcontRcontDispm_TICPriore_E_B-V_E_E_B-V_f_E_B-V_e_MassE_Masse_RadE_Rade_rhoE_rhoe_loggE_logge_LumE_Lume_DistE_Distr_Diste_TeffE_Teffr_TeffBPmage_BPmagRPmage_RPmagq_Gaiar_Vmagr_BmagCliste_RAJ2000e_DEJ2000RAOdegDEOdege_RAOdege_DEOdegRadFlWDFlID
degdegmas / yrmas / yrmas / yrmas / yrmasmasdegdegdegdegmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagKKlog(cm.s**-2)log(cm.s**-2)log(Sun)log(Sun)RsunRsunMsunMsunSunSunLsunLsunpcpcmagmagmagmagMsunMsunRsunRsunSunSunlog(cm.s**-2)log(cm.s**-2)LsunLsunpcpcKKmagmagmagmagmasmasdegdegmasmas
int64float64float64int32objectobjectobjectint64objectint64int32int32objectobjectobjectfloat64float32float64float32objectfloat64float32objectfloat64float64float64float64float32float32float32float32float32float64float32float64float32float64float32float64float32float64float32float32float32float32float32float32objectfloat32float32float32float32float32float32float32float32float64float64float32float32objectobjectfloat32float32float32float32float32float32float64float32float32float32float64float64objectfloat64float64float64float64float32float32int32float64objectint64float64float32float32objectfloat32float32float32float32float64float64float32float32float64float64float64float64objectfloat32float32objectfloat64float64float64float64int16objectobjectobjectfloat64float64float64float64float64float64int16int16int32
\n", + "
\n", "\n", "\n", "\n", @@ -937,7 +937,7 @@ "data": { "text/html": [ "
Table length=14\n", - "
TICRAJ2000DEJ2000HIPTYCUCAC4_2MASSobjIDWISEAGAIAAPASSKICS_GRefr_PospmRAe_pmRApmDEe_pmDEr_pmPlxe_Plxr_PlxGLONGLATELONELATBmage_BmagVmage_Vmagumage_umaggmage_gmagrmage_rmagimage_imagzmage_zmagJmage_JmagHmage_HmagKmage_Kmagq_2MASSW1mage_W1magW2mage_W2magW3mage_W3magW4mage_W4magGmage_GmagTmage_Tmagf_TmagFlagTeffs_Teffloggs_logg__M_H_e__M_H_Rads_RadMasss_Massrhos_rhoLClassLums_LumDists_DistE_B-V_s_E_B-V_NcontRcontDispm_TICPriore_E_B-V_E_E_B-V_f_E_B-V_e_MassE_Masse_RadE_Rade_rhoE_rhoe_loggE_logge_LumE_Lume_DistE_Distr_Diste_TeffE_Teffr_TeffBPmage_BPmagRPmage_RPmagq_Gaiar_Vmagr_BmagCliste_RAJ2000e_DEJ2000RAOdegDEOdege_RAOdege_DEOdegRadFlWDFlID
degdegmas / yrmas / yrmas / yrmas / yrmasmasdegdegdegdegmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagKKlog(cm.s**-2)log(cm.s**-2)log(Sun)log(Sun)RsunRsunMsunMsunSunSunLsunLsunpcpcmagmagmagmagMsunMsunRsunRsunSunSunlog(cm.s**-2)log(cm.s**-2)LsunLsunpcpcKKmagmagmagmagmasmasdegdegmasmas
int64float64float64int32objectobjectobjectint64objectint64int32int32objectobjectobjectfloat64float32float64float32objectfloat64float32objectfloat64float64float64float64float32float32float32float32float32float64float32float64float32float64float32float64float32float64float32float32float32float32float32float32objectfloat32float32float32float32float32float32float32float32float64float64float32float32objectobjectfloat32float32float32float32float32float32float64float32float32float32float64float64objectfloat64float64float64float64float32float32int32float64objectint64float64float32float32objectfloat32float32float32float32float64float64float32float32float64float64float64float64objectfloat32float32objectfloat64float64float64float64int16objectobjectobjectfloat64float64float64float64float64float64int16int16int32
\n", + "
\n", "\n", "\n", "\n", @@ -1004,7 +1004,7 @@ "data": { "text/html": [ "
Table length=7\n", - "
id
object
LAMOST J190243.11+501428.7
\n", + "
\n", "\n", "\n", "\n", @@ -1057,7 +1057,7 @@ "data": { "text/html": [ "
CatalogResult length=1\n", - "
id
object
Gaia DR3 3796414192429498880
\n", + "
\n", "\n", "\n", "\n", @@ -1082,10 +1082,131 @@ "CatalogSearch.QueryID(\"Gaia DR3 3796414192429498880\", catalog=\"tic\")" ] }, + { + "cell_type": "markdown", + "id": "497d2223-6f8e-477b-b693-a8582c32f41a", + "metadata": {}, + "source": [ + "`lksearch` also alows you to input a list of strings, which will then perform sequential ID searches for each item in the list and return a list of the resulting tables: " + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "dc0d422f-fa40-4f36-8017-3cbc9bc03f19", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Throttling query limit to Simbad's: max 5/s\n" + ] + }, + { + "data": { + "text/plain": [ + "[
TICRAJ2000DEJ2000HIPTYCUCAC4_2MASSobjIDWISEAGAIAAPASSKICS_GRefr_PospmRAe_pmRApmDEe_pmDEr_pmPlxe_Plxr_PlxGLONGLATELONELATBmage_BmagVmage_Vmagumage_umaggmage_gmagrmage_rmagimage_imagzmage_zmagJmage_JmagHmage_HmagKmage_Kmagq_2MASSW1mage_W1magW2mage_W2magW3mage_W3magW4mage_W4magGmage_GmagTmage_Tmagf_TmagFlagTeffs_Teffloggs_logg__M_H_e__M_H_Rads_RadMasss_Massrhos_rhoLClassLums_LumDists_DistE_B-V_s_E_B-V_NcontRcontDispm_TICPriore_E_B-V_E_E_B-V_f_E_B-V_e_MassE_Masse_RadE_Rade_rhoE_rhoe_loggE_logge_LumE_Lume_DistE_Distr_Diste_TeffE_Teffr_TeffBPmage_BPmagRPmage_RPmagq_Gaiar_Vmagr_BmagCliste_RAJ2000e_DEJ2000RAOdegDEOdege_RAOdege_DEOdegRadFlWDFlID
degdegmas / yrmas / yrmas / yrmas / yrmasmasdegdegdegdegmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagKKlog(cm.s**-2)log(cm.s**-2)log(Sun)log(Sun)RsunRsunMsunMsunSunSunLsunLsunpcpcmagmagmagmagMsunMsunRsunRsunSunSunlog(cm.s**-2)log(cm.s**-2)LsunLsunpcpcKKmagmagmagmagmasmasdegdegmasmas
int64float64float64int32objectobjectobjectint64objectint64int32int32objectobjectobjectfloat64float32float64float32objectfloat64float32objectfloat64float64float64float64float32float32float32float32float32float64float32float64float32float64float32float64float32float64float32float32float32float32float32float32objectfloat32float32float32float32float32float32float32float32float64float64float32float32objectobjectfloat32float32float32float32float32float32float64float32float32float32float64float64objectfloat64float64float64float64float32float32int32float64objectint64float64float32float32objectfloat32float32float32float32float64float64float32float32float64float64float64float64objectfloat32float32objectfloat64float64float64float64int16objectobjectobjectfloat64float64float64float64float64float64int16int16int32
\n", + " id \n", + " object \n", + " ----------------------------\n", + " LAMOST J190243.11+501428.7\n", + " AP J19024305+5014286\n", + " Gaia DR3 2132155017099178624\n", + " TIC 377780790\n", + " SPOCS 4268\n", + " Gaia DR2 2132155017099178624\n", + " Kepler-10\n", + " UCAC3 281-142262\n", + " 2MASS J19024305+5014286\n", + " PPMX J190243.0+501428\n", + " USNO-B1.0 1402-00324696\n", + " GSC 03549-00354\n", + " KOI-72\n", + " KIC 11904151,\n", + "
\n", + " id \n", + " object \n", + " ----------------------------\n", + " LAMOST J191618.16+514526.7\n", + " Gaia DR3 2133476355197071616\n", + " TIC 299096355\n", + " Gaia DR2 2133476355197071616\n", + " 2MASS J19161817+5145267\n", + " UCAC3 284-140854\n", + " GSC 03554-01147\n", + " KIC 12644769\n", + " Kepler-16\n", + " NAME Kepler-16 (AB)\n", + " KOI-1611]" + ] + }, + "execution_count": 25, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "CatalogSearch.IDLookup([\"Kepler 10\", \"Kepler 16\"])" + ] + }, + { + "cell_type": "markdown", + "id": "99a4d45d-d05e-4497-8e56-e8109f9cb6c2", + "metadata": {}, + "source": [ + "### Matching ID Results to Catalogs\n", + "`lksearch` has the ability to parse the id lists returned by `QueryID` to look for ids which contain the string contained in the optional parameter `match`. This can be usefull for only returning the catalog results which interest you. \n", + "\n", + "Just like the search input can be a list, so can the match criteria, as so: " + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "id": "b05efbea-5edb-471c-ba7c-96af0a24a78a", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Throttling query limit to Simbad's: max 5/s\n" + ] + }, + { + "data": { + "text/html": [ + "
Table length=2\n", + "
\n", + "\n", + "\n", + "\n", + "\n", + "
searchtickic
str9str13str12
Kepler 10TIC 377780790KIC 11904151
Kepler 16TIC 299096355KIC 12644769
" + ], + "text/plain": [ + "\n", + " search tic kic \n", + " str9 str13 str12 \n", + "--------- ------------- ------------\n", + "Kepler 10 TIC 377780790 KIC 11904151\n", + "Kepler 16 TIC 299096355 KIC 12644769" + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "CatalogSearch.IDLookup([\"Kepler 10\", \"Kepler 16\"], match=[\"tic\", \"kic\"])" + ] + }, { "cell_type": "code", "execution_count": null, - "id": "d50f54a2-2990-45b2-985a-680efe830760", + "id": "4b422d41-82bb-40af-a08d-8c7722869a96", "metadata": {}, "outputs": [], "source": [] diff --git a/src/lksearch/CatalogSearch.py b/src/lksearch/CatalogSearch.py index bf61f6e..b8eea31 100644 --- a/src/lksearch/CatalogSearch.py +++ b/src/lksearch/CatalogSearch.py @@ -47,40 +47,77 @@ def _load_cat_config(): # use simbad to get name/ID crossmatches -def IDLookup(search_input: Union[str, list[str]], match_catalog: str = None): - match_list = _Catalog_Dictionary.keys() - """Uses the Simbad name resolver and ids to disambiguate the search_input string or list. +def IDLookup(search_input: Union[str, list[str]], match: Union[str, list[str]] = None): + """Uses the Simbad name resolver and ids to disambiguate the search_input string or list. Parameters ---------- search_input: Union[str, list[str]] A string or list of strings to query simbad for ID disambiguation - - match_catalog: str = None - Short name of catalog to parse the simbad id results for + + match: Union[str, list[str]] = None + Short name of catalog to parse the simbad id results for. If this is passed the list of ids are not + reported and a column per item in the match list is added and the ids with that match str contained in the id are listed. Returns ------- result: Table, list[Table] - Results from the `~astroquery.simbad.Simbad` ID query in `~astropy.table.Table` format. + Results from the `~astroquery.simbad.Simbad` ID query in `~astropy.table.Table` format. """ - # match_str = None only usable in bleeding edge astroquery + # match_str = None only usable in bleeding edge astroquery + # match_list = _Catalog_Dictionary.keys() - if match_catalog is not None: - if match_catalog.lower() in match_list: - match_str = _Catalog_Dictionary[match_catalog.lower()]["SIMBAD_match_like"] + # if match_catalog is not None: + # if match_catalog.lower() in match_list: + # match_str = _Catalog_Dictionary[match_catalog.lower()]["SIMBAD_match_like"] if isinstance(search_input, list): result = [] + log.warning("Throttling query limit to Simbad's: max 5/s") for item in search_input: - log.warning("Throttling query limit to Simbad's: max 5/s") result_iter = _IDLookup(item) time.sleep(0.2) result.append(result_iter) else: result = _IDLookup(search_input) + if match is not None: + # Make an Empty table with # columns = 1(the search input) + len(match) + # This will provide the ids that match each search input given the match criteria + col = ["search"] + for item in np.atleast_1d(match): + col.append(item) + dt = ["str"] * (len(np.atleast_1d(match)) + 1) + + final_result = Table(names=col, dtype=dt) + + # Iterate through the search inputs, returned ids, and match criteria + i = 0 + for item in np.atleast_1d(search_input): + row = [item] + # make sure we're in a list in the event we have a single result + if not isinstance(result, list): + result = [result] + # For each item in the match terms, see if it is contained in ID + for cat in np.atleast_1d(match): + mcat = cat.strip().replace(" ", "").lower() + cmatch = None + for sid in result[i]["id"]: + id = sid.strip().replace(" ", "").lower() + if mcat in id: + if cmatch is None: + cmatch = sid + else: + cmatch.append(sid) + if cmatch is None: + cmatch = "" + row.append(cmatch) + final_result.add_row(row) + i += 1 + # get rid of our old list of tables result and return the matching results + result = final_result + return result From 0a99bb17ab15e3039b2adc77848d96c3b6da17a5 Mon Sep 17 00:00:00 2001 From: Tyler Pritchard Date: Wed, 20 Nov 2024 15:56:25 -0500 Subject: [PATCH 13/15] removed FFI search test due to MAST deprecation. Remove FFI functionality? Separate PR probably --- tests/test_missionsearch.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_missionsearch.py b/tests/test_missionsearch.py index 25f2cb7..9e7efc4 100644 --- a/tests/test_missionsearch.py +++ b/tests/test_missionsearch.py @@ -430,10 +430,10 @@ def test_split_k2_campaigns(): assert search_c11.table["campaign"][0] == "11a" assert search_c11.table["campaign"][1] == "11b" - -def test_FFI_retrieval(): - """Can we find TESS individual FFI's""" - assert len(TESSSearch("Kepler 16b").search_sector_ffis(14)) == 1241 +# MAST is deprecating FFI search and retrieval through astroquery. How should we handle this? +#def test_FFI_retrieval(): +# """Can we find TESS individual FFI's""" +# assert len(TESSSearch("Kepler 16b").search_sector_ffis(14)) == 1241 def test_tesscut(): From 8e2252f53d63cb6763495e26837612072d5a4270 Mon Sep 17 00:00:00 2001 From: Tyler Pritchard Date: Wed, 20 Nov 2024 16:02:23 -0500 Subject: [PATCH 14/15] ruff --- tests/test_missionsearch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_missionsearch.py b/tests/test_missionsearch.py index 9e7efc4..1f34821 100644 --- a/tests/test_missionsearch.py +++ b/tests/test_missionsearch.py @@ -430,8 +430,9 @@ def test_split_k2_campaigns(): assert search_c11.table["campaign"][0] == "11a" assert search_c11.table["campaign"][1] == "11b" + # MAST is deprecating FFI search and retrieval through astroquery. How should we handle this? -#def test_FFI_retrieval(): +# def test_FFI_retrieval(): # """Can we find TESS individual FFI's""" # assert len(TESSSearch("Kepler 16b").search_sector_ffis(14)) == 1241 From 87862e3f8bf74753fbb2393c60fb8e32d22bf503 Mon Sep 17 00:00:00 2001 From: Tyler Pritchard Date: Wed, 20 Nov 2024 16:39:53 -0500 Subject: [PATCH 15/15] fstring update --- src/lksearch/CatalogSearch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lksearch/CatalogSearch.py b/src/lksearch/CatalogSearch.py index b8eea31..6596371 100644 --- a/src/lksearch/CatalogSearch.py +++ b/src/lksearch/CatalogSearch.py @@ -316,7 +316,7 @@ def QueryID( ] else: raise ValueError( - f"{input_catalog} does not have crossmatched IDs with {catalog}. {catalog} can be crossmatched with {_Catalog_Dictionary[catalog]["crossmatch_catalogs"]}" + f"{input_catalog} does not have crossmatched IDs with {catalog}. {catalog} can be crossmatched with {_Catalog_Dictionary[catalog]['crossmatch_catalogs']}" ) else: if catalog is None: