Predefined nodes

Preparing data for plotting

Data Selection

To be written. Describe data selector, idea of compatible data.

Data Gridding

Converting data from a tabular format to a grid is done by the by the node class DataGridder:

class plottr.node.grid.DataGridder(name)

A node that can put data onto or off a grid. Has one property: grid. Its possible values are governed by a main option, plus (optional) additional options.

property grid

Specification for how to grid the data. Consists of a main option and (optional) additional options.

The main option is of type GridOption, and the additional options are given as a dictionary. Assign as tuple, like:

>>> dataGridder.grid = GridOption.<option>, dict((**options)

All types of GridOption are valid main options:

Some types may required additional options. At the moment, this is only the case for GridOption.specifyShape. Manual specification of the shape requires two additional options, order and shape:

  • order

    a list of the input data axis dimension names, in the internal order of the input data array. This order is used to transpose the data before re-shaping with the shape information. Often this is simply the axes list; then the transpose has no effect. A different order needed when the the data to be gridded is not in C order, i.e., when the axes order given in the DataDict is not from slowest changing to fastest changing.

  • shape

    a tuple of integers that can be used to reshape the input data to obtain a grid. Must be in the same order as order to work correctly.

See data.datadict.datadict_to_meshgrid() for additional notes; order will be passed to inner_axis_order in that function, and shape to target_shape.

Return type

Tuple[GridOption, Dict[str, Any]]

class plottr.node.grid.GridOption

Options for how to grid data.

guessShape = 1

guess the shape of the grid

metadataShape = 3

read the shape from DataSet Metadata (if available)

noGrid = 0

don’t put on a grid

specifyShape = 2

manually specify the shape of the grid

Data slicing and reduction to 1D or 2D

To be written.