Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.2%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: e-p-metzner
  • License: bsd-3-clause
  • Language: C++
  • Default Branch: main
  • Size: 4.41 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created 11 months ago · Last pushed 9 months ago
Metadata Files
Readme License Citation Codemeta

README.md

ARTmie


Documentation Status

ARTmie is a python library to calculate optical properties of spherical particles.
Those can be simple, single coated or drawn from a particle size distribution.

ARTmie uses a lot of improved C++ in the backend for accelaration of various calculations.

The Code was mainly ported from Matlab and Fortran to C++.

Installation

from the Python Package Index (PyPI)

python pip install ARTmie

from source

1) Download the source code from this git by clicking the triangular button next to Code and selecting e.g. zip underneath Download source code.
2) Extract the source code to a desired location.
3) Open a terminal with an appropriate python environment (Python 3.0 or higher) and Numpy (1.5 or higher, tested with 2.0).
4) Change to the directory of the ARTmie project (dir above src):
cd /path/to/ARTmie 5) Install it with the following command:
python python -m pip install .

Requirements

  • Python 3.0 or higher
  • Numpy 1.5 or higher, preferable 2.0 or higher
  • On windows with VS-Code: Microsoft Visual C++ 14.0 or higher

Example

Calculating the Mie efficiencies for extinction, scattering, absoprtion and backscattering for a glass sphere (crown glass, BK7) depending on the wavelength
Refractive index data are taken from wikipedia and refractiveindex.info

```python

import libraries

import numpy as np np.set_printoptions(threshold=200) import matplotlib.pyplot as plt import ARTmie ```

```python

setup date

wavelength = np.linspace(200.0, 2000.0, 1000) #nanometers w2 = (wavelength/1000.0)*2 b1,b2,b3,c1,c2,c3 = 1.03961212,0.231792344,1.01046945,6.00069867e-3,2.00179144e-2,103.560653 m_bk7 = np.sqrt(1.0+w2(b1/(w2-c1)+b2/(w2-c2)+b3/(w2-c3))) #real part, from wikipedia (see above) mbk7 = mbk7+9.7525e-9*1j #imaginary part, fix value, because its variability can be neglected (from refractiveindex.info see above) diam = 200.0 #nanometers

calculate Mie efficiencies

mie = ARTmie.MieQ(m_bk7,diam,wavelength, asDict=True) print(mie) ```

{'Qext': array([4.41564110e+00, 4.28610971e+00, 4.17518991e+00, ..., 2.23387660e-03, 2.22560118e-03, 2.21736348e-03], shape=(1000,)), 'Qsca': array([4.41564090e+00, 4.28610952e+00, 4.17518973e+00, ..., 2.23387013e-03, 2.22559471e-03, 2.21735702e-03], shape=(1000,)), 'Qabs': array([1.98117068e-07, 1.88077067e-07, 1.78400203e-07, ..., 6.47562109e-09, 6.46930174e-09, 6.46299577e-09], shape=(1000,)), 'Qback': array([1.87779191, 1.78529354, 1.67319268, ..., 0.00319725, 0.00318568, 0.00317416], shape=(1000,)), 'Qratio': array([0.4252592 , 0.41653008, 0.4007465 , ..., 1.43125931, 1.43138174, 1.43150385], shape=(1000,)), 'Qpr': array([1.53362294, 1.4964994 , 1.45816498, ..., 0.00219041, 0.00218237, 0.00217437], shape=(1000,)), 'g': array([0.652684 , 0.65084905, 0.65075484, ..., 0.01945852, 0.01942341, 0.0193884 ], shape=(1000,))}

```python

plot the results

plt.figure() ax = plt.gca() ax.plot(wavelength, mie['Qext'], ls='-', label='Qext') ax.plot(wavelength, mie['Qsca'], ls='--', label='Qsca') ax.plot(wavelength, mie['Qabs'], ls='-.', label='Qabs') ax.plot(wavelength, mie['Qback'], ls=':', label='Qback') ax.setxlabel('wavelength [nm]') ax.setylabel('efficiency [--]') ax.set_title('Scattering efficiencies of BK7 crown glass') ax.legend() plt.show() ```

