def test2(): # Spiral parameters for inner and outer regions. start_inner = 417.82 end_outer = 6370.13 b = 0.515 theta0 = -40 num_arms = 1 tel1 = Telescope() tel1.add_symmetric_log_spiral(10, start_inner, end_outer, b, num_arms, 'spiral_arms', theta0) cx1 = tel1.layouts['spiral_arms0']['x'][3] cy1 = tel1.layouts['spiral_arms0']['y'][3] cx2 = tel1.layouts['spiral_arms0']['x'][4] cy2 = tel1.layouts['spiral_arms0']['y'][4] delta_t = Telescope.delta_theta(cx1, cy1, cx2, cy2, start_inner, b) tel2 = Telescope() tel2.add_log_spiral_section(6, start_inner, cx1, cy1, b, delta_t / 2, theta0) tel3 = Telescope() tel3.add_log_spiral_section(6, start_inner, cx2, cy2, b, delta_t / 2, theta0) fig, ax = plt.subplots(figsize=(8, 8)) tel2.plot_layout(mpl_ax=ax, color='g') tel3.plot_layout(mpl_ax=ax, color='y') tel1.station_diameter_m = 50 tel1.plot_layout(plot_radii=[start_inner, end_outer], mpl_ax=ax, color='r') ax.plot([cx1], [cy1], '+', ms=10) plt.show()
def test1(): tel = Telescope() # Spiral parameters for inner and outer regions. start_inner = 417.82 end_inner = 1572.13 b_inner = 0.513 start_outer = 2146.78 end_outer = 6370.13 b_outer = 0.52 # Add all stations out to 6500 m. tel.add_ska1_v5(r_min=500, r_max=6500) # Add the cluster centres. tel.add_symmetric_log_spiral(5, start_inner, end_inner, b_inner, 3, 'cluster_centres_inner', -48) tel.add_symmetric_log_spiral(5, start_outer, end_outer, b_outer, 3, 'cluster_centres_outer', 135) # Fill in the gaps with spirals. b = 0.515 tel.add_symmetric_log_spiral(60, start_inner, end_outer, b, 3, 'spiral_arms', -48) tel.plot_layout(plot_radii=[start_inner, end_inner, start_outer, end_outer], show_decorations=False)