Get Lithium or light elements transitions #19
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request allow to get transitions for light elements when no probability are available in the database, but a relative weight is available using
element_xray_transitions. See commit 3021322.The implementation is not great. I was not able to combine
table_probabilityandtable_relative_weightin one SQL operation, the SQL query did not work. So the implementation duplicates the SQL query fortable_probability, but usingtable_relative_weightif the number of transitions found withtable_probabilityis zero.The
print_element_xray_transitionsis also modified to output the relative weight of each transition.A test was added to test the new functionality of
element_xray_transitionsand tests pass.What I try and it did not work was to add a join for
table_relative_weightand modify the clausetable_probability.c['value'] > 0.0to use asqlalchemy.or_on both. Various was tried and either the SQL gives an error or the number of transitions was too large (>1000).Thanks,
Hendrix