Skip to main content

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

The installation requires external system based installations :

  • Fortran compiler : to run external library py3nj
  • optional tex compiler : necessary for the figures to be displayed in latex text.

Those packages can be installed on linux with

  • apt-get install gfortran
  • apt-get install tex-live

Using the GUI

A gui is available to interactively display pre calculated solutions.

import os
from pyScatSpheres import gui_base as hsa_gui

#fetch built-in solution
df_path=os.path.dirname(hsa_gui.__file__)+'/data/qdotSphereArray2_kp0.pkl'
hsa_e = hsa_gui.GUI_handler(df_path)

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)

Metadata

Release files for pyScatSpheres 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyScatSpheres 1.0.4
File Size Uploaded Provenance Actions
pyScatSpheres-1.0.4.tar.gz 5.4 MB Without provenance Details for pyScatSpheres-1.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyScatSpheres 1.0.4
File Interpreter ABI Platform Actions
pyScatSpheres-1.0.4-py3-none-any.whl Python 3 none any Details for pyScatSpheres-1.0.4-py3-none-any.whl

Total release size: 7.4 MB

Release files / pyScatSpheres-1.0.4.tar.gz

Download URL pyScatSpheres-1.0.4.tar.gz
Size 5.4 MB
Tags Source
SHA-256 checksum
How to use checksums
69ca63d04b72ce0c0087d42462f9a7c8352beee6df045fb479704a5d747d4973
BLAKE2b-256 checksum
How to use checksums
958c8f41c775faaf85872328356ee7860ab567624fadca14fdc800862f29c50b
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / pyScatSpheres-1.0.4-py3-none-any.whl

Download URL pyScatSpheres-1.0.4-py3-none-any.whl
Size 2.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
338da03f3424ded0d0b7b06980bbd72642c3433e85a658a6a313eaa691695bcb
BLAKE2b-256 checksum
How to use checksums
206c2cc44ef1fb271460143a3b091000cf42543b70340c022c797066dce49a4c
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for pyScatSpheres 1.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page