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 folders = [f for f in os.listdir(run_path) if os.path.isdir(os.path.join(run_path, f))]
 
 fold = options.outdir.replace(".hdf5","")
 
 basepath = run_path
 
bool looping = True
 
 output_file = os.path.join(fold, folders[0]+".hdf5")
 
list dirs = [d for d in os.listdir(run_path) if os.path.isdir(os.path.join(run_path, d)) and d != "network_data"]
 
 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]
 
dictionary dim = entry_dict[entry][key].ndim
 Other entries ####. More...
 
 value
 

Variable Documentation

◆ action

summarize.action

Definition at line 21 of file summarize.py.

◆ args

summarize.args

Definition at line 65 of file summarize.py.

◆ axis

summarize.axis

Definition at line 441 of file summarize.py.

◆ basepath

summarize.basepath = run_path

Definition at line 109 of file summarize.py.

◆ buffsize

summarize.buffsize = int(options.buffersize)

Definition at line 70 of file summarize.py.

◆ data

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

Definition at line 159 of file summarize.py.

◆ datefmt

summarize.datefmt

Definition at line 79 of file summarize.py.

◆ default

summarize.default

Definition at line 21 of file summarize.py.

◆ dest

summarize.dest

Definition at line 21 of file summarize.py.

◆ dim

dictionary summarize.dim = entry_dict[entry][key].ndim

Other entries ####.

Definition at line 485 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 140 of file summarize.py.

◆ dtype

summarize.dtype

Definition at line 399 of file summarize.py.

◆ dtype_nuclei

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

Definition at line 331 of file summarize.py.

◆ entry_dict

dictionary summarize.entry_dict = {}

Definition at line 246 of file summarize.py.

◆ f_hdf

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

Definition at line 152 of file summarize.py.

◆ file_handler

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

Definition at line 82 of file summarize.py.

◆ finab_data_X

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

Definition at line 323 of file summarize.py.

◆ finab_data_Y

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

Definition at line 322 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 379 of file summarize.py.

◆ final_time

float summarize.final_time = float(options.time_final)

Definition at line 199 of file summarize.py.

◆ fold

summarize.fold = options.outdir.replace(".hdf5","")

Definition at line 108 of file summarize.py.

◆ folders

list summarize.folders = [f for f in os.listdir(run_path) if os.path.isdir(os.path.join(run_path, f))]

Definition at line 104 of file summarize.py.

◆ format

summarize.format

Definition at line 77 of file summarize.py.

◆ found

bool summarize.found = False

Definition at line 157 of file summarize.py.

◆ help

summarize.help

Definition at line 22 of file summarize.py.

◆ ind

int summarize.ind = -1

Definition at line 343 of file summarize.py.

◆ indexes

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

Definition at line 435 of file summarize.py.

◆ indices

summarize.indices = nuclei_sorted_idx[matching_idx]

Definition at line 384 of file summarize.py.

◆ indices_nuclei

summarize.indices_nuclei = nuclei_sorted_idx[matching_idx]

Definition at line 452 of file summarize.py.

◆ initial_time

int summarize.initial_time = float(options.time_initial)

Definition at line 210 of file summarize.py.

◆ level

summarize.level

Definition at line 80 of file summarize.py.

◆ logger

summarize.logger = logging.getLogger(__name__)

Definition at line 83 of file summarize.py.

◆ looping

bool summarize.looping = True

Definition at line 123 of file summarize.py.

◆ mainout_time

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

Definition at line 196 of file summarize.py.

◆ mask

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

Definition at line 439 of file summarize.py.

◆ matching_idx

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

Definition at line 382 of file summarize.py.

◆ maxshape

summarize.maxshape

Finab ####.

Custom snapshots ####.

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 368 of file summarize.py.

◆ net_source

summarize.net_source = options.sunet_path

Definition at line 178 of file summarize.py.

◆ nuclei

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

Definition at line 189 of file summarize.py.

◆ nuclei_data

summarize.nuclei_data = nucleus_multiple(nuclei)

Definition at line 190 of file summarize.py.

◆ nuclei_sorted_idx

summarize.nuclei_sorted_idx = np.argsort(nuclei_struct)

Definition at line 334 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 332 of file summarize.py.

◆ options

summarize.options

Definition at line 65 of file summarize.py.

◆ output_file

summarize.output_file = os.path.join(fold, folders[0]+".hdf5")

Definition at line 130 of file summarize.py.

◆ p

summarize.p = optparse.OptionParser()

Definition at line 20 of file summarize.py.

◆ possible_entries

list summarize.possible_entries = []

Definition at line 223 of file summarize.py.

◆ propagate

summarize.propagate

Definition at line 97 of file summarize.py.

◆ run_ids

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

Definition at line 340 of file summarize.py.

◆ run_names

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

Definition at line 339 of file summarize.py.

◆ run_path

summarize.run_path = options.rundir

Definition at line 66 of file summarize.py.

◆ snapshot_data

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

Definition at line 311 of file summarize.py.

◆ snapshot_time

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

Definition at line 301 of file summarize.py.

◆ snapstime

summarize.snapstime = data.snapshot_time

Custom snapshots ####.

Definition at line 432 of file summarize.py.

◆ sorted_nuclei_struct

summarize.sorted_nuclei_struct = nuclei_struct[nuclei_sorted_idx]

Definition at line 335 of file summarize.py.

◆ style

summarize.style

Definition at line 78 of file summarize.py.

◆ summarize_snapshots

bool summarize.summarize_snapshots = False

Definition at line 285 of file summarize.py.

◆ t

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

Definition at line 174 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 173 of file summarize.py.

◆ time_number

int summarize.time_number = int(options.time_number)

Definition at line 215 of file summarize.py.

◆ value

summarize.value
Initial value:
1 = interp1d(data[entry]["time"],data[entry][key],
2  bounds_error = False, fill_value = np.nan, axis = 0)(mainout_time)

Definition at line 506 of file summarize.py.

inter_module::interp1d
subroutine, public interp1d(n, xp, xb, yp, res, flin, itype)
Interface for 1D interpolation routines.
Definition: inter_module.f90:100