Plot of wavelength dependend Mie efficiencies for BK7 crown glass

License

ARTmie is available under the 3-Clause BSD license. See LICENSE for license information.

Contributor(s)

Enrico P. Metzner

Roadmap

for version 0.2.0: - 1dimensional arrays for input arguments sizepar1 & sizepar2 in Size_Distribution_Optics and Size_Distribution_Phase_Function - Size_Distribution_Phase_Function can also take an array of angles (theta) instead of predefined equally spaced 721 angles from 0° to 180°

Owner

  • Name: Enrico Metzner
  • Login: e-p-metzner
  • Kind: user
  • Location: Germany

Citation (CITATION.cff)

cff-version: 1.2.0
message: If you use this software, please cite the paper describing it as below. Specific
  versions of the software can additionally be referenced using individual DOIs.
type: software
title: ARTmie
abstract: a fast python package for mie scattering and backscattering calculations
  of single particles, coated particles and log-normal distributed particles
doi: 10.35097/1e058ddcxvqhwtrr
version: v0.1.2
date-released: 2025-06-24
authors:
- given-names: Enrico
  family-names: Metzner
license: BSD-3-Clause
identifiers:
- description: This is the archived snapshot of version v0.1.2 of ARTmie
  type: doi
  value: 10.35097/1e058ddcxvqhwtrr

CodeMeta (codemeta.json)

{
  "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
  "type": "SoftwareSourceCode",
  "applicationCategory": "Meteorology, Atmospheric Science, Optics",
  "author": [
    {
      "id": "http://orcid.org/0000-0001-6523-9205",
      "type": "Person",
      "affiliation": {
        "type": "Organization",
        "name": "Karlsruhe Institute of Technology KIT, Germany"
      },
      "email": "enrico.metzner@kit.edu",
      "familyName": "Metzner",
      "givenName": "Enrico"
    }
  ],
  "contributor": {
    "id": "http://orcid.org/0000-0001-6523-9205",
    "type": "Person",
    "affiliation": {
      "type": "Organization",
      "name": "Karlsruhe Institute of Technology KIT, Germany"
    },
    "email": "enrico.metzner@kit.edu",
    "familyName": "Metzner",
    "givenName": "Enrico"
  },
  "dateCreated": "2025-03-01",
  "dateModified": "2025-06-24",
  "datePublished": "2025-04-29",
  "description": "a fast python package for mie scattering and backscattering calculations of single particles, coated particles and log-normal distributed particles",
  "keywords": [
    "Python",
    "Mie",
    "scattering",
    "backscattering",
    "extinction",
    "absorption",
    "size distribution",
    "spheres"
  ],
  "license": "https://spdx.org/licenses/BSD-3-Clause",
  "name": "ARTmie",
  "operatingSystem": [
    "Linux",
    "Windows",
    "macOS"
  ],
  "programmingLanguage": "Python 3",
  "softwareRequirements": "https://numpy.org/doc/2.0/index.html",
  "version": "v0.1.2",
  "developmentStatus": "active",
  "@id": "https://doi.org/10.35097/1e058ddcxvqhwtrr",
  "identifier": [
    {
      "@type": "PropertyValue",
      "propertyID": "DOI",
      "value": "10.35097/1e058ddcxvqhwtrr"
    },
    {
      "@type": "PropertyValue",
      "propertyID": "RADAR",
      "value": "1e058ddcxvqhwtrr"
    }
  ]
}

GitHub Events

Total
  • Delete event: 5
  • Push event: 40
  • Fork event: 1
  • Create event: 7
Last Year
  • Delete event: 5
  • Push event: 40
  • Fork event: 1
  • Create event: 7

Dependencies

pyproject.toml pypi
  • numpy >=1.15
setup.py pypi