Skip to content

← diagnostics package

RandomMatrix

Generate an artificial packet with a random matrix.

This node works offline or online. The node outputs a Packet whose properties are virtually all fully customizable in the parameters of the node. Among others, it is possible to set the name of the chunk, its dictionary of meta-data properties, as well as the axis types and labels used for the data bblock, and the range and distribution of the numeric content. The behavior when the node is successively updated (e.g., in online mode) is configurable. This node can be used to generate debug or test data. Version 1.0.1

Ports/Properties

data

Output data.

verbose name
Data
default value
None
port type
DataPort
value type
Packet (can be None)
data direction
OUT

chunk_name

"Name of generated stream (chunk).

verbose name
Chunk Name
default value
random_matrix
port type
StringPort
value type
str (can be None)

dims

Dimensions of matrix.

verbose name
Dims
default value
[5, 5]
port type
ListPort
value type
list (can be None)

axis_types

Axis types.

verbose name
Axis Types
default value
['space', 'time']
port type
ListPort
value type
list (can be None)

axis_labels

Axis labels. This is a dictionary, where the keys are numeric values matching the position of the axis in the axis types field (starting with 0). Each value is a list of the labels for that axis (and should match its length specified in the matrix dimensions. For a time axis, these will be the times.

verbose name
Axis Labels
default value
{0: ['A', 'B', 'C', 'D', 'E'], 1: ['U', 'V', 'W', 'X', 'Y']}
port type
DictPort
value type
dict (can be None)

distribution

Distribution that the values should follow.

verbose name
Distribution
default value
uniform
port type
EnumPort
value type
str (can be None)

value_range

Value range. Low/high for uniform, mean/std for normal distribution.

verbose name
Value Range
default value
[0, 1]
port type
ListPort
value type
list (can be None)

flavor

Flavor of the node's output. In offline-once mode, the node outputs a single packet, and after that outputs no more data. In that sense, it acts like one of the import nodes, which also output only once (unless they are asked to import a new filename). In offline-same mode, the node will repeatedly emit the exact same packet (with the same values). In online-same it behaves the same as offline-same. In online-rerandomized mode, the node outputs a fresh packet with new numbers on every update.

verbose name
Flavor
default value
offline-once
port type
EnumPort
value type
str (can be None)

chunk_properties

Additional stream (chunk) properties.

verbose name
Chunk Properties
default value
{}
port type
DictPort
value type
dict (can be None)

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

verbose name
Set Breakpoint (Debug Only)
default value
False
port type
BoolPort
value type
bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

verbose name
Metadata
default value
{}
port type
DictPort
value type
dict (can be None)