PyMieSim 3.5.4.1__cp310-cp310-macosx_14_0_arm64.whl → 3.5.4.3__cp310-cp310-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.5.4.1'
21
- __version_tuple__ = version_tuple = (3, 5, 4, 1)
20
+ __version__ = version = '3.5.4.3'
21
+ __version_tuple__ = version_tuple = (3, 5, 4, 3)
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -62,11 +62,17 @@ class BaseScatterer():
62
62
  CPPClass = CppMediumProperties if name == 'medium' else CppScattererProperties
63
63
 
64
64
  if all(isinstance(item, Quantity) for item in properties):
65
- self.binding_kwargs[f'{name}_properties'] = CPPClass(index_properties=properties.magnitude)
65
+ instance = CPPClass(index_properties=properties.magnitude)
66
+ self.binding_kwargs[f'{name}_properties'] = instance
67
+
68
+ return instance
66
69
 
67
70
  elif all(isinstance(item, BaseMaterial) for item in properties):
68
71
  eval_index = numpy.asarray([m.compute_refractive_index(self.source.wavelength.to_base_units().magnitude) for m in properties])
69
- self.binding_kwargs[f'{name}_properties'] = CPPClass(material_properties=eval_index)
72
+ instance = CPPClass(material_properties=eval_index)
73
+ self.binding_kwargs[f'{name}_properties'] = instance
74
+
75
+ return instance
70
76
 
71
77
  else:
72
78
  raise TypeError("All elements in the list must be of type 'Quantity' or 'BaseMaterial', not a mix of both.")
@@ -66,14 +66,17 @@ class CoreShell(BaseScatterer, Sequential):
66
66
  is_sequential=self.is_sequential
67
67
  )
68
68
 
69
- self._add_properties(name='medium', properties=self.medium_property)
69
+ mediun_properties = self._add_properties(name='medium', properties=self.medium_property)
70
70
 
71
- self._add_properties(name='core', properties=self.core_property)
71
+ core_properties = self._add_properties(name='core', properties=self.core_property)
72
72
 
73
- self._add_properties(name='shell', properties=self.shell_property)
73
+ shell_properties = self._add_properties(name='shell', properties=self.shell_property)
74
74
 
75
- binding_kwargs = {
76
- k: v.to_base_units().magnitude if isinstance(v, Quantity) else v for k, v in self.binding_kwargs.items()
77
- }
78
-
79
- self.binding = CppCoreShellSet(**binding_kwargs)
75
+ self.binding = CppCoreShellSet(
76
+ core_diameter=self.core_diameter.to('meter').magnitude,
77
+ shell_thickness=self.shell_thickness.to('meter').magnitude,
78
+ core_properties=core_properties,
79
+ shell_properties=shell_properties,
80
+ medium_properties=mediun_properties,
81
+ is_sequential=self.is_sequential,
82
+ )
@@ -51,12 +51,13 @@ class Cylinder(BaseScatterer, Sequential):
51
51
 
52
52
  self.binding_kwargs = dict(diameter=self.diameter, is_sequential=self.is_sequential)
53
53
 
54
- self._add_properties(name='medium', properties=self.medium_property)
54
+ mediun_properties = self._add_properties(name='medium', properties=self.medium_property)
55
55
 
56
- self._add_properties(name='scatterer', properties=self.property)
56
+ scatterer_properties = self._add_properties(name='scatterer', properties=self.property)
57
57
 
58
- binding_kwargs = {
59
- k: v.to_base_units().magnitude if isinstance(v, Quantity) else v for k, v in self.binding_kwargs.items()
60
- }
61
-
62
- self.binding = CppCylinderSet(**binding_kwargs)
58
+ self.binding = CppCylinderSet(
59
+ diameter=self.diameter.to('meter').magnitude,
60
+ scatterer_properties=scatterer_properties,
61
+ medium_properties=mediun_properties,
62
+ is_sequential=self.is_sequential,
63
+ )
@@ -54,12 +54,13 @@ class Sphere(BaseScatterer, Sequential):
54
54
 
55
55
  self.binding_kwargs = dict(diameter=self.diameter, is_sequential=self.is_sequential)
56
56
 
57
- self._add_properties(name='medium', properties=self.medium_property)
57
+ mediun_properties = self._add_properties(name='medium', properties=self.medium_property)
58
58
 
59
- self._add_properties(name='scatterer', properties=self.property)
59
+ scatterer_properties = self._add_properties(name='scatterer', properties=self.property)
60
60
 
