def process_fieldmap_solrf(data):
    """
    Processes array of raw data from a rfdataX file into a dict.
    
    From the documentation:
    Here, the rfdataV5 file contains the Fourier coefficients for both E fields and B fields.
    The first half contains E fields, and the second half contains B fields.
    See manual. 
    
    fourier_coeffients are as Impact-T prefers: 
    [0] is
    [1::2] are the cos parts
    [2::2] are the sin parts 
    Recontruction of the field at z shown in :
        fieldmap_reconsruction
    
    """
    
    d = {}
    d['Ez'] = {}
    d['Bz'] = {}
    
    # Ez
    n_coef = int(data[0])  # Number of Fourier coefs of on axis
    d['Ez']['z0'] = data[1] # distance before the zedge.
    d['Ez']['z1'] = data[2] # distance after the zedge.
    d['Ez']['L']  = data[3] # length of the Fourier expanded field.
    i1 = 4
    i2 = 4+n_coef
    d['Ez']['fourier_coefficients'] = data[i1:i2] # Fourier coefficients on axis
    
    # Bz
    data2 = data[i2:]
    n_coef = int(data2[0])  # Number of Fourier coefs of on axis
    d['Bz']['z0'] = data2[1] # distance before the zedge.
    d['Bz']['z1'] = data2[2] # distance after the zedge.
    d['Bz']['L']  = data2[3] # length of the Fourier expanded field.
    i1 = 4
    i2 = 4+n_coef
    d['Bz']['fourier_coefficients'] = data2[i1:i2] # Fourier coefficients on axis
    
    return d