Giter Site home page Giter Site logo

mstem-quda / swmfpy Goto Github PK

View Code? Open in Web Editor NEW
7.0 5.0 0.0 286 KB

Mirror of https://gitlab.umich.edu/swmf_software/swmfpy

Home Page: https://gitlab.umich.edu/swmf_software/swmfpy

License: GNU Lesser General Public License v3.0

Python 98.54% Shell 1.34% Vim Script 0.12%
swmf space python tools space-weather-modeling-framework astro space-weather

swmfpy's Introduction

swmfpy logo

pipeline status DOI

swmfpy

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

Installation

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

There are two supported 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:

$ pip install swmfpy || python3 -m pip install swmfpy || python3 -m pip install --user swmfpy

Note: Depending on your system pip may be ran in other ways: python3 -m pip or python -m pip or 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 swmfpy -vvv

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 on gitlab or github page and create an issue. Make sure you follow the templates.

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},
}

swmfpy's People

Contributors

cdkharris avatar gtoth-umich avatar qalshidi avatar tkeebler-umich avatar zhenguang-huang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.