Giter Site home page Giter Site logo

gharib85 / helium-stark-animate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aa-morgan/helium-stark-animate

0.0 1.0 0.0 3.71 MB

Create animations of the Rydberg electron charge distribution in helium as a function of electric field using the Numerov method

License: GNU General Public License v3.0

Python 1.59% Jupyter Notebook 98.41%

helium-stark-animate's Introduction

Helium Stark Animate

Create animations of the Rydberg electron charge distribution in helium as a function of electric field using the Numerov method.

Install

Install helium-stark-animate using setuptools,

git clone https://github.com/axm108/helium-stark-animate
cd helium-stark-animate
python setup.py install

Install helium-stark-zeeman using setuptools,

git clone https://github.com/axm108/helium-stark-zeeman
cd helium-stark-zeeman
python setup.py install

Basic usage

Import libraries,

from heliumstarkanimate import HeliumStarkAnimator
from hsz import HamiltonianMatrix
import numpy as np

Instantiate HamiltonianMatrix object,

n_min = 5
n_max = 6
S = 1
ham = HamiltonianMatrix(n_min=n_min, n_max=n_max, S=S)

Instantiate HeliumStarkAnimator object,

animator = HeliumStarkAnimator(ham)

Calculate charge distributions of a state for different values of the electric field,

state_idx = n_min**2
Efield = np.linspace(0.0, 6.0*10**5, 11) # V/cm
charge_dists = animator.charge_distributions(state_idx, Efield*1e2)

Plot the charge distribution for one field,

animator.plot(charge_dists[0])

Save the charge distributions to a .jpg file for each field,

animator.save(charge_dists)

Plot an interactive figure of the charge distribution along with the corresponding Stark map,

animator.plot_interactive(Efield, charge_dists, stark_map, state_idx)

Version information

Library Version
Python 3.6.1 64bit [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]
IPython 5.3.0
OS Darwin 17.4.0 x86_64 i386 64bit
attr 17.4.0
matplotlib 2.0.2
numba 0.35.0
numpy 1.14.3
scipy 1.00.0
sympy 1.0
tqdm 4.15.0
version_information 1.0.3

helium-stark-animate's People

Contributors

aa-morgan avatar

Watchers

James Cloos 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.