diff --git a/CHANGELOG.md b/CHANGELOG.md index eb6af36..4ba3073 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +- 1.0.9 + - Fix pulseq importer: correct handling of gradients in RF block that are not slice selection gradients - 1.0.8 - `util.pulseq_plot` defaults to a stacked six-row figure (`stacked=True`) on pypulseq 1.5, 1.4 and pre-1.4 - stacked plots use a doubled figure height so the six rows stay readable diff --git a/Cargo.lock b/Cargo.lock index d7373d1..27c9baa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -65,7 +65,7 @@ dependencies = [ [[package]] name = "mrzero_core" -version = "1.0.8" +version = "1.0.9" dependencies = [ "num-complex", "pulseq-rs", diff --git a/Cargo.toml b/Cargo.toml index 5fb4c8b..899942a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mrzero_core" -version = "1.0.8" +version = "1.0.9" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/pyproject.toml b/pyproject.toml index 20a1f22..48ba54c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "mrzerocore" -version = "1.0.8" +version = "1.0.9" description = "Core functionality of MRzero" authors = [ {name = "Jonathan Endres", email = "jonathan.endres@uk-erlangen.de"}, diff --git a/python/MRzeroCore/sequence.py b/python/MRzeroCore/sequence.py index 37696d9..a1d9217 100644 --- a/python/MRzeroCore/sequence.py +++ b/python/MRzeroCore/sequence.py @@ -944,14 +944,23 @@ def integrate_axis(axis: str, t0: float, t1: float) -> float: # - .sample(t): return the amplitude at one time point # - .integrate(t0, t1): return the gradient moment over the given period if blocks[b_idx].gx is not None: - rf_hasgrad = True - rf_grad[0] = blocks[b_idx].gx.amp + if blocks[b_idx].gx.delay > rf.shape_duration + rf.delay: + pass # no graident present during rf + else: + rf_hasgrad = True + rf_grad[0] = blocks[b_idx].gx.amp if blocks[b_idx].gy is not None: - rf_hasgrad = True - rf_grad[1] = blocks[b_idx].gy.amp + if blocks[b_idx].gy.delay > rf.shape_duration + rf.delay: + pass # no graident present during rf + else: + rf_hasgrad = True + rf_grad[1] = blocks[b_idx].gy.amp if blocks[b_idx].gz is not None: - rf_hasgrad = True - rf_grad[2] = blocks[b_idx].gz.amp + if blocks[b_idx].gz.delay > rf.shape_duration + rf.delay: + pass # no graident present during rf + else: + rf_hasgrad = True + rf_grad[2] = blocks[b_idx].gz.amp # Shim handling: pulseq-rs always returns a list, with [(1.0, 0.0)] # meaning "no shim" - in that case fall back to the default.