def model_type(model):
    """Returns the Model Type from the model name
    """
    model = model.upper()

    if model in ['CO-A4', 'SO2-A4', 'NO-A4', 'NOX-A4', 'OX-A4']:
        ans = 'toxic'
    elif model in ['HIH6130', 'PT1000']:
        ans = 'met'
    elif model in ['OPC-N2']:
        ans = 'particle'
    elif model in ['PID-AH', 'PID-A1']:
        ans = 'pid'
    elif model in ['MIT', 'X1', 'X2']:
        ans = 'mit'
    elif model in ['E-BAM', 'EBAM']:
        ans = 'ebam'
    elif model in ['MITv2', 'mit_v2', 'MIT_v2']:
        ans = 'mit_v2'
    elif model.lower() in ['trex', 'trex2017']:
        ans = 'trex'
    else:
        ans = 'other'

    return ans