Skip to content

module myna.database.peregrine

Database class for an ORNL MDF Peregrine build's file structure


class PeregrineDB

method PeregrineDB.__init__

__init__()

method PeregrineDB.exists

exists()

method PeregrineDB.get_cui_info

get_cui_info()

Get any markings about controlled unclassified information (CUI)


method PeregrineDB.get_plate_size

get_plate_size()

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


method PeregrineDB.get_sync_image_size

get_sync_image_size()

Load the (x,y) image size in pixels


method PeregrineDB.layer_str

layer_str(layernumber)

method PeregrineDB.load

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

Load and return a metadata value from the database

Implemented metadata loaders: - LaserPower - LayerThickness - Material - Preheat - SpotSize - STL - Scanpath


method PeregrineDB.make_thumbnail_image

make_thumbnail_image(layernumber, var_name='Test')

method PeregrineDB.set_path

set_path(path)

Set the path to the database

Args:

  • path: filepath to the build folder on the Peregrine server

method PeregrineDB.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.