core/mathematical_expression-0.1.0#
Schema that describes a mathematical_expression.
Description
Defines a mathematical expression using sympy syntax.
https://docs.sympy.org/latest/modules/core.html#module-sympy.core.sympify
Also contains any predefined (constant) parameters used in the expression.
Outline
Schema Definitions ¶
This type is an object with the following properties:
- expression
string Required A string representation of the mathematical expression. The expression must conform to the sympy syntax.No length restriction - parameters
object List of constant parameters that to be set in the mathematical expression.object
Examples ¶
A linear mathematical expression:
!<asdf://weldx.bam.de/weldx/tags/core/mathematical_expression-0.1.0>
expression: a*x + b
parameters:
a: !<asdf://weldx.bam.de/weldx/tags/units/quantity-0.1.0> {value: 1.2, units: !<asdf://weldx.bam.de/weldx/tags/units/units-0.1.0> volt}
b: !<asdf://weldx.bam.de/weldx/tags/units/quantity-0.1.0> {value: 3.4, units: !<asdf://weldx.bam.de/weldx/tags/units/units-0.1.0> volt}
Original Schema ¶
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "asdf://weldx.bam.de/weldx/schemas/core/mathematical_expression-0.1.0"
title: |
Schema that describes a mathematical_expression.
description: |
Defines a mathematical expression using sympy syntax.
https://docs.sympy.org/latest/modules/core.html#module-sympy.core.sympify
Also contains any predefined (constant) parameters used in the expression.
examples:
-
- A linear mathematical expression
- |
!<asdf://weldx.bam.de/weldx/tags/core/mathematical_expression-0.1.0>
expression: a*x + b
parameters:
a: !<asdf://weldx.bam.de/weldx/tags/units/quantity-0.1.0> {value: 1.2, units: !<asdf://weldx.bam.de/weldx/tags/units/units-0.1.0> volt}
b: !<asdf://weldx.bam.de/weldx/tags/units/quantity-0.1.0> {value: 3.4, units: !<asdf://weldx.bam.de/weldx/tags/units/units-0.1.0> volt}
type: object
properties:
expression:
description: |
A string representation of the mathematical expression.
The expression must conform to the sympy syntax.
type: string
parameters:
description: |
List of constant parameters that to be set in the mathematical expression.
type: object
wx_property_tag: "asdf://weldx.bam.de/weldx/tags/units/quantity-0.1.*"
required: [expression]
propertyOrder: [expression, parameters]
flowStyle: block
...