PyMieSim 3.6.0__cp313-cp313-macosx_14_0_arm64.whl → 3.6.2__cp313-cp313-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.
Files changed (32) hide show
  1. PyMieSim/_version.py +2 -2
  2. PyMieSim/binary/interface_experiment.cpython-310-darwin.so +0 -0
  3. PyMieSim/binary/interface_experiment.cpython-311-darwin.so +0 -0
  4. PyMieSim/binary/interface_experiment.cpython-312-darwin.so +0 -0
  5. PyMieSim/binary/interface_experiment.cpython-313-darwin.so +0 -0
  6. PyMieSim/binary/interface_scatterer.cpython-310-darwin.so +0 -0
  7. PyMieSim/binary/interface_scatterer.cpython-311-darwin.so +0 -0
  8. PyMieSim/binary/interface_scatterer.cpython-312-darwin.so +0 -0
  9. PyMieSim/binary/interface_scatterer.cpython-313-darwin.so +0 -0
  10. PyMieSim/binary/interface_sets.cpython-310-darwin.so +0 -0
  11. PyMieSim/binary/interface_sets.cpython-311-darwin.so +0 -0
  12. PyMieSim/binary/interface_sets.cpython-312-darwin.so +0 -0
  13. PyMieSim/binary/interface_sets.cpython-313-darwin.so +0 -0
  14. PyMieSim/binary/libcpp_coordinates.a +0 -0
  15. PyMieSim/binary/libcpp_detector.a +0 -0
  16. PyMieSim/binary/libcpp_experiment.a +0 -0
  17. PyMieSim/binary/libcpp_fibonacci.a +0 -0
  18. PyMieSim/binary/libcpp_mode_field.a +0 -0
  19. PyMieSim/binary/libcpp_sets.a +0 -0
  20. PyMieSim/binary/libcpp_source.a +0 -0
  21. PyMieSim/single/scatterer/base.py +53 -0
  22. PyMieSim/units.py +1 -1
  23. lib/libZBessel.a +0 -0
  24. lib/lib_ZBessel.a +0 -0
  25. lib/libcpp_base_scatterer.a +0 -0
  26. lib/libcpp_coreshell.a +0 -0
  27. lib/libcpp_cylinder.a +0 -0
  28. lib/libcpp_sphere.a +0 -0
  29. {pymiesim-3.6.0.dist-info → pymiesim-3.6.2.dist-info}/METADATA +2 -2
  30. {pymiesim-3.6.0.dist-info → pymiesim-3.6.2.dist-info}/RECORD +32 -32
  31. {pymiesim-3.6.0.dist-info → pymiesim-3.6.2.dist-info}/WHEEL +0 -0
  32. {pymiesim-3.6.0.dist-info → pymiesim-3.6.2.dist-info}/licenses/LICENSE +0 -0
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=_wdnp6N2S4se9FSmG8Grxw-01KRCMKjjAi2kFwM0M4I,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
@@ -68,39 +72,35 @@ PyMieSim/experiment/detector/__init__.py,sha256=pvtXHKR2pM7JOeTTcouKipeQwi0e8dZi
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
74
  PyMieSim/binary/interface_detector.cpython-313-darwin.so,sha256=_J_R1Z8lu8dfS0zLtzU7m1dOKISoApLKjPo5GoFwXlA,492592
71
- PyMieSim/binary/interface_experiment.cpython-311-darwin.so,sha256=j-bh2Ec8tOKyVRCQwgYr5L5Xi4LWUJUFamhlT7N5vf4,491584
72
- PyMieSim/binary/interface_sets.cpython-312-darwin.so,sha256=OvqbheIrBafqIkepmA92exYqyQh_LvYngm7InIJ3M5s,595968
73
- PyMieSim/binary/interface_scatterer.cpython-312-darwin.so,sha256=YskPBQa5MBPGHkxIRZ5pQ_m3_5YMQKixbn97JIxMePA,576512
74
- PyMieSim/binary/libcpp_coordinates.a,sha256=JF0rPWiu7e4IvItQgWMAZ1s-8uYHsJI2vTc76yHcdxo,22432
75
+ PyMieSim/binary/interface_experiment.cpython-311-darwin.so,sha256=GFJkP7rOWysGz9Z5FG97aHw3lJXp4BDka-MPCHh0Pes,491584
76
+ PyMieSim/binary/interface_sets.cpython-312-darwin.so,sha256=MVTlQVa14WgkaL1xp_oeyXDv4tXNH6jn-oaTomKCwnM,596304
77
+ PyMieSim/binary/interface_scatterer.cpython-312-darwin.so,sha256=04kfUnjl47JaG_Al9gEoEpv4H7DPGREwv0-IG_w-uvY,576800
78
+ PyMieSim/binary/libcpp_coordinates.a,sha256=gm4ED1_wv54-75kAILdMIddCOmer9hBR-8nF-uA3I3c,22432
75
79
  PyMieSim/binary/interface_source.cpython-313-darwin.so,sha256=fIG-_MNdIlDlA01hhBWpUNxCKOTTK66yhHiIiU2IQ1U,240864
