|
RadCluster
Graph-based cluster dynamics for irradiated materials
|
Functions | |
| load (pat) | |
Variables | |
| str | OUT = "/Users/ghoni/Documents/GitHub/RadCluster/radcluster_code/output" |
| int | I = 1000 |
| int | NB = int(sys.argv[1]) if len(sys.argv) > 1 else 32 |
| sim | |
| RE = sim.rate_equations | |
| bins = list(RE.bins) | |
| i_d | |
| P | |
| ref = load("*_M1_D1000_*") | |
| bm = load(f"*_M2R_B{NB}_*") | |
| yr = np.asarray(ref["results"]["y"], float) | |
| yb = np.asarray(bm["results"]["y"], float) | |
| C_floor = float(ref["input_data"].reactions.get("C_floor", 1e-15)) | |
| jr | |
| jb | |
| c_ref = np.maximum(yr[:I, jr], 0.0) | |
| dict | tot = {"e0": 0.0, "b0": 0.0, "e1": 0.0, "b1": 0.0} |
| he = float(np.sum(np.maximum(c_ref[1:i_d] - C_floor, 0.0))) | |
| hb = float(np.sum(np.maximum(yb[1:i_d, jb] - C_floor, 0.0))) | |
| ns = np.arange(2, i_d + 1) | |
| he1 = float(np.dot(ns, np.maximum(c_ref[1:i_d] - C_floor, 0.0))) | |
| hb1 = float(np.dot(ns, np.maximum(yb[1:i_d, jb] - C_floor, 0.0))) | |
| hi = min(nhi, I) | |
| seg = c_ref[nlo - 1:hi] | |
| sizes = np.arange(nlo, hi + 1) | |
| e0 = float(np.dot(sizes, seg)) | |
| off = i_d + P * k | |
| int | b0 = 2 else 0.0 |
| tuple | d0 = (b0 - e0) / e0 * 100 if e0 else float("nan") |
| tuple | d1 = (b1 - e1) / e1 * 100 if e1 else float("nan") |
Bin-by-bin comparison, with NO reconstruction anywhere. Takes the exact arm's per-size 1/2<111> spectrum, SUMS it onto the binned run's own bin edges to form the exact mu0 and mu1 per bin, and compares those against the moments the binned run actually carries. Reconstruction is what the closure approximates, so comparing reconstructed spectra would measure the closure twice; comparing moments measures the dynamics alone.
| check_binwise_moments.load | ( | pat | ) |
Definition at line 22 of file check_binwise_moments.py.
| int check_binwise_moments.b0 = 2 else 0.0 |
Definition at line 76 of file check_binwise_moments.py.
| check_binwise_moments.bins = list(RE.bins) |
Definition at line 37 of file check_binwise_moments.py.
Definition at line 42 of file check_binwise_moments.py.
| check_binwise_moments.C_floor = float(ref["input_data"].reactions.get("C_floor", 1e-15)) |
Definition at line 48 of file check_binwise_moments.py.
Definition at line 53 of file check_binwise_moments.py.
Definition at line 77 of file check_binwise_moments.py.
| tuple check_binwise_moments.d1 = (b1 - e1) / e1 * 100 if e1 else float("nan") |
Definition at line 78 of file check_binwise_moments.py.
Definition at line 74 of file check_binwise_moments.py.
Definition at line 59 of file check_binwise_moments.py.
Definition at line 62 of file check_binwise_moments.py.
Definition at line 58 of file check_binwise_moments.py.
Definition at line 61 of file check_binwise_moments.py.
| check_binwise_moments.hi = min(nhi, I) |
Definition at line 71 of file check_binwise_moments.py.
| int check_binwise_moments.I = 1000 |
Definition at line 18 of file check_binwise_moments.py.
| check_binwise_moments.i_d |
Definition at line 38 of file check_binwise_moments.py.
| check_binwise_moments.jb |
Definition at line 49 of file check_binwise_moments.py.
| check_binwise_moments.jr |
Definition at line 49 of file check_binwise_moments.py.
| int check_binwise_moments.NB = int(sys.argv[1]) if len(sys.argv) > 1 else 32 |
Definition at line 19 of file check_binwise_moments.py.
| check_binwise_moments.ns = np.arange(2, i_d + 1) |
Definition at line 60 of file check_binwise_moments.py.
Definition at line 75 of file check_binwise_moments.py.
| str check_binwise_moments.OUT = "/Users/ghoni/Documents/GitHub/RadCluster/radcluster_code/output" |
Definition at line 17 of file check_binwise_moments.py.
| check_binwise_moments.P |
Definition at line 38 of file check_binwise_moments.py.
| check_binwise_moments.RE = sim.rate_equations |
Definition at line 36 of file check_binwise_moments.py.
| check_binwise_moments.ref = load("*_M1_D1000_*") |
Definition at line 41 of file check_binwise_moments.py.
Definition at line 72 of file check_binwise_moments.py.
| check_binwise_moments.sim |
Definition at line 28 of file check_binwise_moments.py.
| check_binwise_moments.sizes = np.arange(nlo, hi + 1) |
Definition at line 73 of file check_binwise_moments.py.
| dict check_binwise_moments.tot = {"e0": 0.0, "b0": 0.0, "e1": 0.0, "b1": 0.0} |
Definition at line 56 of file check_binwise_moments.py.
| check_binwise_moments.yb = np.asarray(bm["results"]["y"], float) |
Definition at line 47 of file check_binwise_moments.py.
| check_binwise_moments.yr = np.asarray(ref["results"]["y"], float) |
Definition at line 46 of file check_binwise_moments.py.