openjournals / joss-reviews

Reviews for the Journal of Open Source Software
Creative Commons Zero v1.0 Universal
704 stars 37 forks source link

[REVIEW]: pypulseq: A Python Package for MRI Pulse Sequence Design #1725

Closed whedon closed 4 years ago

whedon commented 5 years ago

Submitting author: @imr-framework (Sairam Geethanath) Repository: https://github.com/imr-framework/pypulseq Version: 1.2.2r1 Editor: @Kevin-Mattheus-Moerman Reviewers: @grlee77, @mathieuboudreau, @spinicist Archive: 10.5281/zenodo.3479527

Status

status

Status badge code:

HTML: <a href="https://joss.theoj.org/papers/fe83dd500d56a5f45db80def6ca6ed63"><img src="https://joss.theoj.org/papers/fe83dd500d56a5f45db80def6ca6ed63/status.svg"></a>
Markdown: [![status](https://joss.theoj.org/papers/fe83dd500d56a5f45db80def6ca6ed63/status.svg)](https://joss.theoj.org/papers/fe83dd500d56a5f45db80def6ca6ed63)

Reviewers and authors:

Please avoid lengthy details of difficulties in the review thread. Instead, please create a new issue in the target repository and link to those issues (especially acceptance-blockers) by leaving comments in the review thread below. (For completists: if the target issue tracker is also on GitHub, linking the review thread in the issue or vice versa will create corresponding breadcrumb trails in the link target.)

Reviewer instructions & questions

@grlee77, @mathieuboudreau, and @spinicist, please carry out your review in this issue by updating the checklist below. If you cannot edit the checklist please:

  1. Make sure you're logged in to your GitHub account
  2. Be sure to accept the invite at this URL: https://github.com/openjournals/joss-reviews/invitations

The reviewer guidelines are available here: https://joss.readthedocs.io/en/latest/reviewer_guidelines.html. Any questions/concerns please let @Kevin-Mattheus-Moerman know.

Please try and complete your review in the next two weeks

Review checklist for @grlee77

Conflict of interest

Code of Conduct

General checks

Functionality

Documentation

Software paper

Review checklist for @mathieuboudreau

Conflict of interest

Code of Conduct

General checks

Functionality

Documentation

Software paper

Review checklist for @spinicist

Conflict of interest

Code of Conduct

General checks

Functionality

Documentation

Software paper

whedon commented 5 years ago

Hello human, I'm @whedon, a robot that can help you with some common editorial tasks. @grlee77, @mathieuboudreau it looks like you're currently assigned to review this paper :tada:.

:star: Important :star:

If you haven't already, you should seriously consider unsubscribing from GitHub notifications for this (https://github.com/openjournals/joss-reviews) repository. As a reviewer, you're probably currently watching this repository which means for GitHub's default behaviour you will receive notifications (emails) for all reviews 😿

To fix this do the following two things:

  1. Set yourself as 'Not watching' https://github.com/openjournals/joss-reviews:

watching

  1. You may also like to change your default settings for this watching repositories in your GitHub profile here: https://github.com/settings/notifications

notifications

For a list of things I can do to help you, just type:

@whedon commands

For example, to regenerate the paper pdf after making changes in the paper's md or bib files, type:

@whedon generate pdf
whedon commented 5 years ago
Attempting PDF compilation. Reticulating splines etc...
whedon commented 5 years ago

:point_right: Check article proof :page_facing_up: :point_left:

Kevin-Mattheus-Moerman commented 5 years ago

@imr-framework, @grlee77, @mathieuboudreau this is where the review takes place. The reviewers each have a set of tick boxes at the top of this issue to guide them through the process. Let me know if you have any questions. Let the reviewing begin!

Kevin-Mattheus-Moerman commented 5 years ago

@whedon add @spinicist as reviewer

whedon commented 5 years ago

OK, @spinicist is now a reviewer

Kevin-Mattheus-Moerman commented 5 years ago

Thanks for joining @spinicist, I've added a checkbox set for you at the top

grlee77 commented 5 years ago

I have performed my initial review.

Summary

The Pypulseq software is a port of the Pulseq Matlab package to Python. This makes the Pulseq format for rapid sequence prototyping more readily available to sites without need for a commercial license. The authors also have used Python-based machine learning in combination with Pypulseq for novel sequence design. The overall goal is to have a tool for rapid sequence development without relying on complicated and proprietary vendor-specific pulse sequence development tools. The advantage of such an approach is greatly reduced development time for simple experiments and rapid prototyping.

I verified that Pulseq files are produced by running the examples. The generated files are plain text and appear to conform to the Pulseq specification. I currently work with Philips MR systems, which is not one of the supported vendors, so I did not attempt to verify proper execution of the Pulseq files on a physical MRI scanner.

The software appears to work as advertised. Its main weakness in relation to the JOSS criteria is the lack of automated testing and/or continuous integration to test across platforms. I opened imr-framework/pypulseq#16 regarding this.

Comments regarding the text of the paper

1.) A brief statement on the limitations of the types of sequences that can be designed with this simplified approach is warranted so as not to oversell the capabilities. For example, it seems that scans requiring features such as cardiac or respiratory gating, feedback from real-time image-based navigators, etc. are not going to be possible. I assume that it also presents difficulty for scans that require more complicated planning such as placement of saturation slabs and or localized shim boxes interactively prior to scan start.

2.) Similarly, is offline image reconstruction (i.e. not with the vendor-supplied reconstructor) always required when using this tool?

