Skip to content

Mat-O-Lab/IOFMaterialsTutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IOFMaterialsTutorial

Tutorial for using Mat-O-Lab tools in conjunction with the IOF ontologies to create sematic data for material science related characterisaton methods.

Please notice that this tutorial is using unconfirmed experimental parts of the ontology stack like the IOF qualities and the IOF materials ontology. This also includes some modelling strategies for including QUDT concepts which are not officially accepted.

Table of Contents

Basic Tutorial

Introduction DrawIO and Chowlk

In the basic tutorial we will use DrawIO and Chowlk to create a sematic graph representing a simple length measurement of an object as our basic user story. We will also map example data of the measurements taken to the graph.

  • Start DrawIO Session ClickME
  • Create a new Blank Diagram and give it a name
LenghtMeasurement.drawio.xml

new drawio graph

  • Install IOF Materials ScratchPad from
https://github.com/Mat-O-Lab/IOFMaterialsTutorial/raw/main/IOFMaterialsScatchpad.xml

by clicking Open Library from/URL new drawio graph

  • Create a Simple Graph: Measurement of the Length of a Object by using Scratchpad Elements.
    • First add the Prefix and the Provenance Boxes. Make Changes to the template value. new drawio graph Therefor change the labels in the double Boxes to ur Needs. The upper Box is used for the rdf:type definition of the named Individual. The lower Box label ist the Name of the Individual. It Must be unique i the graph and should be a human understandable name in the context of the graph.
    • Add the MeaurementProcess Block from the Scatchpad to ur Graph new drawio graph Change the Type Definitions:
      iof:MeasurementCapability -> iof-mat:DistanceMeasurementCapability
      iof:Quality -> iof-qual:Length
      Also change all the Labels of the lower boxes.
    • A complete example can be found here new drawio graph
  • conversion to RDF with Chowlk
    • upload your drawio xml file new drawio graph
    • download the result or react to the protocoled warnings or errors new drawio graph
    • A complete example can be found here

Data Conversion

A simple Measurements Table

  • Create CSV Table with Length consecutive Measurements of the Objects Length, see for example.
  • Conversion of Table to RDF with CSVToCSVW
    • upload csv file or better use a web location of ur csvfile, so it can be resolved through the meta data generated
    https://raw.githubusercontent.com/Mat-O-Lab/IOFMaterialsTutorial/main/measurements.csv
    

new drawio graph

  • download csvw meta data new drawio graph
  • example output can be found here

Create a Mapping

Create a Mapping of Graph to Data Table with MapToMethod

  • Upload your measurements meta data file to a publicly available web location or use the example url

    https://raw.githubusercontent.com/Mat-O-Lab/IOFMaterialsTutorial/main/measurements-metadata.json
    
  • visit and paste above url to the URL META DATA Field and the location of ur Measurement Graph Turtle File to the URL METHOD GRAPH FIELD

    https://github.com/Mat-O-Lab/IOFMaterialsTutorial/raw/main/LengthMeasurement.ttl
    

    new drawio graph and click on Start Mapping

  • in the new form pick from the dropdown the column in ur measurement data file that u want to map to your method graph new drawio graph and click Create Mapping

  • download the create rulebases Yarrml mapping new drawio graph

  • example output can be found here

Apply Mapping

Use the Mapping with RDFConverter

  • Upload your mapping file to a publicly available web location or use the example url
    https://raw.githubusercontent.com/Mat-O-Lab/IOFMaterialsTutorial/main/measurements-map.yaml
    
  • visit and paste above url to the URL Field Mapping new drawio graph and click on Start Mapping
  • a joined graph will be created and is available for download new drawio graph and download the graph.
  • example output can be found here

Load Data

Load Data to Triplestore

Query Data

Sample Querys on Create Graph

Advanced Example

This example uses the open-access Additive Manufacturing Materials Database (AMMD) of NIST, that is a collaborative platform that shares structured material data with the AM community, advancing the development of AM technology.

