summarize Namespace Reference

Variables

 p = optparse.OptionParser()
 
 action
 
 dest
 
 default
 
 help
 
 options
 
 args
 
 run_path = options.rundir
 
 buffsize = int(options.buffersize)
 
 format
 
 style
 
 datefmt
 
 level
 
 file_handler = logging.FileHandler("debug.log", mode="w", encoding="utf-8")
 
 logger = logging.getLogger(__name__)
 
 propagate
 
list dirs = [d for d in os.listdir(run_path) if os.path.isdir(os.path.join(run_path, d)) and d != "network_data"]
 
 output_file = options.outdir
 
 f_hdf = h5py.File(output_file, 'w')
 
bool found = False
 
 data = wreader(os.path.join(run_path, d))
 
list template_name = [f for f in os.listdir(os.path.join(run_path, d)) if f.endswith('.par')][0]
 
 t = template(os.path.join(run_path, d, template_name))
 
 net_source = options.sunet_path
 
 nuclei = np.loadtxt(net_source,dtype=str)
 
 nuclei_data = nucleus_multiple(nuclei)
 
 mainout_time = np.loadtxt(options.time_file, dtype=float, unpack=True)
 
 final_time = float(options.time_final)
 
 initial_time = float(options.time_initial)
 
 time_number = int(options.time_number)
 
list possible_entries = []
 
dictionary entry_dict = {}
 
bool summarize_snapshots = False
 
 snapshot_time = np.loadtxt(os.path.join(t["snapshot_file"]),dtype=float)
 
 snapshot_data = np.zeros((len(nuclei),len(snapshot_time),buffsize))
 
 finab_data_Y = np.zeros((len(nuclei),buffsize))
 
 finab_data_X = np.zeros((len(nuclei),buffsize))
 
 dtype_nuclei = np.dtype([('A', int), ('Z', int)])
 
 nuclei_struct = np.array(list(zip(nuclei_data.A.astype(int), nuclei_data.Z.astype(int))), dtype=dtype_nuclei)
 
 nuclei_sorted_idx = np.argsort(nuclei_struct)
 
 sorted_nuclei_struct = nuclei_struct[nuclei_sorted_idx]
 
 run_names = np.zeros(buffsize,dtype="S100")
 
 run_ids = np.zeros(buffsize,dtype=int)
 
int ind = -1
 
 maxshape
 Finab ####. More...
 
 finab_struct = np.array(list(zip(data.finab["A"].astype(int), data.finab["Z"].astype(int))), dtype=dtype_nuclei)
 
 matching_idx = np.searchsorted(sorted_nuclei_struct, finab_struct)
 
 indices = nuclei_sorted_idx[matching_idx]
 
 dtype
 
 snapstime = data.snapshot_time
 Custom snapshots ####. More...
 
 indexes = np.searchsorted(snapstime, snapshot_time)
 
 mask = np.zeros(len(snapshot_time),dtype=bool)
 
 axis
 
 indices_nuclei = nuclei_sorted_idx[matching_idx]
 
 left
 
 nan
 
 right
 

Variable Documentation

◆ action

summarize.action

Definition at line 20 of file summarize.py.

◆ args

summarize.args

Definition at line 62 of file summarize.py.

◆ axis

summarize.axis

Definition at line 393 of file summarize.py.

◆ buffsize

summarize.buffsize = int(options.buffersize)

Definition at line 67 of file summarize.py.

◆ data

summarize.data = wreader(os.path.join(run_path, d))

Definition at line 120 of file summarize.py.

◆ datefmt

summarize.datefmt

Definition at line 76 of file summarize.py.

◆ default

summarize.default

Definition at line 20 of file summarize.py.

◆ dest

summarize.dest

Definition at line 20 of file summarize.py.

◆ dirs

list summarize.dirs = [d for d in os.listdir(run_path) if os.path.isdir(os.path.join(run_path, d)) and d != "network_data"]

Definition at line 99 of file summarize.py.

◆ dtype

summarize.dtype

Definition at line 351 of file summarize.py.

◆ dtype_nuclei

summarize.dtype_nuclei = np.dtype([('A', int), ('Z', int)])

Definition at line 283 of file summarize.py.

◆ entry_dict

dictionary summarize.entry_dict = {}

Definition at line 204 of file summarize.py.

◆ f_hdf

summarize.f_hdf = h5py.File(output_file, 'w')

Definition at line 113 of file summarize.py.

◆ file_handler

summarize.file_handler = logging.FileHandler("debug.log", mode="w", encoding="utf-8")

Definition at line 79 of file summarize.py.

◆ finab_data_X

summarize.finab_data_X = np.zeros((len(nuclei),buffsize))

Definition at line 275 of file summarize.py.

◆ finab_data_Y

summarize.finab_data_Y = np.zeros((len(nuclei),buffsize))

Definition at line 274 of file summarize.py.

◆ finab_struct

summarize.finab_struct = np.array(list(zip(data.finab["A"].astype(int), data.finab["Z"].astype(int))), dtype=dtype_nuclei)

Definition at line 331 of file summarize.py.

◆ final_time

float summarize.final_time = float(options.time_final)

