def calc_solarpath(L, gamma, alpha): # Plot solar path: # C = s.collector('akb1') # Collector object from solarfun.py C = th.collectorArray(th.chuanghui_H50(), 1, slope=20, azimuth=0, DFR=True, rho_g=0.2) # Change C.beta = 0 # Calculations for horizontal radiation gamma = gamma - pi # S = 0 deg for solar calculations & plotting r = 90 - np.rad2deg(alpha) # r in degrees fig = plt.figure(1) ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True) plot_sunpath(ax, L, C) plot_horizon(ax, gamma, r) fig.savefig("test.png") return fig
def calc_solarpath(L, gamma, alpha): # Plot solar path: #C = s.collector('akb1') # Collector object from solarfun.py C = th.collectorArray(th.chuanghui_H50(), 1, slope=20, azimuth=0, DFR=True, rho_g=0.2) # Change C.beta = 0 # Calculations for horizontal radiation gamma = gamma - pi # S = 0 deg for solar calculations & plotting r = 90 - np.rad2deg(alpha) # r in degrees fig = plt.figure(1) ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True) plot_sunpath(ax, L, C) plot_horizon(ax, gamma, r) fig.savefig('test.png') return fig
C.beta = 0 # Calculations for horizontal radiation gamma = gamma - pi # S = 0 deg for solar calculations & plotting r = 90 - np.rad2deg(alpha) # r in degrees fig = plt.figure(1) ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True) plot_sunpath(ax, L, C) plot_horizon(ax, gamma, r) fig.savefig("test.png") return fig if __name__ == "__main__": args = get_args() L = th.location() # Default location for starters C = th.collectorArray(th.chuanghui_H50(), 1, slope=20, azimuth=0, DFR=True, rho_g=0.2) # Change # C = s.collector('akb1') # Collector object from solarfun.py C.beta = 0 # Calculations for horizontal radiation plt.ion() fig = plt.figure(1) if args.image: axi = fig.add_axes([0.1, 0.1, 0.8, 0.8], frame_on=False) axi = make_invisible(axi) pic = plt.imread(args.image) axi.imshow(pic) ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True) ax.patch.set_alpha(0) if args.horizon: H = load_horizon(args.horizon, args.location) # Horizon data object from .csv file plot_horizon(ax, H.gamma, H.r)
C.beta = 0 # Calculations for horizontal radiation gamma = gamma - pi # S = 0 deg for solar calculations & plotting r = 90 - np.rad2deg(alpha) # r in degrees fig = plt.figure(1) ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True) plot_sunpath(ax, L, C) plot_horizon(ax, gamma, r) fig.savefig('test.png') return fig if __name__ == "__main__": args = get_args() L = th.location() # Default location for starters C = th.collectorArray(th.chuanghui_H50(), 1, slope=20, azimuth=0, DFR=True, rho_g=0.2) # Change #C = s.collector('akb1') # Collector object from solarfun.py C.beta = 0 # Calculations for horizontal radiation plt.ion() fig = plt.figure(1) if args.image: axi = fig.add_axes([0.1, 0.1, 0.8, 0.8], frame_on=False) axi = make_invisible(axi) pic = plt.imread(args.image) axi.imshow(pic)