3.) I would add a reference to J. Nielsen's TOPPE publication as a closely related work (https://doi.org/10.1002/mrm.26990). (It seems that on the GE platform a Pulseq->TOPPE conversion is done to actually play out the sequences on the scanner?).

4.) For the puposes of the "state of the field" JOSS criteria, it should probably also be mentioned how this framework (and TOPPE) are fast and do not require compilation (as compared to C++ frameworks like ODIN or SequenceTree).

5.) Are there any areas that pypulseq currently offers additional functionality (or lacks functionality) relative to the Matlab implementation? This would be good to know for existing Matlab users thinking of making the switch to Python.

Minor typos/suggested phrasing changes

1.) in the summary:
"easy integrability with" -> "easy integration with"

2.) under the "Statement of Need"
"These are aimed at achieving" <- unclear what "these" is referring to

3.) in the section on the Pulseq format:

"A pulse sequence comprises of pulsed, magnetic field gradient, delay or ADC readout events" ->

"A pulse sequence comprises of radiofrequency pulses, magnetic field gradient waveforms, delays or analog-to-digital converter (ADC) readout events"

4.) Please include the meeting names (International Society for Magnetic Resonance in Medicine?) for the fourth reference and last reference.
sravan953 commented 5 years ago

@grlee77 Thank you for your comments, will work on them and revert. Have a nice weekend!

sravan953 commented 4 years ago

@grlee77 I have addressed your comments in the most recent commit. Please take a look!

More specifically regarding #5 in your comments: our future efforts involve incorporating SAR computation and real-time pulse sequence design.

mathieuboudreau commented 4 years ago

@whedon generate pdf

whedon commented 4 years ago
Attempting PDF compilation. Reticulating splines etc...
whedon commented 4 years ago

:point_right: Check article proof :page_facing_up: :point_left:

mathieuboudreau commented 4 years ago

Contribution and authorship: Has the submitting author (@imr-framework) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?

@imr-framework could you clarify what contribution(s) John Thomas Vaughan Jr. made to this project; I checked out the contributors to the source code here, and he doesn't appear on the list (whereas @tonggehua has made some commits and doesn't appear on the paper).

mathieuboudreau commented 4 years ago

@imr-framework does there exist some kind of validator tool to evaluate if a generated .seq file is (1) properly formatted, and (2) doesn't exceed vendor-imposed hardware limits. I don't expect that this exists within your software, since .seq files have been developed previously, I'm wondering if there's an external tool that already does this?

sravan953 commented 4 years ago

@mathieuboudreau Regarding contributions- John Thomas Vaughan Jr. has been principally involved in the design and review of this project, like for Virtual Scanner. We have been using PyPulseq internally, and the one commit from @tonggehua was regarding documentation. The authors list was finalised after internal deliberations.

Regarding the formatting- We utilised a diffcheck tool to ensure that the .seq files generated by PyPulseq match with Pulseq 1.2.0's files. We performed these checks for the demo scripts that have been bundled. The only difference between .seq files generated by PyPulseq and Pulseq 1.2.0 is the comment on line 2 in every *.seq file which indicates which tool generated the file.

Regarding an external validator tool- The check_timing() and test_report() methods can be leveraged to ensure that the designed pulse sequence is in accordance with the specified gradient raster time limits. Subsequently, a successfully generated *.seq file might or might not play on the scanner, depending on whether the hardware limits were violated or not.

