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 - see example image). This is because the mean vector calc assumes that orientations have directions (i.e. are vector data), which is not true for most data plotted on stereonets, e.g. rock joints, which are really axial data. For axial data, the vectors x and -x are indistinguishable. See Issue #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 issue described above.
I suppose if the current behaviour is intended, we could add my tweaked functions as new functions or an option in the existing functions. Could modify the functions so that they include a data_type keyword and for data_type = 'axial', it uses the scatter matrix approach, for data_type = 'vector' is uses the current approach.