Metadata-Version: 2.4
Name: mnpbem-misc
Version: 0.1.7
Summary: Shared numerical and vector algebra toolkit for MNPBEM-Python.
Author-email: GALIH RIDHO UTOMO <g4lihru@students.unnes.ac.id>
License-Expression: GPL-2.0-only
Project-URL: Homepage, https://pypi.org/project/mnpbem-misc/
Project-URL: Repository, https://github.com/galihru/mnpbem/tree/main/mnpbem-misc
Project-URL: Source, https://github.com/galihru/mnpbem
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.24

# 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:

```text
lambda_nm = C_ev_nm / E_ev
C_ev_nm = 1239.841984
```

Euclidean vector norm:

```text
||v||_2 = sqrt(sum_i |v_i|^2)
```

Normalization:

```text
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
```bash
pip install mnpbem-misc
```

## Example
Runnable example:
- `examples/basic_usage.py`

Run:
```bash
python examples/basic_usage.py
```

## Author
- GALIH RIDHO UTOMO
- g4lihru@students.unnes.ac.id