61
- binding_kwargs = {
62
- k: v.to_base_units().magnitude if isinstance(v, Quantity) else v for k, v in self.binding_kwargs.items()
63
- }
64
-
65
- self.binding = CppSphereSet(**binding_kwargs)
61
+ self.binding = CppSphereSet(
62
+ diameter=self.diameter.to('meter').magnitude,
63
+ scatterer_properties=scatterer_properties,
64
+ medium_properties=mediun_properties,
65
+ is_sequential=self.is_sequential,
66
+ )
@@ -32,12 +32,17 @@ class Gaussian(BaseSource, Sequential):
32
32
  wavelength: Quantity
33
33
  polarization: Union[BasePolarization, Quantity]
34
34
 
35
- def _generate_binding_kwargs(self) -> None:
35
+ def _generate_binding(self) -> None:
36
36
  """
37
37
  Prepares the keyword arguments for the C++ binding based on the scatterer's properties. This
38
38
  involves evaluating material indices and organizing them into a dictionary for the C++ interface.
39
39
 
40
40
  """
41
+ self.mapping = {}
42
+
43
+ if not isinstance(self.polarization, BasePolarization):
44
+ self.polarization = Linear(self.polarization)
45
+
41
46
  self.binding_kwargs = dict(
42
47
  wavelength=self.wavelength,
43
48
  jones_vector=self.polarization.element,
@@ -46,16 +51,10 @@ class Gaussian(BaseSource, Sequential):
46
51
  is_sequential=self.is_sequential
47
52
  )
48
53
 
49
- def _generate_binding(self):
50
- self.mapping = {}
51
-
52
- if not isinstance(self.polarization, BasePolarization):
53
- self.polarization = Linear(self.polarization)
54
-
55
- self._generate_binding_kwargs()
56
-
57
- binding_kwargs = {
58
- k: v.to_base_units().magnitude if isinstance(v, Quantity) else v for k, v in self.binding_kwargs.items()
59
- }
60
-
61
- self.binding = CppGaussianSourceSet(**binding_kwargs)
54
+ self.binding = CppGaussianSourceSet(
55
+ wavelength=self.wavelength.to('meter').magnitude,
56
+ jones_vector=self.polarization.element,
57
+ NA=self.NA.to('dimensionless').magnitude,
58
+ optical_power=self.optical_power.to('watt').magnitude,
59
+ is_sequential=self.is_sequential
60
+ )
@@ -40,14 +40,20 @@ class PlaneWave(BaseSource, Sequential):
40
40
 
41
41
  return value
42
42
 
43
- def _generate_binding_kwargs(self) -> None:
43
+ def _generate_binding(self) -> None:
44
44
  """
45
45
  Prepares the keyword arguments for the C++ binding based on the scatterer's properties. This
46
46
  involves evaluating material indices and organizing them into a dictionary for the C++ interface.
47
47
 
48
- Returns:
49
- None
48
+ Returns
49
+ -------
50
+ None
50
51
  """
52
+ self.mapping = {}
53
+
54
+ if not isinstance(self.polarization, BasePolarization):
55
+ self.polarization = Linear(self.polarization)
56
+
51
57
  self.binding_kwargs = dict(
52
58
  wavelength=self.wavelength,
53
59
  jones_vector=self.polarization.element,
@@ -55,16 +61,9 @@ class PlaneWave(BaseSource, Sequential):
55
61
  is_sequential=self.is_sequential
56
62
  )
57
63
 
58
- def _generate_binding(self):
59
- self.mapping = {}
60
-
61
- if not isinstance(self.polarization, BasePolarization):
62
- self.polarization = Linear(self.polarization)
63
-
64
- self._generate_binding_kwargs()
65
-
66
- binding_kwargs = {
67
- k: v.to_base_units().magnitude if isinstance(v, Quantity) else v for k, v in self.binding_kwargs.items()
68
- }
69
-
70
- self.binding = CppPlaneWaveSourceSet(**binding_kwargs)
64
+ self.binding = CppPlaneWaveSourceSet(
65
+ wavelength=self.wavelength.to('meter').magnitude,
66
+ jones_vector=self.polarization.element,
67
+ amplitude=self.amplitude.to('volt/meter').magnitude,
68
+ is_sequential=self.is_sequential
69
+ )
Binary file
Binary file
Binary file
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: PyMieSim
3
- Version: 3.5.4.1
3
+ Version: 3.5.4.3
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>
@@ -61,7 +61,7 @@ Provides-Extra: testing
61
61
  Requires-Dist: pytest>=0.6; extra == "testing"
