def define_plots(bl): plots = [] for screen in bl.screens: saveName = ('./plots/' + screen.name + '_y' + str(int(screen.center[1])) + save_suffix + '.png') plot = XYCPlot(beam=screen.name, xaxis=xrtplot.XYCAxis(label="x",fwhmFormatStr='%.3f'), yaxis=xrtplot.XYCAxis(label="z",fwhmFormatStr='%.3f'), caxis=xrtplot.XYCAxis(label="energy",unit=r"eV",offset=E0,fwhmFormatStr='%.4f'), title=screen.name+ '_y' + str(int(screen.center[1])), saveName=str(saveName)) plots.append(plot) if do_plot=='all': saveName = ('./plots/' + screen.name + '_y' + str(int(screen.center[1])) + '_divVsE' + save_suffix + '.png') plot = XYCPlot(beam=screen.name, xaxis=xrtplot.XYCAxis(label="energy", unit="eV", offset=E0), yaxis=xrtplot.XYCAxis(label="z'", unit="rad"), caxis=xrtplot.XYCAxis(label="energy",unit="eV",offset=E0,fwhmFormatStr='%.4f',), aspect='auto', title=screen.name+ '_y' + str(int(screen.center[1])), saveName=saveName) plots.append(plot) return plots
def define_plots(bl): plots = [] for screen in bl.screens: saveName = ('./plots/' + subfolder + save_prefix + screen.name + '_y' + str(int(screen.center[1])) + save_suffix + '.png') if 'slits' in screen.name: plot = XYCPlot(beam=screen.name, xaxis=xrtplot.XYCAxis(label="x",fwhmFormatStr='%.3f', limits=[-0.01,0.01]), yaxis=xrtplot.XYCAxis(label="z",fwhmFormatStr='%.3f', limits=[-0.05,0.05]), caxis=xrtplot.XYCAxis(label="energy",unit=r"eV",offset=E0,fwhmFormatStr='%.4f'), title=screen.name+ '_y' + str(int(screen.center[1])), saveName=str(saveName), aspect='auto') else: plot = XYCPlot(beam=screen.name, xaxis=xrtplot.XYCAxis(label="x",fwhmFormatStr='%.3f', limits=[-1.2,1.2]), yaxis=xrtplot.XYCAxis(label="z",fwhmFormatStr='%.3f'), caxis=xrtplot.XYCAxis(label="energy",unit=r"eV",offset=E0,fwhmFormatStr='%.4f'), title=screen.name+ '_y' + str(int(screen.center[1])), saveName=str(saveName)) # plot = XYCPlot(beam=screen.name, # xaxis=xrtplot.XYCAxis(label="x",fwhmFormatStr='%.3f'), # yaxis=xrtplot.XYCAxis(label="z",fwhmFormatStr='%.3f'), # caxis=xrtplot.XYCAxis(label="energy",unit=r"eV",offset=E0,fwhmFormatStr='%.4f'), # title=screen.name+ '_y' + str(int(screen.center[1])), # saveName=str(saveName)) plots.append(plot) if do_plot=='all': saveName = ('./plots/' + subfolder + save_prefix + screen.name + '_y' + str(int(screen.center[1])) + '_divVsE' + save_suffix + '.png') plot = XYCPlot(beam=screen.name, xaxis=xrtplot.XYCAxis(label="energy", unit="eV", offset=E0, limits=None), yaxis=xrtplot.XYCAxis(label="z'", unit="urad", factor=1E6, limits=None), caxis=xrtplot.XYCAxis(label="energy",unit="eV",offset=E0,fwhmFormatStr='%.4f',), title=screen.name+ '_y' + str(int(screen.center[1])), saveName=saveName, aspect='auto') plots.append(plot) saveName = ('./plots/' + subfolder + save_prefix + screen.name + '_y' + str(int(screen.center[1])) + '_zVsE' + save_suffix + '.png') plot = XYCPlot(beam=screen.name, xaxis=xrtplot.XYCAxis(label="energy", unit="eV", offset=E0), yaxis=xrtplot.XYCAxis(label="z", unit="mm"), caxis=xrtplot.XYCAxis(label="energy",unit="eV",offset=E0,fwhmFormatStr='%.4f',), title=screen.name+ '_y' + str(int(screen.center[1])), saveName=saveName, aspect='auto') plots.append(plot) return plots
def define_plots(bl): plots = [] for screen in bl.screens: # x-z plot: saveName = './plots/dist_' + str(int( D / 1000)) + '_' + screen.name + '.png' plot = XYCPlot(beam=screen.name, xaxis=xrtplot.XYCAxis(label="x", fwhmFormatStr='%.3f'), yaxis=xrtplot.XYCAxis(label="z", fwhmFormatStr='%.3f'), caxis=xrtplot.XYCAxis(label="energy", unit=r"eV", offset=E0, fwhmFormatStr='%.4f'), title=screen.name + '_y' + str(int(screen.center[1])), saveName=str(saveName)) plots.append(plot) # E-z' plot: saveName = './plots/dist_' + str(int( D / 1000)) + '_' + screen.name + '._div.png' plot = XYCPlot(beam=screen.name, xaxis=xrtplot.XYCAxis(label="energy", unit="eV", offset=E0), yaxis=xrtplot.XYCAxis(label="z'", unit="urad", factor=1E6), caxis=xrtplot.XYCAxis( label="energy", unit="eV", offset=E0, fwhmFormatStr='%.4f', ), title=screen.name + '_y' + str(int(screen.center[1])), saveName=saveName, aspect='auto') plots.append(plot) return plots