import re


def return_calrep_value_column_names(calrep_model):
    """Returns the column names for values in a calrep model. For example if the
    calrep model is a 1-port, then it returns ["magS11","argS11"] """
    measurement_type = calrep_model.metadata["Measurement_Type"]
    if re.search('1|one', measurement_type, re.IGNORECASE):
        column_names = ['magS11', 'argS11']
    elif re.search('2|two', measurement_type, re.IGNORECASE):
        if re.search('NR', measurement_type, re.IGNORECASE):
            column_names = ['magS11', 'argS11', 'magS12', 'argS12', 'magS21', 'argS21', 'magS22', 'argS22']
        else:
            column_names = ['magS11', 'argS11', 'magS21', 'argS21', 'magS22', 'argS22']
    else:
        column_names = ['magS11', 'argS11', 'Efficiency']
    return column_names