-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
30928ee
commit a8fe2fa
Showing
9 changed files
with
10,902 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
6.88 875.89 12.856 | ||
7.39 235.498 6.433 | ||
7.9 716.13 10.853 | ||
8.41 1622.14 15.835 | ||
8.92 2359.578 18.549 | ||
9.43 2713.698 19.352 | ||
14.01 142.255 2.301 | ||
14.52 202.088 2.695 | ||
15.03 262.384 3.019 | ||
15.54 293.92 3.144 | ||
16.05 310.173 3.555 | ||
16.56 273.796 2.942 | ||
17.06 229.504 2.801 | ||
17.57 168.734 1.933 | ||
18.08 122.731 1.626 | ||
18.59 84.73 1.333 | ||
19.1 58.683 1.095 | ||
19.61 46.797 0.966 | ||
20.12 40.368 0.903 | ||
20.63 39.624 0.766 | ||
21.14 43.109 0.789 | ||
21.65 44.915 0.797 | ||
22.15 44.212 0.782 | ||
22.66 42.61 0.759 | ||
23.17 35.349 0.717 | ||
23.68 28.731 0.64 | ||
24.19 23.681 0.486 | ||
24.7 18.464 0.503 | ||
25.21 14.775 0.377 | ||
25.71 12.014 0.337 | ||
26.22 9.961 0.28 | ||
26.73 8.634 0.258 | ||
27.24 8.516 0.254 | ||
27.75 8.246 0.248 | ||
28.26 8.103 0.244 | ||
28.77 7.697 0.236 | ||
29.27 6.847 0.261 | ||
29.78 5.826 0.185 | ||
30.29 4.728 0.214 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import numpy as np | ||
import matplotlib.pyplot as plt | ||
import matplotlib.pylab as pylab | ||
import glob | ||
import os | ||
|
||
# Set plot parameters | ||
params = { | ||
'xtick.labelsize': 17, | ||
'ytick.labelsize': 17, | ||
'axes.titlesize': 18, | ||
'axes.labelsize': 18, | ||
'legend.fontsize': 16 | ||
} | ||
pylab.rcParams.update(params) # Apply the parameter updates | ||
|
||
# Define file pattern and colors | ||
file_pattern = "./DataInelastic/inelastic_2H116Sn_183MeV*.txt" | ||
colors = ['red', 'blue', 'green', 'orange', 'purple', 'brown'] | ||
|
||
# Find all matching files | ||
files = sorted(glob.glob(file_pattern)) | ||
|
||
# Check if files are found | ||
if len(files) == 0: | ||
raise FileNotFoundError(f"No files matching the pattern {file_pattern} were found.") | ||
|
||
data_exp = np.loadtxt("ExperimentalData.txt") | ||
|
||
# Initialize the plot | ||
plt.figure(figsize=(10, 6)) | ||
|
||
# Iterate through files and plot the data | ||
for i, file in enumerate(files): | ||
data = np.loadtxt(file, skiprows = 1) | ||
x = data[:, 0] | ||
y = data[:, 1] | ||
# Extract the distinguishing part of the file name | ||
label = os.path.splitext(os.path.basename(file))[0].replace("inelastic_2H116Sn_183MeV", "") | ||
plt.plot(x, y, label=label, color=colors[i % len(colors)]) | ||
plt.plot(data_exp[:, 0], data_exp[:, 1], color = "black", label= "Experimental", linestyle = "--") | ||
|
||
# Customize the plot | ||
plt.xlabel(r"$\theta$ (deg)") | ||
plt.ylabel(r"$\sigma_{inel}$ (mb/sr)") | ||
plt.yscale("log") | ||
plt.legend() | ||
|
||
# Save the plot as a PDF | ||
plt.savefig("./DataInelastic/InelasticScattering_All.pdf") | ||
plt.show() |
Oops, something went wrong.