sdynpy.core.sdynpy_geometry.TracelineArray

class TracelineArray(shape, buffer=None, offset=0, strides=None, order=None)[source]

Bases: SdynpyArray

Traceline information array

Use the traceline_array helper function to create the array.

__init__()

Methods

from_unv(unv_data_dict[, combine])

Load TracelineArrays from universal file data from read_unv

reduce(node_list)

Keep only tracelines fully contain nodes in node_list

Attributes

data_dtype

data_dtype = [('id', 'uint64'), ('color', 'uint16'), ('description', '<U40'), ('connectivity', 'object')]
static from_unv(unv_data_dict, combine=True)[source]

Load TracelineArrays from universal file data from read_unv

Parameters
  • unv_data_dict (dict) – Dictionary containing data from read_unv

  • combine (bool, optional) – If True, return as a single TracelineArray object

Returns

output_arrays – Tracelines read from unv

Return type

TracelineArray

reduce(node_list)[source]

Keep only tracelines fully contain nodes in node_list

Parameters

node_list (iterable) – Iterable containing nodes to keep.

Returns

TracelineArray containing lines that contain only nodes in node_list.

Return type

TracelineArray