62
62
  Requires-Dist: pytest-cov>=2.0; extra == "testing"
63
63
  Requires-Dist: pytest-json-report==1.5.0; extra == "testing"
64
- Requires-Dist: coverage==7.8.2; extra == "testing"
64
+ Requires-Dist: coverage==7.9.1; extra == "testing"
65
65
  Provides-Extra: documentation
66
66
  Requires-Dist: numpydoc==1.8.0; extra == "documentation"
67
67
  Requires-Dist: sphinx>=5.1.1; extra == "documentation"
@@ -1,5 +1,9 @@
1
+ pymiesim-3.5.4.3.dist-info/RECORD,,
2
+ pymiesim-3.5.4.3.dist-info/WHEEL,sha256=XNlkiEK0Q3WpNUax7PCCZPGBloeUiy1DCgD8emtk080,114
3
+ pymiesim-3.5.4.3.dist-info/METADATA,sha256=3QF4Pz6lqkM-onxvKsHs4zMk7yLajZ-4mZx9uSpp8dM,13472
4
+ pymiesim-3.5.4.3.dist-info/licenses/LICENSE,sha256=-QSWDJghhVqbAzChmEK86liqPX_eeQFgdwlrKTLLcIA,1088
1
5
  PyMieSim/units.py,sha256=L7Trn8rW5d5AQK1_8I-XwaHGswXklupXs5wHgWQtJNQ,4224
2
- PyMieSim/_version.py,sha256=5Tapzkw5U6lFgs0XMplhd1DKg_j63IGqiiYAseYMB5I,516
6
+ PyMieSim/_version.py,sha256=l0lRbKiwIHWmY6kRcxAgchNaIBGY3lnaM0_Hpo0-dOI,516
3
7
  PyMieSim/directories.py,sha256=ohe9qvjwN0IJ7OpZHsD7LxKYGMLr4CC7xYUGgWgw-Rg,648
4
8
  PyMieSim/__init__.py,sha256=BGzl1hTX7-KoanQDm26IRHq6AmPFzVoIFcvOMfI0wQQ,249
5
9
  PyMieSim/mesh.py,sha256=WcX_rXpWxH7WDniIqaG4rPC-pfDm4AG9ZAX-zI8GbhU,14566
@@ -54,38 +58,34 @@ PyMieSim/experiment/setup.py,sha256=_dt2urIwClCKiKWJjgF4kNOB98gTj1XLNMSPf3KGYOU,
54
58
  PyMieSim/experiment/utils.py,sha256=H4KkYMN33NSm9nwman0vk-umW9ecMsPKujQ4zkctMzc,5380
55
59
  PyMieSim/experiment/dataframe_subclass.py,sha256=qPD_XW8x4WApQFdNOHJHt-Mc3BoT1b9y28dWmpZxccU,7174
56
60
  PyMieSim/experiment/source/__init__.py,sha256=tAfSmMqMTem6-obvbOHD2YK7l4UDh1g-20t789_1Ihw,64
57
- PyMieSim/experiment/source/planewave.py,sha256=lxUKI2NNV5WXEWRu0CTu-TK15juU4UovWsMTPyIMhv8,2488
61
+ PyMieSim/experiment/source/planewave.py,sha256=62RHOHCuTj0LrZ_0IAmLSiVyYyPRvRnLfBQIbdI0gwo,2480
58
62
  PyMieSim/experiment/source/base.py,sha256=QDe7CTQVQthI0KDmvLET4-5kxbv7ESuplmiU2Ubn1LM,3104
59
- PyMieSim/experiment/source/gaussian.py,sha256=hgtzhWQ41TNYNZyRv8kxIJ8YinGVHMXhN8qsQ71NoFo,2294
63
+ PyMieSim/experiment/source/gaussian.py,sha256=DRkap4C9vHHV85yE6Cj2qM3MsoZbNdX_wSilBRParE4,2331
60
64
  PyMieSim/experiment/scatterer/__init__.py,sha256=_19R38S6LSGuuFRRPTFK1Lv2jaSoFk6O1V7CdwdhLXo,124
