deltametrics.section.RadialSection

class deltametrics.section.RadialSection(apex, radius)

Radial section object.

__init__(apex, radius)

Identify coordinates defining the section.

Parameters

CubeInstance (Cube subclass instance, optional) – Connect to this cube. No connection is made if cube is not provided.

Notes

If no arguments are passed, an empty section not connected to any cube is returned. This cube will will need to be manually connected to have any functionality (via the connect() method.

Methods

__init__(apex, radius)

Identify coordinates defining the section.

connect(CubeInstance)

Connect this Section instance to a Cube instance.

show(SectionAttribute[, style, data, label, ax])

Show the section.

Attributes

s

Along-section coordinate.

strat_attr

trace

Coordinates of the section in the x-y plane.

variables

List of variables.

z

Up-section (vertical) coordinate.

__getitem__(var)

Get a slice of the section.

Slicing the section instance creates a SectionVariable instance from data for variable var.

Note

We only support slicing by string.

Parameters

var (str) – Which variable to slice.

Returns

SectionVariable – SectionVariable instance for variable var.

Return type

SectionVariable instance

connect(CubeInstance)

Connect this Section instance to a Cube instance.

s

Along-section coordinate.

show(SectionAttribute, style='shaded', data=None, label=False, ax=None)

Show the section.

Method enumerates convenient routines for visualizing sections of data and stratigraphy. Includes support for multiple data style and mutuple data choices as well.

Note

The colors for style=’lines’ are determined from the left-end edge node, and colors for the style=’shaded’ mesh are determined from the lower-left-end edge node of the quad.

Parameters
  • SectionAttribute (str) – Which attribute to show.

  • style (str, optional) – What style to display the section with. Choices are ‘mesh’ or ‘line’.

  • data (str, optional) – Argument passed to get_display_arrays or get_display_lines. Supported options are ‘spacetime’, ‘preserved’, and ‘stratigraphy’. Default is to display full spacetime plot for section generated from a DataCube, and stratigraphy for a StratigraphyCube section.

  • label (bool, str, optional) – Display a label of the variable name on the plot. Default is False, display nothing. If label=True, the label name from the VariableSet is used. Other arguments are attempted to coerce to str, and the literal is diplayed.

Examples

Example 1: Display the velocity spacetime section of a DataCube.

>>> rcm8cube = dm.sample_data.cube.rcm8()
>>> rcm8cube.register_section('demo', dm.section.StrikeSection(y=5))
>>> rcm8cube.sections['demo'].show('velocity')

(png, hires.png)

../_images/section_demo_spacetime.png

Note that the last line above is functionally equivalent to rcm8cube.show_section('demo', 'velocity').

Example 2: Display a section, with “quick” stratigraphy, as the depth attribute, displaying several different section styles.

>>> rcm8cube = dm.sample_data.cube.rcm8()
>>> rcm8cube.stratigraphy_from('eta')
>>> rcm8cube.register_section('demo', dm.section.StrikeSection(y=5))

>>> fig, ax = plt.subplots(4, 1, sharex=True, figsize=(6, 9))
>>> rcm8cube.sections['demo'].show('depth', data='spacetime',
...                                 ax=ax[0], label='spacetime')
>>> rcm8cube.sections['demo'].show('depth', data='preserved',
...                                ax=ax[1], label='preserved')
>>> rcm8cube.sections['demo'].show('depth', data='stratigraphy',
...                                ax=ax[2], label='quick stratigraphy')
>>> rcm8cube.sections['demo'].show('depth', style='lines', data='stratigraphy',
...                                ax=ax[3], label='quick stratigraphy')

(png, hires.png)

../_images/section_demo_quick_strat.png
trace

Coordinates of the section in the x-y plane.

variables

List of variables.

z

Up-section (vertical) coordinate.