skinoptics 0.0.1b6__py3-none-any.whl → 0.0.1b8__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 CHANGED
@@ -1,5 +1,5 @@
1
1
  '''
2
- Copyright (C) 2024 Victor Lima
2
+ Copyright (C) 2024-2025 Victor Lima
3
3
 
4
4
  | This program is free software: you can redistribute it and/or modify
5
5
  | it under the terms of the GNU General Public License as published by
@@ -17,11 +17,12 @@ Copyright (C) 2024 Victor Lima
17
17
  | Victor Lima
18
18
  | victorporto\@ifsc.usp.br
19
19
  | victor.lima\@ufscar.br
20
+ | victorportog.github.io
20
21
 
21
- | Release Date:
22
- | October 2024
23
- | Last Modification:
22
+ | Release date:
24
23
  | October 2024
24
+ | Last modification:
25
+ | March 2025
25
26
 
26
27
  | Version History:
27
28
  | available at <https://pypi.org/project/skinoptics/#history>
@@ -35,7 +36,7 @@ __all__ = ['utils', 'dataframes',
35
36
  __version__major = '0'
36
37
  __version__minor = '0'
37
38
  __version__micro = '1'
38
- __version__suffix = 'b6'
39
+ __version__suffix = 'b8'
39
40
 
40
41
  __author__ = "Victor Lima"
41
42
  __copyright__ = "Copyright (c) 2024-2025 Victor Lima"
@@ -1,6 +1,6 @@
1
1
  '''
2
2
  | SkinOptics
3
- | Copyright (C) 2024 Victor Lima
3
+ | Copyright (C) 2024-2025 Victor Lima
4
4
 
5
5
  | This program is free software: you can redistribute it and/or modify
6
6
  | it under the terms of the GNU General Public License as published by
@@ -18,10 +18,11 @@
18
18
  | Victor Lima
19
19
  | victorporto\@ifsc.usp.br
20
20
  | victor.lima\@ufscar.br
21
+ | victorportog.github.io
21
22
 
22
- | Release Date:
23
+ | Release date:
23
24
  | October 2024
24
- | Last Modification:
25
+ | Last modification:
25
26
  | October 2024
26
27
 
27
28
  | References:
@@ -1,6 +1,6 @@
1
1
  '''
2
2
  | SkinOptics
3
- | Copyright (C) 2024 Victor Lima
3
+ | Copyright (C) 2024-2025 Victor Lima
4
4
 
5
5
  | This program is free software: you can redistribute it and/or modify
6
6
  | it under the terms of the GNU General Public License as published by
@@ -18,11 +18,12 @@
18
18
  | Victor Lima
19
19
  | victorporto\@ifsc.usp.br
20
20
  | victor.lima\@ufscar.br
21
+ | victorportog.github.io
21
22
 
22
- | Release Date:
23
+ | Release date:
23
24
  | October 2024
24
- | Last Modification:
25
- | October 2025
25
+ | Last modification:
26
+ | March 2025
26
27
 
27
28
  | References:
28
29
 
@@ -394,7 +395,7 @@ def ptheta_TTU2(theta, g1, g2, gamma):
394
395
 
395
396
  return gamma*ptheta_U2(theta = theta, g = g1) + (1 - gamma)*ptheta_U2(theta = theta, g = g2)
396
397
 
397
- def theta_R_from_RND(n_RND = int(1E6)):
398
+ def theta_R_from_RND(n_RND = int(1E6), seed_RND = None):
398
399
  r'''
399
400
  | The scattering angle distribution as a function of a set of random numbers uniformly
400
401
  | distributed over the interval [0, 1), assuming the Rayleigh scattering phase function.
@@ -402,17 +403,21 @@ def theta_R_from_RND(n_RND = int(1E6)):
402
403
 
403
404
  | :math:`\theta_{R} = \mbox{arccos}(\sqrt[3]{u + v} + \sqrt[3]{u - v})`
404
405
  | with
