Skip to main content

A collection of tools for the Space Weather Modelling Framework

Project description

swmfpy logo

swmfpy

A collection of tools to make it easier to work with Python and Space Weather Modeling Framework (SWMF) together.

This is a work in progress.

Installation

Note: swmfpy also is part of the SWMF and gets cloned into SWMF/share/Python. However, if you would like to develop for swmfpy make a clone and work that way and make a merge request.

There are two methods of installing swmfpy with with a virtual environment and without a virtual environment. Only use the virtual environment if your current environment is giving you trouble.

Without Python venv

Install with pip:

$ python3 -m pip install --user wheel  # Might be necessary
$ python3 -m pip install --user git+https://gitlab.umich.edu/swmf_software/swmfpy.git@master

Note: Depending on your system pip may be ran in other ways: python3 -m pip or python -m pip

Then import it into your python project.

import swmfpy

With Python venv

Use this method if the above method is giving you trouble.

Set up a python 3 virtual environment:

$ python3 -m venv ~/.venv

This is important, make sure that it is in your .profile or .bash_profile:

$ echo "source ~/.venv/bin/activate" >> ~/.profile

Note: You might need to use activate.csh instead if using csh and activate.fish in your ~/.config/fish/config.fish instead if using fish shell. You are most likely using bash so no need to worry.

Next install the software. This will take a long time as you will be compiling numpy from scratch.

$ source ~/.venv/bin/activate
$ python3 -m pip install --user wheel -vvv
$ python3 -m pip install --user cython -vvv
$ python3 -m pip install --user git+https://gitlab.umich.edu/swmf_software/swmfpy.git@master

If you are using tmux or GNU Screen on a supercomputer you can safely detach your session and power off your computer and come back another time.

This should be fully installed now. You should be able to import:

import swmfpy

Troubleshooting

If you have followed these carefully and still not been able to install please submit an Issue.

Documentation

An auto-documented version can be found here.

However, documentation is included as docstrings. Use python's dir() and help() inbuilt functions to see documentation.

import swmfpy
help(swmfpy)  # To see list of functions
help(swmfpy.io.read_gm_log)  # To see the function documentation

Issues

If you are experiencing any issues or bugs please go to the Issues page and create an issue. Make sure you include steps to recreate the problem in your post.

How to cite

You can cite this software on LaTeX like this:

@software{swmfpy,
  author = {{Al Shidi, Qusai}},
  title = {swmfpy},
  url = {https://gitlab.umich.edu/swmf_software/swmfpy},
  version = {2020.5},
  date = {2020-06-19},
}

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

swmfpy-2020.10.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

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

swmfpy-2020.10-py2.py3-none-any.whl (25.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file swmfpy-2020.10.tar.gz.

File metadata

  • Download URL: swmfpy-2020.10.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for swmfpy-2020.10.tar.gz
Algorithm Hash digest
SHA256 2449e3a457cf0c68f934d009fab745a23c941c36dfbdb05381680787615128ba
MD5 c4fb9b7b423bd265780affc7a0a7ee70
BLAKE2b-256 2d9b31822ce26eb74cbbd0f4cddf890d5a70bd25b3d401a00f7e6be4111cea87

See more details on using hashes here.

File details

Details for the file swmfpy-2020.10-py2.py3-none-any.whl.

File metadata

  • Download URL: swmfpy-2020.10-py2.py3-none-any.whl
  • Upload date:
  • Size: 25.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for swmfpy-2020.10-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1aab0d18202615b6ad1db9ba8388434b4805f8821f90ea68bb8cef85f8a7b97a
MD5 7bb2589f2a583f4fa4f54d656df6547e
BLAKE2b-256 bba518ef5cab384a11b6c424655579549fc061e99a451d0041f0255f703d86b4

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