ARTEMIS
Variables
plot_results Namespace Reference

Variables

string generator_type = 'random'
 
 list_of_files = glob.glob(sys.argv[1] + '*npy')
 
 latest_file = max(list_of_files, key=os.path.getctime)
 
 results = np.load(latest_file)
 
 pickle_data = pickle.load(f)
 
 nbatches = len(pickle_data[1]['run_order'])
 
 names = results.dtype.names
 
dictionary results_dict = {}
 
list plot_output = ['f', 'emittance', 'charge', 'energy_avg', 'energy_std']
 
list plot_input = ['ramp_down_1', 'zlens_1', 'adjust_factor', 'ramp_down_2']
 
dictionary d_ylim
 
dictionary d_yunits
 
 ind_best = np.nanargmin(results_dict['f'])
 
 figsize
 
 my_sims
 
 s
 
 c
 
 cmap
 
 cbar = plt.colorbar()
 
 bbox_inches
 

Detailed Description

Plotting script for LibEnsemble run on WarpX simulations.
input: A directory which which the script will read the
latest .npy and .pickle files generated by LibEnsemble

Variable Documentation

◆ bbox_inches

plot_results.bbox_inches

◆ c

plot_results.c

◆ cbar

plot_results.cbar = plt.colorbar()

◆ cmap

plot_results.cmap

◆ d_ylim

dictionary plot_results.d_ylim
Initial value:
1 = {
2  'f': (3.e-7, 5.e-3),
3  'emittance': (3.e-7, 5.e-3),
4  'charge': (1.e-7, 1.e-5),
5  'energy_avg': (5.e1, 5.e2),
6  'energy_std': (1.e-2, 1.e-1)
7 }

◆ d_yunits

dictionary plot_results.d_yunits
Initial value:
1 = {
2  'f': " (a.u.)",
3  'emittance': " (m rad)",
4  'charge': " (pC/m)",
5  'energy_avg': " (MeV)",
6  'energy_std': " (%)"
7 }

◆ figsize

plot_results.figsize

◆ generator_type

string plot_results.generator_type = 'random'

◆ ind_best

plot_results.ind_best = np.nanargmin(results_dict['f'])

◆ latest_file

plot_results.latest_file = max(list_of_files, key=os.path.getctime)

◆ list_of_files

plot_results.list_of_files = glob.glob(sys.argv[1] + '*npy')

◆ my_sims

plot_results.my_sims
Initial value:
1 = np.isin(results_dict['sim_id'],
2  pickle_data[1]['run_order'][batch])

◆ names

plot_results.names = results.dtype.names

◆ nbatches

plot_results.nbatches = len(pickle_data[1]['run_order'])

◆ pickle_data

plot_results.pickle_data = pickle.load(f)

◆ plot_input

list plot_results.plot_input = ['ramp_down_1', 'zlens_1', 'adjust_factor', 'ramp_down_2']

◆ plot_output

list plot_results.plot_output = ['f', 'emittance', 'charge', 'energy_avg', 'energy_std']

◆ results

plot_results.results = np.load(latest_file)

◆ results_dict

dictionary plot_results.results_dict = {}

◆ s

plot_results.s