mrzerocore 0.2.6__cp37-abi3-win32.whl → 0.2.8__cp37-abi3-win32.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.
MRzeroCore/_prepass.pyd CHANGED
Binary file
@@ -4,7 +4,6 @@ import gzip
4
4
  import requests
5
5
  import os
6
6
  import numpy as np
7
- from perlin_numpy import generate_perlin_noise_3d
8
7
 
9
8
 
10
9
  # Load the brainweb data file that contains info about tissues, subjects, ...
@@ -54,7 +53,13 @@ def gen_noise(range: float, res: np.ndarray) -> np.ndarray:
54
53
  else:
55
54
  freq = 20
56
55
  padded_res = (res + freq - 1) // freq * freq
57
- noise = generate_perlin_noise_3d(padded_res, (freq, freq, freq))
56
+ try:
57
+ from perlin_numpy import generate_perlin_noise_3d
58
+ noise = generate_perlin_noise_3d(padded_res, (freq, freq, freq))
59
+ except:
60
+ print("perlin_numpy@git+https://github.com/pvigier/perlin-numpy")
61
+ print("is not installed, falling back to numpy.random.random()")
62
+ noise = np.random.random(padded_res)
58
63
  return 1 + range * noise[:res[0], :res[1], :res[2]]
59
64
 
60
65
 
@@ -152,8 +152,7 @@ class SimData:
152
152
  def recover(self) -> Any:
153
153
  """Recover the data that was used to build this instance."""
154
154
  if self.recover_func is None:
155
- print("No recover function was provided")
156
- return None
155
+ raise Exception("No recover function was provided")
157
156
  else:
158
157
  return self.recover_func(self)
159
158
 
@@ -145,8 +145,7 @@ class VoxelGridPhantom:
145
145
  voxel_pos,
146
146
  torch.tensor(shape, device=self.PD.device) / 2 / self.size,
147
147
  dephasing_func,
148
- recover_func=lambda d: recover(
149
- mask, self.base_fov, self.rel_fov, d)
148
+ recover_func=lambda data: recover(mask, data)
150
149
  )
151
150
 
152
151
  @classmethod
