Phase Graph Tutorial
A collection of educational notebooks about Extended Phase Graphs (EPGs):
phase_graphs.ipynb: plotting phase graphsepg_examples.ipynb: basic EPG examplesplot_epg_states.ipynb: plot the EPG state evolutiontse_signal_shaping.ipynb: variable flip-angles for TSE signal shapingepgOptimization_esmrmb25.ipynb: ESMRMB 2025 tutorial notebook
The notebooks imports functionality from epg_code.py, which should be in the same directory:
pg_plot()- a function to plot phase graphsbasic_epg()- a python class for basic EPG calculations
The latter is only used, if the pyepg class is not available. This is a python wrapper for a fast cpp implementation of EPGs, see here.
Both classes have the same functionality, but pyepg is approximately 1000 times faster than basic_epg. With basic_epg some example may take several minutes.