mathieuboudreau commented 4 years ago

Ok great, thanks for all that additional information!

grlee77 commented 4 years ago

@grlee77 I have addressed your comments in the most recent commit. Please take a look!

Thanks, I have checked off the items related above that were addressed.

Regarding functionality, I had not checked the box because I did not verify on an actual scanner, but given that the Pulseq files look correctly formatted and the author has performed an offline comparison vs. the same demos in the Matlab package, I would trust that they work equivalently on actual hardware.

Re Automated testing: This has not been implemented, but the author has indicated future plans to do so in imr-framework/pypulseq#16. It is currently possible for users to manually test the basic functionality of the software by running the supplied examples.

spinicist commented 4 years ago

Hello,

I've gone through the review checklist.

The example in README.md does not appear to work. There is a typo - slew_unit='mT/m/s' should be slew_unit='T/m/s', but after fixing that there is a division by zero error in make_sinc_pulse. The example EPI sequence works fine, as does the GRE sequence but it is very slow to plot.

Similarly to the other authors I did not go as far as testing the sequences on an actual scanner, as (for me) that would involve installation of TOPPE which would take considerable time and I consider beyond the scope of this review. On the same lines, I question the ultimate usefulness of tools such as PyPulseq and TOPPE because of their lack of interaction with vendor UI and safety limits (as mentioned by other reviewers). For instance all GE vendor sequences include extensive software SAR checks, which are not included in PyPulseq/TOPPE. I hence foresee conflicts with local safety and ethics policies if researchers want to use such sequences for scanning subjects.

I do not think the above is reason to reject this paper as PyPulseq itself is clearly useful for prototyping, and I have ticked the Functionality box because I think the functions that Py Pulseq claims to have, have been demonstrated. I only raise it because I think the realistic use-cases are fairly limited, and hence I think the claim "We also envisage PyPulseq to be utilized for repeatability and reproducibility studies ... (multi-site, multi-vendor)" is slightly strong.

sravan953 commented 4 years ago

@spinicist Thanks for your comments, have made changes to the README based on your inputs.

Regarding conflicts with local safety and ethics policies- We will soon incorporate SAR safety features into PyPulseq. @sairamgeethanath has a MATLAB version available at - https://github.com/imr-framework/sar4seq, which will soon get integrated into PyPulseq. We advocate leveraging PyPulseq as an open-source tool for prototyping pulse sequences, and do not advise subject scanning (1, 2).

For repeatability and reproducibility- OMEGA by @qianenlin focuses on the repeatability of MRF using NIST phantom (Jiang et al., MRM 2014). A MATLAB version exists as reported in Qian et al., ISMRM 2019. We are now looking at developing a PyPulseq version.

The AMRI project leverages PyPulseq. Video recordings demonstrating PyPulseq’s functionality from AMRI are available on YouTube.

sairamgeethanath commented 4 years ago

@sravan953 @spinicist The AMRI phantom video illustrates the point better about using different acquisition parameters to generate different .seq files using pyPulseq and using them to scan phantoms, for example.

sravan953 commented 4 years ago

@mathieuboudreau @grlee77 @spinicist We also have AMRI-Scanner as an Online Service (AMRI-SOS). AMRI-SOS lets you upload a sequence file to Google Drive and request a scan. On our end, we run an AMRI-SOS script that downloads the uploaded *.seq file and runs it on a Siemens Prisma 3T. This way we can prove functionality. Thanks @sairamgeethanath for the idea!

sairamgeethanath commented 4 years ago

@mathieuboudreau @grlee77 @spinicist Could you please let us know of action points to take this review forward?

sairamgeethanath commented 4 years ago

@mathieuboudreau @grlee77 @spinicist We also have AMRI-Scanner as an Online Service (AMRI-SOS). AMRI-SOS lets you upload a sequence file to Google Drive and request a scan. On our end, we run an AMRI-SOS script that downloads the uploaded *.seq file and runs it on a Siemens Prisma 3T. This way we can prove functionality. Thanks @sairamgeethanath for the idea!

https://docs.google.com/forms/d/e/1FAIpQLSf3MIC6bcOpV20-yYrqmO_OhK4wNgsKZu3oBqRYe4CLbzIT8A/viewform?fbzx=3238199011716171808

spinicist commented 4 years ago

@whedon commands

whedon commented 4 years ago

Here are some things you can ask me to do:

# List Whedon's capabilities
@whedon commands

# List of editor GitHub usernames
@whedon list editors

# List of reviewers together with programming language preferences and domain expertise
@whedon list reviewers

EDITORIAL TASKS

# Compile the paper
@whedon generate pdf

# Compile the paper from alternative branch
@whedon generate pdf from branch custom-branch-name

# Ask Whedon to check the references for missing DOIs
@whedon check references
spinicist commented 4 years ago

I think my points have been sufficiently addressed. I have no further comments.

I'm not actually sure how to mark my review as complete?

Kevin-Mattheus-Moerman commented 4 years ago

@spinicist If you've ticked all the boxes and have given your blessing here then that is it. Thanks for your help! :tada:

grlee77 commented 4 years ago

I have checked off the remaining items as well and do not have any other remaining unaddressed comments.

Thanks for provided the additional AMRI info, @sravan953.

mathieuboudreau commented 4 years ago

I did the same earlier today - looks complete on my end !

Kevin-Mattheus-Moerman commented 4 years ago

Thanks for your help @grlee77, @mathieuboudreau, @spinicist !!! :tada: :robot:

Kevin-Mattheus-Moerman commented 4 years ago

@whedon generate pdf

whedon commented 4 years ago
Attempting PDF compilation. Reticulating splines etc...
whedon commented 4 years ago

:point_right: Check article proof :page_facing_up: :point_left:

Kevin-Mattheus-Moerman commented 4 years ago

@whedon check references

whedon commented 4 years ago
Attempting to check references...
whedon commented 4 years ago

OK DOIs

- None

MISSING DOIs

- https://doi.org/10.1002/mrm.26235 may be missing for title: Pulseq: a rapid and hardware-independent pulse sequence prototyping framework
- https://doi.org/10.1016/j.mri.2018.03.008 may be missing for title: Pulseq-Graphical Programming Interface: Open source visual environment for prototyping pulse sequences and integrated magnetic resonance imaging algorithm development
- https://doi.org/10.1016/j.jmr.2004.05.021 may be missing for title: ODIN—object-oriented development interface for NMR
- https://doi.org/10.1002/mrm.25640 may be missing for title: Pulse sequence programming in a dynamic visual environment: SequenceTree
- https://doi.org/10.1002/mrm.26990 may be missing for title: TOPPE: A framework for rapid prototyping of MR pulse sequences

INVALID DOIs

- None
Kevin-Mattheus-Moerman commented 4 years ago

@imr-framework here are some additional issues/comments in relation to your paper. Please make these required changes:

sravan953 commented 4 years ago

@Kevin-Mattheus-Moerman Thanks for the comments! I believe I have addressed your inputs, and have pushed my commit. Please let me know.

Kevin-Mattheus-Moerman commented 4 years ago

@whedon generate pdf

whedon commented 4 years ago
Attempting PDF compilation. Reticulating splines etc...
whedon commented 4 years ago

:point_right: Check article proof :page_facing_up: :point_left:

Kevin-Mattheus-Moerman commented 4 years ago

@whedon check references

whedon commented 4 years ago
Attempting to check references...
whedon commented 4 years ago

OK DOIs

- 10.1002/mrm.26235 is OK
- 10.1016/j.mri.2018.03.008 is OK
- 10.1016/j.jmr.2004.05.021 is OK
- 10.1002/mrm.25640 is OK
- 10.1002/mrm.26990 is OK
- 10.1615/CritRevBiomedEng.2019029380 is OK

MISSING DOIs

- None

INVALID DOIs

- None
Kevin-Mattheus-Moerman commented 4 years ago

@sravan953 thanks. One point is remaining, in the sentence containing"...and export them a .seq file.", you forgot to add either to or as i.e. use "...and export them [to] a .seq file." or "...and export them [as] a .seq file."

Kevin-Mattheus-Moerman commented 4 years ago

@sravan953, once you've made the above change, can you run @whedon generate pdf here? Also can you do the following:

sravan953 commented 4 years ago

@whedon generate pdf

whedon commented 4 years ago
Attempting PDF compilation. Reticulating splines etc...
sravan953 commented 4 years ago

@sravan953 thanks. One point is remaining, in the sentence containing"...and export them a .seq file.", you forgot to add either to or as i.e. use "...and export them [to] a .seq file." or "...and export them [as] a .seq file."

Apologies for overlooking this, this has been fixed.