imttugraz / pyqmri Goto Github PK
View Code? Open in Web Editor NEWA framework for quantitative MRI from complex k-space or image data.
License: Apache License 2.0
A framework for quantitative MRI from complex k-space or image data.
License: Apache License 2.0
Hi! I just tried to install PyQMRI on my MacBook Pro with the M1 chip and running into some issues with pyqt5 which doesn't seem to build on this platform, there are a few threads on stackoverflow about this as well. PyQt6 does build though, is it possible to update the dependency for easier build on the arm platform?
I got a test failure in the integration tests because there is a use of time.clock
in _helper_fun/_nlinvns.py
, but this function is no longer present in Python 3.8.
The following is from the Python 3.8 release notes:
The function time.clock() has been removed, after having been deprecated since Python 3.3: use time.perf_counter() or time.process_time() instead, depending on your requirements, to have well-defined behavior. (Contributed by Matthias Bussonnier in bpo-36895.)
It is also worth documenting for new contributors, how they should run the tests. I first tried just running pytest tests
, but found it is also necessary to run ipcluster start
first.
----------------------------------------------------------------- Captured stdout call -----------------------------------------------------------------
Unknown command line arguments passed: ['test/integrationtests/', '-v']. These will be ignored for fitting.
Using provied flip angle correction.
GPU OpenCL platform <NVIDIA CUDA> found with 2 device(s) and OpenCL-version <OpenCL 1.2 CUDA 11.1.70>
Computing coil sensitivity map of slice 0
___________________________________________________ test_VFA_model_kspace_TGV_cart_coilguess_radial ____________________________________________________
gen_data_nocoils_radial = None
@pytest.mark.integration_test
def test_VFA_model_kspace_TGV_cart_coilguess_radial(
gen_data_nocoils_radial):
> assert pyqmri.run(
data=os.getcwd()+'/test/VFA_radial_test_coilguess.h5',
model='VFA',
config=os.getcwd()+'/test/default.ini',
trafo=True,
useCGguess=False,
) is None
test/integrationtests/test_integration_test_single_slice.py:94:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pyqmri/pyqmri.py:761: in run
_start_recon(argsrun)
pyqmri/pyqmri.py:569: in _start_recon
est_coils(data, par, par["file"], myargs, off)
pyqmri/_helper_fun/_est_coils.py:330: in est_coils
par["C"][:, i, :, :] = result[i].get()[2:, -1, :, :]
/home/lee8rx/miniconda3/envs/pyir38/lib/python3.8/site-packages/ipyparallel/client/asyncresult.py:169: in get
raise self.exception()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <AsyncResult: nlinvns:finished>, f = <Future at 0x7f536c1a6490 state=finished returned list>
def _resolve_result(self, f=None):
try:
if f:
results = f.result()
else:
results = list(map(self._client.results.get, self.msg_ids))
if self._single_result:
r = results[0]
if isinstance(r, Exception):
> raise r
E ipyparallel.error.RemoteError: AttributeError(module 'time' has no attribute 'clock')
/home/lee8rx/miniconda3/envs/pyir38/lib/python3.8/site-packages/ipyparallel/client/asyncresult.py:226: RemoteError
I encountered this possible bug when trying to fit the simple MonoExp model from the example.
When doing so, the python throws an error in the file GeneralModel.py on line 100 (for mypar in modelpar:). The error states that the variable modelpar appears to be non-iterable. After I tried adding an additional "fake" parameter "K" to the modelfile.
The model file looked then like this:
[MonoExp]
parameter = TE K
unknowns = M0 A1
signal = M0exp(-TEA1)*K
box_constraints_lower = 0,0
box_constraints_upper = 100,1
real_value_constraints = False,True
guess = 1,0.01
rescale = M0,1/A1
estimate_individual_phase = False
Then I set the "K" parameter to 1 in the .h5 file.
This solved the issue, no more non-iterable error showed. It seems like parsing only one parameter creates some non-iterable structure and then it fails in setting the bounds for the for-loop. This will probably hurt a few people, since most models will have more parameters (TR, TE,TI...) but still, it might cause someone a headache.
Best regards
Jiri Vitous
Hello,
Please resolve the following typos in the JOSS manuscript.
manuscript:
Algorithmic section: Levenberg–Marquat -> Levenberg–Marquardt
Figure 2 caption: coilsensitivity -> coil sensitivity
GitHub README:
spelling: grafical -> graphical
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.