def get_metallicity_from_atm_table_filename(filename):
    """
    Get metallicity as number from filename / directory.

    :param filename: str;
    :return: float;
    """
    m = str(filename).split('_')[0][-3:]
    sign = 1 if str(m).startswith('p') else -1
    value = float(m[1:]) / 10.0
    return value * sign
