skinoptics 0.0.1b8__py3-none-any.whl → 0.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- skinoptics/__init__.py +3 -3
- skinoptics/absorption_coefficient.py +0 -1
- skinoptics/anisotropy_factor.py +954 -955
- skinoptics/colors.py +1543 -1403
- skinoptics/dataframes.py +98 -98
- skinoptics/datasets/colors/Sharma2004_TableI.txt +69 -0
- skinoptics/datasets/optical_properties/ext_and_molarext_oxy_and_deo_Prahl.txt +376 -376
- skinoptics/datasets/optical_properties/molarext_bil_Li.txt +1842 -1842
- skinoptics/datasets/optical_properties/mua_wat_Hale.txt +231 -231
- skinoptics/refractive_index.py +413 -414
- skinoptics/scattering_coefficient.py +0 -1
- skinoptics/utils.py +419 -420
- {skinoptics-0.0.1b8.dist-info → skinoptics-0.0.2.dist-info}/METADATA +31 -31
- {skinoptics-0.0.1b8.dist-info → skinoptics-0.0.2.dist-info}/RECORD +17 -16
- {skinoptics-0.0.1b8.dist-info → skinoptics-0.0.2.dist-info}/WHEEL +1 -1
- {skinoptics-0.0.1b8.dist-info → skinoptics-0.0.2.dist-info}/licenses/LICENSE.txt +674 -674
- {skinoptics-0.0.1b8.dist-info → skinoptics-0.0.2.dist-info}/top_level.txt +0 -0
skinoptics/refractive_index.py
CHANGED
|
@@ -1,414 +1,413 @@
|
|
|
1
|
-
'''
|
|
2
|
-
| SkinOptics
|
|
3
|
-
| Copyright (C) 2024-2025 Victor Lima
|
|
4
|
-
|
|
5
|
-
| This program is free software: you can redistribute it and/or modify
|
|
6
|
-
| it under the terms of the GNU General Public License as published by
|
|
7
|
-
| the Free Software Foundation, either version 3 of the License, or
|
|
8
|
-
| (at your option) any later version.
|
|
9
|
-
|
|
10
|
-
| This program is distributed in the hope that it will be useful,
|
|
11
|
-
| but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
-
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
-
| GNU General Public License for more details.
|
|
14
|
-
|
|
15
|
-
| You should have received a copy of the GNU General Public License
|
|
16
|
-
| along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
-
|
|
18
|
-
| Victor Lima
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
|
31
|
-
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
|
53
|
-
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
|
57
|
-
|
|
|
58
|
-
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
from skinoptics.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
:
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
:
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
:
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
:
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
:
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
:
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
:
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
:
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
:
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
:
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
:
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
:
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
:
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
:
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
|
191
|
-
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
:
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
|
211
|
-
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
|
215
|
-
|
|
|
216
|
-
|
|
|
217
|
-
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
:
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
:
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
|
242
|
-
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
|
246
|
-
|
|
|
247
|
-
|
|
|
248
|
-
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
:
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
:
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
:
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
|
296
|
-
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
:
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
|
315
|
-
|
|
|
316
|
-
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
:
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
|
335
|
-
|
|
|
336
|
-
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
:
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
:
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
msg
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
|
375
|
-
|
|
|
376
|
-
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
:
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
:
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
:
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
| '
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
return n_wat_lambda0*(beta_oxy_Friebel(lambda0)*Cmass_oxy + 1)
|
|
1
|
+
'''
|
|
2
|
+
| SkinOptics
|
|
3
|
+
| Copyright (C) 2024-2025 Victor Lima
|
|
4
|
+
|
|
5
|
+
| This program is free software: you can redistribute it and/or modify
|
|
6
|
+
| it under the terms of the GNU General Public License as published by
|
|
7
|
+
| the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
| (at your option) any later version.
|
|
9
|
+
|
|
10
|
+
| This program is distributed in the hope that it will be useful,
|
|
11
|
+
| but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
| GNU General Public License for more details.
|
|
14
|
+
|
|
15
|
+
| You should have received a copy of the GNU General Public License
|
|
16
|
+
| along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
|
|
18
|
+
| Victor Lima
|
|
19
|
+
| victor.lima\@ufscar.br
|
|
20
|
+
| victorportog.github.io
|
|
21
|
+
|
|
22
|
+
| Release date:
|
|
23
|
+
| October 2024
|
|
24
|
+
| Last modification:
|
|
25
|
+
| March 2025
|
|
26
|
+
|
|
27
|
+
| References:
|
|
28
|
+
|
|
29
|
+
| [HQ73] Hale & Querry 1973.
|
|
30
|
+
| Optical Constants of Water in the 200-nm to 200-μm Wavelength Region.
|
|
31
|
+
| https://doi.org/10.1364/AO.12.000555
|
|
32
|
+
|
|
33
|
+
| [S81] Segelstein's M.S. Thesis 1981.
|
|
34
|
+
| The complex refractive index of water.
|
|
35
|
+
| https://mospace.umsystem.edu/xmlui/handle/10355/11599
|
|
36
|
+
|
|
37
|
+
| [LLX00] Li, Lin & Xie 2000.
|
|
38
|
+
| Refractive index of human whole blood with different types in the visible and near-infrared ranges.
|
|
39
|
+
| https://doi.org/10.1117/12.388073
|
|
40
|
+
|
|
41
|
+
| [D*06] Ding, Lu, Wooden, Kragel & Hu 2006.
|
|
42
|
+
| Refractive indices of human skin tissues at eight wavelengths and estimated dispersion relations
|
|
43
|
+
| between 300 and 1600 nm.
|
|
44
|
+
| https://doi.org/10.1088/0031-9155/51/6/008
|
|
45
|
+
|
|
46
|
+
| [FM06] Friebel & Meinke 2006.
|
|
47
|
+
| Model function to calculate the refractive index of native hemoglobin in the wavelength range of
|
|
48
|
+
| 250–1100 nm dependent on concentration.
|
|
49
|
+
| https://doi.org/10.1364/AO.45.002838
|
|
50
|
+
|
|
51
|
+
| [YLT18] Yanina, Lazareva & Tuchin 2018.
|
|
52
|
+
| Refractive index of adipose tissue and lipid droplet measured in wide spectral and temperature ranges.
|
|
53
|
+
| https://doi.org/10.1364/AO.57.004839
|
|
54
|
+
|
|
55
|
+
| [M*21] Matiatou, Giannios, Koutsoumpos, Toutouzas, Zografos & Moutzouris 2021.
|
|
56
|
+
| Data on the refractive index of freshly-excised human tissues in the visible and near-infrared
|
|
57
|
+
| spectral range.
|
|
58
|
+
| https://doi.org/10.1016/j.rinp.2021.103833
|
|
59
|
+
'''
|
|
60
|
+
|
|
61
|
+
import numpy as np
|
|
62
|
+
from scipy.interpolate import interp1d
|
|
63
|
+
|
|
64
|
+
from skinoptics.utils import *
|
|
65
|
+
from skinoptics.dataframes import *
|
|
66
|
+
|
|
67
|
+
def n_Cauchy(lambda0, A, B, C, D):
|
|
68
|
+
r'''
|
|
69
|
+
The Cauchy's equation.
|
|
70
|
+
|
|
71
|
+
:math:`n(\lambda) = A + \frac{B}{\lambda^2} + \frac{C}{\lambda^4} + \frac{D}{\lambda^6}`
|
|
72
|
+
|
|
73
|
+
:param lambda0: wavelength [nm]
|
|
74
|
+
:type lambda0: float or np.ndarray
|
|
75
|
+
|
|
76
|
+
:param A: coefficient :math:`A` [-]
|
|
77
|
+
:type A: float
|
|
78
|
+
|
|
79
|
+
:param B: coefficient :math:`B` [nm^2]
|
|
80
|
+
:type B: float
|
|
81
|
+
|
|
82
|
+
:param C: coefficient :math:`C` [nm^4]
|
|
83
|
+
:type C: float
|
|
84
|
+
|
|
85
|
+
:param D: coefficient :math:`D` [nm^6]
|
|
86
|
+
:type D: float
|
|
87
|
+
|
|
88
|
+
:return: - **n** (*float or np.ndarray*) – refractive index [-]
|
|
89
|
+
'''
|
|
90
|
+
|
|
91
|
+
return A + B/np.power(lambda0, 2., dtype = 'float64') + C/np.power(lambda0, 4., dtype = 'float64') + D/np.power(lambda0, 6., dtype = 'float64')
|
|
92
|
+
|
|
93
|
+
def n_Cornu(lambda0, A, B, C):
|
|
94
|
+
r'''
|
|
95
|
+
The Cornu's equation.
|
|
96
|
+
|
|
97
|
+
:math:`n(\lambda) = A + \frac{B}{(\lambda - C)}`
|
|
98
|
+
|
|
99
|
+
:param lambda0: wavelength [nm]
|
|
100
|
+
:type lambda0: float or np.ndarray
|
|
101
|
+
|
|
102
|
+
:param A: coefficient :math:`A` [-]
|
|
103
|
+
:type A: float
|
|
104
|
+
|
|
105
|
+
:param B: coefficient :math:`B` [nm]
|
|
106
|
+
:type B: float
|
|
107
|
+
|
|
108
|
+
:param C: coefficient :math:`C` [nm]
|
|
109
|
+
:type C: float
|
|
110
|
+
|
|
111
|
+
:return: - **n** (*float or np.ndarray*) – refractive index [-]
|
|
112
|
+
'''
|
|
113
|
+
|
|
114
|
+
return A + B/(lambda0 - C)
|
|
115
|
+
|
|
116
|
+
def n_Conrady(lambda0, A, B, C):
|
|
117
|
+
r'''
|
|
118
|
+
The Conrady's equation.
|
|
119
|
+
|
|
120
|
+
:math:`n(\lambda) = A + \frac{B}{\lambda} + \frac{C}{\lambda^{3.5}}`
|
|
121
|
+
|
|
122
|
+
:param lambda0: wavelength [nm]
|
|
123
|
+
:type lambda0: float or np.ndarray
|
|
124
|
+
|
|
125
|
+
:param A: coefficient :math:`A` [-]
|
|
126
|
+
:type A: float
|
|
127
|
+
|
|
128
|
+
:param B: coefficient :math:`B` [nm]
|
|
129
|
+
:type B: float
|
|
130
|
+
|
|
131
|
+
:param C: coefficient :math:`C` [nm^3.5]
|
|
132
|
+
:type C: float
|
|
133
|
+
|
|
134
|
+
:return: - **n** (*float or np.ndarray*) – refractive index [-]
|
|
135
|
+
'''
|
|
136
|
+
|
|
137
|
+
return A + B/lambda0 + C/np.power(lambda0, 3.5, dtype = 'float64')
|
|
138
|
+
|
|
139
|
+
def n_Sellmeier(lambda0, A1, B1, A2, B2):
|
|
140
|
+
r'''
|
|
141
|
+
The Sellmeier's equation.
|
|
142
|
+
|
|
143
|
+
:math:`n(\lambda) = \sqrt{1 + \frac{A_1 \mbox{ } \lambda^2}{\lambda^2 - B_1} + \frac{A_2\mbox{ } \lambda^2}{\lambda^2 - B_2}}`
|
|
144
|
+
|
|
145
|
+
:param lambda0: wavelength [nm]
|
|
146
|
+
:type lambda0: float or np.ndarray
|
|
147
|
+
|
|
148
|
+
:param A1: coefficient :math:`A_1` [-]
|
|
149
|
+
:type A1: float
|
|
150
|
+
|
|
151
|
+
:param B1: coefficient :math:`B_1` [nm^2]
|
|
152
|
+
:type B1: float
|
|
153
|
+
|
|
154
|
+
:param A2: coefficient :math:`A_2` [-]
|
|
155
|
+
:type A2: float
|
|
156
|
+
|
|
157
|
+
:param B2: coefficient :math:`B_2` [nm^2]
|
|
158
|
+
:type B2: float
|
|
159
|
+
|
|
160
|
+
:return: - **n** (*float or np.ndarray*) – refractive index [-]
|
|
161
|
+
'''
|
|
162
|
+
|
|
163
|
+
lambda0_sqrd = np.power(lambda0, 2., dtype = 'float64')
|
|
164
|
+
|
|
165
|
+
return np.sqrt(1 + A1*lambda0_sqrd/(lambda0_sqrd - B1) + A2*lambda0_sqrd/(lambda0_sqrd - B2))
|
|
166
|
+
|
|
167
|
+
def n_wat_Hale(lambda0):
|
|
168
|
+
r'''
|
|
169
|
+
| The refractive index of WATER as a function of wavelength.
|
|
170
|
+
| Linear interpolation of data from Hale & Querry 1973 [HQ73].
|
|
171
|
+
|
|
172
|
+
| wavelength range: [200 nm, 200 μm]
|
|
173
|
+
| temperature: 25 ºC
|
|
174
|
+
|
|
175
|
+
:param lambda0: wavelength [nm]
|
|
176
|
+
:type lambda0: float or np.ndarray
|
|
177
|
+
|
|
178
|
+
:return: - **n** (*float or np.ndarray*) – refractive index [-]
|
|
179
|
+
'''
|
|
180
|
+
|
|
181
|
+
return interp1d(np.array(n_and_k_wat_Hale_dataframe)[:,0],
|
|
182
|
+
np.array(n_and_k_wat_Hale_dataframe)[:,2],
|
|
183
|
+
bounds_error = False,
|
|
184
|
+
fill_value = (np.array(n_and_k_wat_Hale_dataframe)[0,2],
|
|
185
|
+
np.array(n_and_k_wat_Hale_dataframe)[-1,2]))(lambda0)
|
|
186
|
+
|
|
187
|
+
def n_wat_Segelstein(lambda0):
|
|
188
|
+
r'''
|
|
189
|
+
| The refractive index of WATER as a function of wavelength.
|
|
190
|
+
| Linear interpolation of data from D. J. Segelstein's M.S. Thesis 1981 [S81] collected
|
|
191
|
+
| by S. Prahl and publicly available at <https://omlc.org/spectra/water/abs/index.html>.
|
|
192
|
+
|
|
193
|
+
| wavelength range: [10 nm, 10 m]
|
|
194
|
+
|
|
195
|
+
:param lambda0: wavelength [nm]
|
|
196
|
+
:type lambda0: float or np.ndarray
|
|
197
|
+
|
|
198
|
+
:return: - **n** (*float or np.ndarray*) – refractive index [-]
|
|
199
|
+
'''
|
|
200
|
+
|
|
201
|
+
return interp1d(np.array(n_and_k_wat_Segelstein_dataframe)[:,0]*1E3,
|
|
202
|
+
np.array(n_and_k_wat_Segelstein_dataframe)[:,1],
|
|
203
|
+
bounds_error = False,
|
|
204
|
+
fill_value = (np.array(n_and_k_wat_Segelstein_dataframe)[0,1],
|
|
205
|
+
np.array(n_and_k_wat_Segelstein_dataframe)[-1,1]))(lambda0)
|
|
206
|
+
|
|
207
|
+
def n_EP_Ding(lambda0, model = 'Cauchy'):
|
|
208
|
+
r'''
|
|
209
|
+
| The refractive index of human EPIDERMIS as a function of wavelength.
|
|
210
|
+
| Ding et al. 2006 [D*06]'s fits to their own experimental data.
|
|
211
|
+
| Complementary data publicly available at <bmlaser.physics.ecu.edu/literature/lit.htm>.
|
|
212
|
+
|
|
213
|
+
| wavelength range: [325 nm, 1557 nm]
|
|
214
|
+
| temperature: 22 ºC
|
|
215
|
+
| body location: abdomen and arm
|
|
216
|
+
| volunteers info: 12 female patients (10 caucasians and 2 african americans),
|
|
217
|
+
| phototypes I-III and V, 27-63 years old
|
|
218
|
+
|
|
219
|
+
:param lambda0: wavelength [nm]
|
|
220
|
+
:type lambda0: float or np.ndarray
|
|
221
|
+
|
|
222
|
+
:param model: the user can choose one of the following... 'Cauchy', 'Cornu' or 'Conrady' (default to 'Cauchy')
|
|
223
|
+
:type moderl: str
|
|
224
|
+
|
|
225
|
+
:return: - **n** (*float or np.ndarray*) – refractive index [-]
|
|
226
|
+
'''
|
|
227
|
+
|
|
228
|
+
if model == 'Cauchy':
|
|
229
|
+
return n_Cauchy(lambda0, 1.4134, 7907.9596, -389.9784, 0)
|
|
230
|
+
elif model == 'Cornu':
|
|
231
|
+
return n_Cornu(lambda0, 1.4057, 13.3628, 162.7100)
|
|
232
|
+
elif model == 'Conrady':
|
|
233
|
+
return n_Conrady(lambda0, 1.3963, 25.0563, 6237909.3004)
|
|
234
|
+
else:
|
|
235
|
+
msg = 'The input model = {} is not valid.'.format(model)
|
|
236
|
+
raise Exception(msg)
|
|
237
|
+
|
|
238
|
+
def n_DE_Ding(lambda0, model = 'Cauchy'):
|
|
239
|
+
r'''
|
|
240
|
+
| The refractive index of human DERMIS as a function of wavelength.
|
|
241
|
+
| Ding et al. 2006 [D*06]'s fits to their own experimental data.
|
|
242
|
+
| Complementary data publicly available at <bmlaser.physics.ecu.edu/literature/lit.htm>.
|
|
243
|
+
|
|
244
|
+
| wavelength range: [325 nm, 1557 nm]
|
|
245
|
+
| temperature: 22 ºC
|
|
246
|
+
| body location: abdomen and arm
|
|
247
|
+
| volunteers info: 12 female patients (10 caucasians and 2 african americans),
|
|
248
|
+
| phototypes I-III and V, 27-63 years old
|
|
249
|
+
|
|
250
|
+
:param lambda0: wavelength [nm]
|
|
251
|
+
:type lambda0: float or np.ndarray
|
|
252
|
+
|
|
253
|
+
:param model: the user can choose one of the following... 'Cauchy', 'Cornu' or 'Conrady' (default to 'Cauchy')
|
|
254
|
+
:type moderl: str
|
|
255
|
+
|
|
256
|
+
:return: - **n** (*float or np.ndarray*) – refractive index [-]
|
|
257
|
+
'''
|
|
258
|
+
|
|
259
|
+
if model == 'Cauchy':
|
|
260
|
+
return n_Cauchy(lambda0, 1.3696, 3916.8026, -2558.7704, 0)
|
|
261
|
+
elif model == 'Cornu':
|
|
262
|
+
return n_Cornu(lambda0, 1.2573, 453.8263, -2874.5367)
|
|
263
|
+
elif model == 'Conrady':
|
|
264
|
+
return n_Conrady(lambda0, 1.3549, 17.8990, -3593764.4133)
|
|
265
|
+
else:
|
|
266
|
+
msg = 'The input model = {} is not valid.'.format(model)
|
|
267
|
+
raise Exception(msg)
|
|
268
|
+
|
|
269
|
+
def n_HY_Matiatou(lambda0):
|
|
270
|
+
r'''
|
|
271
|
+
| The refractive index of human HYPODERMIS as a function of wavelength.
|
|
272
|
+
| Matiatou et al. 2021 [M*21]'s fit to their own experimental data.
|
|
273
|
+
|
|
274
|
+
:math:`n(\lambda) = 1.44909 + \frac{5099.42}{\lambda^2}`
|
|
275
|
+
|
|
276
|
+
| wavelength range: [450 nm, 1551 nm]
|
|
277
|
+
| temperature: 25 ºC
|
|
278
|
+
|
|
279
|
+
:param lambda0: wavelength [nm]
|
|
280
|
+
:type lambda0: float or np.ndarray
|
|
281
|
+
|
|
282
|
+
:return: - **n** (*float or np.ndarray*) – refractive index [-]
|
|
283
|
+
'''
|
|
284
|
+
|
|
285
|
+
return n_Cauchy(lambda0, 1.44909, 5099.42, 0, 0)
|
|
286
|
+
|
|
287
|
+
def n_AT_Matiatou(lambda0):
|
|
288
|
+
r'''
|
|
289
|
+
| The refractive index of human ADIPOSE TISSUE as a function of wavelength.
|
|
290
|
+
| Matiatou et al. 2021 [M*21]'s fit to their own experimental data.
|
|
291
|
+
|
|
292
|
+
:math:`n(\lambda) = 1.44933 + \frac{4908.37}{\lambda^2}`
|
|
293
|
+
|
|
294
|
+
| wavelength range: [450 nm, 1551 nm]
|
|
295
|
+
| temperature: 25 ºC
|
|
296
|
+
| body location: abdomen
|
|
297
|
+
|
|
298
|
+
:param lambda0: wavelength [nm]
|
|
299
|
+
:type lambda0: float or np.ndarray
|
|
300
|
+
|
|
301
|
+
:return: - **n** (*float or np.ndarray*) – refractive index [-]
|
|
302
|
+
'''
|
|
303
|
+
|
|
304
|
+
return n_Cauchy(lambda0, 1.44933, 4908.37, 0, 0)
|
|
305
|
+
|
|
306
|
+
def n_AT_Yanina(lambda0):
|
|
307
|
+
r'''
|
|
308
|
+
| The refractive index of human ADIPOSE TISSUE as a function of wavelength.
|
|
309
|
+
| Yanina, Lazareva & Tuchin 2018 [YLT18]'s fit to their own experimental data.
|
|
310
|
+
|
|
311
|
+
:math:`n(\lambda) = \sqrt{1 + \frac{1.1236 \mbox{ } \lambda^2}{\lambda^2-10556.6963} + \frac{0.2725 \mbox{ } \lambda^2}{\lambda^2-1.8867\times 10^7}}`
|
|
312
|
+
|
|
313
|
+
| wavelength range: [480 nm, 1550 nm]
|
|
314
|
+
| temperature: 23 ºC
|
|
315
|
+
| body location: abdomen
|
|
316
|
+
| volunteers info: 10 biopsies, 5 men, 40 – 50 years old, 70 – 80 kg
|
|
317
|
+
|
|
318
|
+
:param lambda0: wavelength [nm]
|
|
319
|
+
:type lambda0: float or np.ndarray
|
|
320
|
+
|
|
321
|
+
:return: - **n** (*float or np.ndarray*) – refractive index [-]
|
|
322
|
+
'''
|
|
323
|
+
|
|
324
|
+
return n_Sellmeier(lambda0, A1 = 1.1236, B1 = 10556.6963, A2 = 0.2725, B2 = 1.8867E7)
|
|
325
|
+
|
|
326
|
+
def n_blo_Li(lambda0):
|
|
327
|
+
r'''
|
|
328
|
+
| The refractive index of human BLOOD as a function of wavelength.
|
|
329
|
+
| Li, Lin & Xie 2000 [LLX00]'s fit to their own experimental data.
|
|
330
|
+
|
|
331
|
+
:math:`n(\lambda) = 1.357 + \frac{6.9 \times 10^3}{\lambda^2} + \frac{7.6 \times 10^8}{\lambda^4}`
|
|
332
|
+
|
|
333
|
+
| wavelength range: [370 nm, 850 nm]
|
|
334
|
+
| temperature: 27 - 28 ºC
|
|
335
|
+
| blood types: A, B and O
|
|
336
|
+
| volunteers info: 9 healthy volunteers, chinese, male and female
|
|
337
|
+
|
|
338
|
+
:param lambda0: wavelength [nm]
|
|
339
|
+
:type lambda0: float or np.ndarray
|
|
340
|
+
|
|
341
|
+
:return: - **n** (*float or np.ndarray*) – refractive index [-]
|
|
342
|
+
'''
|
|
343
|
+
|
|
344
|
+
return n_Cauchy(lambda0, 1.357, 6.9E3, 7.6E8, 0)
|
|
345
|
+
|
|
346
|
+
def beta_oxy_Friebel(lambda0):
|
|
347
|
+
r'''
|
|
348
|
+
| The specific refractive increment of OXYHEMOGLOBIN solutions as a function of wavelength.
|
|
349
|
+
| Linear interpolation of experimental data from Friebel & Meinke 2006 [FM06].
|
|
350
|
+
|
|
351
|
+
| wavelength range: [250 nm, 1100 nm]
|
|
352
|
+
|
|
353
|
+
:param lambda0: wavelength [nm] (must be in the range [250., 1100.])
|
|
354
|
+
:type lambda0: float or np.ndarray
|
|
355
|
+
|
|
356
|
+
:return: - **beta** (*float or np.ndarray*) – specific refractive increment [dL/g]
|
|
357
|
+
'''
|
|
358
|
+
|
|
359
|
+
if isinstance(lambda0, np.ndarray) == True:
|
|
360
|
+
if np.any(lambda0 < 250) or np.any(lambda0 > 1100):
|
|
361
|
+
msg = 'At least one element in the input lambda0 is out of the range [250 nm, 1100 nm].'
|
|
362
|
+
raise Exception(msg)
|
|
363
|
+
else:
|
|
364
|
+
if lambda0 < 250 or lambda0 > 1100:
|
|
365
|
+
msg = 'The input lambda0 = {} nm is out of the range [250 nm, 1100 nm].'.format(lambda0)
|
|
366
|
+
raise Exception(msg)
|
|
367
|
+
|
|
368
|
+
return interp1d(np.array(beta_oxy_Friebel_dataframe)[:,0],
|
|
369
|
+
np.array(beta_oxy_Friebel_dataframe)[:,1])(lambda0)
|
|
370
|
+
|
|
371
|
+
def n_oxy_Friebel(lambda0, Cmass_oxy, n_wat_model = 'Segelstein'):
|
|
372
|
+
'''
|
|
373
|
+
| The refractive index of OXYHEMOGLOBIN solutions as a function of wavelength and
|
|
374
|
+
| oxyhemoglobin concentration.
|
|
375
|
+
| Calculated from the specific refractive increment :meth:`skinoptics.refractive_index.beta_oxy_Friebel`
|
|
376
|
+
| and the refractive index of water.
|
|
377
|
+
|
|
378
|
+
:math:`n_{oxy}(\lambda, C_{oxy}) = n_{wat}(\lambda) \mbox{ } [\\beta (\lambda) \mbox{ } C_{oxy} + 1]`
|
|
379
|
+
|
|
380
|
+
| wavelength range: [250 nm, 1100 nm]
|
|
381
|
+
| concentration range: [0 g/dL, 28.7 g/dL]
|
|
382
|
+
|
|
383
|
+
:param lambda0: wavelength [nm] (must be in the range [250., 1100.])
|
|
384
|
+
:type lambda0: float or np.ndarray
|
|
385
|
+
|
|
386
|
+
:param Cmass_oxy: oxyhemoglobin mass concentration [g/dL]
|
|
387
|
+
:type Cmass_oxy: float
|
|
388
|
+
|
|
389
|
+
:param n_wat_model: the user can choose one of the following... 'Hale' or 'Segelstein' (default to 'Segelstein')
|
|
390
|
+
:type n_wat_model: str
|
|
391
|
+
|
|
392
|
+
| 'Hale' refers to :meth:`skinoptics.refractive_index.n_wat_Hale`
|
|
393
|
+
| 'Segelstein' refers to :meth:`skinoptics.refractive_index.n_wat_Segelstein`
|
|
394
|
+
|
|
395
|
+
:return: - **n** (*float or array-like*) – refractive index [-]
|
|
396
|
+
'''
|
|
397
|
+
|
|
398
|
+
if Cmass_oxy < 0:
|
|
399
|
+
msg = 'The input Cmass_oxy = {} g/dL is not valid.'.format(Cmass_oxy)
|
|
400
|
+
raise Exception(msg)
|
|
401
|
+
if Cmass_oxy > 28.7:
|
|
402
|
+
msg = 'The input Cmass_oxy = {} g/dL is out of the concentration range [0 g/dL, 28.7 g/dL].'.format(Cmass_oxy)
|
|
403
|
+
warnings.warn(msg)
|
|
404
|
+
|
|
405
|
+
if n_wat_model == 'Hale':
|
|
406
|
+
n_wat_lambda0 = n_wat_Hale(lambda0)
|
|
407
|
+
elif n_wat_model == 'Segelstein':
|
|
408
|
+
n_wat_lambda0 = n_wat_Segelstein(lambda0)
|
|
409
|
+
else:
|
|
410
|
+
msg = 'The input n_wat_model = {} is not valid.'.format(n_wat_model)
|
|
411
|
+
raise Exception(msg)
|
|
412
|
+
|
|
413
|
+
return n_wat_lambda0*(beta_oxy_Friebel(lambda0)*Cmass_oxy + 1)
|