## Contrastinator

This tools helps calculate the contrast between two tissue components for spoiled gradient recalled echo (GRE) and spin echo (SE)
acquisitions. For a GRE acquisition, the calculation determines the optimal flip angle. This is in concept similar to the Ernst angle, but is optimizing
the contrast to find the large signal difference between two tissue components, instead of maximizing the signal for one component. For SE, the
calculation determines the maximum echo time. Also, please note that this estimation uses canonical equations and thus considers only idealized
conditions, such as perfect spoiling for GRE and perfect RF pulses. Results may not be fully accurate for more advanced MR sequences, including
fast spin echo. Furthermore, this tool simply optimizes contrast, not necessarily signal-to-noise ratio. Specifically this tool works by calculating
the difference between expected MRI signals based on input parameters from expected signal equations.

For GRE acquisitions, the signal equation is: PD × (1-e^{-TR/T1}) * sin(α) × e^{-TE/T2*} / (1-cos(α) × e^{-TR/T1})

For SE acqusitions, the signal equation is: PD × (1-e^{-TR/T1}) × e^{-TE/T2}

Input parameters include:

**PD's** - the relative proton density of the two tissues ranging between 0-1. For example: 0.92, 1

**T**_{1}'s - the T_{1} values of the two tissues in milliseconds. For example: 750, 1450

**T**_{2}/T_{2}^{*}'s - the T_{2}^{*} (for GRE) or T_{2} (for SE) values of the two tissues in milliseconds. For example: 75, 100

**TE** - the echo time in milliseconds (for GRE and T_{1}-weighted SE only). For example: 5

**TR** - the repetition time in milliseconds (for GRE and T_{2}-weighted SE only). For example: 100

**Hint:** You may want to use the Parameter
Database to find the T1 and T2 values you are looking for.

**Hint:** For GRE calculations, if you do not want to consider T_{2}^{*} effects. You can set the values
to be very large (e.g., 10000 ms). This will make the T_{2}^{*} relaxation neglible.

**Hint:** You must input two values for PD, T_{1}, and T_{2}/T_{2}^{*}.
They may be separated by any combination of the following delimiters: comma, space, semicolon, newline.