Skip to main content

lspr is a Python 3 scientific package for modelling UV-Vis spectral behaviour of metallic nanoparticle-dieletric composites.

Project description

What is lspr?

lspr is a Python 3 scientific package for modelling UV-Vis spectral behaviour of metallic nanoparticle-dieletric composites.

Dependencies

To run lspr smoothly you will need:

  1. Python 3.4+
  2. Pandas 1.0.3+
  3. NumPy 1.18.1+
  4. SciPy 1.4.1+
  5. Statsmodels 0.11.0+
  6. Matplotlib 3.1.3+

What does lspr enable?

lspr enables one to approximate some spectroscopic features of metallic nanoparticle-dielectric composites, e.g. transmittance, absorbance, scattering cross-section. The model utilizes dipole approximation of Mie solution to Maxwell equations, described in more detail in article by Olson et al.1

To perform a simulation, one needs to construct a composite, so matrix and metallic nanoparticles, so for each a set of refractive index and extinction coefficient data for simulated spectral range are necessary. The model does not take into account possible interactions at the nanoparticle/matrix interface, i.e. the composite absorbance is a simple sum of matrix and nanoparticle absorbances calculated for pristine materials.

1 Optical Characterization of Single Plasmonic Nanoparticles - J. Olson, S. Dominguez-Medina, A. Hoggard, L.-Y. Wang, W.-Sh. Chang, S. Link; Chem Soc Rev. 2015 January 7; 44(1): 40-57. doi: 10.1039/c4cs00131a.

How to get it running?

PyPI

pip install lspr

Anaconda

conda install -c angantyr lspr

Usage

More examples on how to use the lspr and specific methods can be found in the documentation. The transmittance of 31nm silver nanoparticles homogeneously distributed in vacuum with concentration 5.8 · 1013 cm-3

import lspr

# Get the csv file with n,k values for silver in range 200-1000nm
# spaced evenly every 1nm
Ag = lspr.OpticalMaterial(name = "Silver",source = "n-k_Silver_200-1000nm_(1nm).csv")

# Get n,k values for vacuum
Vacuum = lspr.OpticalMaterial(name = "Vacuum",
                         source = "n-k_data_for_vacuum_200-1000nm_(1nm).csv")

# Create Ag nanoparticles with mean size of 31nm, standard deviation of 1nm
# and concentration of 5.8e13 cm^-3
nAg = lspr.Nanoparticle(name = "Silver nanoparticles", material=Ag,
                   size=31, concentration=5.8e13)

# Set the transmittance measurement of a 1 micron thick sample of the composite
(silver nanoparticles dispersed in vacuum); use "T_corr" for reflectance corrected result
Transmittance = lspr.SpectralMeasurement("Measure the transmittance",
                                    matrix=Vacuum, nanoparticle=nAg,
                                    thickness=3).plot_results("T_corr")

The result is a preformatted plot of the reflectance corrected transmittance

License

lspr is distributed under MIT license.

Support

If issue is spotted please open an issue on the GitHub repo of the project. For changes, upgrades and simillar refer to the project's wiki site.

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

lspr-0.20.6.8.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

lspr-0.20.6.8-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file lspr-0.20.6.8.tar.gz.

File metadata

  • Download URL: lspr-0.20.6.8.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for lspr-0.20.6.8.tar.gz
Algorithm Hash digest
SHA256 859ae67ca970f3b1cc63e281294df87190507b3e4801b8ef2f788ad4a440e376
MD5 c04d5d0dbb0fad28737d22f9e87d3d1b
BLAKE2b-256 919768c6bfacb808a6956647c5fb1906c512f2663b1a06a72ad218f1da44d5b8

See more details on using hashes here.

File details

Details for the file lspr-0.20.6.8-py3-none-any.whl.

File metadata

  • Download URL: lspr-0.20.6.8-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for lspr-0.20.6.8-py3-none-any.whl
Algorithm Hash digest
SHA256 037ca058a21dc8a8cccc558e0a8d606ebff152b423c802a4196f4e604ec5591b
MD5 9fb0a01df49c1d8c300ac88c7b9c2089
BLAKE2b-256 4ebff63974cd88dc39c00fbe3efe819a6a0db55cbd81f2886d724fc3a424d716

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