def giveMeasureTypeUnits(measureName, measureType=None):
    """ Given a measure name, returns its units and its type.

    :param measureName: Name of the measure
    :type measureName: str
    :param measureType: Type of the measure (optional)
    :type measureType: str
    :return: A 2-tuple containing the type of the measure and the units
    :rtype: str,str
    """
    if measureType is None:
        if measureName == 'ER' or measureName == 'DIFF':
            measureType = 'SV'
        else:
            measureType = measureName
    if measureType == 'MF':
        units = 'nT'
    elif measureType == 'SV':
        units = 'nT/yr'
    elif measureType == 'U':
        units = 'km/yr'
    elif measureType == 'DIVHU':
        units = '/yr'
    else:
        print(
            'Measure name not recognized for %s in giveMeasureTypeUnits. Setting units to nT.'
            , measureName)
        units = 'nT'
    return measureType, units
