Skip to main content

A python package for easily parsing and processing data from MilkyWay@home

Project description

MILKYWAY@HOME PYTHON PACKAGE (MWAHPY)

NOTE: MWAHPY HAS ENTERED LONG-TERM LEGACY SUPPORT (V2.0.0+). PULL REQUESTS WILL BE REVIEWED AND MERGED IF POSSIBLE, BUT I AM NO LONGER PLANNING ON IMPLEMENTING NEW FEATURES FOR THE CODE BASE.

Copyright Tom Donlon, 2020 RPI

Significant work also done by Kevin Roux (Kevnroux)

github user: thomasdonlon

Requires Python v.>3.6.0


MilkyWay@home is a computational astrophysics project located at RPI and run by Dr. Heidi Newberg. The project contains two main components, (i) the Separation Application and (ii) the N-body Application. I have worked with both, and over a few years have developed several useful bits of python code to supplement analysis and usage of MilkyWay@home. This code has been cleaned and organized here, so that others can avoid having to constantly reinvent the wheel.

The purpose of the mwahpy package is to provide a collection of useful tools for people working with/on the MilkyWay@home N-body project at RPI.

In practice it would be good for this package to be updated along with the MilkyWay@home project and/or python updates after I'm gone. No clue if that's going to happen, but I plan on maintaining support at least through the spring of 2023 (while I'm in grad school).

Issues with the package can be directed to my github profile or on the MilkyWay@home forums at milkyway.cs.rpi.edu. Improvements or additions are welcome, just send a pull request to the mwahpy github repository.

CONTENTS

A non-exhaustive list of contents of the package is given below:

  • easy importing of data from N-body output
  • easy manipulation of data after reading in
  • A variety of coordinate transformations for typical coordinate systems used in Galactic astronomy
  • easy visualization of the imported data through plotting functionality
  • a wide variety of useful scripts and routines for working with N-body simulations, especially those with dwarf galaxies
  • a tutorial .pdf document along with documentation for each function in the package

INSTALLATION

FOR USERS:

  1. Open your terminal, and run

python3 -m pip install mwahpy

  1. Insert import statements for the subpackages that you want to use in your .py files:

import mwahpy.{mwahpy subpackage}

import mwahpy.{other mwahpy subpackage}

...

  1. Do science

FOR DEVELOPERS:

  1. Clone the mwahpy github repository

  2. Make the desired changes in the source code

  3. Navigate to the directory where you cloned the repo, and then run

python3 setup.py develop --user

(note, you will probably need to uninstall any previous versions of mwahpy you had on your machine before running this)

  1. To test your changes, insert import statements for the subpackages that you want to use in your .py files as you normally would:

import mwahpy.{mwahpy subpackage}

import mwahpy.{other mwahpy subpackage}

...

  1. Once you are done making changes to the source code, put in a pull request to master

  2. Navigate to the directory where you cloned the repo, and then run

python3 setup.py develop --uninstall

pip3 install mwahpy

Your changes will not be available in the main mwahpy build until a new release comes out.

TODO

MAJOR:

  • Expand plot capabilities
  • Finish refactoring coords.py
  • Finish unit testing of coordinate transformations
  • add animate() for the Nbody struct for nice animations
  • update documentation so it is current (probably last thing I'll do during summer 2023)

MINOR:

  • Let subset_circ() and subset_rect() handle None as bounds
  • Implement better linear algebra to reduce the computation time of coords.get_rvpm()
  • Play around with turning off mwahpy_glob.verbose flag for some things to quiet unnecessary output
  • Add levels of verbosity, and make this changeable by running a command

ISSUES

  • output_handler.make_nbody_input() has to set all particles types to dark matter. This is because MilkyWay@home N-Body can only read .in files that only contain dark matter (#ignore = 1) files. This is more of a bug in the N-Body client than mwahpy, but doesn't change the physics at all.

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

mwahpy-2.1.4.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mwahpy-2.1.4-py3-none-any.whl (182.7 kB view details)

Uploaded Python 3

File details

Details for the file mwahpy-2.1.4.tar.gz.

File metadata

  • Download URL: mwahpy-2.1.4.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12

File hashes

Hashes for mwahpy-2.1.4.tar.gz
Algorithm Hash digest
SHA256 acdd82fbbc859cce1410f197a83d35cebdab0b783946fe952690663bb1d71768
MD5 07277d56b0a0167b6b697e10854f11e3
BLAKE2b-256 4b243a67068f311ef15d514574e50de2f0a47a2f5e3003e6564eb9f734e38b1e

See more details on using hashes here.

File details

Details for the file mwahpy-2.1.4-py3-none-any.whl.

File metadata

  • Download URL: mwahpy-2.1.4-py3-none-any.whl
  • Upload date:
  • Size: 182.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12

File hashes

Hashes for mwahpy-2.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 de2ebb98f7a13805a38e34d9b6c60c98381fb9624e77e9e31c6ca491acd633ef
MD5 d6bbcfbc6ac6e51a537a39eb97b552ca
BLAKE2b-256 2ae96412a538538ad2a81f095893c8db2e4ccaaf3a2e9764ddb28b24e9639abb

See more details on using hashes here.

Supported by

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