# -*- coding: utf-8 -*-
"""
load_bin.py
"""

import numpy as np

def load(fn):
    d = np.load(fn)
    Ne         = d[d.files[0]]
    Nfreq      = d[d.files[1]]
    Freq       = d[d.files[2]]
    Nfeed      = d[d.files[3]]
    Iplanewave = d[d.files[4]]
    Planewave  = d[d.files[5]]
    E_posc     = d[d.files[6]]
    E_posm     = d[d.files[7]]
    E_posp     = d[d.files[8]]
    E_lng      = d[d.files[9]]
    E_tan      = d[d.files[10]]
    E_ifeed    = d[d.files[11]]
    E_feed     = d[d.files[12]]
    E_iload    = d[d.files[13]]
    E_load     = d[d.files[14]]
    Iground    = d[d.files[15]]
    Title      = d[d.files[16]]
    Z0         = d[d.files[17]]
    Xc         = d[d.files[18]]
    Zin        = d[d.files[19]]

    return \
    Ne, Nfreq, Freq, Nfeed, Iplanewave, Planewave, \
    E_posc, E_posm, E_posp, E_lng, E_tan, E_ifeed, E_feed, E_iload, E_load, \
    Iground, Title, Z0, Xc, Zin