76
80
  PyMieSim/binary/interface_detector.cpython-312-darwin.so,sha256=zb-Fd5xUJ8boMJ-hrYYj-HmwaURdymcSfs00GBtTSlY,492336
77
- PyMieSim/binary/libcpp_source.a,sha256=eCtn6C7ikdkcVKHYMjA5fbjZvErko1JiyUGjRv6PU4U,6720
78
- PyMieSim/binary/interface_experiment.cpython-310-darwin.so,sha256=4fBEUHQlYLuesrGM45q23MiGDHJ2SC6D6OyuFhS1kT8,474976
79
- PyMieSim/binary/interface_sets.cpython-313-darwin.so,sha256=khK4bZiYVH795MWaDKlHSLgNHqegeOC_w6O9f-NLB2E,596256
80
- PyMieSim/binary/interface_scatterer.cpython-313-darwin.so,sha256=xgx7mGN20uy_u4WGOHyXZRLnrQORe17o0k3vdlHwn9c,576752
81
+ PyMieSim/binary/libcpp_source.a,sha256=K58kzkefPfqKvesoUupATJul4cskxrHwK6C-YS3j8Vg,6720
82
+ PyMieSim/binary/interface_experiment.cpython-310-darwin.so,sha256=YvN2RCpQBfmSl6Z4CbvbW3JaFCme0mXgy_A6Jr5z-eY,474976
83
+ PyMieSim/binary/interface_sets.cpython-313-darwin.so,sha256=_kO_8U3GZBvVBIVvsBpKrwzwEnRgtIqRSdKR4EsTDSU,596544
84
+ PyMieSim/binary/interface_scatterer.cpython-313-darwin.so,sha256=_jLjC5qd6Jp6cTTeHwVJJxDpBxUtMEm6IBphB4uV_kg,577040
81
85
  PyMieSim/binary/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
82
86
  PyMieSim/binary/interface_detector.cpython-311-darwin.so,sha256=lh_RCWgRN4R1wKI3q-tWLtC_8666eV09V3H0qafR0q8,492336
83
87
  PyMieSim/binary/interface_source.cpython-310-darwin.so,sha256=WKhrAqfJWndYN1ACTmjnD7W4qHu0OPZiE4kK7Zu-de0,240624
84
- PyMieSim/binary/libcpp_fibonacci.a,sha256=JV1VxGz_S_jn4S-ov6oDJ3eaw7AXVISG1HxSaXhr2p8,14160
85
- PyMieSim/binary/interface_sets.cpython-310-darwin.so,sha256=67faOdm74RVKsEq-bRptcZTtagRfYbSdRkAW9njxtJ0,579360
86
- PyMieSim/binary/libcpp_experiment.a,sha256=A8LnPFH62-Xy48vb-WWDaT7FgfGqhRV1gJcCeWtGYoY,172960
87
- PyMieSim/binary/interface_experiment.cpython-313-darwin.so,sha256=p_N_r_jKmN1_wKuumGD25cIFXQh6rXZZGQ15aHjB_cg,491824
88
- PyMieSim/binary/libcpp_mode_field.a,sha256=1JYKKeZ6sCW-07MdudTk3hldvvGPT3Nzwx2Y8Xna6SM,10960
89
- PyMieSim/binary/interface_scatterer.cpython-310-darwin.so,sha256=UdqKQyH0KUkGlW1PIz891BnfDiUQ08QqHRDcDQda4MI,559936
88
+ PyMieSim/binary/libcpp_fibonacci.a,sha256=yuhaAzJZph4jKSndN46r3IwP4X0Qe8o0ycrjXnPHWbE,14160
89
+ PyMieSim/binary/interface_sets.cpython-310-darwin.so,sha256=Visa5KodgbNq4SpOAZ5JD5eRz7Q1FZgXqNGyG1pEwSQ,579632
90
+ PyMieSim/binary/libcpp_experiment.a,sha256=mYuFXPM5Y43eNmcCH1B-fXtunQdxx36a5fLfj8c1FaQ,172960
91
+ PyMieSim/binary/interface_experiment.cpython-313-darwin.so,sha256=OTbaf5_Dr-5Z-8aY4UcXNm9q-D6S0ekI05fhIa_wt-E,491824
92
+ PyMieSim/binary/libcpp_mode_field.a,sha256=M62RDFL14y7t0pTjqzvbb5I3n16t3lxA881jDEA_YsE,10960
93
+ PyMieSim/binary/interface_scatterer.cpython-310-darwin.so,sha256=9jv04bzud0oVFQ0NsGN15s9kMrrzWAjTpI9blkNunJ8,560224
90
94
  PyMieSim/binary/interface_detector.cpython-310-darwin.so,sha256=Cm8QqjfgCodblQQfRTFgh9kTxYMmS-D55E_w7ND4N9o,475776