Definition at line 157 of file summarize.py.

◆ format

summarize.format

Definition at line 74 of file summarize.py.

◆ found

bool summarize.found = False

Definition at line 118 of file summarize.py.

◆ help

summarize.help

Definition at line 21 of file summarize.py.

◆ ind

int summarize.ind = -1

Definition at line 295 of file summarize.py.

◆ indexes

summarize.indexes = np.searchsorted(snapstime, snapshot_time)

Definition at line 387 of file summarize.py.

◆ indices

summarize.indices = nuclei_sorted_idx[matching_idx]

Definition at line 336 of file summarize.py.

◆ indices_nuclei

summarize.indices_nuclei = nuclei_sorted_idx[matching_idx]

Definition at line 404 of file summarize.py.

◆ initial_time

int summarize.initial_time = float(options.time_initial)

Definition at line 168 of file summarize.py.

◆ left

summarize.left

Definition at line 447 of file summarize.py.

◆ level

summarize.level

Definition at line 77 of file summarize.py.

◆ logger

summarize.logger = logging.getLogger(__name__)

Definition at line 80 of file summarize.py.

◆ mainout_time

summarize.mainout_time = np.loadtxt(options.time_file, dtype=float, unpack=True)

Definition at line 154 of file summarize.py.

◆ mask

summarize.mask = np.zeros(len(snapshot_time),dtype=bool)

Definition at line 391 of file summarize.py.

◆ matching_idx

summarize.matching_idx = np.searchsorted(sorted_nuclei_struct, finab_struct)

Definition at line 334 of file summarize.py.

◆ maxshape

summarize.maxshape

Finab ####.

Custom snapshots ####.

Other entries ####.

Run name ####.

Put the data in the finab_data, Notice that it should be at the right A and Z position A is contained in data.finab["A"] and Z in data.finab["Z"]. It should fit to the nuclei_data.A and nuclei_data.Z All of them are 1D arrays Getting indices where match occurs indices = [(np.where((nuclei_data.A.astype(int) == A) & (nuclei_data.Z.astype(int) == Z))[0][0]) for A, Z in zip(data.finab["A"].astype(int), data.finab["Z"].astype(int))]

Definition at line 320 of file summarize.py.

◆ nan

summarize.nan

Definition at line 447 of file summarize.py.

◆ net_source

summarize.net_source = options.sunet_path

Definition at line 136 of file summarize.py.

◆ nuclei

summarize.nuclei = np.loadtxt(net_source,dtype=str)

Definition at line 147 of file summarize.py.

◆ nuclei_data

summarize.nuclei_data = nucleus_multiple(nuclei)

Definition at line 148 of file summarize.py.

◆ nuclei_sorted_idx

summarize.nuclei_sorted_idx = np.argsort(nuclei_struct)

Definition at line 286 of file summarize.py.

◆ nuclei_struct

summarize.nuclei_struct = np.array(list(zip(nuclei_data.A.astype(int), nuclei_data.Z.astype(int))), dtype=dtype_nuclei)

Definition at line 284 of file summarize.py.

◆ options

summarize.options

Definition at line 62 of file summarize.py.

◆ output_file

summarize.output_file = options.outdir

Definition at line 106 of file summarize.py.

◆ p

summarize.p = optparse.OptionParser()

Definition at line 19 of file summarize.py.

◆ possible_entries

list summarize.possible_entries = []

Definition at line 181 of file summarize.py.

◆ propagate

summarize.propagate

Definition at line 94 of file summarize.py.

◆ right

summarize.right

Definition at line 447 of file summarize.py.

◆ run_ids

summarize.run_ids = np.zeros(buffsize,dtype=int)

Definition at line 292 of file summarize.py.

◆ run_names

summarize.run_names = np.zeros(buffsize,dtype="S100")

Definition at line 291 of file summarize.py.

◆ run_path

summarize.run_path = options.rundir

Definition at line 63 of file summarize.py.

◆ snapshot_data

summarize.snapshot_data = np.zeros((len(nuclei),len(snapshot_time),buffsize))

Definition at line 263 of file summarize.py.

◆ snapshot_time

summarize.snapshot_time = np.loadtxt(os.path.join(t["snapshot_file"]),dtype=float)

Definition at line 253 of file summarize.py.

◆ snapstime

summarize.snapstime = data.snapshot_time

Custom snapshots ####.

Definition at line 384 of file summarize.py.

◆ sorted_nuclei_struct

summarize.sorted_nuclei_struct = nuclei_struct[nuclei_sorted_idx]

Definition at line 287 of file summarize.py.

◆ style

summarize.style

Definition at line 75 of file summarize.py.

◆ summarize_snapshots

bool summarize.summarize_snapshots = False

Definition at line 237 of file summarize.py.

◆ t

summarize.t = template(os.path.join(run_path, d, template_name))

Definition at line 132 of file summarize.py.

◆ template_name

list summarize.template_name = [f for f in os.listdir(os.path.join(run_path, d)) if f.endswith('.par')][0]

Definition at line 131 of file summarize.py.

◆ time_number

int summarize.time_number = int(options.time_number)

Definition at line 173 of file summarize.py.