Skip to content

module myna.database.nist_ambench_2022

Database class for a directory with NIST AM-Bench 2022 build data


class AMBench2022

NIST AM-Bench data structure

Specify a directory as the path to the database. Files can be downloaded from https://doi.org/10.18434/mds2-2607.

In order to enable simulation of all parts, the directory must contain the following:

  • AMB2022-01-AMMT-XYPT_v1.h5 (https://data.nist.gov/od/ds/ark:/88434/mds2-2607/Scan_Strategy/AMB2022-01-AMMT-XYPT_v1.h5, 4.97 GB)
  • AMB2022-01-AMMT-PartCAD.STL (https://data.nist.gov/od/ds/ark:/88434/mds2-2607/CAD_Geometry/AMB2022-01-AMMT-PartCAD.STL, 21.9 kB)
  • AMB2022-01-AMMT-RecoaterGuideCAD.STL (https://data.nist.gov/od/ds/ark:/88434/mds2-2607/CAD_Geometry/AMB2022-01-AMMT-RecoaterGuideCAD.STL, 18.7 kB)

method AMBench2022.__init__

__init__()

method AMBench2022.create_scanfile

create_scanfile(part, layer)

Create a scanpath file from the HDF5 archive

Args:

  • part: name of the part
  • layer: layer number

Returns:

  • file_database: path to the exported file

method AMBench2022.exists

exists()

method AMBench2022.get_part_bounds

get_part_bounds(part)

Defines the part (inclusive) bounding box in XY coordinates

AM-Bench doesn't provide a part ID map, so data from the provided plaintext descriptions is encoded here.

Args:

  • part: part name string (options: P1, P2, P3, P4, G1, G2)

Returns - [xmin, xmax, ymin, ymax]: corners of the rectangular bounding box of the part, in millimeters


method AMBench2022.get_plate_size

get_plate_size()

Load the (x,y) build plate size in meters


method AMBench2022.get_sync_image_size

get_sync_image_size()

Load the (x,y) image size in pixels


method AMBench2022.layer_str

layer_str(layernumber)

method AMBench2022.load

load(metadata_type, part=None, layer=None)

Load and return a metadata value from the database

Implemented metadata loaders: - Scanpath - Material - LaserPower - SpotSize


method AMBench2022.make_thumbnail_image

make_thumbnail_image(layernumber, var_name='Test')

method AMBench2022.set_path

set_path(path)

Set the path to the database

Args:

  • path: filepath to the folder containing the downloaded AM-Bench data

method AMBench2022.sync

sync(component_type, step_types, output_class, files)

Sync result files to the database using Peregrine-style directory and file structure.

Args:

  • component_type: (str) name of workflow component app, i.e., Component.component_application
  • step_types: (list of str) list of workflow component types, i.e., Component.types
  • output_class: class object for the output file, e.g., Component.output_requirement
  • files: List of files to sync for the passed workflow component

Returns:

  • synced_files: list of files that were synced

For each layer: 1. Open the corresponding NPZ file 2. Save all corresponding data 3. Close NPZ file 4. Write thumbnail file


This file was automatically generated via lazydocs.