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 | |
summarize.action |
Definition at line 20 of file summarize.py.
summarize.args |
Definition at line 62 of file summarize.py.
summarize.axis |
Definition at line 393 of file summarize.py.
summarize.buffsize = int(options.buffersize) |
Definition at line 67 of file summarize.py.
Definition at line 120 of file summarize.py.
summarize.datefmt |
Definition at line 76 of file summarize.py.
summarize.default |
Definition at line 20 of file summarize.py.
summarize.dest |
Definition at line 20 of file summarize.py.
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.
summarize.dtype |
Definition at line 351 of file summarize.py.
summarize.dtype_nuclei = np.dtype([('A', int), ('Z', int)]) |
Definition at line 283 of file summarize.py.
dictionary summarize.entry_dict = {} |
Definition at line 204 of file summarize.py.
summarize.f_hdf = h5py.File(output_file, 'w') |
Definition at line 113 of file summarize.py.
summarize.file_handler = logging.FileHandler("debug.log", mode="w", encoding="utf-8") |
Definition at line 79 of file summarize.py.
Definition at line 275 of file summarize.py.
Definition at line 274 of file summarize.py.
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.
float summarize.final_time = float(options.time_final) |
Definition at line 157 of file summarize.py.
summarize.format |
Definition at line 74 of file summarize.py.
bool summarize.found = False |
Definition at line 118 of file summarize.py.
summarize.help |
Definition at line 21 of file summarize.py.
int summarize.ind = -1 |
Definition at line 295 of file summarize.py.
summarize.indexes = np.searchsorted(snapstime, snapshot_time) |
Definition at line 387 of file summarize.py.
summarize.indices = nuclei_sorted_idx[matching_idx] |
Definition at line 336 of file summarize.py.
summarize.indices_nuclei = nuclei_sorted_idx[matching_idx] |
Definition at line 404 of file summarize.py.
int summarize.initial_time = float(options.time_initial) |
Definition at line 168 of file summarize.py.
summarize.left |
Definition at line 447 of file summarize.py.
summarize.level |
Definition at line 77 of file summarize.py.
summarize.logger = logging.getLogger(__name__) |
Definition at line 80 of file summarize.py.
summarize.mainout_time = np.loadtxt(options.time_file, dtype=float, unpack=True) |
Definition at line 154 of file summarize.py.
summarize.mask = np.zeros(len(snapshot_time),dtype=bool) |
Definition at line 391 of file summarize.py.
summarize.matching_idx = np.searchsorted(sorted_nuclei_struct, finab_struct) |
Definition at line 334 of file summarize.py.
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.
summarize.nan |
Definition at line 447 of file summarize.py.
summarize.net_source = options.sunet_path |
Definition at line 136 of file summarize.py.
summarize.nuclei = np.loadtxt(net_source,dtype=str) |
Definition at line 147 of file summarize.py.
summarize.nuclei_data = nucleus_multiple(nuclei) |
Definition at line 148 of file summarize.py.
summarize.nuclei_sorted_idx = np.argsort(nuclei_struct) |
Definition at line 286 of file summarize.py.
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.
summarize.options |
Definition at line 62 of file summarize.py.
summarize.output_file = options.outdir |
Definition at line 106 of file summarize.py.
summarize.p = optparse.OptionParser() |
Definition at line 19 of file summarize.py.
list summarize.possible_entries = [] |
Definition at line 181 of file summarize.py.
summarize.propagate |
Definition at line 94 of file summarize.py.
summarize.right |
Definition at line 447 of file summarize.py.
Definition at line 292 of file summarize.py.
Definition at line 291 of file summarize.py.
summarize.run_path = options.rundir |
Definition at line 63 of file summarize.py.
summarize.snapshot_data = np.zeros((len(nuclei),len(snapshot_time),buffsize)) |
Definition at line 263 of file summarize.py.
summarize.snapshot_time = np.loadtxt(os.path.join(t["snapshot_file"]),dtype=float) |
Definition at line 253 of file summarize.py.
summarize.snapstime = data.snapshot_time |
Custom snapshots ####.
Definition at line 384 of file summarize.py.
summarize.sorted_nuclei_struct = nuclei_struct[nuclei_sorted_idx] |
Definition at line 287 of file summarize.py.
summarize.style |
Definition at line 75 of file summarize.py.
bool summarize.summarize_snapshots = False |
Definition at line 237 of file summarize.py.
summarize.t = template(os.path.join(run_path, d, template_name)) |
Definition at line 132 of file summarize.py.
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.
int summarize.time_number = int(options.time_number) |
Definition at line 173 of file summarize.py.