Skip to main content

A Python version of Oculus - The eye into the chaos: a comprehensive magnetic field diagnostic package for non-integrable, toroidal magnetic fields

Project description

pyoculus

A Python version of Oculus - The eye into the chaos: a comprehensive magnetic field diagnostic package for non-integrable, toroidal magnetic fields (and more general 1 1/2-D or 2D Hamiltonian system). Oculus is the Latin word for 'eye'.

Installation

You can obtain the package from PYPI by

pip3 install pyoculus

or

pip3 install --user pyoculus

Alternatively, you can clone this repository. In this case, additional steps are needed to compile the FORTRAN interfaces for SPEC magnetic field and PJH. See below.

Usage

To use the package, simply import it in Python:

import pyoculus

Examples can be found in the examples subfolder.

Documentation

The documentation of pyoculus is managed by Doxygen.

You can find the documentation on Github Page: https://zhisong.github.io/pyoculus/

This documentation will be updated regularly but may not be most up-to-date. To generate the documentation from source, please run

make doxygen

The documentation will appear in the subfolder doc/html. Please open doc/html/index.html in your browser.

SPEC magnetic field and Pressure Jump Hamiltonian (PJH)

Some additional steps are needed to run pyoculus on outputs generated by the Stepped Pressure Equilibrium Code or SPEC.

Pre-requisite

You will need the py_spec package to read a SPEC output file and give it to pyoculus. However, py_spec is not a requirement for pyoculus. Link to py_spec

Compilation

If you are not obtaining the package via PYPI, to use the pyoculus on SPEC magnetic field and PJH, please compile the Fortran modules for SPEC by

pip3 install -e .

Alternatively, you can manually compile *.f90 in pyoculus/problems/SPECfortran using f2py to generate a module pyoculus_spec_fortran_module. This is not recommended.

Documentation for f2py can be found here.

Developers

Link to the original Oculus package:

Github: https://github.com/SRHudson/Oculus

Documentation: https://w3.pppl.gov/~shudson/Oculus/oculus.pdf

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

pyoculus-0.1.0.tar.gz (30.9 kB view details)

Uploaded Source

Built Distribution

pyoculus-0.1.0-cp38-cp38-macosx_10_9_x86_64.whl (160.4 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

Details for the file pyoculus-0.1.0.tar.gz.

File metadata

  • Download URL: pyoculus-0.1.0.tar.gz
  • Upload date:
  • Size: 30.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.3

File hashes

Hashes for pyoculus-0.1.0.tar.gz
Algorithm Hash digest
SHA256 11862de601a4e30451ffc2e82c1e52bc3aecde03ea513e7cc6a883fb9b158343
MD5 7b13460b0827a1f751a1daa2c210dc21
BLAKE2b-256 c3bd7678b900d197d9b5f3c197b25b68ac82b1a70dd650e9af9d39640f0a9797

See more details on using hashes here.

File details

Details for the file pyoculus-0.1.0-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: pyoculus-0.1.0-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 160.4 kB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.3

File hashes

Hashes for pyoculus-0.1.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 69a5bcd44b9c17a0d5547212dee95a61cb13adf540c34654627bede3be1785a9
MD5 c3144aeeb1c564f37d503ae723fe7eea
BLAKE2b-256 034bdb0e44f83e2584c78a9e0d240f75cb80ac55382e2e4c4da27f11622223f3

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