@@ -38,6 +38,8 @@ def execute_graph(graph: Graph,
38
38
  min_latent_signal : float
39
39
  Minimum "latent_signal" metric of a state for it to be simulated.
40
40
  Should be <= than min_emitted_signal.
41
+ print_progress : bool
42
+ If true, the current repetition is printed while simulating.
41
43
 
42
44
  Returns
43
45
  -------
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: MRzeroCore
3
- Version: 0.2.6
3
+ Version: 0.2.8
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -10,6 +10,8 @@ Requires-Dist: pypulseq
10
10
  Requires-Dist: matplotlib>=3.5
11
11
  Requires-Dist: scipy>=1.7
12
12
  Requires-Dist: requests>=2.20
13
+ Requires-Dist: scikit-image
14
+ Requires-Dist: torchkbnufft
13
15
  Requires-Dist: pydisseqt
14
16
  License-File: LICENSE
15
17
  Summary: Core functionality of MRzero
@@ -17,8 +19,8 @@ Author-email: Jonathan Endres <jonathan.endres@uk-erlangen.de>
17
19
  Requires-Python: >=3.9
18
20
  Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
19
21
  Project-URL: Documentation, https://mrzero-core.readthedocs.io/
20
- Project-URL: Repository, https://github.com/MRsources/MRzero-Core
21
22
  Project-URL: MRzero-Paper, https://arxiv.org/abs/2002.04265
23
+ Project-URL: Repository, https://github.com/MRsources/MRzero-Core
22
24
 
23
25
  [![Documentation Status](https://readthedocs.org/projects/mrzero-core/badge/?version=latest)](https://mrzero-core.readthedocs.io/en/latest/?badge=latest)
24
26
 
@@ -1,13 +1,13 @@
1
- MRzeroCore-0.2.6.dist-info/METADATA,sha256=RH2lFxHy7ShAeFj-3j5EYcQxafh_MQeYQMHWD0IVlu8,3737
2
- MRzeroCore-0.2.6.dist-info/WHEEL,sha256=gXYpX75r-fJLXR2RD6r-k3EXD66bMIXTAL43kNqJgxg,92
3
- MRzeroCore-0.2.6.dist-info/license_files/LICENSE,sha256=rd_IFJ484uAluv8CigP2CpXg4l2GJLLKENqB6-RXPp4,35112
1
+ MRzeroCore-0.2.8.dist-info/METADATA,sha256=vmG2wLCGAbNTJ606C5os_6R-SGI7E3bE-XcIdFXHOiM,3793
2
+ MRzeroCore-0.2.8.dist-info/WHEEL,sha256=gXYpX75r-fJLXR2RD6r-k3EXD66bMIXTAL43kNqJgxg,92
3
+ MRzeroCore-0.2.8.dist-info/license_files/LICENSE,sha256=rd_IFJ484uAluv8CigP2CpXg4l2GJLLKENqB6-RXPp4,35112
4
4
  MRzeroCore/phantom/brainweb/brainweb_data.json,sha256=HETnXgLJndWbqeL4yfm8N-f9t0EwO-v6HzRA46f4VPU,1795
5
5
  MRzeroCore/phantom/brainweb/brainweb_data_sources.txt,sha256=Sh6NFLU1bhdaD0pp12D_Hc70cA_UC1s7KdHcuoGTKuA,1853
6
6
  MRzeroCore/phantom/brainweb/output/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- MRzeroCore/phantom/brainweb/__init__.py,sha256=FFUf4-vksejFs0riau3onT-mnJVJ3OEnq0kxp90Hc04,6574
7
+ MRzeroCore/phantom/brainweb/__init__.py,sha256=R48NlkMNpMgyKKwFm-5iUlhxBKctQ6dXx7yCmyVwm6E,6828
8
8
  MRzeroCore/phantom/custom_voxel_phantom.py,sha256=Pt5X1KjOgzNo6ebINyl4oT8drFTWp4NU3Mi3e5a0YVM,10413
9
- MRzeroCore/phantom/sim_data.py,sha256=sYN9kwn3KwpzXOJ2pe6iQPTR2exEqKYMBs5GrQzZi6A,7133
10
- MRzeroCore/phantom/voxel_grid_phantom.py,sha256=JftvRMP-qR1FYBId2GEkzGnPclX0Y4ExzKt1BnC2FD4,16654
9
+ MRzeroCore/phantom/sim_data.py,sha256=rL0eRk_CuvzxIHrjcjHA2nexYEBieu70B2nS6VlhcxQ,7118
10
+ MRzeroCore/phantom/voxel_grid_phantom.py,sha256=wAereuWTbJRBYVPRKT93tQlI-jDDOx1QDT2z5nrhFeY,16613
11
11
  MRzeroCore/pulseq/exporter.py,sha256=RlIHkXNVmQy-ywixIPeWeICnb9jq4_1_9O8HujBigLs,17226
12
12
  MRzeroCore/pulseq/exporter_v2.py,sha256=GVnhC6bmbxbYq4CFrBbL2nj98B_u3OVglOt50J19pkk,30554
13
13
  MRzeroCore/pulseq/helpers.py,sha256=ZEtctXy7qm6BLexcwNRDd8xPSBFNiy5dUeifOo5bYkw,8774
@@ -28,8 +28,8 @@ MRzeroCore/pulseq/pulseq_loader/__init__.py,sha256=6OLwC3k9LSjl8aRin9pV4-Rb-Q3YS
28
28
  MRzeroCore/reconstruction.py,sha256=NA_gT6kagFUNPx_JYUTgG17-9u76hwmoZhmI0HhUU0w,4244
29
29
  MRzeroCore/sequence.py,sha256=DRWdCwTZseDQjL8FGfy36I7inrX1Viuv1TRzInr50z8,27601
30
30
  MRzeroCore/simulation/isochromat_sim.py,sha256=tp1Jo0E3nKpOuN0weunlBzQQfqE0SF3MsmqqjbFa_vw,9186
31
- MRzeroCore/simulation/main_pass.py,sha256=c5-llCKrGIIEz6l-vcjA9jdbvHRCf53ye1zFeJliUw0,9298
31
+ MRzeroCore/simulation/main_pass.py,sha256=el18lc4VhhyHtIwUIhYiSaF5daDnSvzbngYVCJ37rUI,9395
32
32
  MRzeroCore/simulation/pre_pass.py,sha256=5wmXKxgFeGwA7yrqTkOjcWoFuGuRYEPzedRGqkx2Evg,5117
33
33
  MRzeroCore/__init__.py,sha256=A0PQPakvuFhf5gYtioSTiBbqV3CZzBvbwW6anzeUH4M,830
34
- MRzeroCore/_prepass.pyd,sha256=95_3aGSWgHJxKLyX2XSNbLoBesYOyW4C0GDUhkIAdxw,355840
35
- MRzeroCore-0.2.6.dist-info/RECORD,,
34
+ MRzeroCore/_prepass.pyd,sha256=XPymuUlXLMJkn3nA8oeOYwyyDTOzV0AONcI5b5me_ls,355840
35
+ MRzeroCore-0.2.8.dist-info/RECORD,,