PyMieSim 3.6.0__cp312-cp312-macosx_14_0_arm64.whl → 3.6.2__cp312-cp312-macosx_14_0_arm64.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.
PyMieSim/_version.py CHANGED
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '3.6.0'
21
- __version_tuple__ = version_tuple = (3, 6, 0)
20
+ __version__ = version = '3.6.2'
21
+ __version_tuple__ = version_tuple = (3, 6, 2)
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -126,6 +126,59 @@ class BaseScatterer(units.UnitsValidation):
126
126
  """
127
127
  return self._cpp_get_fields(phi=phi, theta=theta, r=r.to_base_units().magnitude)
128
128
 
129
+ def get_s1s2_array(self, phi: numpy.ndarray) -> Tuple[numpy.ndarray, numpy.ndarray]:
130
+ """Return the S1 and S2 scattering amplitudes for arbitrary ``phi`` angles.
131
+
132
+ Parameters
133
+ ----------
134
+ phi : numpy.ndarray
135
+ Array of azimuthal angles in **radians** for which the scattering
136
+ amplitudes are computed.
137
+
138
+ Returns
139
+ -------
140
+ Tuple[numpy.ndarray, numpy.ndarray]
141
+ Arrays of ``S1`` and ``S2`` values evaluated at the supplied angles.
142
+ """
143
+
144
+ phi = numpy.atleast_1d(phi)
145
+ return self._cpp_get_s1s2(phi=phi + numpy.pi / 2)
146
+
147
+ def get_stokes_array(
148
+ self,
149
+ phi: numpy.ndarray,
150
+ theta: numpy.ndarray,
151
+ r: units.Quantity = 1 * units.meter
152
+ ) -> Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray]:
153
+ """Return the Stokes parameters for arbitrary ``phi`` and ``theta`` angles.
154
+
155
+ Parameters
156
+ ----------
157
+ phi : numpy.ndarray
158
+ Azimuthal angles in radians.
159
+ theta : numpy.ndarray
160
+ Polar angles in radians. Must be broadcastable with ``phi``.
161
+ r : units.Quantity, optional
162
+ Radial distance from the scatterer. Defaults to ``1 * meter``.
163
+
164
+ Returns
165
+ -------
166
+ Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray]
167
+ The ``I``, ``Q``, ``U`` and ``V`` Stokes parameters.
168
+ """
169
+
170
+ phi, theta = numpy.broadcast_arrays(phi, theta)
171
+
172
+ E_phi, E_theta = self.get_farfields_array(phi=phi, theta=theta, r=r)
173
+
174
+ intensity = numpy.abs(E_phi) ** 2 + numpy.abs(E_theta) ** 2
175
+ I = intensity / numpy.max(intensity)
176
+ Q = (numpy.abs(E_phi) ** 2 - numpy.abs(E_theta) ** 2) / intensity
177
+ U = (+2 * numpy.real(E_phi * E_theta.conjugate())) / intensity
178
+ V = (-2 * numpy.imag(E_phi * E_theta.conjugate())) / intensity
179
+
180
+ return I, Q, U, V
181
+
129
182
  def get_s1s2(self, sampling: int = 200, distance: units.Quantity = 1 * units.meter) -> S1S2:
130
183
  r"""
131
184
  Compute the S1 and S2 scattering amplitude functions for a spherical scatterer.
PyMieSim/units.py CHANGED
@@ -12,7 +12,7 @@ BASE_UNITS = [
12
12
  ]
13
13
 
14
14
  # Define prefixes for scaling units
15
- SCALES = ['nano', 'micro', 'milli', '', 'kilo', 'mega']
15
+ SCALES = ['nano', 'micro', 'milli', '', 'kilo', 'mega', 'giga', 'tera']
16
16
 
17
17
 
18
18
  def initialize_registry(ureg: Optional[object] = None):
