def testPlotOnAxisPowerDensityVsTime(self): """ Test plotting the on-axis power as function of time. """ xfel_photon_analyzer = XFELPhotonAnalysis( input_path=TestUtilities.generateTestFilePath( 'prop_out_0000001.h5')) xfel_photon_analyzer.plotOnAxisPowerDensity()
def testPlotOnAxisPowerDensityVsEnergy(self): """ Test plotting the total power spectrum.""" xfel_photon_analyzer = XFELPhotonAnalysis( input_path=TestUtilities.generateTestFilePath( 'prop_out_0000001.h5')) xfel_photon_analyzer.plotOnAxisPowerDensity(spectrum=True)
def main(args): # Setup the object. analyzer = XFELPhotonAnalysis(input_path=args.input_file) if args._do_intensity_distribution: analyzer.plotIntensityMap(logscale=args.logscale) if args._do_qspace_intensity: analyzer.plotIntensityMap(logscale=args.logscale, qspace=True) if args._do_total_power: analyzer.plotTotalPower() if args._do_on_axis_power: analyzer.plotOnAxisPowerDensity() if args._do_spectrum: analyzer.plotTotalPower(spectrum=True) if args._do_animate: analyzer.animate(logscale=args.logscale, qspace=False) if not args._do_animate: plt.show()