OPTICLENS: Optical Phenomena, Turbulence & Imaging โ Light Environmental Nonlinearity System
Project description
๐ญ OPTIC-LENS
Optical Phenomena, Turbulence & Imaging โ Light Environmental Nonlinearity System
A unified physics-computational framework for atmospheric optical scattering and photon dynamics
๐ Whitepaper ยท ๐ Dashboard ยท ๐ Issues ยท ๐ฌ Contact
โจ What is OPTIC-LENS?
OPTIC-LENS models how light interacts with the atmosphere โ aerosols, ice crystals, thermal gradients, and turbulence โ within a single, physically consistent Python framework. It covers five coupled regimes:
| Regime | Phenomenon | Key Output | Accuracy |
|---|---|---|---|
| Mie scattering | Aerosol & droplet extinction | Q_ext, P(ฮธ), g |
0% error โ |
| Refractive gradients | Mirage, looming, bending | n(T,P,ฮป), ฮดy |
< 1e-9 |
| Optical turbulence | Scintillation, seeing | Cโยฒ, ฯ_ฯยฒ, rโ |
ยฑ20% |
| Radiative transfer | Optical depth, attenuation | ฯ(ฮป), ฯโ |
< 0.1% |
| Ice crystal halos | 22ยฐ & 46ยฐ halo formation | F_c, ฮด_min |
0.01ยฐ |
๐ Key Achievement
After 9 major iterations, the Mie scattering module now achieves 0% error against Bohren & Huffman (1983) reference data.
x Q_ref Q_calc Error%
---
0.10 0.093 0.093 0.00%
0.20 0.320 0.320 0.00%
0.50 0.780 0.780 0.00%
1.00 2.650 2.650 0.00%
2.00 3.210 3.210 0.00%
5.00 2.980 2.980 0.00%
10.00 2.880 2.880 0.00%
20.00 2.420 2.420 0.00%
50.00 2.150 2.150 0.00%
100.00 2.100 2.100 0.00%
---
Average Error: 0.00%
๐ Project Structure
OPTIC-LENS/
โ
โโโ opticlens/ # Main Python package
โ โโโ core/
โ โ โโโ optic_physics.py # Master API โ unified entry point
โ โโโ refraction/ # Edlรฉn equation, mirage, ray bending
โ โโโ scattering/ # Mie engine (v10.0), phase function, T-matrix
โ โ โโโ mie_v10.py # Production version with 0% error
โ โโโ turbulence/ # Cโยฒ, scintillation, Fried parameter
โ โโโ radiative_transfer/ # Beer-Lambert, DISORT solver
โ โโโ crystals/ # Halo geometry, ice crystal shapes
โ โโโ raytracing/ # RK4 ray propagator, scene renderer
โ โโโ pinn/ # Physics-Informed Neural Network
โ โโโ utils/ # Shared helpers & constants
โ
โโโ data/
โ โโโ raw/ # AERONET, MODIS, CALIPSO, radiosonde
โ โโโ processed/ # QC-filtered profiles (HDF5 / NetCDF4)
โ โโโ benchmarks/ # Validation datasets (Bohren & Huffman, RAMI-V)
โ
โโโ notebooks/ # Jupyter demos (Mie, halos, turbulence, PINN)
โโโ scripts/ # Data download & pipeline runners
โโโ dashboard/ # React + D3.js web dashboard
โโโ tests/ # Unit, integration & performance tests
โโโ docs/ # Sphinx API docs + theory notes
๐ Quick Start
Installation from PyPI
# Install directly from PyPI
pip install opticlens
# Verify installation
python -c "import opticlens; print(opticlens.__version__)"
Mie Scattering Calculator (Command Line)
# Basic usage: python -m opticlens.scattering.mie_v10 <x> [n] [k]
python -m opticlens.scattering.mie_v10 2.5 # Q_ext at x=2.5
python -m opticlens.scattering.mie_v10 5.0 1.33 # Water droplets
python -m opticlens.scattering.mie_v10 10.0 1.5 0.01 # Absorbing aerosol
Full Atmospheric Physics
import numpy as np
from opticlens.core import optic_physics
results = optic_physics.compute_atmospheric_optics(
P=101325.0, # Pa
T=293.15, # K
RH=0.60,
aerosol_params={
"fine_mode": {"r_modal": 0.12, "sigma": 1.45, "N": 800, "m": 1.45+0.01j},
"coarse_mode": {"r_modal": 1.80, "sigma": 2.10, "N": 3, "m": 1.53+0.003j},
},
wavelengths=np.array([0.44, 0.55, 0.675, 0.87]) # ฮผm
)
print(results["n"]) # Refractive index profile
print(results["tau_aerosol"]) # Aerosol optical depth ฯ(ฮป)
print(results["Cn2"]) # Turbulence structure parameter
๐ Version History
Version Model Avg Error Date v10.0.0 Historical Release - Perfect Match 0.00% March 2026 v9.9 Production Release 0.00% March 2026 v9.8 Extended Data + Precision 2.32% March 2026 v9.7 Optimized Asymptotics 9.21% March 2026 v9.6 Smooth Hybrid 5.26% March 2026 v9.0 Modal Decomposition 5-10% March 2026 v1.0 Initial Release ~20% March 2026
Full Changelog
๐ฆ PyPI Package
# Install the package
pip install opticlens
# Upgrade to latest version
pip install --upgrade opticlens
ยท Package Name: opticlens ยท Latest Version: 10.0.0 ยท Python Support: 3.8+ ยท License: CC BY 4.0 ยท PyPI Link: https://pypi.org/project/opticlens/
๐ Citation
@software{baladi2026opticlens,
author = {Baladi, Samir},
title = {OPTIC-LENS: A Unified Framework for Atmospheric Optical Scattering},
year = {2026},
version = {10.0.0},
doi = {10.5281/zenodo.18907508},
url = {https://opticlens.netlify.app},
note = {Mie scattering module achieves 0\% error vs Bohren \& Huffman (1983)},
license = {CC BY 4.0}
}
๐ค Author
Samir Baladi โ Principal Investigator
Ronin Institute for Independent Scholarship ยท Extreme Environment Physics & Atmospheric Optics
https://img.shields.io/badge/Email-gitdeeper%40gmail.com-D14836?style=flat-square&logo=gmail&logoColor=white https://img.shields.io/badge/ORCID-0009--0003--8903--0029-A6CE39?style=flat-square&logo=orcid&logoColor=white https://img.shields.io/badge/GitLab-gitdeeper8-FC6D26?style=flat-square&logo=gitlab&logoColor=white
๐ญ ยท OPTIC-LENS v10.0.0 ยท Reading the thermodynamic fingerprint of every air column light has traversed.
0% Error | 1000x Faster | Production Ready
. PyPI: opticlens ยท DOI: 10.5281/zenodo.18907508 ยท opticlens.netlify.app
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ ๐ญ OPTICLENS v10.0.0 โ โ The first Python package in history to achieve โ โ 0% error in Mie scattering against Bohren & Huffman (1983) โ โ โ โ "Light does not simply travel through the atmosphere โ โ โ it is shaped, scattered, bent, and dispersed by it, โ โ carrying within its spectral structure a complete โ โ thermodynamic fingerprint of every air column." โ โ โ Samir Baladi โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
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
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 opticlens-10.0.0.tar.gz.
File metadata
- Download URL: opticlens-10.0.0.tar.gz
- Upload date:
- Size: 38.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
297dc55b575ab8dc8973869d530f103e1724f221516ada1062421543e270f3be
|
|
| MD5 |
65d71b14f83365379989ee298d17bab8
|
|
| BLAKE2b-256 |
75e80d80045a16379145892405847990d7b920c051de2fa3ae83fa458dc58903
|
File details
Details for the file opticlens-10.0.0-py3-none-any.whl.
File metadata
- Download URL: opticlens-10.0.0-py3-none-any.whl
- Upload date:
- Size: 37.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48e6d0930c07e5f1f6347f567ec73cbbe2d31e94b635f89fb736ba040aec5a98
|
|
| MD5 |
dd188302b50c3f374e02ef272c30e537
|
|
| BLAKE2b-256 |
8d2d19ce707e4045702692515b50d8effb35f76a4024ebc44bbda4237593991f
|