Add check of a component metric is used that includes n/a values #922
Labels
bug
issues describing a bug or error found in the project
effort: medium
Theoretically <40h total work
impact: medium
Improves code/documentation functionality for some users
priority: medium
Should get addressed soon
Summary
It is possible to use metrics in the component table that have n/a or None values for some components. With the added decision tree modularization #756, if a conditional statement test includes components with n/a values then the result will always be
False
A check to throw an error rather than returningFalse
should be added. While this could be considerd a bug, this is not an urgent problem because this scenario is impossible with the decision trees that are included with tedana.Additional Detail
The kundu decision tree calculate a few metrics on a subset of components and then classifies components within that subset. The minimal tree doesn't add components so this issue can never arise there.
One potential way to address this issue is to add
used_metrics
as a parameter intoselectcomps2use
. Then, after the selected components are identified, ifn/a
orNone
are the values for any of the used_metrics, an error should be returned. Tree should be designed so that this is impossible, so it's better to throw an error that says there's a problem with a decision tree.Next Steps
The text was updated successfully, but these errors were encountered: