sct_compute_ernst_angle

Function to compute the Ernst Angle.

For examples of T1 values in the brain, see Wansapura et al. NMR relaxation times in the human brain at 3.0 tesla. Journal of magnetic resonance imaging : JMRI (1999) vol. 9 (4) pp. 531-8. T1 in WM: 832msT1 in GM: 1331ms

usage: sct_compute_ernst_angle -tr <float> [-t1 <float>] [-b <float> <float>]
                               [-o <str>] [-ofig <str>] [-h] [-v <int>]
                               [-profile-time [<file>]]
                               [-trace-memory [<folder>]]

MANDATORY ARGUMENTS

-tr

Value of TR (in ms) to get the Ernst Angle. Example: 2000

OPTIONAL ARGUMENTS

-t1

T1 value (in ms).

Default: 832.0

-b

Min/Max range of TR (in ms) separated with space. Only use with -v 2.

Default: [500, 3500]

-o

Name of the output file containing Ernst angle result.

Default: “ernst_angle.txt”

-ofig

Name of the output graph. Only use with -v 2.

Default: “ernst_angle.png”

MISC ARGUMENTS

-v

Possible choices: 0, 1, 2

Verbosity. 0: Display only errors/warnings, 1: Errors/warnings + info messages, 2: Debug mode.

Default: 1

-profile-time

Enables time-based profiling of the program, dumping the results to the specified file.

If no file is specified, human-readable results are placed into a ‘time_profiling_results.txt’ document in the current directory (’/home/docs/checkouts/readthedocs.org/user_builds/spinalcordtoolbox/checkouts/stable/documentation/source’). If the specified file is a .prof file, the file will instead be in binary format, ready for use with common post-profiler utilities (such as snakeviz).

-trace-memory

Enables memory tracing of the program.

When active, a measure of the peak memory (in KiB) will be output to the file peak_memory.txt. Optionally, developers can also modify the SCT code to add additional snapshot_memory() calls. These calls will ‘snapshot’ the memory usage at that moment, saving the memory trace at that point into a second file (memory_snapshots.txt).

By default, both outputs will be placed in the current directory (’/home/docs/checkouts/readthedocs.org/user_builds/spinalcordtoolbox/checkouts/stable/documentation/source’). Optionally, you may provide an alternative directory (-trace-memory <dir_name>), in which case all files will be placed in that directory instead. Note that this WILL incur an overhead to runtime, so it is generally advised that you do not run this in conjunction with the time profiler or in time-sensitive contexts.