Python interface to WorldWide Telescope 🌌
Перейти к файлу
Peter Williams f20f1f4d3c
Merge pull request #377 from pkgw/numpy2
Fixups for Numpy 2 compatibility
2024-06-25 17:47:03 +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 Increase timeout for test with coverage job to match regular tests. 2024-05-17 16:18:21 -04:00
docs docs: update some logos for branding 2023-09-15 12:41:54 -04:00
frontend Allow refreshing tile cache. 2024-04-18 18:27:27 -04: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 pywwt/layers.py: np.unicode_ is removed in Numpy 2 2024-06-25 12:01:26 -04: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 Fix up the ReadTheDocs build 2023-08-07 09:48:14 -04:00
.readthedocs_env.yml Only pin sphinx-automodapi in RTD environment and add explanatory comment. Try removing new test images. 2024-05-06 16:28:37 -04:00
CHANGELOG.md Update developer docs in prep for Cranko work 2020-10-17 18:19:02 -04:00
LICENSE.rst Improvements to documentation 2017-12-18 11:15:42 +00:00
MANIFEST.in Build system tidying 2023-09-15 13:49:14 -04:00
README.md Sponsorship branding updates 2023-09-15 12:24:57 -04:00
pyproject.toml pyproject.toml: have the Python package require the latest version of the JS frontend 2023-09-15 15:38:51 -04:00
pytest.ini Don't show logging messages with pytest 2017-12-12 11:29:15 +00:00
setup.cfg Build system tidying 2023-09-15 13:49:14 -04:00
setup.py Make qtpy an optional dependency. 2024-05-17 16:18:21 -04:00
setupbase.py Build system tidying 2023-09-15 13:49:14 -04:00

README.md

pywwt on PyPI DOI Build Status

pywwt: WorldWide Telescope from Python/Jupyter

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

Note: the 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 WorldWide Telescope (WWT), a free, open-source astronomy visualization system. WWT includes a sophisticated 4D WebGL rendering engine and a cloud-based web service for sharing and visualizing terabytes of astronomical data.

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 WorldWide Telescope project uses an open governance model and is fiscally sponsored by NumFOCUS. Consider making a tax-deductible donation to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs.

Installation

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

Reporting issues

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

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.

Continuous Integration and Deployment

This repository uses Cranko to automate release workflows. This automation is essential to the smooth and reproducible deployment of the WWT web services.

Getting involved

We love it when people get involved in the WWT community! You can get started by participating in our user forum or by signing up for our low-traffic newsletter. If you would like to help make WWT better, our Contributor Hub aims to be your one-stop shop for information about how to contribute to the project, with the Contributors Guide being the first thing you should read. Here on GitHub we operate with a standard fork-and-pull model.

All participation in WWT communities is conditioned on your adherence to the WWT Code of Conduct, which basically says that you should not be a jerk.

Acknowledgments

Work on the WorldWide Telescope system has been supported by the American Astronomical Society (AAS), the .NET Foundation, and other partners. See the WWT user website for details.

Legalities

The WWT code is licensed under the MIT License. The copyright to the code is owned by the .NET Foundation.