Skip to content

Commit b33fb4c

Browse files
committed
improvements
1 parent 634e247 commit b33fb4c

1 file changed

Lines changed: 61 additions & 73 deletions

File tree

README.rst

Lines changed: 61 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ Overview
5353
- **Partially-absorbing spheres** (lossy dielectrics)
5454
- **Perfectly-conducting spheres** (metallic particles)
5555

56-
Full documentation at <https://miepython.readthedocs.io>
57-
5856
Key Features
5957
~~~~~~~~~~~~
6058

@@ -67,6 +65,27 @@ Key Features
6765
- ✅ **Field calculations** - Internal field coefficients coming!
6866

6967

68+
Documentation
69+
-------------
70+
71+
- **Full Documentation**: `miepython.readthedocs.io <https://miepython.readthedocs.io>`_
72+
- **API Reference**: `miepython api <https://miepython.readthedocs.io/en/latest/#api-reference>`_
73+
- **Jupyter Notebooks**: `Interactive Jupyter notebooks <https://github.com/scottprahl/miepython/tree/main/docs>`_
74+
- **Theory Background**: `Mathematical foundations and validation <https://miepython.readthedocs.io/en/latest/07_algorithm.html>`_
75+
76+
Version 3.0 Breaking Changes
77+
----------------------------
78+
79+
Version 3.0 introduced significant API changes and new functionality:
80+
81+
- **Internal field calculations** - Compute electromagnetic fields inside spheres
82+
- **Enhanced coefficient access** - Direct access to Mie expansion coefficients
83+
- **Future-ready architecture** - Foundation for full field calculations
84+
85+
If you need the old API, pin to version 2.5.5::
86+
87+
pip install miepython==2.5.5
88+
7089
Installation
7190
~~~~~~~~~~~~
7291

@@ -135,6 +154,23 @@ Parameters
135154
- **mu** (array): Cosine of scattering angles
136155

137156

157+
Important Conventions
158+
---------------------
159+
160+
1. **Negative imaginary refractive index**: For absorbing materials, use ``m = n - ik`` where k > 0
161+
2. **Albedo normalization**: Scattering phase functions integrate to the single scattering albedo over 4π steradians (customizable)
162+
163+
These latter may be mitigated using custom normalization
164+
165+
.. code-block:: python
166+
167+
# Different scattering function normalizations
168+
I_albedo = mie.i_unpolarized(m, x, mu, norm='albedo') # Default
169+
I_unity = mie.i_unpolarized(m, x, mu, norm='one') # Normalized to 1
170+
I_4pi = mie.i_unpolarized(m, x, mu, norm='4pi') # 4π normalization
171+
172+
173+
138174
Performance & JIT Compilation
139175
-----------------------------
140176

@@ -221,86 +257,38 @@ Gold Nanoparticles
221257
.. image:: https://raw.githubusercontent.com/scottprahl/miepython/main/docs/04.svg
222258
:alt: Gold Nanoparticles
223259

224-
Important Conventions
225-
---------------------
226260

227-
1. **Negative imaginary refractive index**: For absorbing materials, use ``m = n - ik`` where k > 0
228-
2. **Albedo normalization**: Scattering phase functions integrate to the single scattering albedo over 4π steradians (customizable)
229-
230-
These conventions may differ from other Mie codes - always verify when comparing results!
231-
232-
Version 3.0 Breaking Changes
233-
----------------------------
234-
235-
Version 3.0 introduced significant API changes and new functionality:
236-
237-
New Features
238-
~~~~~~~~~~~~
239-
240-
- **Internal field calculations** - Compute electromagnetic fields inside spheres
241-
- **Enhanced coefficient access** - Direct access to Mie expansion coefficients
242-
- **Future-ready architecture** - Foundation for full field calculations
243-
244-
Migration
245-
~~~~~~~~~
246-
247-
If you need the old API, pin to version 2.5.5::
248-
249-
pip install miepython==2.5.5
250-
251-
For new projects, use v3.0+ to access the latest features and improvements.
252261

253262

254-
Custom Normalization
255-
~~~~~~~~~~~~~~~~~~~~
263+
Citing `miepython`
264+
--------------------
256265

257-
.. code-block:: python
258-
259-
# Different scattering function normalizations
260-
I_albedo = mie.i_unpolarized(m, x, mu, norm='albedo') # Default
261-
I_unity = mie.i_unpolarized(m, x, mu, norm='one') # Normalized to 1
262-
I_4pi = mie.i_unpolarized(m, x, mu, norm='4pi') # 4π normalization
266+
If this library contributes to your research, please cite the archived release
267+
on `zenodo <https://zenodo.org>`_
263268

264-
Documentation
265-
-------------
269+
```
270+
S. Prahl, *miepython — Pure‑Python Mie scattering calculations*, Zenodo,
271+
16 March 2025. doi:10.5281/zenodo.7949263
272+
```
266273

267-
- **Full Documentation**: `miepython.readthedocs.io <https://miepython.readthedocs.io>`_
268-
- **API Reference**: `miepython api <https://miepython.readthedocs.io/en/latest/#api-reference>`_
269-
- **Theory Background**: Mathematical foundations and validation
270-
- **Example Gallery**: `Interactive Jupyter notebooks <https://github.com/scottprahl/miepython/tree/main/docs>`_
271-
272-
Citation
273-
--------
274-
275-
If you use miepython in your research, use the zenodo link |doi| to cite
276-
the version of miepython that you used:
274+
* **Generic DOI (always the newest release)** — `10.5281/zenodo.7949263`. The
275+
badge at the top of this file resolves to that record.
276+
* **Version‑specific DOIs** — click the Zenodo badge |doi| and choose the DOI that
277+
corresponds to the exact version you want to cite (e.g.
278+
`10.5281/zenodo.14257432 for v2.5.5`).
277279

278280
.. code-block:: bibtex
279281
280-
@software{miepython,
281-
author = {Scott Prahl},
282-
title = {miepython: A Python library for Mie scattering calculations},
283-
url = {https://github.com/scottprahl/miepython},
284-
doi = {10.5281/zenodo.xxxxx},
285-
year = {2024}
286-
}
287-
288-
Contributing
289-
------------
290-
291-
Contributions are welcome! Please see our `contributing guidelines <CONTRIBUTING.md>`_ for details on:
292-
293-
- Reporting bugs
294-
- Suggesting enhancements
295-
- Submitting pull requests
296-
- Running tests locally
297-
298-
Support
299-
-------
300-
301-
- **Issues**: `GitHub Issues <https://github.com/scottprahl/miepython/issues>`_
302-
- **Discussions**: `GitHub Discussions <https://github.com/scottprahl/miepython/discussions>`_
303-
- **Documentation**: `ReadTheDocs <https://miepython.readthedocs.io>`_
282+
```
283+
@software{prahl_miepython_2025,
284+
author = {Prahl, Scott},
285+
title = {{miepython}: A Python library for Mie scattering calculations},
286+
url = {https://github.com/scottprahl/miepython},
287+
doi = {10.5281/zenodo.7949263},
288+
year = {2025},
289+
version = {latest}
290+
}
291+
```
304292

305293
License
306294
-------

0 commit comments

Comments
 (0)