Beispiel #1
0
def plot_compare_library_beams():
    min_el = 80
    e3d = alib.e3d_array_beam(az0=0.0, el0=90.0, I_0=10**4.3)
    bp1 = alib.airy_beam(az0=0.0,
                         el0=90.0,
                         lat=60,
                         lon=19,
                         f=233e6,
                         I_0=10**4.3,
                         a=40.0)
    bp2 = alib.cassegrain_beam(az0=0.0,
                               el0=90.0,
                               lat=60,
                               lon=19,
                               f=233e6,
                               I_0=10**4.3,
                               a0=80.0,
                               a1=80.0 / 16.0 * 2.29)
    bp3 = alib.planar_beam(az0=0.0,
                           el0=90.0,
                           lat=60,
                           lon=19,
                           f=233e6,
                           I_0=10**4.3,
                           a0=40.0,
                           az1=0,
                           el1=90.0)
    antenna.plot_gains([bp1, bp2, bp3, e3d], min_el=min_el)
Beispiel #2
0
def eiscat_uhf():
    uhf_lat = 69.34023844
    uhf_lon = 20.313166
    uhf = rc.rx_antenna(
        "UHF Tromso", uhf_lat, uhf_lon, 30, 930e6, 100,
        a.cassegrain_beam(az0=0,
                          el0=90,
                          lat=uhf_lat,
                          lon=uhf_lon,
                          I_0=10**4.3,
                          f=930e6,
                          a0=16.0,
                          a1=4.58 / 2.0))

    uhf_tx = rc.tx_antenna(
        "UHF Tromso TX",
        uhf_lat,
        uhf_lon,
        30,
        930e6,
        100,
        a.cassegrain_beam(0,
                          90,
                          uhf_lat,
                          uhf_lon,
                          I_0=10**4.3,
                          a0=16.0,
                          a1=4.58 / 2.0,
                          f=930e6),
        rslib.beampark_model(az=90.0,
                             el=75.0,
                             lat=uhf_lat,
                             lon=uhf_lon,
                             alt=0.0),
        2e6,  # 2 MW
        1e6,  # 1 MHz
        0.125)  # 12.5% duty-cycle

    # EISCAT UHF beampark
    tx = [uhf_tx]
    rx = [uhf]

    euhf = rc.radar_system(tx, rx, 'Eiscat UHF')
    return euhf
Beispiel #3
0
def plot_beams():
    min_el = 80.0
    bp = alib.airy_beam(90.0, 90, 60, 19, f=930e6, I_0=10**4.3, a=16.0)
    gains = []
    els = n.linspace(min_el, 90.0, num=1000)
    for a in els:
        k = coord.azel_ecef(60.0, 19.0, 0.0, 90, a)
        gains.append(bp.gain(k))
    gains = n.array(gains)
    plt.plot(els, 10.0 * n.log10(gains), label="airy")

    bp = alib.cassegrain_beam(90.0,
                              90,
                              60,
                              19,
                              f=930e6,
                              I_0=10**4.3,
                              a0=16.0,
                              a1=4.58)
    gains = []
    for a in els:
        k = coord.azel_ecef(60.0, 19.0, 0.0, 90, a)
        gains.append(bp.gain(k))
    gains = n.array(gains)
    plt.plot(els, 10.0 * n.log10(gains), label="cassegrain")

    bp = alib.planar_beam(0,
                          90.0,
                          60,
                          19,
                          I_0=10**4.3,
                          f=233e6,
                          a0=40.0,
                          az1=0,
                          el1=90.0)
    gains = []
    for a in els:
        k = coord.azel_ecef(60.0, 19.0, 0.0, 90, a)
        gains.append(bp.gain(k))
    gains = n.array(gains)

    plt.plot(els, 10.0 * n.log10(gains), label="planar")
    plt.ylim([0, 50])

    plt.legend()
    plt.show()
Beispiel #4
0
def plot_compare_eiscat_beams():
    min_el = 80
    uhf0 = alib.airy_beam(az0=0.0,
                          el0=90.0,
                          lat=60,
                          lon=19,
                          f=930e6,
                          I_0=10**4.81,
                          a=16.0)
    uhf1 = alib.cassegrain_beam(az0=0.0,
                                el0=90.0,
                                lat=60,
                                lon=19,
                                f=930e6,
                                I_0=10**4.81,
                                a0=32.0,
                                a1=4.58)
    antenna.plot_gains([uhf1], min_el=min_el, name="(UHF)")
