Python interface to WorldWide Telescope 🌌
Перейти к файлу
cranko bc7649cd9c Release commit created with Cranko.
+++ cranko-release-info-v1
[[projects]]
qnames = ["pywwt", "npm"]
version = "1.5.3"
age = 1

[[projects]]
qnames = ["pywwt", "pypa"]
version = "0.21.0"
age = 0

+++
2023-07-28 19:10:36 +00:00
.config/cranko Switch to Cranko for versioning. 2020-10-17 13:07:23 -04:00
.github Update developer docs in prep for Cranko work 2020-10-17 18:19:02 -04:00
ci Release commit created with Cranko. 2023-07-28 19:10:36 +00:00
docs More updates to work with Notebook 7 2023-07-26 22:04:27 -04:00
frontend Release commit created with Cranko. 2023-07-06 13:35:28 +00:00
jupyter.d Test sdist process and make sure pywwt is installed/enabled as far as Jupyter is concerned. 2018-04-05 21:09:33 +01:00
pywwt Release commit created with Cranko. 2023-07-28 19:10:36 +00:00
.check_enabled.py Fix compatibility with `notebook` 7.x 2023-07-23 17:23:33 -04:00
.coveragerc Added .coveragerc 2018-11-19 18:44:32 +00:00
.gitignore Restructure the API docs 2021-11-19 11:29:54 -05:00
.readthedocs.yaml Use qtwebengine, not qtwebkit, everywhere, and default to Python 3.9 2022-10-07 14:01:27 -04:00
.readthedocs_env.yml More updates to work with Notebook 7 2023-07-26 22:04:27 -04:00
CHANGELOG.md Release commit created with Cranko. 2023-07-28 19:10:36 +00:00
LICENSE.rst Improvements to documentation 2017-12-18 11:15:42 +00:00
MANIFEST.in Rearrange webserver static files 2021-06-10 16:59:07 -04:00
README.md README.md: add some badges! 2022-10-26 16:27:53 -04:00
pyproject.toml frontend: require version 0.14.3 of the research app 2023-05-30 10:17:56 -04:00
pytest.ini Don't show logging messages with pytest 2017-12-12 11:29:15 +00:00
setup.cfg Prep for Cranko bootstrap 2020-10-17 12:39:52 -04:00
setup.py Added [qt6] extras 2023-02-16 15:13:31 +00:00
setupbase.py Move re-flag in `_translate_glob` to front for Python 3.11 2022-10-26 18:22:32 +02:00

README.md

pywwt on PyPI DOI Build Status

pywwt: AAS WorldWide Telescope from Python/Jupyter

🚀🚀 Click here to try out pywwt in the cloud! 🚀🚀

Note: our cloud servers usually start up quickly, but if they were recently updated you may have to wait a few minutes for the backing software images to be rebuilt.

About

The pywwt package is the official toolkit for visualizing astronomical data in Python using AAS WorldWide Telescope (WWT). WWT is a free, open-source tool for visually exploring humanitys scientific understanding of the Universe. It includes a sophisticated 4D WebGL rendering engine and a cloud-based web service for sharing and visualizing terabytes of astronomical data. WWT is brought to you by the non-profit American Astronomical Society (AAS), the major organization of professional astronomers in North America, and the .NET Foundation.

A WWT screenshot showing exoplanets in the Kepler field overlaid on a background sky map.

With pywwt you can:

  • Visualize and explore astronomical data interactively in the Jupyter and JupyterLab environments through an HTML widget
  • Do the same in standalone applications with a Qt widget
  • Load data from common astronomical data formats (e.g. AstroPy tables) into WWT
  • Control a running instance of the WWT Windows application

The full documentation, including installation instructions, can be found at http://pywwt.readthedocs.io/.

For Developers: Testing

To test your pywwt checkout, use the pytest command.

The pywwt test suite includes a set of image tests that generate imagery using the WWT Qt widget and compare the results to a set of reference images. This component of the test suite can be finicky, even when everything is working properly, because the details of the rendering are dependent upon your operating system and OpenGL implementation. If your setup is yielding visually correct results, but the test suite is not passing for you, you can fix that as described below.

For a bit more context, each “image test” generates a WWT visual and compares it to multiple reference images. If any of those images is sufficiently close to the WWT result, the test passes. So if youre running the test suite and the comparisons are failing, you need add appropriate new images to the corpus.

For a test like image_layer_equ, the reference images are stored in the subdirectory pywwt/tests/data/refimg_image_layer_equ. The filenames of the reference images within that directory don't matter, and are intentionally uninformative since the same reference image might match a wide variety of rendering platforms.

If you run the test suite with the environment variable $PYWWT_TEST_IMAGE_DIR set to a non-empty value, the WWT visuals generated during the test run will be saved in the named directory. For any images that fail tests, difference images with names resembling image_layer_equ_vs_a.png will also be saved. So to update the image corpus so that the test suite passes for you, run the test suite in this mode, then copy the failing images to the appropriate reference image data directories. Don't forget to git add the new files! And you should also verify that your new images do in fact look “reasonable” compared to whats expected for the test.

You can also run python -m pywwt.tests $imgdir1 $imgdir2 ..., where $imgdirN are paths to directories or Zip files containing images generated during one or more test runs. This will compare those images to the current corpus of reference images, and indicate whether there are images in the reference corpus that could potentially be removed. Note, however, that this is only safe if your collection of $imgdirN spans all pywwt rendering platforms of interest. If theres a developer that runs the test suite on MacOS 10.10 and your collection doesn't include those samples, you run the risk of breaking the test suite for that person if you remove the reference files that they need. That being said, it is quite possible for reference images to get out-of-date as the rendering code and test suite evolve. On the third hand, deleting files from the Git repository doesn't actually make it smaller, so removing old reference images only helps a bit with housekeeping.

Reporting issues

If you run into any issues, please open an issue here.

Acknowledgments

The AAS WorldWide Telescope (WWT) system, including pywwt, is a .NET Foundation project. Work on WWT and pywwt has been supported by the American Astronomical Society (AAS), the US National Science Foundation (grants 1550701, 1642446, and 2004840), the Gordon and Betty Moore Foundation, and Microsoft.