imr-framework / pypulseq

Pulseq in Python
https://pypulseq.readthedocs.io
GNU Affero General Public License v3.0
117 stars 63 forks source link

Updating Sequence.set_definition() "val" keyword argument to "value" to match demo scripts #102

Open rextlfung opened 1 year ago

rextlfung commented 1 year ago

Describe the bug Hi, this is a minor bug. The current demo scripts on the GitHub appears to be incompatible with the latest pypulseq module installed via pip. For example, line 147 of write_gre.py runs seq.set_definition(key="FOV", value=[fov, fov, slice_thickness]) raises the error TypeError: set_definition() got an unexpected keyword argument 'value'.

Workaround/Solution I resolved this error by using the keyword argument 'val' instead to match the latest PyPulseq release (1.3.1.post1), but figured I'd report the issue in case any MRI beginners like myself run into the same problem when running the demo scripts on the GitHub.

sravan953 commented 1 year ago

Hi, thanks for reporting this! Can you reproduce this issue if you pip install from the dev branch?

rextlfung commented 1 year ago

Hi. Pip installing from the dev branch works since seq.set_definition() expects the keyword argument value there instead of val.

sravan953 commented 1 year ago

Then, pip installing from the main branch causes the issue?

rextlfung commented 1 year ago

I ran into the issue when I just did pip install pypulseq, which I believe searches PyPI (online) for the latest package named pypulseq, which is pupulseq-1.3.1.post1 when I just tried it on a fresh environment.

sravan953 commented 1 year ago

Hi @rextlfung , can you verify if this issue persists in the latest pip install?

aTrotier commented 8 months ago

still the same issue when I installed it from pip

pypulseq 1.3.1.post1 pypi_0 pypi