wavesimpro 0.9.2__tar.gz → 0.10.0__tar.gz

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 (20) hide show
  1. {wavesimpro-0.9.2 → wavesimpro-0.10.0}/PKG-INFO +1 -1
  2. {wavesimpro-0.9.2 → wavesimpro-0.10.0}/pyproject.toml +1 -1
  3. {wavesimpro-0.9.2 → wavesimpro-0.10.0}/src/wavesimpro/__init__.py +1 -1
  4. {wavesimpro-0.9.2 → wavesimpro-0.10.0}/src/wavesimpro/execute.py +19 -4
  5. {wavesimpro-0.9.2 → wavesimpro-0.10.0}/src/wavesimpro.egg-info/PKG-INFO +1 -1
  6. {wavesimpro-0.9.2 → wavesimpro-0.10.0}/setup.cfg +0 -0
  7. {wavesimpro-0.9.2 → wavesimpro-0.10.0}/src/wavesimpro/__main__.py +0 -0
  8. {wavesimpro-0.9.2 → wavesimpro-0.10.0}/src/wavesimpro/binary_utils.py +0 -0
  9. {wavesimpro-0.9.2 → wavesimpro-0.10.0}/src/wavesimpro/client.py +0 -0
  10. {wavesimpro-0.9.2 → wavesimpro-0.10.0}/src/wavesimpro/config.py +0 -0
  11. {wavesimpro-0.9.2 → wavesimpro-0.10.0}/src/wavesimpro/exceptions.py +0 -0
  12. {wavesimpro-0.9.2 → wavesimpro-0.10.0}/src/wavesimpro/json_helper.py +0 -0
  13. {wavesimpro-0.9.2 → wavesimpro-0.10.0}/src/wavesimpro/py.typed +0 -0
  14. {wavesimpro-0.9.2 → wavesimpro-0.10.0}/src/wavesimpro/setup.py +0 -0
  15. {wavesimpro-0.9.2 → wavesimpro-0.10.0}/src/wavesimpro/simulate.py +0 -0
  16. {wavesimpro-0.9.2 → wavesimpro-0.10.0}/src/wavesimpro/validate.py +0 -0
  17. {wavesimpro-0.9.2 → wavesimpro-0.10.0}/src/wavesimpro.egg-info/SOURCES.txt +0 -0
  18. {wavesimpro-0.9.2 → wavesimpro-0.10.0}/src/wavesimpro.egg-info/dependency_links.txt +0 -0
  19. {wavesimpro-0.9.2 → wavesimpro-0.10.0}/src/wavesimpro.egg-info/requires.txt +0 -0
  20. {wavesimpro-0.9.2 → wavesimpro-0.10.0}/src/wavesimpro.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wavesimpro
3
- Version: 0.9.2
3
+ Version: 0.10.0
4
4
  Summary: WavesimPro Python API — cloud execution client for the Rayfos simulation platform
5
5
  Author: Rayfos
6
6
  Project-URL: Repository, https://github.com/rayfos/wavesimpro
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "wavesimpro"
7
- version = "0.9.2"
7
+ version = "0.10.0"
8
8
  description = "WavesimPro Python API — cloud execution client for the Rayfos simulation platform"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -49,7 +49,7 @@ from .json_helper import (
49
49
  parse_progress_data,
50
50
  )
51
51
 
52
- __version__ = "0.9.2"
52
+ __version__ = "0.10.0"
53
53
  __all__ = [
54
54
  # Client
55
55
  "RayfosClient",
@@ -280,12 +280,27 @@ def execute_via_api(
280
280
  pol_map = {0: "x", 1: "y", 2: "z"}
281
281
  pol_str = pol_map.get(pol_num, "none")
282
282
 
283
+ # Convert the user's source position (top-left corner in absolute
284
+ # corner-based μm — the MATLAB/Python convention) into the canonical
285
+ # WavesimProperties convention used by Rayfos Studio and consumed by
286
+ # the C# CommonServices: Position = CENTER of the source, expressed
287
+ # relative to the coordinate-system centre (which sits at the domain
288
+ # centre, world 0,0,0). Keeping every client emitting the same shape
289
+ # of WavesimProperties means the server has one coordinate path, not
290
+ # one per client.
291
+ src_extent_x = float(src_nx) * float(pixel_size)
292
+ src_extent_y = float(src_ny) * float(pixel_size)
293
+ src_extent_z = float(src_nz) * float(pixel_size)
294
+ position_x_centered = float(src["position"][0]) + src_extent_x / 2.0 - domain_x_um / 2.0
295
+ position_y_centered = float(src["position"][1]) + src_extent_y / 2.0 - domain_y_um / 2.0
296
+ position_z_centered = float(src["position"][2]) + src_extent_z / 2.0 - domain_z_um / 2.0
297
+
283
298
  custom_source = create_custom_field_source(
284
299
  name=f"source_{i + 1}",
285
300
  field_data_id=source_ids[i],
286
- position_x=src["position"][0],
287
- position_y=src["position"][1],
288
- position_z=src["position"][2],
301
+ position_x=position_x_centered,
302
+ position_y=position_y_centered,
303
+ position_z=position_z_centered,
289
304
  grid_nx=src_nx,
290
305
  grid_ny=src_ny,
291
306
  grid_nz=src_nz,
@@ -293,7 +308,7 @@ def execute_via_api(
293
308
  amplitude_real=1.0,
294
309
  amplitude_imag=0.0,
295
310
  data_format="Complex64",
296
- origin="topleft",
311
+ origin="center",
297
312
  )
298
313
  input_sources.append(custom_source)
299
314
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wavesimpro
3
- Version: 0.9.2
3
+ Version: 0.10.0
4
4
  Summary: WavesimPro Python API — cloud execution client for the Rayfos simulation platform
5
5
  Author: Rayfos
6
6
  Project-URL: Repository, https://github.com/rayfos/wavesimpro
File without changes