Shared numerical and vector algebra toolkit for MNPBEM-Python.
Project description
mnpbem-misc
mnpbem-misc provides shared numerical utilities used across MNPBEM-Python submodules.
Features
- Physical unit conversions between photon energy and wavelength.
- Vector norms and normalization utilities with MATLAB-compatible behavior.
- Tensor-aware linear algebra helpers (
matmul,matcross,inner,outer,spdiag).
Mathematical Formulations
Photon energy-wavelength conversion:
lambda_nm = C_ev_nm / E_ev
C_ev_nm = 1239.841984
Euclidean vector norm:
||v||_2 = sqrt(sum_i |v_i|^2)
Normalization:
v_tilde = v / ||v_ref||_2
Implementation
- Unit conversion utilities:
src/mnpbem_misc/units.py - Vector operations:
src/mnpbem_misc/vector.py - Linear algebra helpers:
src/mnpbem_misc/linalg.py
Dependencies
numpy>=1.24
Installation
pip install mnpbem-misc
Example
Runnable example:
examples/basic_usage.py
Run:
python examples/basic_usage.py
Author
- GALIH RIDHO UTOMO
- g4lihru@students.unnes.ac.id
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mnpbem_misc-0.1.7.tar.gz
(4.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mnpbem_misc-0.1.7.tar.gz.
File metadata
- Download URL: mnpbem_misc-0.1.7.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f914ebe8ed1008dfd1b4b0b4281e076e7a47d58039cb2927da39736171ea90a
|
|
| MD5 |
4c6769753a214c63bb2a4372c04322ab
|
|
| BLAKE2b-256 |
b3e7aa2d93d71b1b056fe5918b2389e043259b0582f206b7df43c9d6661c8dc0
|
File details
Details for the file mnpbem_misc-0.1.7-py3-none-any.whl.
File metadata
- Download URL: mnpbem_misc-0.1.7-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ab293e30c06111ccdc89b8c9d96fa789ec7976acf4915151b3601a12ac3cb70
|
|
| MD5 |
3ae454b1f889661f50d60737f85b9130
|
|
| BLAKE2b-256 |
cfbf879afb1f3ad284694203aa4fdbe4dad47adf5d77c7b1b62c692053016ece
|