GeForce GTX 1070 (8GB)
ASRock Z170M Pro4S [Intel Z170chipset]
Ubuntu 16.04 LTS desktop amd64
TensorFlow v1.2.1
cuDNN v5.1 for Linux
CUDA v8.0
Python 3.5.2
IPython 6.0.0 -- An enhanced Interactive Python.
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)
scipy v0.19.1
geopandas v0.3.0
MATLAB R2017b (Home Edition)
ADDA v.1.3b6
gnustep-gui-runtime v0.24.0-3.1
Numpy実装による球粒子の光散乱コードPyMieScatt関連。
Mie_ab()
https://github.com/bsumlin/PyMieScatt/blob/master/PyMieScatt/Mie.py
http://pymiescatt.readthedocs.io/en/latest/forward.html#Mie_ab
Reference
- Bohren C.F. and D. R. Huffman, "Absorption and Scattering of Light by Small Particles", John Wiley, New York, NY (1983)
- PDF: MATLAB Functions for Mie Scattering and Absorption, Research Report No. 2002-08, June 2002 by Christian Mätzler
Downward recurrence
Dn = np.zeros(int(nmx),dtype=complex)
for i in range(int(nmx)-1,1,-1):
Dn[i-1] = (i/mx)-(1/(Dn[i]+i/mx))
UpwardでなくDownward Recurrenceなのは何故か?
数値計算のつぼ
@ 数値計算のつぼ by 二宮市三さん、吉田 年雄さん、長谷川 武光さん、秦野ヤスヨさん、杉浦 洋さん、桜井 鉄也さん
p35
漸化式の解の一般形は
$x_i = \alpha (1/3)^i + \beta (-5)^i$
と書かれる。
...
誤差の増大の対策は、漸化式を逆進することである。適当な値 i=nを設定してy_{n+1} = 0, y_n = 1とおき、この2つを初期値として漸化式を逆向きにy_{n-1}, y_{n-2}, ..., y_0を計算する。
Bohren and Huffman (1983)
- Bohren C.F. and D. R. Huffman, "Absorption and Scattering of Light by Small Particles", John Wiley, New York, NY (1983)
p127
Threre are two of possible shemes for calculating $D_n(mx)$ in (4.88): upward recurrence ... and downward recurrence ... Kattawar and Plass (1967) have shown that $D_n$ is numerically stable with respect to downward recurrence; that is, if $e_n$ is the error in $D_n$, then the error in $D_{n-1}$ generated from (4.89) is such that $|e_{n-1}| << |e_n|$.