lib/libZBessel.a CHANGED
Binary file
lib/lib_ZBessel.a CHANGED
Binary file
Binary file
lib/libcpp_coreshell.a CHANGED
Binary file
lib/libcpp_cylinder.a CHANGED
Binary file
lib/libcpp_sphere.a CHANGED
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: PyMieSim
3
- Version: 3.6.0
3
+ Version: 3.6.2
4
4
  Summary: A package for light scattering computation.
5
5
  Keywords: mie,scattering,backscatter,sphere,cylinder,nanoparticle,phase function,efficiency,rayleigh,backscattering
6
6
  Author-Email: Martin Poinsinet de Sivry-Houle <martin.poinsinet.de.sivry@gmail.com>
@@ -193,7 +193,7 @@ If you use PyMieSim in academic work, please cite:
193
193
 
194
194
  Contact
195
195
  -------
196
- For questions or contributions, contact `martin.poinsinet.de.sivry@gmail.ca <mailto:martin.poinsinet.de.sivry@gmail.ca>`_.
196
+ For questions or contributions, contact `martin.poinsinet.de.sivry@gmail.com <mailto:martin.poinsinet.de.sivry@gmail.com>`_.
197
197
 
198
198
  .. |logo| image:: https://github.com/MartinPdeS/PyMieSim/raw/master/docs/images/logo.png
199
199
  :alt: PyOptik logo
@@ -1,5 +1,9 @@
1
- PyMieSim/units.py,sha256=L7Trn8rW5d5AQK1_8I-XwaHGswXklupXs5wHgWQtJNQ,4224
2
- PyMieSim/_version.py,sha256=eic-6Xs9-9wocSdGZ3Qt8lkpGHJbspTaUymbZDQfBkA,511
1
+ pymiesim-3.6.2.dist-info/RECORD,,
2
+ pymiesim-3.6.2.dist-info/WHEEL,sha256=5ye47H9DCxgF2P1ZFb3v-Dd6T1guVxvcfwpP6gQdi98,114
3
+ pymiesim-3.6.2.dist-info/METADATA,sha256=yoziIyxY_OA6060JK0Mg1wOMjUdiAZ3dL6VRI73wYLk,9532
4
+ pymiesim-3.6.2.dist-info/licenses/LICENSE,sha256=-QSWDJghhVqbAzChmEK86liqPX_eeQFgdwlrKTLLcIA,1088
5
+ PyMieSim/units.py,sha256=v8fSnzYU6B7qEqkhFj5P2QofFV-qHJ3I1bTixgnG1fM,4240
6
+ PyMieSim/_version.py,sha256=NBUzwa2zr8t3-TKaVeP0ZYSkB9sd6Z52RcDA5GmYxv8,511
3
7
  PyMieSim/directories.py,sha256=ohe9qvjwN0IJ7OpZHsD7LxKYGMLr4CC7xYUGgWgw-Rg,648
4
8
  PyMieSim/__init__.py,sha256=ZRdkOFRqjkVCq0qQs4DHIFnAgkdtBr19gZaq1k6bzxw,453
5
9
  PyMieSim/mesh.py,sha256=WcX_rXpWxH7WDniIqaG4rPC-pfDm4AG9ZAX-zI8GbhU,14566
@@ -14,7 +18,7 @@ PyMieSim/single/source/base.py,sha256=HKqsEVw7caNV7ev8OVNPi3zMHc4cgGuhH9s2XcgvgB
14
18
  PyMieSim/single/source/gaussian.py,sha256=vVZ7UVkhlm2KvsTOf2uVcm9rjgXISSs7sv798m9otp4,4849
15
19
  PyMieSim/single/scatterer/__init__.py,sha256=2a9o-VHfqGloCEEbfIGSjLIIzWssRCt9W72AYvU2nSg,124
16
20
  PyMieSim/single/scatterer/core_shell.py,sha256=fqhu2PooEUDo7Vnotio7_iz2stozC5i5XczP8vdOKMs,5074
