-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: main
Are you sure you want to change the base?
Conversation
* 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
There was a problem hiding this 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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# 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.""" |
There was a problem hiding this comment.
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
No description provided.