Skip to content

Commit

Permalink
data/wbm/eda.py add toggle normalize MP/WBM element count ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh committed Nov 23, 2023
1 parent ee5d2c7 commit d7ad893
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions data/wbm/eda.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,17 @@


# %% ratio of WBM to MP counts
ax_mp_ratio_wbm = ptable_heatmap_ratio(
wbm_occu_counts,
mp_occu_counts,
normalized = True
ax_ptable = ptable_heatmap_ratio(
wbm_occu_counts / (len(df_wbm) if normalized else 1),
mp_occu_counts / (len(df_mp) if normalized else 1),
zero_color="#efefef",
exclude_elements=["Xe", "Th", "Pa", "U", "Np", "Pu"],
exclude_elements="Xe Th Pa U Np Pu".split(),
)
save_fig(ax_mp_ratio_wbm, f"{PDF_FIGS}/wbm-mp-element-counts-ratio-by-occurrence.pdf")
img_name = "wbm-mp-ratio-element-counts-by-occurrence"
if normalized:
img_name += "-normalized"
save_fig(ax_ptable, f"{PDF_FIGS}/{img_name}.pdf")


# %% export element counts by WBM step to JSON
Expand Down

0 comments on commit d7ad893

Please # to comment.