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.
Currently, the find_fisher_stats, fisher_stats, and mean_vector functions don't calculate Fisher k (kappa) or the mean vector of a group of poles correctly where the group of poles includes orientations which cross a dip=90° (e.g., subvertical joints with steeply north and south dipping orientations will have a flat mean orientation instead of a subvertical one). This is because the mean vector calc assumes that orientations have directions, which is not true for most data plotted on stereonets (e.g. rock joints). See Issue joferkington#39 for an example of undesired results.
This update uses the scatter matrix approach from Directional Statistics (Jupp and Mardia, 2000, pp.165) to estimate mean orientation and dispersion. This fixes the aforementioned issue.