91
95
  PyMieSim/binary/interface_source.cpython-311-darwin.so,sha256=8ZwlKEMALhwE8u7vvSH_LlEpimsPcQtB8BnubLyKW0M,240624
92
- PyMieSim/binary/interface_sets.cpython-311-darwin.so,sha256=4rRbWfSR1jQ1cF328qHIfYZN1em6sJMr3pbGw9wHALo,579440
93
- PyMieSim/binary/interface_experiment.cpython-312-darwin.so,sha256=suJQTGXWhS5aJb9xYpQQi23CY3vrVqmiLUTbp0867kE,491584
94
- PyMieSim/binary/libcpp_sets.a,sha256=2rL9-8odQvPPPVgGUHqd_GNWoMug8RNfoaJQnQ6Ut9o,172952
95
- PyMieSim/binary/interface_scatterer.cpython-311-darwin.so,sha256=W9qVZz9zvi4cRU_GgqMMQnxsx6KhKQ5cx3IaUxynYI8,576512
96
- PyMieSim/binary/libcpp_detector.a,sha256=w7m6xRYURit3o8XwvlkHzC6SapbE2ABewVFBWlosLwI,200264
97
- pymiesim-3.6.0.dist-info/RECORD,,
98
- pymiesim-3.6.0.dist-info/WHEEL,sha256=_wdnp6N2S4se9FSmG8Grxw-01KRCMKjjAi2kFwM0M4I,114
99
- pymiesim-3.6.0.dist-info/METADATA,sha256=NLH1cmL-XPL5EVHrCZuT_ZTIbYMT-jqEMJlNV92L1PQ,9530
100
- pymiesim-3.6.0.dist-info/licenses/LICENSE,sha256=-QSWDJghhVqbAzChmEK86liqPX_eeQFgdwlrKTLLcIA,1088
101
- lib/libcpp_cylinder.a,sha256=D1mbpyUi7ZBzDRkTYhFgNUxGWGRxiCnU9pFW3lC0aj8,187992
102
- lib/libcpp_sphere.a,sha256=8-x7Wcupbo6FYIKKCW_MnUXjBcefKJj2LtpkXD-s6vM,196984
103
- lib/libZBessel.a,sha256=rmEdAOjcB6LZ_55VI2OYc65c77Qq_1ACbI0Ff-Pfjlw,106200
104
- lib/lib_ZBessel.a,sha256=Mz8WmHrnFGKmImtue_1xjpbzJhgM7PSxlt26r6PQYU8,9840
105
- lib/libcpp_coreshell.a,sha256=uy4HmHTRWHnR4h0a9Vbb1tORgqOYUSNCPHXvS1_r68U,196296
106
- lib/libcpp_base_scatterer.a,sha256=9hVprMKB3BKaEJOAcbUfKw1vdgOaB6EQ-aCu2Qa7lMM,197136
96
+ PyMieSim/binary/interface_sets.cpython-311-darwin.so,sha256=LkDJ3m4atitgTZFnorzql4C0sISSSZ8FVyEMJIDAfw0,579776
97
+ PyMieSim/binary/interface_experiment.cpython-312-darwin.so,sha256=rliIkpNrvIRf2ZwyDITw4XLYBzRZ8Spa_h5JEdgyy-Q,491584
98
+ PyMieSim/binary/libcpp_sets.a,sha256=Ny3ew74gPQ52SdvWkb1IqlFs1gRm5SvDbd7W14GYLU4,172952
99
+ PyMieSim/binary/interface_scatterer.cpython-311-darwin.so,sha256=L74jfmT-dNnZzxdoTxvdLlxALfKS5e_4A0NCYeyv7Es,576800
100
+ PyMieSim/binary/libcpp_detector.a,sha256=a79qarKO9CYDoefAU8K70ypq-j1sXWricwUQN6r1D5k,200264
101
+ lib/libcpp_cylinder.a,sha256=S7JAm5HxbJTrVXcrbpI-YXJsUl8bDjm4Q92pUpUnySU,188440
102
+ lib/libcpp_sphere.a,sha256=b06MsiTFyPbAS48hM85mvU7iLN7k07d56BPBuvJz5nw,197848
103
+ lib/libZBessel.a,sha256=ncJ_uqMWTWbft8oHBfes0KHx8RIjmqLo41Pm_NA68SI,106200
104
+ lib/lib_ZBessel.a,sha256=nTDc2NCv0c_vJqwHHxhH7iFeGH1wOmL4X0899Nj8vLg,9840
105
+ lib/libcpp_coreshell.a,sha256=BzV_fYSPyV4xwTa5NPvZFZsMo7_ikB3qM_L6f0nXlyg,197208
106
+ lib/libcpp_base_scatterer.a,sha256=s8N3EhedGT96TSmxVzU86Qr1mb5Ia0ZnL-33WRxpE04,197136