Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup structure & workflows and add t2prep block #2

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

schuenke
Copy link
Contributor

No description provided.

schuenke and others added 8 commits January 15, 2025 08:29
* add pyproject.toml

* add .gitignore

* add general folder structure
Add GitHub workflows and dependabot config
* change definition of system defaults

* small docstring fixes in t2prep

* add t1prep block

* add tests for t1prep block
Copy link

@ckolbPTB ckolbPTB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can discuss the inversion_time for the T1prep pulse again.

*.swp
*.swo

# Ignore output folder

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe also add *.seq ?

hooks:
- id: typos

- repo: https://github.com/fzimmermann89/check_all

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to have the all-logic? In MRpro we did this for the documentation. Maybe we leave it for the moment and add it back in when we have a documentation which requires that...

@@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="0" time="1.253" timestamp="2025-01-15T16:00:30.474844+01:00" hostname="i81453" /></testsuites>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this file be here?

Duration of the adiabatic inversion pulse (in seconds).
add_spoiler
Toggles addition of spoiler gradients after the inversion pulse.
The spoiler does not increase the total duration of the block, but limits the minimum inversion time.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does it not increase the block duration?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After reading on about the inversion_time I understand now why this does not increase the block duration.

if seq is None:
seq = pp.Sequence(system=system)

# get current duration of sequence before adding T2prep block

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# get current duration of sequence before adding T2prep block
# get current duration of sequence before adding T1 preparation block

) -> tuple[pp.Sequence, float]:
"""Add an adiabatic T1 preparation block to a sequence.

The adiabatic inversion pulse is a hyperbolic secant pulse with default values similar to the one used by Siemens.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The adiabatic inversion pulse is a hyperbolic secant pulse with default values similar to the one used by Siemens.
The adiabatic inversion pulse is a hyperbolic secant pulse with default values similar to the one used by vendors.

if tau > 0:
seq.add_block(pp.make_delay(tau))

# calculate total duration of T1prep block

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# calculate total duration of T1prep block
# calculate total duration of T1 preparation block

system
PyPulseq system limit object. Must have rf_dead_time attribute != None.
duration_180
Duration of 180° refocussing block pulse (in seconds). The 90° pulses have half this duration.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Duration of 180° refocussing block pulse (in seconds). The 90° pulses have half this duration.
Duration of 180° refocusing block pulse (in seconds). The 90° pulses have half this duration.

if seq is None:
seq = pp.Sequence(system=system)

# get current duration of sequence before adding T2prep block

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# get current duration of sequence before adding T2prep block
# get current duration of sequence before adding T2 preparation block

@@ -0,0 +1,112 @@
"""Tests for the MLEV-4 type T2 preparation block."""

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be name test_t2prep.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants