Data structures
elematic.ds
Defines the data structure of the MatML 3.1 schema used in elematic.
AssociationDetails
AssociationDetails class represents the content model for association details in a complex material system.
It contains a description of the relationship of a component to another component, such as in composites, welds, or multilayer materials.
Attributes:
Name | Type | Description |
---|---|---|
associate |
str
|
The name of a component's associate. For example, in a TiC coating on AISI 1018 steel coupons, the associate of the steel is the "titanium carbide coating". Defaults to None. |
relationship |
str
|
A description of the relationship between a component and its associate. For example, the relationship of the "steel" component to the "titanium carbide coating" is that the steel is the "substrate" for the coating. Defaults to None. |
notes |
str
|
Any additional information concerning the association. Defaults to None. |
AuthorityDetails
This class represents the AuthorityDetails element, which contains a description of an authority referenced by other elements, such as the Specification and Name elements. An authority is typically an organization that is the authoritative source of information about the element that is referencing it.
Attributes:
Name | Type | Description |
---|---|---|
name |
Name
|
The name of the Authority. This attribute is required and must occur once and only once within the AuthorityDetails element. |
notes |
str
|
Any additional information concerning the parameter. Defaults to None. |
id |
str
|
A unique identifier for the AuthorityDetails element. This attribute is required and must be unique among id attributes assigned elsewhere in a MatML document. |
BulkDetails
Describes the bulk material.
Attributes:
Name | Type | Description |
---|---|---|
name |
Name
|
Contains the material's name and has one optional attribute, |
class_value |
list[Class]
|
Contains the material's class. |
subclass |
list[Class]
|
Contains the material's subclass(es). |
specification |
list[Specification]
|
Contains the material's specification(s). |
source |
Source
|
Contains the name of the source of the material. |
form |
Form
|
Describes the form of the material. |
processing_details |
list[ProcessingDetails]
|
Contains a description of a processing step for the material. |
characterization |
Characterization
|
Contains the characterization. |
property_data |
list[PropertyData]
|
Contains the property data for the material. |
notes |
str
|
Contains any additional information concerning the bulk material. |
Characterization
Describes the chemical composition of the bulk material or component.
Attributes:
Name | Type | Description |
---|---|---|
formula |
str
|
A string representation of the chemical formula for the bulk material or component. |
chemical_composition |
ChemicalComposition
|
A description of the compounds and elements that comprise the bulk material or component. |
phase_composition |
list[PhaseComposition]
|
A description of the phases that comprise the bulk material or component. |
dimensional_details |
list[DimensionalDetails]
|
Information relating to component or bulk precipitate size and distribution, etc. |
notes |
str
|
Any additional information concerning the Characterization. |
ChemicalComposition
Describes the compounds or elements that comprise the bulk material or component.
Attributes:
Name | Type | Description |
---|---|---|
compound |
list[Compound]
|
A list of Compound elements. This attribute
is mutually exclusive with |
element |
list[Element]
|
A list of Element elements. This attribute is
mutually exclusive with |
Warning
Setting either of compound
or element
to a non-empty list will set the other
to an empty list.
ChemicalElementSymbol
Enum which provides the valid strings representing chemical elements, which may be used in the elematic.ds.Element.Symbol element.
Class
The material class to which the Material belongs. The Class can either have a Name or ParentMaterial element.
Attributes:
Name | Type | Description |
---|---|---|
name |
Name
|
Contains a string representing the name of the material's class. Defaults to None. |
parent_material |
list[ParentMaterial]
|
A list of references to parent material. Defaults to an empty list. |
parent_sub_class |
list[Class]
|
A list of references to parent sub-class. |
ComponentDetails
Contains a description of a component within the bulk material and is used to support encoding of information for complex materials systems such as composites.
Attributes:
Name | Type | Description |
---|---|---|
name |
Name
|
Contains the component's name. |
class_value |
list[Class]
|
Contains the component's material class. |
subclass |
list[Class]
|
Contains the component's material subclass(es). |
specification |
list[Specification]
|
Contains the component's specification(s). |
source |
Source
|
Contains the name of the source of the component. |
form |
Form
|
Contains the form of the component. |
processing_details |
list[ProcessingDetails]
|
Contains a description of a processing step for the component. |
characterization |
Characterization
|
Contains the characterization of the component, |
property_data |
list[PropertyData]
|
Contains the property data for the component. |
association_details |
list[AssociationDetails]
|
Contains a description of a relationship of the component to another component. |
notes |
str
|
Contains any additional information concerning the component. |
component_details |
list[ComponentDetails]
|
Contains a description of a component within the component. |
id |
str
|
An optional attribute used as an identification specifier for the component. |
Compound
The elemental description of a chemical compound.
Attributes:
Name | Type | Description |
---|---|---|
element |
list[Element]
|
Contains the description of a chemical element. |
concentration |
Concentration
|
Contains the concentration of the compound. |
notes |
str
|
Contains any additional information concerning the compound. |
Concentration
Defines the concentration of a Compound, Element, or PhaseComposition.
Attributes:
Name | Type | Description |
---|---|---|
value |
Value
|
Contains the value of the concentration. |
units |
Units
|
Contains the units for the value of the concentration. |
qualifier |
list[str]
|
Contains any qualifier pertinent to the value of the concentration (e.g., "min," "max," etc.). |
uncertainty |
list[Uncertainty]
|
Contains the measurement uncertainty(ies) of the data. |
notes |
None | str
|
Contains any additional information concerning the concentration and may occur once or not at all within the Concentration element. |
CurrencyCode
Enumerates the ISO4217 currency codes.
DataFormat
Enumerates allowable dataformats used by the format
attributes of the
elematic.ds.Value, elematic.ds.ParameterValue,
elematic.ds.ParameterValue.Data, and elematic.ds.PropertyData.Data
elements.
Attributes:
Name | Type | Description |
---|---|---|
FLOAT |
float |
|
INTEGER |
int |
|
STRING |
str |
|
EXPONENTIAL |
float |
|
MIXED |
str |
Notes
MIXED
is only used for a group of data where each individual member of the
group can be given a unique format.
DataSourceDetails
Describes the form of the bulk material or component.
Attributes:
Name | Type | Description |
---|---|---|
description |
Name
|
Contains a string representing the description of the bulk material or component's form. |
geometry |
Geometry
|
Contains a description of the geometry of the bulk material or component. Defaults to None. |
notes |
str
|
Contains any additional information concerning the form. Defaults to None. |
DimensionalDetails
Describes a dimensional characteristic (e.g., grain size, porosity, precipitate size and distribution, etc.) of the bulk material or component.
Attributes:
Name | Type | Description |
---|---|---|
name |
Name
|
Contains the name of the characteristic. |
value |
Value
|
Contains the value of the dimensional characteristic. |
units |
Units
|
Contains the units for the value of the dimensional characteristic. |
qualifier |
Optional[str]
|
Contains any qualifier pertinent to the value of the dimensional characteristic (e.g., "min," "max," etc.). |
uncertainty |
List[Uncertainty]
|
Contains the measurement uncertainty(ies) of the data. |
notes |
Optional[str]
|
Contains any additional information concerning the dimensional DimensionalDetails element. |
Element
Represents a chemical element with its symbol, concentration, and notes. symbol (Element.Symbol): Symbol of the chemical element. It must be one of the strings enumerated by the ChemicalElementSymbol datatype. concentration (Concentration, optional): Concentration of the element. notes (str, optional): Additional information concerning the element.
Symbol
Symbol of the chemical element. It must be one of the strings enumerated by the ChemicalElementSymbol datatype.
Attributes:
Name | Type | Description |
---|---|---|
value |
ChemicalElementSymbol
|
The symbol of the chemical element. |
subscript |
str
|
The subscript of the element, default is "1". |
Form
Describes the form of the bulk material or component.
Attributes:
Name | Type | Description |
---|---|---|
description |
Name
|
Contains a string representing the description of the bulk material or component's form. |
geometry |
Geometry
|
Contains a description of the geometry of the bulk material or component. Defaults to None. |
notes |
str
|
Contains any additional information concerning the form. Defaults to None. |
Geometry
Descibes the geometry of the bulk material, component, or specimen.
Attributes:
Name | Type | Description |
---|---|---|
shape |
str
|
A string describing the shape of the bulk material or component. |
dimensions |
str
|
A string describing the dimensions of the bulk material or component. Defaults to None. |
orientation |
str
|
A string describing the orientation of the bulk material or component. Defaults to None. |
notes |
str
|
Contains any additional information concerning the geometry. Defaults to None. |
Glossary
Contains one or more elematic.ds.GlossaryTerm elements.
Attributes:
Name | Type | Description |
---|---|---|
term |
list[GlossaryTerm]
|
Contains one or more elematic.ds.GlossaryTerm. |
GlossaryTerm
Provides the definition of a term in the glossary.
Attributes:
Name | Type | Description |
---|---|---|
name |
Name
|
Contains the name of the term. |
definition |
str
|
Contains the definition of the term. |
abbreviation |
list[str]
|
Contains any abbreviations for the term. Defaults to an empty list. |
synonym |
list[str]
|
Contains any synonyms for the term. Defaults to an empty list. |
notes |
str
|
Any additional information concerning the term. Defaults to None. |
Graphs
Contains elematic.ds.Graphs.Graph elements.
Attributes:
Name | Type | Description |
---|---|---|
graph |
list[Graph]
|
Contains elematic.ds.Graphs.Graph elements. |
Graph
Contains a single SVG graph element. Graph uses the W3C's Scalable Vector Graphics markup language (SVG) for describing two dimensional graphics and allows for three types of graphical objects: vector graphics shapes, images, and text. Graph must occur one or more times within the Graphs element. For more information concerning SVG, see the documentation at http://www.w3.org/TR/SVG/.
Attributes:
Name | Type | Description |
---|---|---|
w3_org_2000_svg_element |
list[object]
|
Contains a single SVG graph element. |
MatMLDoc
Material
Material class represents the content model for materials data.
Attributes:
Name | Type | Description |
---|---|---|
bulk_details |
BulkDetails
|
Contains a description of the bulk material. |
component_details |
list[ComponentDetails]
|
Contains descriptions of components within the bulk material. |
graphs |
Graphs
|
Contains descriptions of two-dimensional graphics. |
glossary |
Glossary
|
Contains descriptions of the material and property terms used in the document. |
id |
str
|
An optional identification specifier for the material, useful for complex systems such as composite laminates. |
layers |
int
|
An optional attribute indicating the number of layers in complex systems such as composite laminates. |
local_frame_of_reference |
str
|
An optional identification specifier for the local material orientation relative to the global frame of reference, useful for complex systems such as anisotropic materials. |
MeasurementTechniqueDetails
Describes the measurement technique referenced by the elematic.ds.PropertyData element.
Attributes:
Name | Type | Description |
---|---|---|
name |
Name
|
Contains the name of the measurement technique. |
id |
str
|
A unique identifier for the MeasurementTechniqueDetails element. This attribute may be arbitrarily assigned but must be unique among id attributes assigned elsewhere in a MatML document. |
notes |
str
|
Any additional information concerning the measurement technique. Defaults to None. |
Metadata
Provides the metadata information for a MatML document.
Attributes:
Name | Type | Description |
---|---|---|
authority_details |
list[AuthorityDetails]
|
Contains a description of authorities referenced from the Specification and Name elements. |
data_source_details |
list[DataSourceDetails]
|
Contains a description of a data source referenced using the PropertyData element. |
measurement_technique_details |
list[MeasurementTechniqueDetails]
|
Contains a description of a measurement technique referenced using the PropertyData element. |
parameter_details |
list[ParameterDetails]
|
Contains a description of a parameter referenced using the PropertyData element. |
property_details |
list[PropertyDetails]
|
Contains a description of a property for which materials data are encoded using the PropertyData element. |
source_details |
list[SourceDetails]
|
Contains a description of the source of a material or component. |
specimen_details |
list[SpecimenDetails]
|
Contains a description of a specimen referenced using the PropertyData element. |
test_condition_details |
list[TestConditionDetails]
|
Contains a description of the test condition(s) referenced using the PropertyData element. |
check_unique_ids()
Verify that all id attributes are unique between the different elements.
Name
Represents a name with an optional authority attribute.
Attributes:
Name | Type | Description |
---|---|---|
value |
str
|
A string representing the name. This attribute is required. |
authority |
str
|
An optional attribute for identifying an authoritative source of names in the context in which the Name element is used. Defaults to None. |
ParameterDetails
Provides the definition of a elematic.ds.ParameterValue element.
Attributes:
Name | Type | Description |
---|---|---|
name |
Name
|
Contains the name of the parameter. |
id |
str
|
This attribute may be arbitrarily assigned but must be unique among id attributes assigned elsewhere in a MatML document. |
units |
Units
|
Describes the parameter's units. This attribute is
mutually exclusive with |
unitless |
Unitless
|
Indicates that the parameter is unitless. This
attribute is mutually exclusive with |
notes |
str
|
Contains any additional information concerning the parameter. |
Warning
Setting either of units
or unitless
to a non-None value will set the other
to None.
ParameterValue
Represents the value of a parameter with associated metadata.
Attributes:
Name | Type | Description |
---|---|---|
data |
Data
|
Contains the property data. |
uncertainty |
list[Uncertainty]
|
Contains the measurement uncertainties of the data. |
qualifier |
list[str]
|
Contains any qualifiers pertinent to the data. |
notes |
str
|
Contains any additional information concerning the property data. |
parameter |
str
|
References an id attribute specified in a ParameterDetails element. |
format |
DataFormat
|
Indicates the format of the value. |
Data
Contains the property data.
Attributes:
Name | Type | Description |
---|---|---|
value |
str
|
The value of the data. |
format |
DataFormat
|
The format of the value. |
PhaseComposition
Represents a phase that comprises the bulk material or component.
Attributes:
Name | Type | Description |
---|---|---|
name |
Name
|
The name of the phase. |
concentration |
Concentration
|
The concentration of the phase. |
property_data |
list[PropertyData]
|
Property data for the phase. |
notes |
str
|
Any additional information concerning the phase. |
ProcessingDetails
Represents a processing step for bulk material or component.
Attributes:
Name | Type | Description |
---|---|---|
name |
Name
|
The name of the processing step. |
parameter_value |
list[ParameterValue]
|
A list of parameter values under which the processing step occurred. |
result |
str
|
A description of the outcome or result of the processing step. |
notes |
str
|
Any additional information concerning the processing step. |
PropertyData
Represents property data.
Attributes:
Name | Type | Description |
---|---|---|
data |
Data
|
Contains the property data. |
uncertainty |
list[Uncertainty]
|
Contains the measurement uncertainty(ies) of the data. |
qualifier |
list[str]
|
Contains any qualifier(s) pertinent to the data (e.g. "min," "max," etc.). |
parameter_value |
list[ParameterValue]
|
Contains the value(s) of a parameter under which the data were determined. |
notes |
None | str
|
Contains any additional information concerning the property data. |
property |
str
|
Required attribute that references an id attribute specified in a PropertyDetails element. |
technique |
None | str
|
Optional attribute that references an id attribute specified in a MeasurementTechniqueDetails element. |
source |
None | str
|
Optional attribute that references an id attribute specified in a DataSourceDetails element. |
specimen |
None | str
|
Optional attribute that references an id attribute specified in a SpecimenDetails element. |
test |
None | str
|
Optional attribute that references an id attribute specified in a TestConditionDetails element. |
delimiter |
str
|
Specifies the delimiter that separates multiple values in the Data, Qualifier, Uncertainty, and ParameterValue elements. The default value is a comma (','). |
quote |
None | str
|
Specifies the string that is used to quote values in the Data, Qualifier, Uncertainty, and ParameterValue elements. The default value is a null string, which is equivalent to saying that the values are not quoted. |
Data
Data class that represents the data values used by elematic.ds.PropertyData.
Attributes:
Name | Type | Description |
---|---|---|
value |
str
|
A string value with a default of an empty string. |
format |
DataFormat
|
A DataFormat object. |
Note
This class is distinct from elematic.ds.ParameterValue.Data, in that the
format
attribute herein is required, whereas in
elematic.ds.ParameterValue, it is optional.
PropertyDetails
Provides the defition of a elematic.ds.PropertyData element.
Attributes:
Name | Type | Description |
---|---|---|
name |
Name
|
Contains the name of the property. |
id |
str
|
A unique identifier for the PropertyDetails element. This attribute may be arbitrarily assigned but must be unique among id attributes assigned elsewhere in a MatML document. |
units |
Units
|
Describes the property's units. This attribute is
mutually exclusive with |
unitless |
Unitless
|
Indicates that the property is unitless. This
attribute is mutually exclusive with |
notes |
str
|
Contains any additional information concerning the property. |
Warning
Setting either of units
or unitless
to a non-None value will set the other
to None.
Source
The source of the bulk material or component. Attributes: source (str, optional): An optional attribute representing the source of the bulk material or component. Defaults to None.
SourceDetails
Contains the name of the source of the component.
Attributes:
Name | Type | Description |
---|---|---|
name |
Name
|
Contains the name of the source. |
id |
str
|
A unique identifier for the SourceDetails element. This attribute may be arbitrarily assigned but must be unique among id attributes assigned elsewhere in a MatML document. |
notes |
str
|
Any additional information concerning the source. Defaults to None. |
type_value |
str
|
The type of the source (e.g., unpublished report, journal, handbook, etc.). Defaults to None. |
Specification
Represents a specification for bulk material or component. It contains a string value representing the specification and an optional attribute, authority, for identifying an authoritative source of specifications.
Attributes:
Name | Type | Description |
---|---|---|
value |
str
|
The specification content. This field is required. |
authority |
str
|
An optional attribute for identifying an authoritative source of specifications. Defaults to None. |
SpecimenDetails
Describes a specimen referenced by the elematic.ds.PropertyData element.
Attributes:
Name | Type | Description |
---|---|---|
id |
str
|
A unique identifier for the SpecimenDetails element. This attribute may be arbitrarily assigned but must be unique among id attributes assigned elsewhere in a MatML document. |
name |
Name
|
Contains the name of the specimen. Defaults to None. |
notes |
str
|
Any additional information concerning the specimen. Defaults to None. |
geometry |
Geometry
|
Contains a description of the geometry of the component. Defaults to None. |
type_value |
str
|
The type of the specimen (e.g., "cylindrical," "rectangular," "full cross-section," "pressed," etc.). Defaults to None. |
TestConditionDetails
Describes a test condition referenced by the elematic.ds.PropertyData element.
Attributes:
Name | Type | Description |
---|---|---|
parameter_value |
list[ParameterValue]
|
Contains the value(s) of a parameter, i.e., a test condition. |
notes |
str
|
Contains any additional information concerning the test conditions. |
id |
str
|
A required attribute that must be unique among id attributes assigned elsewhere in a MatML document. |
Uncertainty
Describes the measurement uncertainty of the data.
Attributes:
Name | Type | Description |
---|---|---|
value |
Value
|
Contains the value of the uncertainty. |
units |
Units
|
Contains the units for the value of the uncertainty.
This attribute is mutually exclusive with |
unitless |
Unitless
|
Indicates if the value is unitless. This
attribute is mutually exclusive with |
notes |
str
|
Contains any additional information concerning the uncertainty, such as a description of the evaluation of the uncertainty. |
scale |
UncertaintyScale
|
Represents the scale of the uncertainty. |
distribution_type |
(str, scale)
|
The type of distribution, default is "Normal/Gaussian". |
num_std_dev |
float
|
Number of standard deviations, default is 2.0. |
percentile |
float
|
A value indicating the percentage of the data population value. If Percentile is not given then Value is interpreted as being an equal and unspecified deviation above and below the Property value(s). |
confidence_level |
float
|
The confidence level of the uncertainty. |
Warning
Setting either of units
or unitless
to a non-None value will set the other
to None.
UncertaintyScale
An enumeration representing different scales of uncertainty.
Attributes:
Name | Type | Description |
---|---|---|
LINEAR |
str
|
Represents a linear scale of uncertainty. |
LOGARITHMIC |
str
|
Represents a logarithmic scale of uncertainty. |
Unit
Defines a unit of measurement. Unit has the choice of two attributes: name or currency.
Attributes:
Name | Type | Description |
---|---|---|
name |
str
|
Contains the name of the unit. Defaults to None. |
currency |
CurrencyCode
|
Contains the currency code of the unit. Defaults to None. |
power |
Decimal
|
Contains the power of the unit. Defaults to None. |
description |
str
|
Contains a description of the unit. Defaults to None. |
Notes
Multiple Unit elements are multiplied together to form units. Division is specified by setting the power attribute of the Unit to "-1".
Unitless
An empty element used whenever a property, parameter, or uncertainty value has no units.
Units
A class to represent a collection of units with associated metadata.
Attributes:
Name | Type | Description |
---|---|---|
unit |
list[Unit]
|
A list of Unit objects. |
system |
str
|
The system attribute. Defaults to None. |
factor |
float
|
The factor attribute. Defaults to None. |
name |
str
|
The name attribute. Defaults to None. |
description |
str
|
The description attribute. Defaults to None. |
Value
Contains a string representation of a value, and a format attribute.
Attributes:
Name | Type | Description |
---|---|---|
value |
str
|
A string representing a value. |
format |
DataFormat
|
The format of the value. |