def name_assignment(spectrum: str):
    """
    assigns a name to the filename in which the spectrum is going to be saved
    """
    m0_aces = 'lte03900'
    m3_aces = 'lte03500'
    m6_aces = 'lte02800'
    m9_aces = 'lte02600'
    base = 'PHOENIX-ACES-AGSS-COND-2011-HiRes_wave.dat'
    if m0_aces in spectrum and base in spectrum:
        name = 'M0-PHOENIX-ACES'
    elif m3_aces in spectrum and base in spectrum:
        name = 'M3-PHOENIX-ACES'
    elif m6_aces in spectrum and base in spectrum:
        name = 'M6-PHOENIX-ACES'
    elif m9_aces in spectrum and base in spectrum:
        name = 'M9-PHOENIX-ACES'
    else:
        raise ValueError('Name {0} not found!'.format(spectrum))
    return name