405
- | :math:`u = -2(2 \chi - 1)`
406
- | :math:`v = \sqrt{4(2 \chi - 1)^2 + 1}`
407
- | in which :math:`\chi` is a random number in the interval [0, 1)
406
+ | :math:`u = -2(2 \xi - 1)`
407
+ | :math:`v = \sqrt{4(2 \xi - 1)^2 + 1}`
408
+ | in which :math:`\xi` is a random number in the interval [0, 1)
408
409
 
409
410
  :param n_RND: number of random numbers [-] (default to int(1E6))
410
411
  :type n_RND: int
412
+
413
+ :param seed_RND: seed for the random number generator np.random.default_rng() [-] (default to None)
414
+ :type seed_RND: int
411
415
 
412
416
  :return: - **theta** (*np.ndarray*) – scattering angle [degrees]
413
417
  '''
414
418
 
415
- xi = np.random.rand(n_RND)
419
+ rng = np.random.default_rng(seed = seed_RND)
420
+ xi = rng.uniform(0., 1., size = n_RND)
416
421
  two_times_xi_minus_one = 2*xi - 1
417
422
  term1 = -2*two_times_xi_minus_one
418
423
  term2 = np.sqrt(4*two_times_xi_minus_one**2 + 1)
@@ -420,7 +425,7 @@ def theta_R_from_RND(n_RND = int(1E6)):
420
425
  return np.arccos(np.cbrt(term1 + term2) + np.cbrt(term1 - term2))*180/np.pi
421
426
 
422
427
 
423
- def theta_HG_from_RND(g, n_RND = int(1E6)):
428
+ def theta_HG_from_RND(g, n_RND = int(1E6), seed_RND = None):
424
429
  r'''
425
430
  | The scattering angle distribution as a function of the anisotropy factor and a set of random
426
431
  | numbers uniformly distributed over the interval [0, 1), assuming the Henyey-Greenstein
@@ -429,11 +434,11 @@ def theta_HG_from_RND(g, n_RND = int(1E6)):
429
434
 
430
435
  :math:`\theta_{HG} =
431
436
  \left \{ \begin{matrix}
432
- \mbox{arccos}(2 \chi - 1) , & \mbox{if } g = 0 \\
433
- \mbox{arccos}\left\{\frac{1}{2g} \left[1 + g^2 - \left(\frac{1 - g^2}{1 - g + 2g \chi}\right)^2\right]\right\}, & \mbox{if } g \ne 0
437
+ \mbox{arccos}(2 \xi - 1) , & \mbox{if } g = 0 \\
438
+ \mbox{arccos}\left\{\frac{1}{2g} \left[1 + g^2 - \left(\frac{1 - g^2}{1 - g + 2g \xi}\right)^2\right]\right\}, & \mbox{if } g \ne 0
434
439
  \end{matrix} \right.`
435
440
 
436
- in which :math:`\chi` is a random number in the interval [0, 1)
441
+ in which :math:`\xi` is a random number in the interval [0, 1)
437
442
 
438
443
  In this particular model :math:`g` is the anisotropy factor.
439
444
 
@@ -442,6 +447,9 @@ def theta_HG_from_RND(g, n_RND = int(1E6)):
442
447
 
443
448
  :param n_RND: number of random numbers [-] (default to int(1E6))
444
449
  :type n_RND: int
450
+
451
+ :param seed_RND: seed for the random number generator np.random.default_rng() [-] (default to None)
452
+ :type seed_RND: int
445
453
 
446
454
  :return: - **theta** (*np.ndarray*) – scattering angle [degrees]