61
- PyMieSim/experiment/scatterer/core_shell.py,sha256=SAlSDlaLqs7DpYMafv74BNIOHXyegJgchmlTvHHtiL4,3248
62
- PyMieSim/experiment/scatterer/base.py,sha256=sTbaoI0VKY8pbrbxns8p45iQJvqDRtQ5UFkvpd2X7yA,3757
63
- PyMieSim/experiment/scatterer/sphere.py,sha256=yapEd4t7iIZtEqkhA4EYANNYavw6skcv3wlwgltkpoI,2756
64
- PyMieSim/experiment/scatterer/cylinder.py,sha256=Ly4PvDME7W2cOdXO2rdgquCSxgjjkKNgma6FkkB9HkA,2449
65
+ PyMieSim/experiment/scatterer/core_shell.py,sha256=4VbxS6Evcz5sjNlB3wtMTdScXCPLHov87Vr3HNlH-AQ,3470
66
+ PyMieSim/experiment/scatterer/base.py,sha256=3hesoH2tNh2JtyOSSefU7Jl1WWjVpf8-QFmM1IfaR6Q,3879
67
+ PyMieSim/experiment/scatterer/sphere.py,sha256=tPZMCfrGlttVh6W2kJSLxzz1zvKEQNC7CmVk5yIaBSM,2845
68
+ PyMieSim/experiment/scatterer/cylinder.py,sha256=yr8fJsX-tj5HaCqxQOd4UccUxvWylZRgHXhXTL4tflE,2538
65
69
  PyMieSim/experiment/detector/photodiode.py,sha256=GBSoF3mhVRyADJbEO2g4n0LffmGU7HOc5gDGF-ojgLQ,1850
66
70
  PyMieSim/experiment/detector/coherent_mode.py,sha256=ME1CtxUfPY40E3HJoqJrW0ikje6QvhMY4RYs-yOvx0Q,1805
67
71
  PyMieSim/experiment/detector/__init__.py,sha256=pvtXHKR2pM7JOeTTcouKipeQwi0e8dZiZTpdAn9K2Ls,75
68
72
  PyMieSim/experiment/detector/base.py,sha256=j2yY_InLQDAPgDkM19ILlIEF-2koGMKRe9Hc-nFpyGc,7340
69
- PyMieSim/binary/libcpp_cylinder.a,sha256=_Vfa748gUA5iqNRMrBW7tsIiX7ojUMS7cm9ZDZZs37w,161368
70
- PyMieSim/binary/libcpp_coordinates.a,sha256=LKLxUTMHpff96Z2ugcAvUtSY9ZcbyoVHk3KyDH4OcAE,22432
71
- PyMieSim/binary/libcpp_source.a,sha256=vg6gYNzXyVFTOJq0CEKHRVTLpoql11omByYP9X62lhk,6720
73
+ PyMieSim/binary/libcpp_coordinates.a,sha256=-D1IStWtebqdrOgFgSqhkA2uyzMtq8Pa9LfOypCmDKQ,22432
74
+ PyMieSim/binary/libcpp_source.a,sha256=VRpJNntSNWb5Knh9OH12iTzc8QHGviLXuxOCltZ6C-Y,6720
72
75
  PyMieSim/binary/interface_experiment.cpython-310-darwin.so,sha256=UCgdLZHrbVmEZ432PUrIHE8P8lAlM_IDyx0hEZqd3nU,456752
73
- PyMieSim/binary/libcpp_sphere.a,sha256=lSlwmWWkJ7DxrH0jykiPzZBDpXS2PHRVRAvs2H80HYc,171760
74
76
  PyMieSim/binary/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
75
77
  PyMieSim/binary/interface_source.cpython-310-darwin.so,sha256=rpdCj8Y6nvkHYAgsvGPdpXw6Tuc5QJrEko0qyPz80hc,223664
