From 928936ba248fd754fef5db4834ad12bdaf29f535 Mon Sep 17 00:00:00 2001 From: Mike Boyle Date: Mon, 4 Apr 2022 23:09:24 -0400 Subject: [PATCH] Use newer sxs capabilities (#66) * Update dependencies * Preserve COM info in waveform, regardless of file output, in `remove_avg_com_motion` * Preserve COM info when translating to `sxs.WaveformModes` * Make `WaveformModes.transform` a full function, not just lambda (so that its name will appear correctly in the JSON when saving to RPXMB) * Make RPXMB functions wrappers around `sxs.rpxmb` functions --- poetry.lock | 241 ++++----- pyproject.toml | 10 +- scri/SpEC/com_motion.py | 6 +- .../rotating_paired_xor_multishuffle_bzip2.py | 465 ++---------------- scri/waveform_grid.py | 6 +- scri/waveform_modes.py | 31 +- 6 files changed, 206 insertions(+), 553 deletions(-) diff --git a/poetry.lock b/poetry.lock index 79b73591..24f7b42a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -41,7 +41,7 @@ pytz = ">=2015.7" [[package]] name = "black" -version = "22.1.0" +version = "22.3.0" description = "The uncompromising code formatter." category = "main" optional = false @@ -52,7 +52,7 @@ click = ">=8.0.0" mypy-extensions = ">=0.4.3" pathspec = ">=0.9.0" platformdirs = ">=2" -tomli = ">=1.1.0" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""} [package.extras] @@ -82,11 +82,11 @@ unicode_backport = ["unicodedata2"] [[package]] name = "click" -version = "8.0.4" +version = "8.1.2" description = "Composable command line interface toolkit" category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} @@ -207,11 +207,11 @@ python-versions = "*" [[package]] name = "jinja2" -version = "3.1.1" +version = "3.0.3" description = "A very fast and expressive template engine." category = "main" optional = false -python-versions = ">=3.7" +python-versions = ">=3.6" [package.dependencies] MarkupSafe = ">=2.0" @@ -327,7 +327,7 @@ python-versions = ">=3.7,<3.11" [[package]] name = "numpy-quaternion" -version = "2022.2.10.14.20.39" +version = "2022.4.1" description = "Add a quaternion dtype to NumPy" category = "main" optional = false @@ -344,14 +344,14 @@ testing = ["pytest", "pytest-cov"] [[package]] name = "numpydoc" -version = "1.2" +version = "1.2.1" description = "Sphinx extension to support docstrings in Numpy format" category = "main" optional = false python-versions = ">=3.7" [package.dependencies] -Jinja2 = ">=2.10" +Jinja2 = ">=2.10,<3.1" sphinx = ">=1.8" [package.extras] @@ -370,7 +370,7 @@ pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" [[package]] name = "pandas" -version = "1.4.1" +version = "1.4.2" description = "Powerful data structures for data analysis, time series, and statistics" category = "main" optional = false @@ -635,15 +635,18 @@ pymdown-extensions = ["pymdown-extensions (>=8,<9)"] [[package]] name = "spherical-functions" -version = "2020.8.18.15.37.20" +version = "2022.4.1" description = "Python/numba implementation of Wigner D Matrices, spin-weighted spherical harmonics, and associated functions" category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.8,<3.11" [package.dependencies] -numpy = ">=1.13" -numpy-quaternion = "*" +numba = ">=0.55" +numpy = ">=1.20" +numpy-quaternion = ">=2022" +scipy = ">=1.0,<2.0" +spinsfast = ">=2022,<2023" [[package]] name = "sphinx" @@ -750,7 +753,7 @@ test = ["pytest"] [[package]] name = "spinsfast" -version = "104.2022.3.2.14.39.8" +version = "2022.4.1" description = "Fast and exact spin-s spherical-harmonic transforms" category = "main" optional = false @@ -758,7 +761,7 @@ python-versions = "*" [[package]] name = "sxs" -version = "2021.0.6" +version = "2022.3.2" description = "Interface to data produced by the Simulating eXtreme Spacetimes collaboration" category = "main" optional = false @@ -771,6 +774,7 @@ h5py = ">=3,<4" inflection = ">=0.5.1,<0.6.0" numba = {version = ">=0.55", markers = "implementation_name == \"cpython\""} numpy = ">=1.20,<2.0" +numpy-quaternion = ">=0.3.1" pandas = ">=1.1.2,<2.0.0" pylatexenc = ">=2.7,<3.0" pytest-forked = ">=1.3.0,<2.0.0" @@ -779,7 +783,7 @@ quaternionic = ">=1.0,<2.0" requests = ">=2.24.0,<3.0.0" scipy = ">=1.0,<2.0" spherical = ">=1.0,<2.0" -spinsfast = {version = ">=104,<105", markers = "sys_platform != \"win32\""} +spinsfast = {version = ">=2022", markers = "sys_platform != \"win32\""} tqdm = ">=4.48.2,<4.61.2" urllib3 = ">=1.25.10,<2.0.0" @@ -787,7 +791,7 @@ urllib3 = ">=1.25.10,<2.0.0" mkapi = ["mkapi (==1.0.13)"] mkdocs = ["mkdocs (>=1.1.2)"] pymdown-extensions = ["pymdown-extensions (>=8,<9)"] -ecosystem = ["ipywidgets (>=7.5.1,<8.0.0)", "ipykernel (>=5.3.4,<6.0.0)", "jupyter_contrib_nbextensions (>=0.5.1,<0.6.0)", "jupyterlab (>=2.2.8,<3.0.0)", "line_profiler (>=3.0.2,<4.0.0)", "memory_profiler (>=0.57.0,<0.58.0)", "matplotlib (>=2.1.1)", "sympy (>=1.6.2,<2.0.0)", "corner (>=2.1.0,<3.0.0)", "qgrid (>=1.3.1,<2.0.0)", "rise (>=5.6.1,<6.0.0)", "quaternion (>=0.3.1,<0.4.0)", "scri (>=2020.8.18,<2021.0.0)"] +ecosystem = ["ipywidgets (>=7.5.1,<8.0.0)", "ipykernel (>=5.3.4,<6.0.0)", "jupyter_contrib_nbextensions (>=0.5.1,<0.6.0)", "jupyterlab (>=2.2.8,<3.0.0)", "line_profiler (>=3.0.2,<4.0.0)", "memory_profiler (>=0.57.0,<0.58.0)", "matplotlib (>=2.1.1)", "sympy (>=1.6.2,<2.0.0)", "corner (>=2.1.0,<3.0.0)", "qgrid (>=1.3.1,<2.0.0)", "rise (>=5.6.1,<6.0.0)", "scri (>=2020.8.18)"] [[package]] name = "tomli" @@ -844,15 +848,15 @@ watchmedo = ["PyYAML (>=3.10)"] [[package]] name = "zipp" -version = "3.7.0" +version = "3.8.0" description = "Backport of pathlib-compatible object wrapper for zip files" category = "main" optional = false python-versions = ">=3.7" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] +docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] [extras] mkdocs = ["mkdocs"] @@ -861,7 +865,7 @@ mktheapidocs = ["mktheapidocs"] [metadata] lock-version = "1.1" python-versions = ">=3.8,<3.11" -content-hash = "f2c986e900ac0d0d4f9b837440e60f2234c792172f5de1cc7f1677d9d05d0182" +content-hash = "e5ee947e7af0b8bdf89c505b2aded0a38e83f2f91dd0459c247870fd26e68333" [metadata.files] alabaster = [ @@ -881,29 +885,29 @@ babel = [ {file = "Babel-2.9.1.tar.gz", hash = "sha256:bc0c176f9f6a994582230df350aa6e05ba2ebe4b3ac317eab29d9be5d2768da0"}, ] black = [ - {file = "black-22.1.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:1297c63b9e1b96a3d0da2d85d11cd9bf8664251fd69ddac068b98dc4f34f73b6"}, - {file = "black-22.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2ff96450d3ad9ea499fc4c60e425a1439c2120cbbc1ab959ff20f7c76ec7e866"}, - {file = "black-22.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0e21e1f1efa65a50e3960edd068b6ae6d64ad6235bd8bfea116a03b21836af71"}, - {file = "black-22.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2f69158a7d120fd641d1fa9a921d898e20d52e44a74a6fbbcc570a62a6bc8ab"}, - {file = "black-22.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:228b5ae2c8e3d6227e4bde5920d2fc66cc3400fde7bcc74f480cb07ef0b570d5"}, - {file = "black-22.1.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:b1a5ed73ab4c482208d20434f700d514f66ffe2840f63a6252ecc43a9bc77e8a"}, - {file = "black-22.1.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:35944b7100af4a985abfcaa860b06af15590deb1f392f06c8683b4381e8eeaf0"}, - {file = "black-22.1.0-cp36-cp36m-win_amd64.whl", hash = "sha256:7835fee5238fc0a0baf6c9268fb816b5f5cd9b8793423a75e8cd663c48d073ba"}, - {file = "black-22.1.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:dae63f2dbf82882fa3b2a3c49c32bffe144970a573cd68d247af6560fc493ae1"}, - {file = "black-22.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5fa1db02410b1924b6749c245ab38d30621564e658297484952f3d8a39fce7e8"}, - {file = "black-22.1.0-cp37-cp37m-win_amd64.whl", hash = "sha256:c8226f50b8c34a14608b848dc23a46e5d08397d009446353dad45e04af0c8e28"}, - {file = "black-22.1.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:2d6f331c02f0f40aa51a22e479c8209d37fcd520c77721c034517d44eecf5912"}, - {file = "black-22.1.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:742ce9af3086e5bd07e58c8feb09dbb2b047b7f566eb5f5bc63fd455814979f3"}, - {file = "black-22.1.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:fdb8754b453fb15fad3f72cd9cad3e16776f0964d67cf30ebcbf10327a3777a3"}, - {file = "black-22.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5660feab44c2e3cb24b2419b998846cbb01c23c7fe645fee45087efa3da2d61"}, - {file = "black-22.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:6f2f01381f91c1efb1451998bd65a129b3ed6f64f79663a55fe0e9b74a5f81fd"}, - {file = "black-22.1.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:efbadd9b52c060a8fc3b9658744091cb33c31f830b3f074422ed27bad2b18e8f"}, - {file = "black-22.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8871fcb4b447206904932b54b567923e5be802b9b19b744fdff092bd2f3118d0"}, - {file = "black-22.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ccad888050f5393f0d6029deea2a33e5ae371fd182a697313bdbd835d3edaf9c"}, - {file = "black-22.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:07e5c049442d7ca1a2fc273c79d1aecbbf1bc858f62e8184abe1ad175c4f7cc2"}, - {file = "black-22.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:373922fc66676133ddc3e754e4509196a8c392fec3f5ca4486673e685a421321"}, - {file = "black-22.1.0-py3-none-any.whl", hash = "sha256:3524739d76b6b3ed1132422bf9d82123cd1705086723bc3e235ca39fd21c667d"}, - {file = "black-22.1.0.tar.gz", hash = "sha256:a7c0192d35635f6fc1174be575cb7915e92e5dd629ee79fdaf0dcfa41a80afb5"}, + {file = "black-22.3.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:2497f9c2386572e28921fa8bec7be3e51de6801f7459dffd6e62492531c47e09"}, + {file = "black-22.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5795a0375eb87bfe902e80e0c8cfaedf8af4d49694d69161e5bd3206c18618bb"}, + {file = "black-22.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e3556168e2e5c49629f7b0f377070240bd5511e45e25a4497bb0073d9dda776a"}, + {file = "black-22.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67c8301ec94e3bcc8906740fe071391bce40a862b7be0b86fb5382beefecd968"}, + {file = "black-22.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:fd57160949179ec517d32ac2ac898b5f20d68ed1a9c977346efbac9c2f1e779d"}, + {file = "black-22.3.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:cc1e1de68c8e5444e8f94c3670bb48a2beef0e91dddfd4fcc29595ebd90bb9ce"}, + {file = "black-22.3.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d2fc92002d44746d3e7db7cf9313cf4452f43e9ea77a2c939defce3b10b5c82"}, + {file = "black-22.3.0-cp36-cp36m-win_amd64.whl", hash = "sha256:a6342964b43a99dbc72f72812bf88cad8f0217ae9acb47c0d4f141a6416d2d7b"}, + {file = "black-22.3.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:328efc0cc70ccb23429d6be184a15ce613f676bdfc85e5fe8ea2a9354b4e9015"}, + {file = "black-22.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:06f9d8846f2340dfac80ceb20200ea5d1b3f181dd0556b47af4e8e0b24fa0a6b"}, + {file = "black-22.3.0-cp37-cp37m-win_amd64.whl", hash = "sha256:ad4efa5fad66b903b4a5f96d91461d90b9507a812b3c5de657d544215bb7877a"}, + {file = "black-22.3.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8477ec6bbfe0312c128e74644ac8a02ca06bcdb8982d4ee06f209be28cdf163"}, + {file = "black-22.3.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:637a4014c63fbf42a692d22b55d8ad6968a946b4a6ebc385c5505d9625b6a464"}, + {file = "black-22.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:863714200ada56cbc366dc9ae5291ceb936573155f8bf8e9de92aef51f3ad0f0"}, + {file = "black-22.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10dbe6e6d2988049b4655b2b739f98785a884d4d6b85bc35133a8fb9a2233176"}, + {file = "black-22.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:cee3e11161dde1b2a33a904b850b0899e0424cc331b7295f2a9698e79f9a69a0"}, + {file = "black-22.3.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:5891ef8abc06576985de8fa88e95ab70641de6c1fca97e2a15820a9b69e51b20"}, + {file = "black-22.3.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:30d78ba6bf080eeaf0b7b875d924b15cd46fec5fd044ddfbad38c8ea9171043a"}, + {file = "black-22.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ee8f1f7228cce7dffc2b464f07ce769f478968bfb3dd1254a4c2eeed84928aad"}, + {file = "black-22.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ee227b696ca60dd1c507be80a6bc849a5a6ab57ac7352aad1ffec9e8b805f21"}, + {file = "black-22.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:9b542ced1ec0ceeff5b37d69838106a6348e60db7b8fdd245294dc1d26136265"}, + {file = "black-22.3.0-py3-none-any.whl", hash = "sha256:bc58025940a896d7e5356952228b68f793cf5fcb342be703c3a2669a1488cb72"}, + {file = "black-22.3.0.tar.gz", hash = "sha256:35020b8886c022ced9282b51b5a875b6d1ab0c387b31a065b84db7c33085ca79"}, ] certifi = [ {file = "certifi-2021.10.8-py2.py3-none-any.whl", hash = "sha256:d62a0163eb4c2344ac042ab2bdf75399a71a2d8c7d47eac2e2ee91b9d6339569"}, @@ -914,8 +918,8 @@ charset-normalizer = [ {file = "charset_normalizer-2.0.12-py3-none-any.whl", hash = "sha256:6881edbebdb17b39b4eaaa821b438bf6eddffb4468cf344f09f89def34a8b1df"}, ] click = [ - {file = "click-8.0.4-py3-none-any.whl", hash = "sha256:6a7a62563bbfabfda3a38f3023a1db4a35978c0abd76f6c9605ecd6554d6d9b1"}, - {file = "click-8.0.4.tar.gz", hash = "sha256:8458d7b1287c5fb128c90e23381cf99dcde74beaf6c7ff6384ce84d6fe090adb"}, + {file = "click-8.1.2-py3-none-any.whl", hash = "sha256:24e1a4a9ec5bf6299411369b208c1df2188d9eb8d916302fe6bf03faed227f1e"}, + {file = "click-8.1.2.tar.gz", hash = "sha256:479707fe14d9ec9a0757618b7a100a0ae4c4e236fac5b7f80ca68028141a1a72"}, ] colorama = [ {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, @@ -1015,8 +1019,8 @@ iniconfig = [ {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, ] jinja2 = [ - {file = "Jinja2-3.1.1-py3-none-any.whl", hash = "sha256:539835f51a74a69f41b848a9645dbdc35b4f20a3b601e2d9a7e22947b15ff119"}, - {file = "Jinja2-3.1.1.tar.gz", hash = "sha256:640bed4bb501cbd17194b3cace1dc2126f5b619cf068a726b98192a0fde74ae9"}, + {file = "Jinja2-3.0.3-py3-none-any.whl", hash = "sha256:077ce6014f7b40d03b47d1f1ca4b0fc8328a692bd284016f806ed0eaca390ad8"}, + {file = "Jinja2-3.0.3.tar.gz", hash = "sha256:611bb273cd68f3b993fabdc4064fc858c5b47a973cb5aa7999ec1ba405c87cd7"}, ] llvmlite = [ {file = "llvmlite-0.38.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0497a19428083a0544663732a925994d74e3b15c3c94946c6e7b6bf21a391264"}, @@ -1166,68 +1170,68 @@ numpy = [ {file = "numpy-1.21.5.zip", hash = "sha256:6a5928bc6241264dce5ed509e66f33676fc97f464e7a919edc672fb5532221ee"}, ] numpy-quaternion = [ - {file = "numpy-quaternion-2022.2.10.14.20.39.tar.gz", hash = "sha256:ab53de3bb0f6ce8e9e1082e89531d1a77c624603d09a717cb34112404a0c4486"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e9902e236288451e1d5ca28cf5d310cd2ad7be4d6807ba5699537dd1d72222ad"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:3bc6d146ebeb1a6b38c321a59d870dc40a499d989595c95e371b7f0cb065e1e8"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a4eb95876f96bf9e58d750e2f085fdda78a1eeb42f33ac80a6754450d891154e"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f762288789c273da1dad8480c8caa310b3b8c05a80333919fc192ec42ec88708"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bd5c2feb93ba413ecd49a46e25c2da5a73e3c8a3cb6cdc3d29e8876e894ebec4"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:09bee21d20ff05e2659e2ad18e0d1d4a097ace6677ef754e669f0192bb282f44"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:a91c5eaba0c20e27907915ae323f09c843c971716860ebcda06ee2a74fe23e5d"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ca2849daa10538d1f0b35ee29f320db1c94632c6e0ba1e69b04e17534dc367c8"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp310-cp310-win32.whl", hash = "sha256:12a156b85397ffe73129e01a1b0e5d3ecda5a5483fa68edece11a10376dbbb45"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp310-cp310-win_amd64.whl", hash = "sha256:3f2d2c7fd5f1680d3da2b185f62ea69fc2e8d2750c6e14c1e6b6aa5e077ccbd6"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:0233d974c1eb434139098fed016a0a25ccf11f00cc86d9c45cee2516514c78a2"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1302e35e687257957bd3cce25fe691d708775d101363a835e67fbd67bcffd577"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:001f43d8b22bbc1a94c86cd9fe4009c95125a1d6669013326813ab36096edb24"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5a7967fb79d6f9f6c1a117a648a7b9f89c1c562b6f160028ba283b9f23bf1302"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cf51c0ca4f4473950013e4f117873365d14471e91f7204b09f860661315a4b0b"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d39ba6554a8be28fb3f2809fcfeae7170769c9e21715284181bb0a01c25fff94"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:8954ecb951b5e83e858da148ace08a92697cb49180c2a3ec761e89bf59ce654d"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6763c41661375e93534554604a3577150fcdf1c00e3f9f44de15c9d5c16390f8"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp38-cp38-win32.whl", hash = "sha256:77313634f4c1728cdbc1829113f03522a4c4cc2c1dd043a8626e33a1f08396f9"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp38-cp38-win_amd64.whl", hash = "sha256:b38c3769887af2a6cbe157b290367387bd2eb4a08ac712228db8c7113a11126b"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:b53d8354431bc707174fce24f9ab0d1b3e0aab6d4fb3046cf3e89033fa14603f"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f25b9e03ece5d12754567eda34b0fd72f96c835bf1b056cb2020ad653d0a3fbd"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ad5d736abfb31670a0a987ba4fbfdf6abdf9027553b3c6be0a8846ec2174442e"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:adc4be75eb01006c0d9a5dd6d7beea0319dccfa8fe083504451f2369fb39eaa6"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1aa3b2aa3a9de1e447a805136d4d614420ae78731bd58a8cb306229e7f6d615c"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3a75c22821bf0cc6fe54e7b8c2a433667ab1d016dbb833897e52961c193e5597"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:4d013459fb04bef3dd68b8d9a100a06936672399f57040155ab211799c1d22e6"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:7cb350c61cc3369afa1fb592b907bb33c87cff8954dd25730458ecfd9cd4faab"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp39-cp39-win32.whl", hash = "sha256:fa37158d8c1409fe706eb6d3aab2b0eed294ad76cdb5bc81d5f7c6e2a245b7b6"}, - {file = "numpy_quaternion-2022.2.10.14.20.39-cp39-cp39-win_amd64.whl", hash = "sha256:c95d0ed84b590a1d36a1aba975e2d24af4d83e872c7c5b1ca34b161f587df960"}, + {file = "numpy-quaternion-2022.4.1.tar.gz", hash = "sha256:88dc0f923ee18e0ccb0321ace311fb17acc3973cd72ff4284bb07f8460fe0b58"}, + {file = "numpy_quaternion-2022.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d81fd2fed9de16915edf4f9c995153ce3ddf15c5e96420aa915d1079302567ab"}, + {file = "numpy_quaternion-2022.4.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:53bc86f8c973b484e15bae01a8c44e30637b449bd62c6a5cb242bd60909633b0"}, + {file = "numpy_quaternion-2022.4.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f09655e7f582a746d6ce8f26ec320aa9695096ba281b353d9968d6f312453ae7"}, + {file = "numpy_quaternion-2022.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c2724ca5e5994138c837fc8caae49f096ac3eacc11d72d69937904aaa831f7d4"}, + {file = "numpy_quaternion-2022.4.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:18771c9718ab013f98c8093d3e245f5dd2b5131a89e4183ba76dc7e6f8c74118"}, + {file = "numpy_quaternion-2022.4.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6a423839a5138eef5ff39af97d616728fa62c96705b5c7af99739fa0850d43f9"}, + {file = "numpy_quaternion-2022.4.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:18974d5e74c4c366ae70567447e1cf6c312dfee51c3850eb7b7a67e48f57f1a4"}, + {file = "numpy_quaternion-2022.4.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:72bc21e15a405acc8cabfd169406ab02f6a92967654357b91cef54ba4e94a1ff"}, + {file = "numpy_quaternion-2022.4.1-cp310-cp310-win32.whl", hash = "sha256:6706bb234d516e60f3cde0fa54f0006b4d01013c54d4a77d8acedb61dda88c59"}, + {file = "numpy_quaternion-2022.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:466dbcae63f58ef78e3a54e40591760f225a7f44a1d5d5e92a2219ae26d87135"}, + {file = "numpy_quaternion-2022.4.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:432ae7d18ff8fd2fc7ddbb70c7415b2d8a3d332e88349b9e862dea4285ee32b0"}, + {file = "numpy_quaternion-2022.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:3ae1019055cb14b371ed9a20c31f03049fbd8f51c7029dc833a74c9468762fad"}, + {file = "numpy_quaternion-2022.4.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:21dfbd167c155ff01b1f5767e599bf9e8845f6f349f875067edd2b646bd1a4fc"}, + {file = "numpy_quaternion-2022.4.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c8ca4c52a81a0d1fcf7f779f7bb82cdc6722028ed0dca7bb3e12113ba8f37d0d"}, + {file = "numpy_quaternion-2022.4.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7550800915e6d3d2cf33467836eb70a2cafa4db85226f4042aed8a343e0ef69b"}, + {file = "numpy_quaternion-2022.4.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:833defb9aaf2caf475fa2081e7ff6c476ce9b5aed9706eee697c71a5bd4af56c"}, + {file = "numpy_quaternion-2022.4.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:194401f285eb8da496a2ec955bb5a750dc34653a560ad288245a0d1931c4dad7"}, + {file = "numpy_quaternion-2022.4.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:64f2fe5844cd1987c0551572a70813b64a20d495bc543f98d586b4604c7c460e"}, + {file = "numpy_quaternion-2022.4.1-cp38-cp38-win32.whl", hash = "sha256:ec2f9ff9c66895ee3c49ed6fe00f2c50097bffca1bc5ee004deb4547c4c7d32c"}, + {file = "numpy_quaternion-2022.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:6d2da2e94ebfd808092e1b03ed502ee5629b9b025d21ccb8bf6ab92f72924d4d"}, + {file = "numpy_quaternion-2022.4.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:974910f61506d547a3417a2869c485508070c2c5e6a650e28518a6d951137099"}, + {file = "numpy_quaternion-2022.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:429d7c8d586ff6f3514c078ec908ac7594b034d5f6e7c8ab5c0a288fa850a946"}, + {file = "numpy_quaternion-2022.4.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4b47da90eb892ba19a3f23a3fdb15104d5fb330010b0090fa23f06f3426af977"}, + {file = "numpy_quaternion-2022.4.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4f457bd11825356b76a48988dff43aebd10ca9c7f95ad8f62372a63f6665406d"}, + {file = "numpy_quaternion-2022.4.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40280861f8b8e94951a26d572b33f4ed4c5ccadf98f66874a0dbeb954fca2038"}, + {file = "numpy_quaternion-2022.4.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3e3a98a52bb45cce1f13b7d3fcc1e64010920769e8d64ef89b8abec3b7c27925"}, + {file = "numpy_quaternion-2022.4.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:5e32947efb17e4c71d639069d66ad6c293348ea4727f716bdfa3ad3b144825a9"}, + {file = "numpy_quaternion-2022.4.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:b836f76aef996a09c1719cd19db17e3e11e9888b98bd7c237a2c351d7cffd0af"}, + {file = "numpy_quaternion-2022.4.1-cp39-cp39-win32.whl", hash = "sha256:1c51e55afc7d0b64b3aa2447b645d4243a4b2f17e6c9faa58ee3499fe46ca785"}, + {file = "numpy_quaternion-2022.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:df0dabe27eace3e3d693d8cb4f58b83b830444b85041288bcb847fad95683277"}, ] numpydoc = [ - {file = "numpydoc-1.2-py3-none-any.whl", hash = "sha256:3ecbb9feae080031714b63128912988ebdfd4c582a085d25b8d9f7ac23c2d9ef"}, - {file = "numpydoc-1.2.tar.gz", hash = "sha256:0cec233740c6b125913005d16e8a9996e060528afcb8b7cad3f2706629dfd6f7"}, + {file = "numpydoc-1.2.1-py3-none-any.whl", hash = "sha256:2d317df5fd9404a5199bb993c1b6627436b2804582d2775bf9ccf3c5912ebe99"}, + {file = "numpydoc-1.2.1.tar.gz", hash = "sha256:7ce826ed0d54c3fdc9097992a8d73a4d459dc468611351c68e444fec44a45af6"}, ] packaging = [ {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"}, ] pandas = [ - {file = "pandas-1.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3dfb32ed50122fe8c5e7f2b8d97387edd742cc78f9ec36f007ee126cd3720907"}, - {file = "pandas-1.4.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0259cd11e7e6125aaea3af823b80444f3adad6149ff4c97fef760093598b3e34"}, - {file = "pandas-1.4.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:96e9ece5759f9b47ae43794b6359bbc54805d76e573b161ae770c1ea59393106"}, - {file = "pandas-1.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:508c99debccd15790d526ce6b1624b97a5e1e4ca5b871319fb0ebfd46b8f4dad"}, - {file = "pandas-1.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e6a7bbbb7950063bfc942f8794bc3e31697c020a14f1cd8905fc1d28ec674a01"}, - {file = "pandas-1.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:c614001129b2a5add5e3677c3a213a9e6fd376204cb8d17c04e84ff7dfc02a73"}, - {file = "pandas-1.4.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:4e1176f45981c8ccc8161bc036916c004ca51037a7ed73f2d2a9857e6dbe654f"}, - {file = "pandas-1.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:bbb15ad79050e8b8d39ec40dd96a30cd09b886a2ae8848d0df1abba4d5502a67"}, - {file = "pandas-1.4.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6d6ad1da00c7cc7d8dd1559a6ba59ba3973be6b15722d49738b2be0977eb8a0c"}, - {file = "pandas-1.4.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:358b0bc98a5ff067132d23bf7a2242ee95db9ea5b7bbc401cf79205f11502fd3"}, - {file = "pandas-1.4.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6105af6533f8b63a43ea9f08a2ede04e8f43e49daef0209ab0d30352bcf08bee"}, - {file = "pandas-1.4.1-cp38-cp38-win32.whl", hash = "sha256:04dd15d9db538470900c851498e532ef28d4e56bfe72c9523acb32042de43dfb"}, - {file = "pandas-1.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:1b384516dbb4e6aae30e3464c2e77c563da5980440fbdfbd0968e3942f8f9d70"}, - {file = "pandas-1.4.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:f02e85e6d832be37d7f16cf6ac8bb26b519ace3e5f3235564a91c7f658ab2a43"}, - {file = "pandas-1.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:0b1a13f647e4209ed7dbb5da3497891d0045da9785327530ab696417ef478f84"}, - {file = "pandas-1.4.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:19f7c632436b1b4f84615c3b127bbd7bc603db95e3d4332ed259dc815c9aaa26"}, - {file = "pandas-1.4.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7ea47ba1d6f359680130bd29af497333be6110de8f4c35b9211eec5a5a9630fa"}, - {file = "pandas-1.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2e5a7a1e0ecaac652326af627a3eca84886da9e667d68286866d4e33f6547caf"}, - {file = "pandas-1.4.1-cp39-cp39-win32.whl", hash = "sha256:1d85d5f6be66dfd6d1d8d13b9535e342a2214260f1852654b19fa4d7b8d1218b"}, - {file = "pandas-1.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:3129a35d9dad1d80c234dd78f8f03141b914395d23f97cf92a366dcd19f8f8bf"}, - {file = "pandas-1.4.1.tar.gz", hash = "sha256:8db93ec98ac7cb5f8ac1420c10f5e3c43533153f253fe7fb6d891cf5aa2b80d2"}, + {file = "pandas-1.4.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:be67c782c4f1b1f24c2f16a157e12c2693fd510f8df18e3287c77f33d124ed07"}, + {file = "pandas-1.4.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5a206afa84ed20e07603f50d22b5f0db3fb556486d8c2462d8bc364831a4b417"}, + {file = "pandas-1.4.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0010771bd9223f7afe5f051eb47c4a49534345dfa144f2f5470b27189a4dd3b5"}, + {file = "pandas-1.4.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3228198333dd13c90b6434ddf61aa6d57deaca98cf7b654f4ad68a2db84f8cfe"}, + {file = "pandas-1.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5b79af3a69e5175c6fa7b4e046b21a646c8b74e92c6581a9d825687d92071b51"}, + {file = "pandas-1.4.2-cp310-cp310-win_amd64.whl", hash = "sha256:5586cc95692564b441f4747c47c8a9746792e87b40a4680a2feb7794defb1ce3"}, + {file = "pandas-1.4.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:061609334a8182ab500a90fe66d46f6f387de62d3a9cb9aa7e62e3146c712167"}, + {file = "pandas-1.4.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b8134651258bce418cb79c71adeff0a44090c98d955f6953168ba16cc285d9f7"}, + {file = "pandas-1.4.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:df82739e00bb6daf4bba4479a40f38c718b598a84654cbd8bb498fd6b0aa8c16"}, + {file = "pandas-1.4.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:385c52e85aaa8ea6a4c600a9b2821181a51f8be0aee3af6f2dcb41dafc4fc1d0"}, + {file = "pandas-1.4.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:295872bf1a09758aba199992c3ecde455f01caf32266d50abc1a073e828a7b9d"}, + {file = "pandas-1.4.2-cp38-cp38-win32.whl", hash = "sha256:95c1e422ced0199cf4a34385ff124b69412c4bc912011ce895582bee620dfcaa"}, + {file = "pandas-1.4.2-cp38-cp38-win_amd64.whl", hash = "sha256:5c54ea4ef3823108cd4ec7fb27ccba4c3a775e0f83e39c5e17f5094cb17748bc"}, + {file = "pandas-1.4.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c072c7f06b9242c855ed8021ff970c0e8f8b10b35e2640c657d2a541c5950f59"}, + {file = "pandas-1.4.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f549097993744ff8c41b5e8f2f0d3cbfaabe89b4ae32c8c08ead6cc535b80139"}, + {file = "pandas-1.4.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ff08a14ef21d94cdf18eef7c569d66f2e24e0bc89350bcd7d243dd804e3b5eb2"}, + {file = "pandas-1.4.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c5bf555b6b0075294b73965adaafb39cf71c312e38c5935c93d78f41c19828a"}, + {file = "pandas-1.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:51649ef604a945f781105a6d2ecf88db7da0f4868ac5d45c51cb66081c4d9c73"}, + {file = "pandas-1.4.2-cp39-cp39-win32.whl", hash = "sha256:d0d4f13e4be7ce89d7057a786023c461dd9370040bdb5efa0a7fe76b556867a0"}, + {file = "pandas-1.4.2-cp39-cp39-win_amd64.whl", hash = "sha256:09d8be7dd9e1c4c98224c4dfe8abd60d145d934e9fc1f5f411266308ae683e6a"}, + {file = "pandas-1.4.2.tar.gz", hash = "sha256:92bc1fc585f1463ca827b45535957815b7deb218c549b7c18402c322c7549a12"}, ] pathspec = [ {file = "pathspec-0.9.0-py2.py3-none-any.whl", hash = "sha256:7d15c4ddb0b5c802d161efc417ec1a2558ea2653c2e8ad9c19098201dc1c993a"}, @@ -1364,7 +1368,8 @@ spherical = [ {file = "spherical-1.0.11.tar.gz", hash = "sha256:8334b9442b239c92b26c930798c39b487ce0448b0fb57bb34b6e62c0bb199359"}, ] spherical-functions = [ - {file = "spherical-functions-2020.8.18.15.37.20.tar.gz", hash = "sha256:775408f6b535151c99f4eb49c2d568298f4503b9c212bb574740b4178ca82043"}, + {file = "spherical-functions-2022.4.1.tar.gz", hash = "sha256:0dda9641bac21c747c1e1419489b2d1a9eb7c7db3e46c3059b6a1f050478ab61"}, + {file = "spherical_functions-2022.4.1-py3-none-any.whl", hash = "sha256:5363f2647b990400b8f9ab426cab29ecfcd5834a03c65ca98487fb96b11eda02"}, ] sphinx = [ {file = "Sphinx-4.5.0-py3-none-any.whl", hash = "sha256:ebf612653238bcc8f4359627a9b7ce44ede6fdd75d9d30f68255c7383d3a6226"}, @@ -1395,20 +1400,20 @@ sphinxcontrib-serializinghtml = [ {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, ] spinsfast = [ - {file = "spinsfast-104.2022.3.2.14.39.8-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:75725b21b60294fd58964439e73990bc335b3fcd8a9ff73df7bc3788b23e4d78"}, - {file = "spinsfast-104.2022.3.2.14.39.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f3727fcce6c043016a7b9a72b770d899948655e8288a9c47228e9b4aff40065b"}, - {file = "spinsfast-104.2022.3.2.14.39.8-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b74630fecf3c3e0760b27a715abcbf5666d03d88610a8c8e9ef38880996b492f"}, - {file = "spinsfast-104.2022.3.2.14.39.8-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ddef1586f9b7432257fd4c6a61344bf84f20f32a76a94631bbb51f80b4aa157"}, - {file = "spinsfast-104.2022.3.2.14.39.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4717b12d19199bfd5a07f490be5a50e4b9dda984c7eace0c164ac510bb2217c0"}, - {file = "spinsfast-104.2022.3.2.14.39.8-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e812644f97e2e29ebb3604b8949172173f3dc65092966c4623b4d70efad95dc7"}, - {file = "spinsfast-104.2022.3.2.14.39.8-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:609c5d75e22cfa400e0d0bdd94b4f77f89b21280adcbeee67cf67456c2af0ec4"}, - {file = "spinsfast-104.2022.3.2.14.39.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d538fbc35e66e46155f608237f797800a195dc547115e22f700ae7aba7bf2a3f"}, - {file = "spinsfast-104.2022.3.2.14.39.8-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77dd9299a2a6c35bd25bd97198469fa0bf33cc7565f65d5d6201f02777e56e7b"}, - {file = "spinsfast-104.2022.3.2.14.39.8.tar.gz", hash = "sha256:b0cee447644e8e6b54b56f069f48f2c3846cd80775b684332202b6ff5362765f"}, + {file = "spinsfast-2022.4.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:dd9968e7bdca3dd55d0be3a6fa885d7af19f9926ca368763dc6a601e788474fa"}, + {file = "spinsfast-2022.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:33ddd3b316c062e7d9fb573d8505577f04048e4cea440faac90c53fcab0a82a9"}, + {file = "spinsfast-2022.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8a515b6d2166e73e4e7e41476ad4a749e97d59b03e836da5f867705c9fb426ba"}, + {file = "spinsfast-2022.4.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7467f56ee849a41d649f58a2fde82bebb11e80bf95b4b1fa749bed76df4aebc3"}, + {file = "spinsfast-2022.4.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aff4133f2bf64414e3ba3d5fae9e0b91adc955445a7071a7b6db0fa9a854e00c"}, + {file = "spinsfast-2022.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b7418f04f1cfbbe5b7f6b6019f55905700ac42a6af7f904c3580072add4e7733"}, + {file = "spinsfast-2022.4.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f2302fd696c02595b0bdd9f4f0b5f9370315953b4e031672a9afec976142208d"}, + {file = "spinsfast-2022.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d389782fa5d13abe47eb55cad91b15dcf4eda526a8601b0fc8852deb3c79721c"}, + {file = "spinsfast-2022.4.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72ba27c3e267af3446f2da16946493294630d1f72ae0b4df09e03459635e7994"}, + {file = "spinsfast-2022.4.1.tar.gz", hash = "sha256:e9f5842a0ec2bf2796c9efe9f1d1c85f706a37890588272ce9cf079961c5e772"}, ] sxs = [ - {file = "sxs-2021.0.6-py3-none-any.whl", hash = "sha256:53b48ee0007441c7f5273c125ebc79fb16715c12eabf0e164bfae7ea2a47427b"}, - {file = "sxs-2021.0.6.tar.gz", hash = "sha256:3a4acf9dcd8a41ade38f23f8372edf63936de46484073171619d4e75292e8f6b"}, + {file = "sxs-2022.3.2-py3-none-any.whl", hash = "sha256:bb95a8fbb1452ec8fa1ad9ea55f39679e4163aedad0e001ea003190ea60a6533"}, + {file = "sxs-2022.3.2.tar.gz", hash = "sha256:54c3d9ac8b33193da990cd249d472b3a9787643cd7af22aaaf2af49dd9b7c9d4"}, ] tomli = [ {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, @@ -1453,6 +1458,6 @@ watchdog = [ {file = "watchdog-2.1.7.tar.gz", hash = "sha256:3fd47815353be9c44eebc94cc28fe26b2b0c5bd889dafc4a5a7cbdf924143480"}, ] zipp = [ - {file = "zipp-3.7.0-py3-none-any.whl", hash = "sha256:b47250dd24f92b7dd6a0a8fc5244da14608f3ca90a5efcd37a3b1642fac9a375"}, - {file = "zipp-3.7.0.tar.gz", hash = "sha256:9f50f446828eb9d45b267433fd3e9da8d801f614129124863f9c51ebceafb87d"}, + {file = "zipp-3.8.0-py3-none-any.whl", hash = "sha256:c4f6e5bbf48e74f7a38e7cc5b0480ff42b0ae5178957d564d18932525d5cf099"}, + {file = "zipp-3.8.0.tar.gz", hash = "sha256:56bf8aadb83c24db6c4b577e13de374ccfb67da2078beba1d037c17980bf43ad"}, ] diff --git a/pyproject.toml b/pyproject.toml index 2ad83f40..e7fbed9b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "scri" +version = "2022.3.0" description = "Time-dependent functions of spin-weighted spherical harmonics" -version = "2022.0.2" readme = "README.md" license = "MIT" authors = ["Michael Boyle "] @@ -13,10 +13,10 @@ numpy = ">=1.20" scipy = "^1.0" numba = ">=0.55" h5py = "^3" -numpy-quaternion = ">=2021" -spinsfast = "^104" -spherical-functions = ">=2020" -sxs = ">=2021" +numpy-quaternion = ">=2022.4" +spherical-functions = ">=2022.4" +spinsfast = ">=2022.4" +sxs = ">=2022.3.2" tqdm = ">=4.48.2, <4.61.2" importlib-metadata = {version = "^1.0", python = "<3.8"} mkdocs = {version = "^1.1.2", optional = true} diff --git a/scri/SpEC/com_motion.py b/scri/SpEC/com_motion.py index 29714642..139be5db 100644 --- a/scri/SpEC/com_motion.py +++ b/scri/SpEC/com_motion.py @@ -428,10 +428,10 @@ def remove_avg_com_motion( file_write_mode=file_write_mode, attributes={"space_translation": x_0, "boost_velocity": v_0}, ) - elif file_format.lower() == "rpxmb" or file_format.lower() == "rpxm": + w_m.boost_velocity = v_0 + w_m.space_translation = x_0 + if file_format.lower() == "rpxmb" or file_format.lower() == "rpxm": path_to_new_waveform_h5 = path_to_waveform_h5.replace(".h5", "_CoM.h5", 1) - w_m.boost_velocity = v_0 - w_m.space_translation = x_0 rotating_paired_xor_multishuffle_bzip2.save(w_m, path_to_new_waveform_h5) # Finish by plotting the new data and save to PDF diff --git a/scri/SpEC/file_io/rotating_paired_xor_multishuffle_bzip2.py b/scri/SpEC/file_io/rotating_paired_xor_multishuffle_bzip2.py index 6dc0803c..246b1f8a 100644 --- a/scri/SpEC/file_io/rotating_paired_xor_multishuffle_bzip2.py +++ b/scri/SpEC/file_io/rotating_paired_xor_multishuffle_bzip2.py @@ -1,443 +1,64 @@ # Copyright (c) 2021, Michael Boyle # See LICENSE file for details: -sxs_formats = [ - "rotating_paired_xor_multishuffle_bzip2", -] -default_shuffle_widths = (8, 8, 4, 4, 4, 2,) + (1,) * 34 +import sxs +from ... import WaveformModes -def save(w, file_name=None, file_write_mode="w", L2norm_fractional_tolerance=1e-10, log_frame=None, shuffle_widths=default_shuffle_widths): - """Save a waveform in RPXMB format +default_shuffle_widths = sxs.utilities.default_shuffle_widths - This function converts the data to "rotating paired XOR multishuffle bzip2" - format. In particular, it uses the corotating frame, and zeroes out bits at - high precision to allow for optimal compression while maintaining the requested - tolerance. - Parameters - ---------- - w : WaveformModes - A waveform in either the inertial or corotating frame - file_name : str - Relative or absolute path to the output HDF5 file. If this string contains - `'.h5'` but does not *end* with that, the remainder of the string is taken - to be the group within the HDF5 file in which the data should be stored. - Also note that a JSON file is created in the same location, with `.h5` - replaced by `.json` (and the corresponding data is stored under the `group` - key if relevant). For testing purposes, this argument may be `None`, in - which case a temporary directory is used, just to test how large the output - will be; it is deleted immediately upon returning. - file_write_mode : str, optional - One of the valid [file modes for - h5py](https://docs.h5py.org/en/stable/high/file.html#opening-creating-files). - Default value is `"w"`, which overwrites any existing file. If writing - into a group, you may prefer `"a"`, which will just ensure the file exists - without erasing it first. - L2norm_fractional_tolerance : float, optional - Tolerance passed to `WaveformModes.truncate`; see that function's docstring - for details. Default value is 1e-10. - log_frame : array of quaternions, optional - If this argument is given the waveform must be in the corotating frame, and - the given data will be used as the logarithmic frame data. If this - argument is `None` (the default), this will be calculated when the waveform - is transformed to the corotating frame, or simply taken directly from the - waveform if it is already corotating. - shuffle_widths : iterable of ints, optional - See `scri.utilities.multishuffle` for details. The default value is - `default_shuffle_widths`. Note that if `L2norm_fractional_tolerance` is - 0.0, this will be ignored and the standard HDF5 shuffle option will be used - instead. +def save(w, file_name=None, file_write_mode="w", L2norm_fractional_tolerance=1e-10, log_frame=None, shuffle_widths=default_shuffle_widths): + """Save a waveform in RPXMB format - Returns - ------- - w_out : WaveformModes - The output data, after conversion to the corotating frame, pairing of - opposite `m` modes, and XOR-ing (but not shuffling). - log_frame : array of quaternions - The actual `log_frame` data stored in the file, and used to transform to - the corotating frame if that was done inside this function. + This function is essentially a backwards-compatibility wrapper for the the + `sxs.rpxmb.save` function; see that function's docstring for details. """ - import sys - import os - import warnings - import tempfile - import contextlib - import pathlib - import bz2 - import json - import numpy as np - import scipy - import h5py - import quaternion - import sxs - import scri - import spherical_functions as sf - from scri.utilities import xor_timeseries as xor - from sxs.utilities import md5checksum - - # Make sure that we can understand the file_name and create the directory - group = None - if file_name is None: - # We'll just be creating a temp directory below, to check - warnings.warn( - "\nInput `file_name` is None. Running in temporary directory.\n" - "Note that this option is mostly for debugging purposes." - ) - else: - if ".h5" in file_name and not file_name.endswith(".h5"): - file_name, group = file_name.split(".h5") - h5_path = pathlib.Path(file_name).expanduser().resolve().with_suffix(".h5") - if not h5_path.parent.exists(): - h5_path.parent.mkdir(parents=True) - if group == "/": - group = None - - shuffle = scri.utilities.multishuffle(tuple(shuffle_widths)) - - if L2norm_fractional_tolerance == 0.0: - log_frame = quaternion.as_float_array(np.log(w.frame))[:, 1:] - else: - # We need this storage anyway, so let's just make a copy and work in-place - w = w.copy() - if log_frame is not None: - log_frame = log_frame.copy() - - # Ensure waveform is in corotating frame - if w.frameType == scri.Inertial: - try: - initial_time = w.t[0] - relaxation_time = w.metadata.relaxation_time - max_norm_time = w.max_norm_time() - z_alignment_region = ((relaxation_time - initial_time) / (max_norm_time - initial_time), 0.95) - except: - z_alignment_region = (0.1, 0.95) - w, log_frame = w.to_corotating_frame( - tolerance=1e-10, z_alignment_region=z_alignment_region, truncate_log_frame=True - ) - log_frame = log_frame[:, 1:] - if w.frameType != scri.Corotating: - raise ValueError( - "Frame type of input waveform must be 'Corotating' or 'Inertial'; " f"it is {w.frame_type_string}" - ) - - # Convert mode structure to conjugate pairs - w.convert_to_conjugate_pairs() - - # Set bits below the desired significance level to 0 - w.truncate(tol=L2norm_fractional_tolerance) - - # Compute log(frame) - if log_frame is None: - log_frame = quaternion.as_float_array(np.log(w.frame))[:, 1:] - # power_of_2 = 2 ** (-np.floor(np.log2(L2norm_fractional_tolerance / 10))).astype("int") - # log_frame = np.round(log_frame * power_of_2) / power_of_2 - - # Change -0.0 to 0.0 (~.5% compression for non-precessing systems) - w.t += 0.0 - w.data += 0.0 - log_frame += 0.0 - - # XOR successive instants in time - xor(w.t) - xor(w.data) - xor(log_frame) - - # Make sure we have a place to keep all this - with contextlib.ExitStack() as context: - if file_name is None: - temp_dir = context.enter_context(tempfile.TemporaryDirectory()) - h5_path = pathlib.Path(f"{temp_dir}") / "test.h5" - else: - print(f'Saving H5 to "{h5_path}"') - - # Write the H5 file - with h5py.File(h5_path, file_write_mode) as f: - # If we are writing to a group within the file, create it - if group is not None: - g = f.create_group(group) - else: - g = f - if L2norm_fractional_tolerance != 0.0: - g.attrs["sxs_format"] = f"{sxs_formats[0]}" - g.attrs["n_times"] = w.n_times - g.attrs["ell_min"] = w.ell_min - g.attrs["ell_max"] = w.ell_max - g.attrs["shuffle_widths"] = np.array(shuffle_widths, dtype=np.uint8) - # warnings.warn(f'sxs_format is being set to "{sxs_formats[0]}"') - data = np.void( - bz2.compress( - shuffle(w.t.view(np.uint64)).tobytes() - + shuffle(w.data.view(np.uint64).flatten("F")).tobytes() - + shuffle(log_frame.view(np.uint64).flatten("F")).tobytes() - ) - ) - g.create_dataset("data", data=data) - else: - compression_options = { - "compression": "gzip", - "compression_opts": 9, - "shuffle": True, - } - g.attrs["sxs_format"] = f"{sxs_formats[0]}" - g.create_dataset("time", data=w.t.view(np.uint64), chunks=(w.n_times,), **compression_options) - g.create_dataset("modes", data=w.data.view(np.uint64), chunks=(w.n_times, 1), **compression_options) - g["modes"].attrs["ell_min"] = w.ell_min - g["modes"].attrs["ell_max"] = w.ell_max - if log_frame.size > 1: - g.create_dataset( - "log_frame", data=log_frame.view(np.uint64), chunks=(w.n_times, 1), **compression_options - ) - - # Get some numbers for the JSON file - h5_size = os.stat(h5_path).st_size - if file_name is None: - print(f"Output H5 file size: {h5_size:_} B") - md5sum = md5checksum(h5_path) - - if file_name is not None: - # Set up the corresponding JSON information - json_data = { - "sxs_format": sxs_formats[0], - "data_info": { - "data_type": w.data_type_string, - "m_is_scaled_out": w.m_is_scaled_out, - "r_is_scaled_out": w.r_is_scaled_out, - "spin_weight": int(w.spin_weight), - "ell_min": int(w.ell_min), - "ell_max": int(w.ell_max), - }, - "transformations": { - "truncation": L2norm_fractional_tolerance, - # see below for 'boost_velocity' - # see below for 'space_translation' - }, - "version_info": { - "python": sys.version, - "numpy": np.__version__, - "scipy": scipy.__version__, - "h5py": h5py.__version__, - "quaternion": quaternion.__version__, - "spherical_functions": sf.__version__, - "scri": scri.__version__, - "sxs": sxs.__version__, - # see below 'spec_version_hist' - }, - # see below for 'validation' - } - if group is not None: - json_data["validation"] = { - "n_times": w.n_times, - } - else: - json_data["validation"] = { - "h5_file_size": h5_size, - "n_times": w.n_times, - "md5sum": md5sum - } - if hasattr(w, "boost_velocity"): - json_data["transformations"]["boost_velocity"] = w.boost_velocity.tolist() - if hasattr(w, "space_translation"): - json_data["transformations"]["space_translation"] = w.space_translation.tolist() - if hasattr(w, "version_hist"): - json_data["version_info"]["spec_version_history"] = w.version_hist - - # Write the corresponding JSON file - json_path = h5_path.with_suffix(".json") - print(f'Saving JSON to "{json_path}"') - if group is not None: - if json_path.exists() and file_write_mode!="w": - with json_path.open("r") as f: - original_json = json.load(f) - else: - original_json = {} - original_json[group] = json_data - json_data = original_json - with json_path.open("w") as f: - json.dump(json_data, f, indent=2, separators=(",", ": "), ensure_ascii=True) - - return w, log_frame + return sxs.rpxmb.save( + w.to_sxs, + file_name=file_name, + file_write_mode=file_write_mode, + L2norm_fractional_tolerance=L2norm_fractional_tolerance, + log_frame=log_frame, + shuffle_widths=shuffle_widths + ) -def load(file_name, ignore_validation=False, check_md5=True, **kwargs): +def load(file_name, ignore_validation=False, check_md5=True, transform_to_inertial=False, **kwargs): """Load a waveform in RPXMB format - Parameters - ---------- - file_name : str - Relative or absolute path to the input HDF5 file. If this string contains - but does not *end* with `'.h5'`, the remainder of the string is taken to be - the group within the HDF5 file in which the data is stored. Also note that - a JSON file is expected in the same location, with `.h5` replaced by - `.json` (and the corresponding data must be stored under the `group` key if - relevant). - ignore_validation : bool, optional - If `True`, the JSON file need not be present, and the validation keys - (`h5_file_size`, `n_times`, and `md5sum`) will be ignored — though warnings - may be issued. If `False`, these are all required, with the possible - exception of `h5_file_size` and `md5sum` if a group is used within the HDF5 - file, or `md5sum` if `check_md5` is `False`. - check_md5 : bool, optional - Default is `True`. See `ignore_validation` for explanation. + This function is essentially a backwards-compatibility wrapper for the the + `sxs.rpxmb.load` function; see that function's docstring for full details. - Keyword parameters - ------------------ - data_type : str, optional - One of `scri.DataNames`. Default is "UnknownDataType". - m_is_scaled_out : bool, optional - Default is True - r_is_scaled_out : bool, optional - Default is True + However, note that this function has slightly different behavior (for backwards + compatibility): - Note that the keyword parameters will be overridden by corresponding entries in - the JSON file, if they exist. If the JSON file does not exist, any keyword - parameters not listed above will be passed through as the `json_data` field of - the returned waveform. + 1. The default value of `ignore_validation` is `False`, which means that a + `ValueError` is raised whenever validation fails, rather than just a + warning. - """ - import os - import warnings - import pathlib - import bz2 - import json - import numpy as np - import h5py - import quaternion - import scri - from scri.utilities import xor_timeseries_reverse as unxor - from sxs.utilities import md5checksum - - def invalid(message): - if ignore_validation: - pass - elif ignore_validation is None: - warnings.warn(message) - else: - raise ValueError(message) - - group = None - if ".h5" in file_name and not file_name.endswith(".h5"): - file_name, group = file_name.split(".h5") - if group == "/": - group = None - - h5_path = pathlib.Path(file_name).expanduser().resolve().with_suffix(".h5") - json_path = h5_path.with_suffix(".json") - - # This will be used for validation - h5_size = h5_path.stat().st_size - - data_type = kwargs.pop("data_type", "UnknownDataType") - m_is_scaled_out = bool(kwargs.pop("m_is_scaled_out", True)) - r_is_scaled_out = bool(kwargs.pop("r_is_scaled_out", True)) - - if not json_path.exists(): - invalid(f'\nJSON file "{json_path}" cannot be found, but is expected for this data format.') - json_data = kwargs.copy() - else: - with open(json_path) as f: - json_data = json.load(f) - if group is not None: - json_data = json_data[group] - - data_type = json_data.get("data_info", {}).get("data_type", data_type) - m_is_scaled_out = bool(json_data.get("data_info", {}).get("m_is_scaled_out", m_is_scaled_out)) - r_is_scaled_out = bool(json_data.get("data_info", {}).get("r_is_scaled_out", r_is_scaled_out)) - - # Make sure this is our format - sxs_format = json_data.get("sxs_format", "") - if sxs_format not in sxs_formats: - invalid( - f"\nThe `sxs_format` found in JSON file is '{sxs_format}';\n" - f"it should be one of\n" - f" {sxs_formats}." - ) - - if group is None: - # Make sure the expected H5 file size matches the observed value - json_h5_file_size = json_data.get("validation", {}).get("h5_file_size", 0) - if json_h5_file_size != h5_size: - invalid( - f"\nMismatch between `validation/h5_file_size` key in JSON file ({json_h5_file_size}) " - f'and observed file size ({h5_size}) of "{h5_path}".' - ) + 2. The default value of `transform_to_inertial` is `False`, which means that + the returned waveform will still be in the corotating frame (specified + most precisely by the `log_frame` attribute of the returned waveform). - # Make sure the expected H5 file hash matches the observed value - if check_md5: - md5sum = md5checksum(h5_path) - json_md5sum = json_data.get("validation", {}).get("md5sum", "") - if json_md5sum != md5sum: - invalid(f"\nMismatch between `validation/md5sum` key in JSON file and observed MD5 checksum.") + 3. If `transform_to_inertial` is `False`, the return value is a tuple of `(w, + log_frame)`; otherwise, it is just the waveform `w`. In both cases, + `w.log_frame` will contain this data. - dataType = scri.DataType[scri.DataNames.index(data_type)] - - with h5py.File(h5_path, "r") as f: - if group is not None: - g = f[group] - else: - g = f - # Make sure this is our format - sxs_format = g.attrs["sxs_format"] - if sxs_format not in sxs_formats: - raise ValueError( - f'The `sxs_format` found in H5 file is "{sxs_format}"; it should be one of\n' - f" {sxs_formats}." - ) - - # Ensure that the 'validation' keys from the JSON file are the same as in this file - n_times = g.attrs["n_times"] - json_n_times = json_data.get("validation", {}).get("n_times", 0) - if json_n_times != n_times: - invalid( - f"\nNumber of time steps in H5 file ({n_times}) " - f"does not match expected value from JSON ({json_n_times})." - ) - - # Read the raw data - sizeof_float = 8 - sizeof_complex = 2 * sizeof_float - ell_min = g.attrs["ell_min"] - ell_max = g.attrs["ell_max"] - shuffle_widths = tuple(g.attrs["shuffle_widths"]) - unshuffle = scri.utilities.multishuffle(shuffle_widths, forward=False) - n_modes = ell_max * (ell_max + 2) - ell_min ** 2 + 1 - i1 = n_times * sizeof_float - i2 = i1 + n_times * sizeof_complex * n_modes - uncompressed_data = bz2.decompress(g["data"][...]) - t = np.frombuffer(uncompressed_data[:i1], dtype=np.uint64) - data = np.frombuffer(uncompressed_data[i1:i2], dtype=np.uint64) - log_frame = np.frombuffer(uncompressed_data[i2:], dtype=np.uint64) - - # Unshuffle the raw data - t = unshuffle(t) - data = unshuffle(data) - log_frame = unshuffle(log_frame) - - # Reshape and re-interpret the data - t = t.view(np.float64) - data = data.reshape((-1, n_times)).T.copy().view(complex) - log_frame = log_frame.reshape((-1, n_times)).T.copy().view(np.float64) - - # Un-XOR the data - t = unxor(t) - data = unxor(data) - log_frame = unxor(log_frame) - - frame = np.exp(quaternion.as_quat_array(np.insert(log_frame, 0, 0.0, axis=1))) - - w = scri.WaveformModes( - t=t, - frame=frame, - data=data, - frameType=scri.Corotating, - dataType=dataType, - m_is_scaled_out=m_is_scaled_out, - r_is_scaled_out=r_is_scaled_out, - ell_min=ell_min, - ell_max=ell_max, + """ + w_sxs = sxs.rpxmb.load( + file_name, + ignore_validation=ignore_validation, + check_md5=check_md5, + transform_to_inertial=transform_to_inertial, + **kwargs ) - w.convert_from_conjugate_pairs() - w.json_data = json_data + w = WaveformModes.from_sxs(w_sxs) + w.json_data = w_sxs.json_data + w.log_frame = w_sxs.log_frame - return w, log_frame + if transform_to_inertial: + return w + else: + return w, w.log_frame diff --git a/scri/waveform_grid.py b/scri/waveform_grid.py index 1726d2af..aabd4a46 100644 --- a/scri/waveform_grid.py +++ b/scri/waveform_grid.py @@ -640,12 +640,12 @@ def __repr__(self): # Now, we can assign WaveformModes objects new capabilities based on WaveformGrid functions WaveformModes.to_grid = lambda w_modes, **kwargs: WaveformGrid.from_modes(w_modes, **kwargs) WaveformModes.from_grid = classmethod(lambda cls, w_grid, ell_max: WaveformGrid.to_modes(w_grid, ell_max)) -WaveformModes.transform = lambda w_mode, **kwargs: WaveformGrid.transform(w_mode, **kwargs) +#WaveformModes.transform = lambda w_mode, **kwargs: WaveformGrid.transform(w_mode, **kwargs) # Move to WaveformModes class if sys.version_info[0] == 2: WaveformModes.to_grid.__func__.__doc__ = WaveformGrid.from_modes.__doc__ WaveformModes.from_grid.__func__.__doc__ = WaveformGrid.to_modes.__doc__ - WaveformModes.transform.__func__.__doc__ = WaveformGrid.transform.__doc__ + # WaveformModes.transform.__func__.__doc__ = WaveformGrid.transform.__doc__ else: WaveformModes.to_grid.__doc__ = WaveformGrid.from_modes.__doc__ WaveformModes.from_grid.__func__.__doc__ = WaveformGrid.to_modes.__doc__ - WaveformModes.transform.__doc__ = WaveformGrid.transform.__doc__ + # WaveformModes.transform.__doc__ = WaveformGrid.transform.__doc__ diff --git a/scri/waveform_modes.py b/scri/waveform_modes.py index f25c2741..91938f51 100644 --- a/scri/waveform_modes.py +++ b/scri/waveform_modes.py @@ -208,8 +208,9 @@ def to_sxs(self): import quaternionic import quaternion + # All of these will be stored in the `_metadata` member of the resulting WaveformModes + # object; most of these will also be accessible directly as attributes. kwargs = dict( - input_array=self.data, time=self.t, time_axis=0, modes_axis=1, @@ -236,7 +237,17 @@ def to_sxs(self): f"equal to the number of time steps ({self.n_times})" ) - return sxs.WaveformModes(**kwargs) + w = sxs.WaveformModes(self.data, **kwargs) + + # Special case for the translation and boost + if hasattr(self, "space_translation") or hasattr(self, "boost_velocity"): + w.register_modification( + self.transform, + space_translation=list(getattr(self, "space_translation", [0., 0., 0.])), + boost_velocity=list(getattr(self, "boost_velocity", [0., 0., 0.])), + ) + + return w @waveform_alterations def ensure_validity(self, alter=True, assertions=False): @@ -679,6 +690,22 @@ def convert_from_conjugate_pairs(self): self.data[..., i_minus] = np.conjugate(mode_plus - mode_minus) / np.sqrt(2) self._append_history(f"{self}.convert_from_conjugate_pairs()") + def transform(self, **kwargs): + """Transform modes by some BMS transformation + + This simply applies the `WaveformGrid.from_modes` function, followed by the + `WaveformGrid.to_modes` function. See their respective docstrings for more + details. + + However, note that the `ell_max` parameter used in the second function call + defaults here to the `ell_max` value in the input waveform. This is slightly + different from the usual default, because `WaveformGrid.from_modes` usually + increases the effective ell value by 1. + + """ + from . import WaveformGrid + return WaveformGrid.transform(self, **kwargs) + # Involutions @property @waveform_alterations