imr-framework / pypulseq

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

Added PNS calculations #131

Closed FrankZijlstra closed 1 year ago

FrankZijlstra commented 1 year ago

This is a direct translation of the MATLAB Pulseq calcPNS function to python, renamed to calculate_pns. This includes a partial translation of the MATLAB safe_pns_prediction repository (https://github.com/filip-szczepankiewicz/safe_pns_prediction), put into utils/safe_pns_prediction.py. To test the functionality, this adds the pnsTest sequence "example" from MATLAB Pulseq.

A few, mostly stylistic, things may need some review:

FrankZijlstra commented 1 year ago

I moved the Siemens functions into utils/siemens and added the BSD license into safe_pns_prediction. I did not move calc_pns to remain consistent with MATLAB pulseq (similar as for ext_test_report, read_seq, etc.)

I updated the previous commit to keep the pull-request to a single commit.