Skip to main content

This package is an educational tool to teach undergradute students in astronomy about the gravitational potential and corresponding velocity curve as a function of radius for the Milky Way galaxy. After using this tool, students should understand that some form of dark matter must exist in order to explain the obsered velocity curve of the Milky Way.

Project description

Logo

MIT License

GitHub top language

A rectangular badge, half black half purple containing the text made at Code Astro

GitHub last commit (by committer)

Dark Plotter

Dark Plotter is a Python package for visualizing velocity as a function of radius for the Milky Way galaxy in an interactive way. This Python package was developed as a project for the Code/Astro workshop in 2024. Code/Astro 2024

The study of the orbital velocity of the galactic disk has provided astronomers with insights into the nature of dark matter, a substance that is so far not well understood, despite composing approximately one-third of the universal energy density. The equations of gravity, both classic and relativistic, fail to explain why galactic rotation curves do not decay as quickly as we expect they should with increasing distance from the core. Mathematical models to describe the gravitational potential profiles for galaxies as a function of radius, including the Navarro-Frenk-White, Plummer, Hernquist, and Jaffe profiles offer different perspectives on a galaxy's mass and velocity distribution. However, researchers and students often face challenges in visualizing and comparing these models with observed data, emphasizing the need for an interactive tool to aid in the teaching and exploration of galactic dynamics. This tool enables the direct comparison of the observed Milky Way velocity profile with the included models.

Attribution

If you use this code in your research work, please refer to the package by its name and cite the authors! If you have any questions, feel free to open an issue through GitHub.

Getting Started

Prerequisites

Before using this program, you'll need the following:

  • Python 3.10 or higher installed on your system.
  • Jupyter notebook.

Installation

You can install Dark Plotter on Windows, MacOS, and Linux distributions. In either case, we assume that you have already installed the dependencies and the appropriate Python version. There are two options to install Dark Plotter:

GitHub

You can install the latest sources from Dark Plotter by cloning the repository directly from GitHub:

git clone https://github.com/brettonsimpson/darkplotter
cd darkplotter
pip install darkplotter

Or, instead, use pip with the path to the repository:

pip install darkplotter@git+https://github.com/brettonsimpson/darkplotter

PyPI

A stable compiled version of Dark Plotter is available on PyPI. You can install it by running:

pip install darkplotter

Testing

If you have installed the development version of Dark Plotter or cloned the complete source code (e.g., from the GitHub repository), you can run the tests by executing the following commands:

cd darkplotter
python -m unittest -v

Usage

  1. Open Jupyter notebook.

  2. Import the darkplotter :

import darkplotter
  1. Use the plot function to create the interactive rotation curve plots.
DarkPlotter.plot()

Contribution

  1. Fork the repository and create a new branch for your feature or bug fix.

  2. Make your changes, and ensure that your code follows the PEP 8 style guide.

  3. Write tests to cover your code if applicable.

  4. Create a pull request with a clear description of your changes and why they are needed.

  5. Your pull request will be reviewed, and once approved, it will be merged into the main branch.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgement

The success of this project is due to the contributions of many.

  • Deep appreciation goes to the contributors of this repository. Their efforts and shared knowledge have been essential.
  • The instructors and teaching assistants who led the workshop and provided invaluable guidance throughout are gratefully acknowledged.
  • Special thanks are extended to Suchitra Narayana, the teaching assistant for the group. Their support, patience, and insights significantly aided in the completion of this project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

darkplotter-1.0.3.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

darkplotter-1.0.3-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file darkplotter-1.0.3.tar.gz.

File metadata

  • Download URL: darkplotter-1.0.3.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for darkplotter-1.0.3.tar.gz
Algorithm Hash digest
SHA256 0304817fa2a370f1d9dbd2eac3a05ca9cd1f219d38352021b29fe6abd80466b8
MD5 3c25bf5befa1dddd9f91dea5bcec128f
BLAKE2b-256 35249e63ededc478707c88e1a5a1a68e41cc4c2363197c0e58a481bd13dca02e

See more details on using hashes here.

File details

Details for the file darkplotter-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: darkplotter-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for darkplotter-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 95cf8347607b2f4ccdb4b64a273430164c137570f2b47cacb1b5df675af849d9
MD5 174b90efdead4b347550b1a5e53ad66b
BLAKE2b-256 8673497fccd57eb464a55ee5d7305a0630f19cb5df2cb8762b65d5004c12acbd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page