Beispiel #5
0
                    aop=0,
                    mu0=0,
                    C_D=2.3,
                    A=1.0,
                    m=1.0,
                    diam=0.1)

ITER = 1
dt = 24

e3d.set_beam(
    'TX',
    alib.cassegrain_beam(az0=0.0,
                         el0=90.0,
                         lat=60,
                         lon=19,
                         f=233e6,
                         I_0=10**4.3,
                         a0=80.0,
                         a1=80.0 / 16.0 * 2.29))
e3d.set_beam(
    'RX',
    alib.cassegrain_beam(az0=0.0,
                         el0=90.0,
                         lat=60,
                         lon=19,
                         f=233e6,
                         I_0=10**4.3,
                         a0=80.0,
                         a1=80.0 / 16.0 * 2.29))

exec_time_cassegrain = n.zeros((ITER, ))
Beispiel #6
0
plt.show()
exit()



beams = [
    alib.e3d_array_beam_interp(az0=0, el0=el, I_0=10**4.5)
    for el in np.linspace(90.0, 30.0, num=4)
]

antenna.plot_gains(beams,res=1000,min_el = 0.0)

plt.show()
exit()

beams = [
    alib.planar_beam(az0=0., el0=90., I_0=4.5**10, f=366e6, a0=40., az1=0., el1=90.),
    alib.cassegrain_beam(az0=0., el0=90., I_0=4.5**10, f=940e6, a0=40., a1=20.),
    alib.uhf_beam(az0=0., el0=90., I_0=4.5**10, f=266e6),
    alib.e3d_array_beam_stage1(az0=0, el0=90.0, I_0=10**4.2),
    alib.e3d_array_beam_stage1(az0=0, el0=90.0, I_0=10**4.2, opt='sparse'),
    alib.e3d_array_beam(az0=0, el0=90.0, I_0=10**4.5),
]

#test for peak gain on axis is max
#test for lambda 3db loss

for beam in beams:
    plot_gain_heatmap(beam, res=100, min_el = 75.)

plt.show()
Beispiel #7
0
def time_compare_library_beams():
    e3d = alib.e3d_array_beam(az0=0.0, el0=90.0, I_0=10**4.3)
    bp1 = alib.airy_beam(az0=0.0,
                         el0=90.0,
                         lat=60,
                         lon=19,
                         f=233e6,
                         I_0=10**4.3,
                         a=40.0)
    bp2 = alib.cassegrain_beam(az0=0.0,
                               el0=90.0,
                               lat=60,
                               lon=19,
                               f=233e6,
                               I_0=10**4.3,
                               a0=80.0,
                               a1=80.0 / 16.0 * 2.29)
    bp3 = alib.planar_beam(az0=0.0,
                           el0=90.0,
                           lat=60,
                           lon=19,
                           f=233e6,
                           I_0=10**4.3,
                           a0=40.0,
                           az1=0,
                           el1=90.0)

    import time
    k = coord.azel_ecef(e3d.lat, e3d.lon, 0.0, 0, 87.0)
    test_n = 500
    t = n.zeros((test_n, 4))
    for i in range(test_n):
        t0 = time.clock()
        g = e3d.gain(k)
        t[i, 0] = time.clock() - t0

        t0 = time.clock()
        g = bp1.gain(k)
        t[i, 1] = time.clock() - t0

        t0 = time.clock()
        g = bp2.gain(k)
        t[i, 2] = time.clock() - t0

        t0 = time.clock()
        g = bp3.gain(k)
        t[i, 3] = time.clock() - t0

    print('Exec time %s: mean %.5f s, std %.5f s' % (
        e3d.beam_name,
        n.mean(t[:, 0]),
        n.std(t[:, 0]),
    ))
    print('Exec time %s: mean %.5f s, std %.5f s' % (
        bp1.beam_name,
        n.mean(t[:, 1]),
        n.std(t[:, 1]),
    ))
    print('Exec time %s: mean %.5f s, std %.5f s' % (
        bp2.beam_name,
        n.mean(t[:, 2]),
        n.std(t[:, 2]),
    ))
    print('Exec time %s: mean %.5f s, std %.5f s' % (
        bp3.beam_name,
        n.mean(t[:, 3]),
        n.std(t[:, 3]),
    ))

    print('Exec time %s vs %s: mean %.5f, std %.5f' % (
        e3d.beam_name,
        bp3.beam_name,
        n.mean(t[:, 0]) / n.mean(t[:, 3]),
        n.std(t[:, 0]) / n.std(t[:, 3]),
    ))