pypulseq icon indicating copy to clipboard operation
pypulseq copied to clipboard

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

Open rextlfung opened this issue 2 years ago • 6 comments

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.

rextlfung avatar Feb 22 '23 19:02 rextlfung

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

sravan953 avatar Mar 01 '23 03:03 sravan953

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

rextlfung avatar Mar 01 '23 17:03 rextlfung

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

sravan953 avatar Mar 02 '23 15:03 sravan953

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.

rextlfung avatar Mar 03 '23 03:03 rextlfung

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

sravan953 avatar Mar 20 '23 23:03 sravan953

still the same issue when I installed it from pip

pypulseq 1.3.1.post1 pypi_0 pypi

aTrotier avatar Jan 25 '24 10:01 aTrotier