Giter VIP home page Giter VIP logo

pyqmri's People

Contributors

agahkarakuzu avatar glaser94 avatar maieroli2010 avatar s-rauh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pyqmri's Issues

Install on MacOS with ARM

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?

JOSS: avoid use of time.clock (Python 3.8+ compatibility)

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.

Test Failure Details
----------------------------------------------------------------- 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

Error when trying text-based model with single parameter

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

JOSS: typos

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.