Pre assembly
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
from lib.lib import read_xy_alt, read_load
|
||||
import matplotlib as mpl
|
||||
from mpl_toolkits.mplot3d import Axes3D
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
full_data = read_load("/Users/joshuacoles/Developer/checkouts/jc3091/CompB DLA/data-analysis/data/rust-3d", read_xy_alt)
|
||||
run1 = full_data[full_data.run == '1']
|
||||
|
||||
max_actual_radius = max(run1.x.abs().max(), run1.y.abs().max(), run1.z.abs().max())
|
||||
max_radius = int(np.exp2(np.floor(np.log2(max_actual_radius)) + 1))
|
||||
data = np.zeros((max_radius * 2, max_radius * 2, max_radius * 2))
|
||||
data[run1.x + max_radius, run1.y + max_radius, run1.z + max_radius] = 1
|
||||
|
||||
# %%
|
||||
fig = plt.figure(figsize=(10, 10))
|
||||
ax = fig.add_subplot(projection='3d')
|
||||
ax.scatter(run1.x, run1.y, run1.z, c=run1.N)
|
||||
|
||||
fig.savefig("../figures/3d-eg.png")
|
||||
fig.savefig("../figures/3d-eg.svg")
|
||||
@@ -41,8 +41,8 @@ nc_fd(direct_meaned_by_N, label="IPC + 3D Direct", color="tab:blue", no_error=Tr
|
||||
nc_fd(rust_direct_meaned_by_N, label="NF 3D Direct", color="tab:orange", no_error=True)
|
||||
nc_fd(rust_offaxis_meaned_by_N, label="NF 3D Off-axis", color="tab:purple", linestyle='dashdot', no_error=True)
|
||||
|
||||
plt.plot([np.min(c_direct_neighbours.N), np.max(c_direct_neighbours.N)], [2.5, 2.5], color='tab:red', label='Literature')
|
||||
# plt.fill_between(c_direct_neighbours.N, 2.5 - 0.01, 2.5 + 0.01, alpha=0.2, color='tab:red', label='Literature error band')
|
||||
plt.plot([np.min(c_direct_neighbours.N), np.max(c_direct_neighbours.N)], [2.51, 2.51], color='tab:red', label='Literature')
|
||||
# plt.fill_between(c_direct_neighbours.N, 2.51 - 0.01, 2.51 + 0.01, alpha=0.2, color='tab:red', label='Literature error band')
|
||||
|
||||
plt.xlabel("$N_C$")
|
||||
plt.ylabel("$fd$ (instantaneous)")
|
||||
|
||||
Reference in New Issue
Block a user