private void ParseOption(string line)
        {
            string[] options = Regex.Split(line, @"\s");

            // Skip the first element since it will still contain the "#"
            IEnumerable <string> optionsEnumerable = options.Skip(1);

            // We will manually control the enumerator here since the last item (resistance)
            // has to fetch the next item in sequence
            using var enumer = optionsEnumerable.GetEnumerator();

            while (enumer.MoveNext())
            {
                string option = enumer.Current;
                // Format specifies that options can occur in any order
                if (TouchstoneEnumMap <FrequencyUnit> .ValidTouchstoneName(option))
                {
                    //string frequencyUnitName = frequencyUnitLookup.Value[option];
                    Options.FrequencyUnit = TouchstoneEnumMap <FrequencyUnit> .FromTouchstoneValue(option);
                }
                else if (TouchstoneEnumMap <FormatType> .ValidTouchstoneName(option))
                {
                    Options.Format = TouchstoneEnumMap <FormatType> .FromTouchstoneValue(option);
                }
                else if (TouchstoneEnumMap <ParameterType> .ValidTouchstoneName(option))
                {
                    Options.Parameter = TouchstoneEnumMap <ParameterType> .FromTouchstoneValue(option);
                }
                else if (option == resistanceSignifier)
                {
                    // For resistance, this option is specified in the format of "R [value]"
                    // Hence, we need to actually move the enumerator forward to get the value
                    bool success = enumer.MoveNext();
                    if (success)
                    {
                        string value = enumer.Current;

                        bool parsed = float.TryParse(value, out float r);
                        if (parsed)
                        {
                            Options.Resistance = r;
                        }
                        else
                        {
                            ThrowHelper("Options", "Bad value for resistance");
                        }
                    }
                    else
                    {
                        ThrowHelper("Options", "No value specified for resistance");
                    }
                }
                else
                {
                    ThrowHelper("Options", $"Invalid option value {option}");
                }
            }
        }
        private static string FormatOptions(TouchstoneOptions options)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append(OptionChar);

            string frequencyUnit = TouchstoneEnumMap <FrequencyUnit> .ToTouchstoneValue(options.FrequencyUnit);

            string parameter = TouchstoneEnumMap <ParameterType> .ToTouchstoneValue(options.Parameter);

            string format = TouchstoneEnumMap <FormatType> .ToTouchstoneValue(options.Format);

            string resistance = $"{ResistanceChar} {options.Resistance:g}";

            return(string.Join(" ", OptionChar, frequencyUnit, parameter, format, resistance));
        }
        //private static string FormatKeyword()
        private string FormatColumns(int numberOfPorts)
        {
            ListFormat format = core.GetListFormat(numberOfPorts);

            string frequencyDescription = $"Frequency ({Options.FrequencyUnit})";
            string columnPad            = string.Empty;

            if (settings.UnifiedColumnWidth)
            {
                frequencyDescription = frequencyDescription.PadRight(settings.ColumnWidth - 2);
                columnPad            = columnPad.PadRight(settings.ColumnWidth - 2);
            }

            //columns.Add(frequencyUnit);

            string parameter = TouchstoneEnumMap <ParameterType> .ToTouchstoneValue(Options.Parameter);

            string description1 = null, description2 = null;

            switch (Options.Format)
            {
            case FormatType.DecibelAngle:
                description1 = "Mag (dB)";
                description2 = "Angle (deg)";
                break;

            case FormatType.MagnitudeAngle:
                description1 = "Mag";
                description2 = "Angle (deg)";
                break;

            case FormatType.RealImaginary:
                description1 = "Real";
                description2 = "Imag";
                break;
            }

            /*int leftPad = (int)Math.Floor(settings.ColumnWidth / 2.0);
             * int rightPad = (int)Math.Ceiling(settings.ColumnWidth / 2.0);*/

            List <string> parameterDescriptions = new List <string>();

            ForEachParameter(numberOfPorts, format, indices =>
            {
                (int dest, int source) = indices;

                string column1 = $"{parameter}{dest}{source}:{description1}";
                string column2 = $"{parameter}{dest}{source}:{description2}";

                if (settings.UnifiedColumnWidth)
                {
                    column1 = column1.PadRight(settings.ColumnWidth);
                    column2 = column2.PadRight(settings.ColumnWidth);
                }

                parameterDescriptions.Add(column1);
                parameterDescriptions.Add(column2);
            });

            string formattedColumns             = FormatMatrix(frequencyDescription, columnPad, parameterDescriptions, numberOfPorts);

            return(formattedColumns);
        }