Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] How do I determine the sputtering and reflection yield from "output, incident, stopped = compound_bca_list_1D_py" code output in test_rustbca.py? #262

Open
HexSygon opened this issue Feb 18, 2025 · 3 comments
Labels
question Further information is requested

Comments

@HexSygon
Copy link

I believe I understand the inputs and outputs but not how to calculate sputter and reflection yields from the output.

Also, what is the compound reflection code used for/is this how you determine reflection coefficients for ions on compound targets?

I want to find the sputtering and reflection coefficients of D and C ions on a half W - half C target at various energies.

@HexSygon HexSygon added the question Further information is requested label Feb 18, 2025
@drobnyjt
Copy link
Collaborator

drobnyjt commented Feb 24, 2025

@HexSygon the way to do it is to count the number of sputtered or reflected atoms and then divide by the number of computational ions / number of samples. In the examples folder, test_morse.py includes the way I usually do this:

...

if np.size(reflected) > 0:
  num_reflected = np.shape(reflected)[0]
  energy_reflected = np.sum(reflected[:, 2])
else:
  num_reflected = 0
  energy_reflected = 0.

return num_reflected/num_samples, energy_reflected/energy/num_samples

In this code snippet, the number of reflected atoms is found using np.shape as the number of rows in the reflected output file. Same procedure for the sputtered atoms - count the number of rows and divide by the number of computational ions.

@HexSygon
Copy link
Author

Thanks Jon,

I'll give this a go and let you know if I come across any issues.

Best,
Alec

@drobnyjt
Copy link
Collaborator

@HexSygon You're welcome - I just realized I only responded to half of your comment; sorry about that.

Yes, the compound version is for homogeneous targets composed of more than one element. So for example H reflecting from CW.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants