Skip to main content

Scattering of array of spheres, scalar theory

Project description

pyScatSpheres

Package for solving the scalar wave equation with a linear array of scattering spheres. Possibility to solve for constant potential well and hard spheres i.e. infinite potential.

installation

pip install pyScatSpheres

Using the GUI

A gui is available to interactively display pre calculated solutions.

from pyScatSpheres import gui_base as gui
sa = gui.GUI_handler()

Using the API

New sets of solution can be calculated and solved to a pickle using the API.

import numpy as np
import pandas as pd
from pyScatSpheres import qdot_sphere_array as qsa
from pyScatSpheres import glob_colors as colors

kas = [0.5,2,5]
kds = [2,5,10]
kps = [1.2]
kas,kps,kds = np.meshgrid(kas,kps,kds)
kas,kps,kds = kas.flatten(),kps.flatten(),kds.flatten()
cols = ['N','ka','kp','kd','nmax','sigma','ap','bp']
df = pd.DataFrame(columns=cols)
for ka,kp,kd in zip(kas,kps,kds):
    nmax = max(int(np.ceil(1.3*ka)),int(ka)+4)
    s = qsa.QdotSphereArray(N=N,ka=ka,kp=kp,kd=kd*ka,nmax=10,solve=1,copt=1)
    sig = s.get_s(npts=1000)
    df=df.append(dict(zip(cols,[s.N,s.ka,s.kp,s.kd,s.nmax,sig,s.ap,s.bp])),ignore_index=True)
df.to_pickle(df_name)
print(colors.green+'DataFrame saved:\n'+ colors.yellow+df_name+colors.black)

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

pyScatSpheres-1.0.2rc0.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

pyScatSpheres-1.0.2rc0-py3-none-any.whl (2.0 kB view details)

Uploaded Python 3

File details

Details for the file pyScatSpheres-1.0.2rc0.tar.gz.

File metadata

  • Download URL: pyScatSpheres-1.0.2rc0.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for pyScatSpheres-1.0.2rc0.tar.gz
Algorithm Hash digest
SHA256 9fb59f60952dd72c9c0c7c48be6227447a24907ddd7780f56a79c96f2bae05f7
MD5 0e63c32eca77075c452a0495afc37505
BLAKE2b-256 2e84a4ffd1737ee50d6142dc55576ebd4851ec4fae3a480adc4a3375d1a2450d

See more details on using hashes here.

File details

Details for the file pyScatSpheres-1.0.2rc0-py3-none-any.whl.

File metadata

  • Download URL: pyScatSpheres-1.0.2rc0-py3-none-any.whl
  • Upload date:
  • Size: 2.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for pyScatSpheres-1.0.2rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d46fce8a1c626aada583f3fe32b0c078e43a6ddcebbbe58c92618163ca43b6f
MD5 7a7a3b04fae864817764582986fa2ce3
BLAKE2b-256 c2a7d7a4b0f56cf6d0b95ccb308428870bd4a3fd9947f306ba1c45d7d47feab5

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