Closed FrankZijlstra closed 1 week ago
Didn't find the time yet, but I will hopefully review it soon
Hey. I finally went through the code. Sorry for the loooooooooong delay @FrankZijlstra
I never used the Sequence.install() option, but hopefully be able to give it a try on Monday.
Regarding the code, I think making SequenceDefinition
a real Abstract Base Class would make sense. But I could do that if you want.
Yes, using the abstract base class makes sense. But since I never used it before, you are probably able to change it quicker than me. Having can_install
default to True
would be nice if possible, but it wouldn't be a big deal if that method is also abstract.
I tried to test the feature at our scanner, but in our institute the scanner is in a separate network so I cannot access it from my computer.
The code in general looks good to me. Did you verify that it actually works as expected @FrankZijlstra? If you confirm it, I would be willing to approve it. Or does @btasdelen wanna give it a try?
Yes, I did test it (twice I believe), but only on one scanner (running Numaris X, not Numaris 4). The installation worked fine. At this point I don't remember if the caching of the scanner detection worked properly. I remember that once it kept pinging the scanner on every install call, despite being the same ipython runtime (i.e. where the cache should work). But I don't recall whether or not I fixed it afterwards... Either way that would be minor issue, that could be resolved easily later when someone is able to test it more thoroughly.
Our scanner is also on a separate network. The workflow we use to install is to upload the sequence to a known directory on a remote server. The scanner has access to the remote server, and we have a script to pull and install the .seq files on the scanner. Maybe I could register the remote server as a scanner? I don't know if it is a useful test, though.
This PR adds an implementation of the
Sequence.install
functionality as suggested in #163, with an interface that is very similar to Matlab Pulseq.pypulseq.Sequence.install.register_scanner
The implementation is fairly straightforward, but I wonder if the
install
function should throw exceptions to give more detailed errors (e.g. stdout from the system command calls).