def test1():
    tel = Telescope()
    tel.add_uniform_core(200, 1000)
    fig = tel.plot_layout()
    ax = fig.gca()
    ax.add_artist(plt.Circle((0, 0), radius=1000, fill=False, color='r'))
    plt.show()
    plt.close(fig)
def test3():
    tel = Telescope()
    tel.add_uniform_core(368, 5000)
    tel.add_ska1_v5(r_min=5000)
    x, y, z = tel.coords()
    fig, ax = plt.subplots()
    for xy in zip(x, y):
        ax.add_artist(plt.Circle(xy, radius=(tel.station_diameter_m / 2),
                                 fill=False))
    ax.set_aspect('equal')
    ax.set_xlim(-8000, 8000)
    ax.set_ylim(-8000, 8000)
    plt.show()
    plt.close(fig)
if __name__ == '__main__':

    # # Uniform core with hole in the middle
    # tel = Telescope('test')
    # tel.add_uniform_core(300, 500, 100)
    # tel.plot(plot_radii=[100, 500])
    #
    # # Uniform core
    # tel = Telescope('test')
    # tel.add_uniform_core(250, 400)
    # tel.plot(plot_radii=[400])
    #
    # # Hexagonal core + Uniform halo
    tel = Telescope('test')
    tel.add_hex_core(200, 0.0)
    tel.add_uniform_core(180, 400, 200)
    # tel.plot_layout(plot_radii=[200, 400])
    tel.save('HEX_layout.txt')

    # # Spiral arms
    # tel = Telescope('test')
    # tel.add_log_spiral(n=3*10, r0=100, r1=400, b=0.5, num_arms=3, theta0_deg=0)
    # tel.plot_layout(plot_radii=[100, 400])
    #
    # # Symmetric spiral arms
    # tel = Telescope('test')
    # tel.add_symmetric_log_spiral(n=10, r0=100, r1=400, b=0.5, num_arms=3,
    #                              name='foo', theta0_deg=0)
    # tel.plot_layout(plot_radii=[100, (400, 'b')], color='g')