447
455
  '''
@@ -450,7 +458,8 @@ def theta_HG_from_RND(g, n_RND = int(1E6)):
450
458
  msg = 'The input g = {} is out of the range [-1, 1].'.format(g)
451
459
  raise Exception(msg)
452
460
 
453
- xi = np.random.rand(n_RND)
461
+ rng = np.random.default_rng(seed = seed_RND)
462
+ xi = rng.uniform(0., 1., size = n_RND)
454
463
  if g == 0:
455
464
  theta_HG = np.arccos(2*xi - 1)*180./np.pi
456
465
  else:
@@ -465,9 +474,9 @@ def theta_U2_from_RND(g, n_RND = int(1E6)):
465
474
  | scattering phase function.
466
475
  | For details please check section 4.4.2 from Baes, Camps & Kapoor 2022 [BCK22].
467
476
 
468
- :math:`\theta_{U2} = arccos\left[\frac{(1 + g)^2 - 2 \chi (1 + g^2)}{(1 + g)^2 - 4g \chi}\right]`
477
+ :math:`\theta_{U2} = arccos\left[\frac{(1 + g)^2 - 2 \xi (1 + g^2)}{(1 + g)^2 - 4g \xi}\right]`
469
478
 
470
- in which :math:`\chi` is a random number in the interval [0, 1)
479
+ in which :math:`\xi` is a random number in the interval [0, 1)
471
480
 
472
481
  | In this model :math:`g` is NOT the anisotropy factor.
473
482
 
@@ -476,11 +485,15 @@ def theta_U2_from_RND(g, n_RND = int(1E6)):
476
485
 
477
486
  :param n_RND: number of random numbers [-] (default to int(1E6))
478
487
  :type n_RND: int
488
+
489
+ :param seed_RND: seed for the random number generator np.random.default_rng() [-] (default to None)
490
+ :type seed_RND: int
479
491
 
480
492
  :return: - **theta** (*np.ndarray*) – scattering angle [degrees]
481
493
  '''
482
494
 
483
- xi = np.random.rand(n_RND)
495
+ rng = np.random.default_rng(seed = seed_RND)
496
+ xi = rng.uniform(0., 1., size = n_RND)
484
497
 
485
498
  return np.arccos(((1 + g)**2 - 2*xi*(1 + g**2))/((1 + g)**2 - 4*g*xi))*180./np.pi
486
499
 
skinoptics/colors.py CHANGED
@@ -1,6 +1,6 @@
1
1
  '''
2
2
  | SkinOptics
3
- | Copyright (C) 2024 Victor Lima
3
+ | Copyright (C) 2024-2025 Victor Lima
4
4
 
5
5
  | This program is free software: you can redistribute it and/or modify
6
6
  | it under the terms of the GNU General Public License as published by
@@ -18,10 +18,11 @@
18
18
  | Victor Lima
19
19
  | victorporto\@ifsc.usp.br
20
20
  | victor.lima\@ufscar.br
21
+ | victorportog.github.io
21
22
 
22
- | Release Date:
23
+ | Release date:
23
24
  | October 2024
24
- | Last Modification:
25
+ | Last modification:
25
26
  | October 2024
26
27
 
27
28
  | References:
skinoptics/dataframes.py CHANGED
@@ -1,6 +1,6 @@
1
1
  '''
2
2
  | SkinOptics
3
- | Copyright (C) 2024 Victor Lima
3
+ | Copyright (C) 2024-2025 Victor Lima
4
4
 
5
5
  | This program is free software: you can redistribute it and/or modify
6
6
  | it under the terms of the GNU General Public License as published by
@@ -18,10 +18,11 @@
18
18
  | Victor Lima
19
19
  | victorporto\@ifsc.usp.br
20
20
  | victor.lima\@ufscar.br
21
+ | victorportog.github.io
21
22
 
22
- | Release Date:
23
+ | Release date:
23
24
  | October 2024
24
- | Last Modification:
25
+ | Last modification:
25
26
  | March 2025
26
27
 
27
28
  | Example:
@@ -1,6 +1,6 @@
1
1
  '''
2
2
  | SkinOptics
3
- | Copyright (C) 2024 Victor Lima
3
+ | Copyright (C) 2024-2025 Victor Lima
4
4
 
5
5
  | This program is free software: you can redistribute it and/or modify
6
6
  | it under the terms of the GNU General Public License as published by
@@ -18,10 +18,11 @@
18
18
  | Victor Lima
19
19
  | victorporto\@ifsc.usp.br
20
20
  | victor.lima\@ufscar.br
21
+ | victorportog.github.io
21
22
 
22
- | Release Date:
23
+ | Release date:
23
24
  | October 2024
24
- | Last Modification:
25
+ | Last modification:
25
26
  | March 2025
26
27
 
27
28
  | References:
@@ -1,6 +1,6 @@
1
1
  '''
2
2
  | SkinOptics
3
- | Copyright (C) 2024 Victor Lima
3
+ | Copyright (C) 2024-2025 Victor Lima
4
4
 
5
5
  | This program is free software: you can redistribute it and/or modify
6
6
  | it under the terms of the GNU General Public License as published by
@@ -18,10 +18,11 @@
18
18
  | Victor Lima
19
19
  | victorporto\@ifsc.usp.br
20
20
  | victor.lima\@ufscar.br
21
+ | victorportog.github.io
21
22
 
22
- | Release Date:
23
+ | Release date:
23
24
  | October 2024
24
- | Last Modification:
25
+ | Last modification:
25
26
  | October 2024
26
27
 
27
28
  | References:
skinoptics/utils.py CHANGED
@@ -1,6 +1,6 @@
1
1
  '''
2
2
  | SkinOptics
3
- | Copyright (C) 2024 Victor Lima
3
+ | Copyright (C) 2024-2025 Victor Lima
4
4
 
5
5
  | This program is free software: you can redistribute it and/or modify
6
6
  | it under the terms of the GNU General Public License as published by
@@ -18,10 +18,11 @@
18
18
  | Victor Lima
19
19
  | victorporto\@ifsc.usp.br
20
20
  | victor.lima\@ufscar.br
21
+ | victorportog.github.io
21
22
 
22
- | Release Date:
23
+ | Release date:
23
24
  | October 2024
24
- | Last Modification:
25
+ | Last modification:
25
26
  | October 2024
26
27
 
27
28
  | References:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: skinoptics
3
- Version: 0.0.1b6
3
+ Version: 0.0.1b8
4
4
  Summary: SkinOptics: a python package with tools for building human skin computational models for Monte Carlo simulations of light transport
5
5
  Author-email: Victor Lima <victorporto@ifsc.usp.br>
6
6
  Project-URL: Homepage, https://github.com/victorportog/skinoptics
@@ -1,11 +1,11 @@
1
- skinoptics/__init__.py,sha256=nOnK6ysDy0kcY2coRiHN6dW63XDVC64b3QD_sup6Vbg,1544
2
- skinoptics/absorption_coefficient.py,sha256=2CnxVqR_Ah5t6T3jZ7UXOvff7WTxLNZcbw6akk4zCM4,36261
3
- skinoptics/anisotropy_factor.py,sha256=VU2L0mUBnXxDWhXnnF6t5pzmNT-9h0ubVM8QbOgF_jo,37941
4
- skinoptics/colors.py,sha256=xRYlsX4WIfibACAYnY_jIqcO6VORgsSsewXCr_j0mn8,56728
5
- skinoptics/dataframes.py,sha256=oSB8TIplsskYK8Nes3BnyduC_odFQ6oseojgb3FN8zU,6454
6
- skinoptics/refractive_index.py,sha256=IN8_rTb7cpdYZnUwxGlYLSM5Vnn_-QVRPoQbc6yEw-w,14963
7
- skinoptics/scattering_coefficient.py,sha256=w7mAmR3P5CoEvhg_7cqwZh1TSAN1mUtfat1uYIR6i2Q,15214
8
- skinoptics/utils.py,sha256=H53ZxsTErP8gpgR5VK1j-DuoO7JTFK1qpW7NYpq9QWw,10868
1
+ skinoptics/__init__.py,sha256=-M2YualclZt5UL2jVzxUCT3Omok7IYVlf4snsAJaXZo,1572
2
+ skinoptics/absorption_coefficient.py,sha256=f5mKTqgEiXKk0MDhPyL6t3w3jPDriJqI3R65U8mZNy8,36292
3
+ skinoptics/anisotropy_factor.py,sha256=lSPJtMkvo7KKTQA3JE58N_VwPmKrw4J1ahf_OBPEDQA,38577
4
+ skinoptics/colors.py,sha256=mUAQOyLiwM-PnLjDLNSz7Lt57iRBawXutsDxDwNMY4g,56759
5
+ skinoptics/dataframes.py,sha256=EMN1Cr0gJu0TM5fZJTP5qk8Dfu5VqvhnxUq5mcS2zQQ,6485
6
+ skinoptics/refractive_index.py,sha256=1zuSNIjy3KkbPH30YNbkPosASENTBtkxym8IML0Uy0A,14994
7
+ skinoptics/scattering_coefficient.py,sha256=3rsbwkqD2OeHfmu9z8bEGCBJ1RTjKzPV9fSu78gtrco,15244
8
+ skinoptics/utils.py,sha256=qjBM3B9mTIPsYZNvt4u32rd96mnn4bovOoZfA6Y7aNA,10899
9
9
  skinoptics/datasets/colors/Lab_Alaluf2002.txt,sha256=PEmAPud84qe7U7V0kQliYvPwng3NuT-9qKLqabQWMYo,610
10
10
  skinoptics/datasets/colors/Lab_Xiao2017.txt,sha256=fx7y84PN5OFSDH6Z4rUNML6U8QOnHDr7MTWoxvNFBRs,903
11
11
  skinoptics/datasets/colors/cmfs.txt,sha256=q4Veg2SoCipCBRj2DL5pSzEH5RW4YORUmXxyVytB7KE,44381
@@ -37,8 +37,8 @@ skinoptics/datasets/optical_properties/n_and_k_wat_Segelstein.txt,sha256=EZIS515
37
37
  skinoptics/datasets/optical_properties/oxy_and_deo_Bosschaart.txt,sha256=eF96Ao44TDUYRo6-8p0L7I9Q8h6wLNpEUyrcbo7FySA,24972
38
38
  skinoptics/datasets/spectra/Xiao2016/skindatabaseSpectra/readmeSpectra.docx,sha256=ren4htGe154BIlBridkvBvbc8AYY1RRmp4CVICYwDvc,15147
39
39
  skinoptics/datasets/spectra/Xiao2016/skindatabaseSpectra/skin spectra data.xlsx,sha256=z7shS1rZzqpaRGi_Ji0nYcSzIxEmADQOtaJ_Uwcotcc,1434709
40
- skinoptics-0.0.1b6.dist-info/licenses/LICENSE.txt,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
41
- skinoptics-0.0.1b6.dist-info/METADATA,sha256=gpksH_TZve1pao8T6OP1b6Bed9cvILL80IN9q-Dtatk,1324
42
- skinoptics-0.0.1b6.dist-info/WHEEL,sha256=tTnHoFhvKQHCh4jz3yCn0WPTYIy7wXx3CJtJ7SJGV7c,91
43
- skinoptics-0.0.1b6.dist-info/top_level.txt,sha256=4NYJW3uliYlvbd-Zywg2MxJOGe4wYA7Oz_I5EZF4YEQ,11
44
- skinoptics-0.0.1b6.dist-info/RECORD,,
40
+ skinoptics-0.0.1b8.dist-info/licenses/LICENSE.txt,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
41
+ skinoptics-0.0.1b8.dist-info/METADATA,sha256=6QgcxQ3fpJMWUZnjX7CIhunP90jZU_v56WDc8s7BzNo,1324
42
+ skinoptics-0.0.1b8.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
43
+ skinoptics-0.0.1b8.dist-info/top_level.txt,sha256=4NYJW3uliYlvbd-Zywg2MxJOGe4wYA7Oz_I5EZF4YEQ,11
44
+ skinoptics-0.0.1b8.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (77.0.1)
2
+ Generator: setuptools (77.0.3)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5