def reassign_root_of_initial_spectra(d, name, root, iteration,
    transition_energy, intensity, wavelength, number, cutoff):
    """
    If the file being searched is run to find the 
    roots to take forward, need to know the roots!
    
    This function reassigns the value in the 'root'
    column to reflect this
    """
    if 'initial_spectra' in d[name]:
        d[name].pop(root)
    new_key = f'initial spectra: root {number + 1}'
    if new_key not in d[name]:
        d[name][new_key] = {}
        d[name][new_key]['peaks'] = {}
        if iteration not in d[name][new_key]['peaks']:
            d[name][new_key]['peaks'][iteration] = []
    if intensity > cutoff:
        d[name][new_key]['peaks'][iteration].append((transition_energy,
            wavelength, intensity))
    return d
