attitude.display package

Submodules

attitude.display.cartopy module

attitude.display.error_comparison module

attitude.display.error_comparison.bootstrap_ci(deskewed_data)[source]
attitude.display.error_comparison.error_comparison(fit, do_bootstrap=False, **kwargs)[source]

attitude.display.hyperbola module

class attitude.display.hyperbola.HyperbolicErrors(*args, **kwargs)[source]

Bases: object

A class to simplify plotting and animation of hyperbolic error areas that are orthogonal to the fitted plane. ax.fill_between cannot be used for these (unless the plane is flat), because the coordinate system is rotated.

plot(ax, **kw)[source]
plot_nominal(ax, *args, **kw)[source]
update_data(*args, **kwargs)[source]
attitude.display.hyperbola.apparent_dip_correction(axes)[source]

Produces a two-dimensional rotation matrix that rotates a projected dataset to correct for apparent dip

attitude.display.hyperbola.hyperbola_values(hyp_axes, xvals)[source]
kwargs:
transformation rotation to apply to quadric prior to slicing
(e.g. transformation into ‘world’ coordinates

axes axes on which to slice the data

attitude.display.hyperbola.hyperbolic_errors(hyp_axes, xvals, transformation=None, axes=None, means=None, correct_apparent_dip=True, reverse=False)[source]

Returns a function that can be used to create a view of the hyperbolic error ellipse from a specific direction.

This creates a hyperbolic quadric and slices it to form a conic on a 2d cartesian plane aligned with the requested direction.

A function is returned that takes x values (distance along nominal line) and returns y values (width of error hyperbola)

kwargs:
transformation rotation to apply to quadric prior to slicing
(e.g. transformation into ‘world’ coordinates

axes axes on which to slice the data

attitude.display.hyperbola.hyperbolic_errors_parametric(hyp_axes, xvals=None, transformation=None, axes=None, means=None)[source]

attitude.display.nbextension module

attitude.display.nbextension.get_library(fn)[source]
attitude.display.nbextension.init_notebook_mode()[source]

Initialize attitude.js in the browser.

Based heavily on the plotly offline setup function (https://github.com/plotly/plotly.py/blob/master/plotly/offline/offline.py)

Also see https://github.com/paulgb/nbgraph/blob/master/nbgraph/client/prepare_notebook.html

attitude.display.nbextension.plot_interactive(attitudes)[source]

attitude.display.parametric module

attitude.display.parametric.ellipse(axes, **kwargs)[source]
attitude.display.parametric.hyperbola(axes, **kwargs)[source]

Plots a hyperbola that opens along y axis

attitude.display.parametric.plot_conjugate_conics(ax, axes, width=None, plot_foci=False, plot_inverse_hyperbola=False)[source]

attitude.display.pca_aligned module

attitude.display.pca_aligned.plot_aligned(pca, sparse=True, **kwargs)[source]

Plots the residuals of a principal component analysis of attiude data.

attitude.display.stereonet module

attitude.display.stereonet.girdle_error(ax, fit, **kwargs)[source]

Plot an attitude measurement on an mplstereonet axes object.

attitude.display.stereonet.plot_patch(ax, vertices, codes, **kwargs)[source]
attitude.display.stereonet.pole_error(ax, fit, **kwargs)[source]

Plot the error to the pole to a plane on a mplstereonet axis object.

attitude.display.stereonet.uncertain_plane(ax, *args, **kwargs)[source]

attitude.display.test_display module

attitude.display.test_display.cases()
attitude.display.test_display.test_simple_ellipse()[source]
attitude.display.test_display.test_simple_plane()[source]

attitude.display.test_hyperbolic_errors module

Test module to make sure that simple representations of hyperbolic errors are equivalent to more generalized expressions.

attitude.display.test_hyperbolic_errors.hyperbola_from_axes(cov, xvals, n=1, level=1)[source]
attitude.display.test_hyperbolic_errors.simple_hyperbola(cov, xvals, n=1, level=1)[source]

Simple hyperbolic error bounds for 2d errors using quadratic formulation.

Returns tuple of
( distance from center of distribution,
width of error bar)

in unrotated coordinate space

attitude.display.test_hyperbolic_errors.test_dual_conic()[source]
attitude.display.test_hyperbolic_errors.test_sampling_covariance()[source]

Test the creation of hyperbolic errors along direction of maximum angular variability

attitude.display.util module

attitude.display.util.encode(fig)[source]
attitude.display.util.to_json(value)[source]

A filter that outputs Python objects as JSON

Module contents

Functions for displaying data using matplotlib, cartopy, and interactive javascript, both for static plotting and the IPython notebook.

Deprecated code for generating HTML reports is also included in this module.