imr-framework / pypulseq

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

Seq.write() changes the seq object #32

Closed tonggehua closed 4 years ago

tonggehua commented 4 years ago

Describe the bug Using seq.write() to output the .seq file causes numerical values in the seq object to change due to unit conversion. The unexpected outcome is that when seq.write() is run twice, the second generated sequence is incorrect.

To Reproduce

  1. Go to the write_spgr.ipynb notebook and run all cells ahead of section 6.
  2. Run this cell in section 6 twice
  3. Compare the 2 seq files output from the 2 runs.

Expected behavior There should be scaling differences in the timing of gradients, for example.