17
- PyMieSim/single/scatterer/base.py,sha256=CVVI8_nSgoF_BkEN0Fb_A61YHgMnKfOiKaKbe60NsD8,19701
21
+ PyMieSim/single/scatterer/base.py,sha256=0VKnDBvStQAXO4s4A1N2IJ76wTwSV23Fjd8PQ3Di9Fo,21624
18
22
  PyMieSim/single/scatterer/sphere.py,sha256=NVBP9iUX0pAPWdi13xbMzgLfllDPCgvF5BuJuWfUUec,3847
19
23
  PyMieSim/single/scatterer/cylinder.py,sha256=GNABjAb2csnWxANlIdJW7PhuuewJHMVAlzNmlfnz7eU,4062
20
24
  PyMieSim/single/detector/uncoherent.py,sha256=DOqf5hU5ghEhj8IooC5uJX6pjMwNBveIr-FzcWkgTLk,4848
@@ -67,35 +71,31 @@ PyMieSim/experiment/detector/coherent_mode.py,sha256=ME1CtxUfPY40E3HJoqJrW0ikje6
67
71
  PyMieSim/experiment/detector/__init__.py,sha256=pvtXHKR2pM7JOeTTcouKipeQwi0e8dZiZTpdAn9K2Ls,75
68
72
  PyMieSim/experiment/detector/base.py,sha256=j2yY_InLQDAPgDkM19ILlIEF-2koGMKRe9Hc-nFpyGc,7340
69
73
  PyMieSim/binary/interface_source.cpython-312-darwin.so,sha256=CQ8wPJrzmwAW9nnbhMUQD4KIpSSCuWP7kXfHDAoqBqY,240624
70
- PyMieSim/binary/interface_experiment.cpython-311-darwin.so,sha256=j-bh2Ec8tOKyVRCQwgYr5L5Xi4LWUJUFamhlT7N5vf4,491584
71
- PyMieSim/binary/interface_sets.cpython-312-darwin.so,sha256=OvqbheIrBafqIkepmA92exYqyQh_LvYngm7InIJ3M5s,595968
72
- PyMieSim/binary/interface_scatterer.cpython-312-darwin.so,sha256=YskPBQa5MBPGHkxIRZ5pQ_m3_5YMQKixbn97JIxMePA,576512
73
- PyMieSim/binary/libcpp_coordinates.a,sha256=SYrQ8xUeT5o5QpiXsZJVeuLK5F431C6UdLY1vQ6iAdg,22432
74
+ PyMieSim/binary/interface_experiment.cpython-311-darwin.so,sha256=GFJkP7rOWysGz9Z5FG97aHw3lJXp4BDka-MPCHh0Pes,491584
75
+ PyMieSim/binary/interface_sets.cpython-312-darwin.so,sha256=MVTlQVa14WgkaL1xp_oeyXDv4tXNH6jn-oaTomKCwnM,596304
76
+ PyMieSim/binary/interface_scatterer.cpython-312-darwin.so,sha256=04kfUnjl47JaG_Al9gEoEpv4H7DPGREwv0-IG_w-uvY,576800
77
+ PyMieSim/binary/libcpp_coordinates.a,sha256=lJYIdhQ9FAUUjEJCoijg5zbmTKxvQgbjCjhf2GXcpOo,22432
74
78
  PyMieSim/binary/interface_detector.cpython-312-darwin.so,sha256=zb-Fd5xUJ8boMJ-hrYYj-HmwaURdymcSfs00GBtTSlY,492336
75
- PyMieSim/binary/libcpp_source.a,sha256=gomZXYXL6fRvVke9VTtLuNB5hT1N27WT-OwGegcAfIA,6720
76
- PyMieSim/binary/interface_experiment.cpython-310-darwin.so,sha256=4fBEUHQlYLuesrGM45q23MiGDHJ2SC6D6OyuFhS1kT8,474976
79
+ PyMieSim/binary/libcpp_source.a,sha256=ADEsR-0ez1YaIcZ4D5iCEQsl_bu7ESVQUHrCdO0_Ipg,6720
80
+ PyMieSim/binary/interface_experiment.cpython-310-darwin.so,sha256=YvN2RCpQBfmSl6Z4CbvbW3JaFCme0mXgy_A6Jr5z-eY,474976
77
81
  PyMieSim/binary/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
78
82
  PyMieSim/binary/interface_detector.cpython-311-darwin.so,sha256=lh_RCWgRN4R1wKI3q-tWLtC_8666eV09V3H0qafR0q8,492336
79
83
  PyMieSim/binary/interface_source.cpython-310-darwin.so,sha256=WKhrAqfJWndYN1ACTmjnD7W4qHu0OPZiE4kK7Zu-de0,240624
80
- PyMieSim/binary/libcpp_fibonacci.a,sha256=9LZ1QjH6OFxOU-8AGBZs52-H5XrJuA3737jweXAC39o,14160
81
- PyMieSim/binary/interface_sets.cpython-310-darwin.so,sha256=67faOdm74RVKsEq-bRptcZTtagRfYbSdRkAW9njxtJ0,579360
82
- PyMieSim/binary/libcpp_experiment.a,sha256=uN2gy7eq7sm8zsr_8KrtIB7n8BNEYtPRqYCx9tIG3H4,173480
83
- PyMieSim/binary/libcpp_mode_field.a,sha256=L4UN-s6OSetr4iEfD_4rj-qbUROwsUJe_RNT8k13hTc,10960
84
- PyMieSim/binary/interface_scatterer.cpython-310-darwin.so,sha256=UdqKQyH0KUkGlW1PIz891BnfDiUQ08QqHRDcDQda4MI,559936
84
+ PyMieSim/binary/libcpp_fibonacci.a,sha256=6vOj45UGKPsw9yDPrxXo96Jz0jVp2HlBqt_UJQpsG_Y,14160
85
+ PyMieSim/binary/interface_sets.cpython-310-darwin.so,sha256=Visa5KodgbNq4SpOAZ5JD5eRz7Q1FZgXqNGyG1pEwSQ,579632
86
+ PyMieSim/binary/libcpp_experiment.a,sha256=c_DI6TfmA4yFLVukGnkkQDMNbxrGJjpL56Rm_dOMYMU,173480
87
+ PyMieSim/binary/libcpp_mode_field.a,sha256=y0W1_neR3E42VHF2i4UK-hkWI9ob3LVAp8O6LFlHXbw,10960
88
+ PyMieSim/binary/interface_scatterer.cpython-310-darwin.so,sha256=9jv04bzud0oVFQ0NsGN15s9kMrrzWAjTpI9blkNunJ8,560224
85
89
  PyMieSim/binary/interface_detector.cpython-310-darwin.so,sha256=Cm8QqjfgCodblQQfRTFgh9kTxYMmS-D55E_w7ND4N9o,475776
86
90
  PyMieSim/binary/interface_source.cpython-311-darwin.so,sha256=8ZwlKEMALhwE8u7vvSH_LlEpimsPcQtB8BnubLyKW0M,240624