76
- PyMieSim/binary/libcpp_fibonacci.a,sha256=K48h1Ts9bOYK2HM1gwHlnMZL_D79zWyVQ9JX8teNLHk,14160
77
- PyMieSim/binary/libZBessel.a,sha256=hXIGaBqJvxC0fV6rssEePbuJB9VDn6tIqm9fM_1hodw,106200
78
- PyMieSim/binary/interface_sets.cpython-310-darwin.so,sha256=mOuQ-k55bFh1pg15iLQSAp-C3Qiqh4cCyU1OiOYSqts,544672
79
- PyMieSim/binary/libcpp_experiment.a,sha256=Xf3ritmI6z6TwV1viSdNKsjtAt6yoAz3_lNHwFjTaB8,148872
80
- PyMieSim/binary/lib_ZBessel.a,sha256=i0v_cj07QclBw98KXqNVQCdyYj8yJxjpcAzZnLXR-uI,9840
81
- PyMieSim/binary/libcpp_coreshell.a,sha256=ZP4UWXTFKrmWI7oETY6-wn6IgP8NZq03pzFDGc3RiME,171064
82
- PyMieSim/binary/libcpp_mode_field.a,sha256=HkJccbRC25B4GJnzNjJODhJvgw45zHbiO-TZnrrxRs0,10960
83
- PyMieSim/binary/interface_scatterer.cpython-310-darwin.so,sha256=H-R0X3GCRQP6pJ8IRb9z2I8bj7ClPwg67fU-Vz4QH_0,541440
84
- PyMieSim/binary/interface_detector.cpython-310-darwin.so,sha256=GX9-2miDwhgx9MVT3swRE8355ma91HLuApi8skh96tc,457136
85
- PyMieSim/binary/libcpp_base_scatterer.a,sha256=T7hbGO_OtfkfrvQkL5wV3I3cq7jrD7x6lVogtnNNqA8,172320
86
- PyMieSim/binary/libcpp_sets.a,sha256=keEjDLV8EPNAWTXhWlGgP6tWLkO56R-fHikAGbd4Ttc,148864
87
- PyMieSim/binary/libcpp_detector.a,sha256=x_3ZMKbc3Uo-7E5KEaJVYbTeEakIUDBj0dGmwqrhDRI,176408
88
- pymiesim-3.5.4.1.dist-info/RECORD,,
89
- pymiesim-3.5.4.1.dist-info/WHEEL,sha256=XNlkiEK0Q3WpNUax7PCCZPGBloeUiy1DCgD8emtk080,114
90
- pymiesim-3.5.4.1.dist-info/METADATA,sha256=lF-Jv_Pr0ijVs5CZmGwC_LF4dH68v33pIcICD6h1zMo,13472
91
- pymiesim-3.5.4.1.dist-info/licenses/LICENSE,sha256=-QSWDJghhVqbAzChmEK86liqPX_eeQFgdwlrKTLLcIA,1088
78
+ PyMieSim/binary/libcpp_fibonacci.a,sha256=FFpFyNmXsojSpK_MKn3VK0teL5iYs6yl4uXaJHuhDaQ,14160
79
+ PyMieSim/binary/interface_sets.cpython-310-darwin.so,sha256=BNlKN6BC7ORNSA8BugkD3RGHQHToa79lKOmbTrhoGhQ,544672
80
+ PyMieSim/binary/libcpp_experiment.a,sha256=DcqbTxQdolmK_2xWUJsXV6dZ-mHlZKm4WvAOH9vEkd0,148872
81
+ PyMieSim/binary/libcpp_mode_field.a,sha256=FQI2E_hpaLUz6SCnormpAnyG0gmEeaUvUrZa2NCHl1U,10960
82
+ PyMieSim/binary/interface_scatterer.cpython-310-darwin.so,sha256=RuIFRUL5za0Gs1m53KQgaY7_cC2qQCtXtMhVdPpYRlw,541440
83
+ PyMieSim/binary/interface_detector.cpython-310-darwin.so,sha256=1hHF3ya14-4IYVqsRt0IYMmGw4EHumGgG0bbDr_wE4s,440576
84
+ PyMieSim/binary/libcpp_sets.a,sha256=R9wgf-0GtCs2d7qUS8Y2BqbancwYszDRySBvlIDAbrA,148864
85
+ PyMieSim/binary/libcpp_detector.a,sha256=yFm80m1ejt_9LvYNeMws_Sxx24VmJ2kzNwrbBhQiMdo,176408
86
+ lib/libcpp_cylinder.a,sha256=PyZdSpBngjxQTknzewEwhuDDxupb0BbLXYV49OMMwZo,161200
87
+ lib/libcpp_sphere.a,sha256=g99anoZLBdDDU8hv7Ee8_HGSLqbg8-6FXfYWcLEtNP8,171760
88
+ lib/libZBessel.a,sha256=D8IxeYKpDPJlFk1FjoPJNQx6OpJPkQFhTvw500mvKAo,106200
89
+ lib/lib_ZBessel.a,sha256=PVY_6VWBMWx1cdQudsJqrEcPzSIA5ARWdNHeGvBgmTQ,9840
90
+ lib/libcpp_coreshell.a,sha256=5o1288O00_6wR0FJhZDsmhGSU1vgR_JTVpWTzSi8KPk,171064
91
+ lib/libcpp_base_scatterer.a,sha256=8kPnFpvx_GrrzQJ04WmqsoXXB6YGtxkZ3ZNEvX6Hz0s,172320