The original data can be obtained at https://ammd.nist.gov/query-ontology/ AMTests/Powder/ParticleSize/Sieving

in particular:

  • NIST_IN625_RR_WesternIllinoisPSS2.xml
  • Project ID: NIST-IN625-RR-14
  • Material Name: IN625
  • MaterialStockID: NIST_IN625_RR_Feedstock_WesternIllinois
  • Test Standards: ASTM B214-07
  • Test Type: particle size sieving
  • Test preparation: Virgin Powder in Dispenser
  • Test Results:
    • Particle Size
    • percentOfMass

The data is result of a powder sieving analysis according to ASTM B214-22. new drawio graph

The data is downloaded through the implemented REST API reorganised and saved as csv. To use the implemented lookup of the CSVToCSVW tool, the unit symbols are added the header labels as an be seen in the adjusted csv.

Creating the Method Graph

Open the DrawIO Application and the IOFTutorial Scatchpad as described in the Introduction to DrawIO and Chowlk.

Add the provenance information by dragging out the particulare boxes fram the Scratchpad and make the changes needed. new drawio graph

Our method is conducted according to the standard ASTM B214-22 o we should point out this fact. new drawio graph

The specimen here is a portion of metal powder taken from a feedstock. Both have an Identifier in the data so lets model these too. new drawio graph

The powder taken is sieved and the mean size of the particles passing the sieve can be calculated according to the standard. The mass of the particles in elation to the overall mass is calculated using the measured mass by a balance. So the assemply of particles passing the sieve as to qualities we refer to. new drawio graph

We need to measurement devices the sieve and the belance whch are used in two consecutively measurementprocesses in there there measurement capabilities are realized. new drawio graph The whole measurement process has the measurement data as an output.

The data is about the qualities of the particles assembly and we need to draw a connection which device is used to measure the particular quality. new drawio graph Our method graph is done.

Data Conversion

Just as in the basic tutorial the URL of the csv file is passed to the CSVToCSVW tool.

https://raw.githubusercontent.com/Mat-O-Lab/IOFMaterialsTutorial/main/sieveDistribution-AMMD_adjusted.csv

The resulting meta data file can be found here csv-metadata.json.

In our Data every row of the table seams to offer data for an sieving experiment each. Thats why we will need every data cel in the data for the creation of the sematic data. Because of that we will serialize the whole table as sematic data using the rdf api endpoint of the CSVToCSVW tool.

We need to pass the location of our csv meta data.

https://github.com/Mat-O-Lab/IOFMaterialsTutorial/raw/main/sieveDistribution-AMMD_adjusted-metadata.json

new drawio graph After excecuting the results can be downloaded. The semantic table data can be found here.

Create the Mapping

Go through the steps described in Create a Mapping. This time we need make some manual changes to the mapping rules which can not be done through the MapToMethod UI.

First we set a flag that this mapping will be done for every single row of the table so that it wil result in a method graph for each of them. new drawio graph

Second we add two rules for the identifiers of specimen and feedstock which they are taken from. new drawio graph

Next we add the whole csvw:TableGroup instance as the OutputData. new drawio graph

And at last we add the mapping rules for the measurement columns using the predicate iof:isMeasuredValueOfAtSomeTime. new drawio graph

The resulting mapping file can be found here.

Run the Mapping

Run the mapping like explained in Appy Mapping, no further changes needed.

https://raw.githubusercontent.com/Mat-O-Lab/IOFMaterialsTutorial/main/sieveDistribution-map.yaml

This results in a joined graph with replicas of our method graph and mapped data for each row of our table. The example result can also be found here

For better readability a prefix for every row index of the table is created.

More Examples

Hardness Measurements

Graph and Transformation for Vickers Hardness see this Repo. The Graph is visualized bellow. Image

Image Analysis

Example using an OMERO Image Server, see doucmentation in this Repo.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published