87
- PyMieSim/binary/interface_sets.cpython-311-darwin.so,sha256=4rRbWfSR1jQ1cF328qHIfYZN1em6sJMr3pbGw9wHALo,579440
88
- PyMieSim/binary/interface_experiment.cpython-312-darwin.so,sha256=suJQTGXWhS5aJb9xYpQQi23CY3vrVqmiLUTbp0867kE,491584
89
- PyMieSim/binary/libcpp_sets.a,sha256=WEM1y-A6JCgCdGNqZGed5YMnf2OO3t5on3r9LUYhQuI,173472
90
- PyMieSim/binary/interface_scatterer.cpython-311-darwin.so,sha256=W9qVZz9zvi4cRU_GgqMMQnxsx6KhKQ5cx3IaUxynYI8,576512
91
- PyMieSim/binary/libcpp_detector.a,sha256=YXmmr8QooypEZX8vQN1V5XgLfrI3-toTEK_IbmGttHE,200752
92
- pymiesim-3.6.0.dist-info/RECORD,,
93
- pymiesim-3.6.0.dist-info/WHEEL,sha256=5ye47H9DCxgF2P1ZFb3v-Dd6T1guVxvcfwpP6gQdi98,114
94
- pymiesim-3.6.0.dist-info/METADATA,sha256=NLH1cmL-XPL5EVHrCZuT_ZTIbYMT-jqEMJlNV92L1PQ,9530
95
- pymiesim-3.6.0.dist-info/licenses/LICENSE,sha256=-QSWDJghhVqbAzChmEK86liqPX_eeQFgdwlrKTLLcIA,1088
96
- lib/libcpp_cylinder.a,sha256=tb4OEgUYhYqlBsoCoEQwDQl99RTTnDCzUEpj_9Jb0zA,186504
97
- lib/libcpp_sphere.a,sha256=MEhipYsfkJdH3d7UOCkzH8Ho3lHs5QbYnxD4WlfFPHs,197768
98
- lib/libZBessel.a,sha256=7IO-fFXh5Ji_8BIGKp2_0GN7Mnho0mvYZ7LZxrK4GCI,106200
99
- lib/lib_ZBessel.a,sha256=3XOCg3vvzB2xw-bN9CDXWcyCaNLToBf2zoUl47whuck,9840
100
- lib/libcpp_coreshell.a,sha256=cjNemyuRyNr0fh8FEQnF3h1pvjctphR1oXSQxWjRje8,196584
101
- lib/libcpp_base_scatterer.a,sha256=nN4lBF5Y4g68s8RQi1G39O3U3XoH8wpdiDqCU99HBZw,197152
91
+ PyMieSim/binary/interface_sets.cpython-311-darwin.so,sha256=LkDJ3m4atitgTZFnorzql4C0sISSSZ8FVyEMJIDAfw0,579776
92
+ PyMieSim/binary/interface_experiment.cpython-312-darwin.so,sha256=rliIkpNrvIRf2ZwyDITw4XLYBzRZ8Spa_h5JEdgyy-Q,491584
93
+ PyMieSim/binary/libcpp_sets.a,sha256=td6UU2RG2Z9N4BPz4z97pzY7wiX3JQfR-9R75S2v-B4,173472
94
+ PyMieSim/binary/interface_scatterer.cpython-311-darwin.so,sha256=L74jfmT-dNnZzxdoTxvdLlxALfKS5e_4A0NCYeyv7Es,576800
95
+ PyMieSim/binary/libcpp_detector.a,sha256=Rn5RJZtaQ3ERq04KS346vB9vVK-7sfOb0T24b0IFDaI,200752
96
+ lib/libcpp_cylinder.a,sha256=cCospD7WI3m_eG3kJZ-Xd6MV6gFHwS-eQRw_h7Z8-AA,186952
97
+ lib/libcpp_sphere.a,sha256=DWsaiVHvjdQwmHwUUz6rzdxH76wcxU0tFYug_m5QbmM,198456
98
+ lib/libZBessel.a,sha256=i8EWcw7YhnL6phX8BhjoWrSX_S032CxfT7oL7xDzt00,106200
99
+ lib/lib_ZBessel.a,sha256=gOY14DKuSKcozkmKFAJulkrdQd2ZXHjOjwPdJCyYeY0,9840
100
+ lib/libcpp_coreshell.a,sha256=jhg01oaH-mfRpYjYyUFDUPZnaOpwnZs0qBpyIy8pR6E,197672
101
+ lib/libcpp_base_scatterer.a,sha256=AJmdJTbXu0HVxezWPFc6hrvr0wqSDI42z_28IGERQSY,197152