♻️ Refactor some radiation methods for clarity - #4219
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4219 +/- ##
==========================================
- Coverage 48.64% 48.63% -0.01%
==========================================
Files 151 151
Lines 29703 29705 +2
==========================================
- Hits 14449 14448 -1
- Misses 15254 15257 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
439cbc9 to
4c7c3ce
Compare
03ddd71 to
e4e975a
Compare
| indices = np.digitize(temp_electron_kev, bins) | ||
| indices[indices >= bins.shape[0]] = bins.shape[0] - 1 |
There was a problem hiding this comment.
temp_electron_kev is typed as allowed to be a float but this function would fail here because indices will be a np.int64 which you cannot do item assignment to
| nd_electron_profile: np.array | float, | ||
| temp_electron_profile_kev: np.array | float, |
There was a problem hiding this comment.
Again, I don't think these will work as floats because indexing wont work
| def z2index(zimp, data: DataStructure) -> int: | ||
| for i in range(len(data.impurity_radiation.impurity_arr_label)): | ||
| if zimp == data.impurity_radiation.impurity_arr_z[i]: | ||
| return i | ||
|
|
||
| # Should only get here if there is a problem | ||
| raise ProcessValueError( | ||
| "Element with the given charge is not in the impurity array", zimp=zimp | ||
| ) |
There was a problem hiding this comment.
I can't see this function being used anywhere
There was a problem hiding this comment.
Can you also add : to the other arguments and the solve the merge conflicts
…nd improve comments Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
…sity` for clarity
…n imprad_profile method Co-authored-by: Copilot <copilot@github.com>
…` for clarity and update references
…p_compiled` for clarity
… accuracy in parameter types and documentation Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
…mathematical notation Co-authored-by: Copilot <copilot@github.com>
…ions Co-authored-by: Copilot <copilot@github.com>
…y and update related tests
…ty and update related calculations
Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com>
f6ed7f3 to
de4ec34
Compare
Description
Checklist
I confirm that I have completed the following checks: