Skip to content

Commit 5c8b9c3

Browse files
committed
Added some comments to test_rustbca.py
1 parent d2ee60f commit 5c8b9c3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

examples/test_rustbca.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def main():
8181
print(f'RustBCA R: {len(reflected[:, 0])/number_ions} Thomas R: {thomas}')
8282
print(f'Time per ion: {delta_time/number_ions*1e3} us/{ion["symbol"]}')
8383

84-
#layered target version
84+
#Next up is the layered target version. I'll add a 50 Angstrom layer of W-H to the top of the target.
8585

8686
#1 keV is above the He on W sputtering threshold of ~150 eV
8787
energies_eV = 1000.0*np.ones(number_ions)
@@ -96,6 +96,8 @@ def main():
9696

9797
print(f'Running RustBCA for {number_ions} {ion["symbol"]} ions on {target["symbol"]} with hydrogenated layer at {energies_eV[0]/1000.} keV...')
9898
print(f'This may take several minutes.')
99+
#Not the different argument order; when a breaking change is due, this will
100+
#be back-ported to the other bindings as well for consistency.
99101
output, incident, stopped = compound_bca_list_1D_py(
100102
ux, uy, uz, energies_eV, [ion['Z']]*number_ions,
101103
[ion['m']]*number_ions, [ion['Ec']]*number_ions, [ion['Es']]*number_ions, [target['Z'], 1.0], [target['m'], 1.008],
@@ -121,6 +123,7 @@ def main():
121123
heights, _, _ = plt.hist(x[np.logical_and(incident, stopped)], bins=100, density=True, histtype='step')
122124
plt.plot([50.0, 50.0], [0.0, np.max(heights)*1.1])
123125
plt.gca().set_ylim([0.0, np.max(heights)*1.1])
126+
124127
plt.show()
125128

126129
if __name__ == '__main__':

0 commit comments

Comments
 (0)