|
RadCluster
Graph-based cluster dynamics for irradiated materials
|
Functions | |
| _node_key (str node) | |
| find_hyperedge (rag, edge_class, tails, head) | |
| _draw_example (ax, x0, y, tails, head, edge_class, label, n_max, note=None) | |
| None | build_figure (int n_max, Path out, bool examples=True) |
Variables | |
| int | _LABEL_FONTSIZE = 22 |
| int | _TICK_FONTSIZE = 20 |
| int | _PLOT_FONTSIZE = 20 |
| int | _NODE_FONTSIZE = 26 |
| float | _LW = 3.0 |
| float | _LW_THIN = 2.4 |
| int | _DPI = 150 |
| str | _INK = "#1a1a1a" |
| str | _NODE_RING = "#3f3f3f" |
| str | _SENTINEL = "#b4b4b4" |
| str | _FAN_SIA = "#1a1a1a" |
| str | _FAN_VAC = "#1a4f8a" |
| str | _GREY_TEXT = "#6a6a6a" |
| dict | _POP |
| dict | _EDGE |
| float | _X_SCALE = 3.00 |
| dict | _LANE_Y = {"bulk-111": 6.2, "bulk-100": 3.1, "bulk": 0.0} |
| float | _R = 0.44 |
| float | _EX_R = 0.64 |
| dict | _POP_SHORT |
| dict | _HYPER = {"coalescence": "#256abf", "annihilation": "#d03b3b"} |
| ap = argparse.ArgumentParser(description=__doc__) | |
| type | |
| int | |
| default | |
| action | |
| help | |
| a = ap.parse_args() | |
| out | |
| examples | |
make_rag_figure.py — node-link drawing of the EUROFER-97 RAG.
Renders the reaction admissibility graph declared in
``py_utils/materials/eurofer97`` as a three-lane ladder: one lane per
population, cluster size along x, one arc per declared edge family.
The drawing is generated from the MATERIALIZED graph
(``py_utils.core.to_networkx``), not from a hand-transcribed edge list, so
it cannot drift from the declaration. If a family is added to the host
declaration it appears here on the next run.
Binary classes (COALESCENCE, ANNIHILATION) are omitted: they are directed
hyperedges and O(n_max**2) in count -- 6564 of the 7078 arcs at n_max=30 --
and drawing them turns the figure into a solid block. Their count is
reported on the figure instead.
ENCODING. Colour carries the EDGE CLASS here, not the population, because
the edge classes are what must be told apart: several share a vertex pair
and are drawn as nested arcs millimetres from each other. Population
identity is carried instead by a tinted lane band plus a direct lane label
-- a large, low-saturation mark that cannot be confused with a thin
saturated arc, and which leaves the whole categorical budget for the arcs.
The lane tints are the suite population colours from
py_utils/visualization.py, so the association with the physics figures
survives.
The four arc hues are reference categorical slots 1/2/3/7, validated under
the ALL-PAIRS gate (worst CVD dE 9.2, worst normal-vision dE 16.3).
All-pairs is the right gate here because nested arcs sit side by side
rather than in a legend-ordered stack. Line style is a redundant second
channel, so the figure survives greyscale printing.
Style otherwise follows py_utils/visualization.py: titles suppressed (the
document captions the figure) and type set once via rcParams at 22/20/16.
Usage::
cd radcluster_code
python codes/make_rag_figure.py --n-max 12 \
--out ../docs/Formulation/reaction_admissibility_graph/figures/eurofer_rag_figure.png
|
protected |
One hyperedge: two tails -> reaction vertex -> one head.
Definition at line 172 of file make_rag_figure.py.
|
protected |
'sia:bulk-111:7' -> ('bulk-111', 7); sentinels -> (None, None).
Definition at line 118 of file make_rag_figure.py.
| None make_rag_figure.build_figure | ( | int | n_max, |
| Path | out, | ||
| bool | examples = True |
||
| ) |
Definition at line 236 of file make_rag_figure.py.
| make_rag_figure.find_hyperedge | ( | rag, | |
| edge_class, | |||
| tails, | |||
| head | |||
| ) |
Assert that (tails -> head) is really declared, and name its family. The examples are hand-picked sizes, so unlike everything else in this figure they could drift from the declaration. This looks them up in a graph materialized wide enough to contain them and returns the family label, so a stale example fails loudly instead of drawing a reaction the host does not admit.
Definition at line 143 of file make_rag_figure.py.
|
protected |
Definition at line 69 of file make_rag_figure.py.
|
protected |
Definition at line 100 of file make_rag_figure.py.
|
protected |
Definition at line 131 of file make_rag_figure.py.
|
protected |
Definition at line 84 of file make_rag_figure.py.
|
protected |
Definition at line 85 of file make_rag_figure.py.
|
protected |
Definition at line 86 of file make_rag_figure.py.
|
protected |
Definition at line 140 of file make_rag_figure.py.
|
protected |
Definition at line 81 of file make_rag_figure.py.
|
protected |
Definition at line 63 of file make_rag_figure.py.
|
protected |
Definition at line 114 of file make_rag_figure.py.
|
protected |
Definition at line 67 of file make_rag_figure.py.
|
protected |
Definition at line 68 of file make_rag_figure.py.
|
protected |
Definition at line 66 of file make_rag_figure.py.
|
protected |
Definition at line 82 of file make_rag_figure.py.
|
protected |
Definition at line 65 of file make_rag_figure.py.
|
protected |
Definition at line 89 of file make_rag_figure.py.
|
protected |
Definition at line 132 of file make_rag_figure.py.
|
protected |
Definition at line 115 of file make_rag_figure.py.
|
protected |
Definition at line 83 of file make_rag_figure.py.
|
protected |
Definition at line 64 of file make_rag_figure.py.
|
protected |
Definition at line 113 of file make_rag_figure.py.
| make_rag_figure.a = ap.parse_args() |
Definition at line 407 of file make_rag_figure.py.
| make_rag_figure.action |
Definition at line 403 of file make_rag_figure.py.
| make_rag_figure.ap = argparse.ArgumentParser(description=__doc__) |
Definition at line 401 of file make_rag_figure.py.
| make_rag_figure.default |
Definition at line 402 of file make_rag_figure.py.
| make_rag_figure.examples |
Definition at line 408 of file make_rag_figure.py.
| make_rag_figure.help |
Definition at line 404 of file make_rag_figure.py.
| make_rag_figure.int |
Definition at line 402 of file make_rag_figure.py.
| make_rag_figure.out |
Definition at line 408 of file make_rag_figure.py.
| make_rag_figure.type |
Definition at line 402 of file make_rag_figure.py.