upxo.meshing.gbconformant.fm_steel_abaqus.subset module
Cuboid subset of an input dataset: box entry, the crop, and what the crop cuts.
The crop is taken from the input label array (and the feature table that goes with it) before anything is cleaned or meshed. Raw labels are kept, so grain IDs, element-set names, global IDs and orientations of the features that remain are those of the full structure.
- class upxo.meshing.gbconformant.fm_steel_abaqus.subset.BoxSpec(mode: str = 'index', lo: tuple = (0, 0, 0), hi: tuple | None = None, units: str | None = None)[source]
Bases:
objectA box entered in one of three ways.
index: voxel indices,hiexclusive.percent: percent of the dataset along each axis.physical: lengths from the dataset origin inunits. AhiofNonemeans the full extent.
- upxo.meshing.gbconformant.fm_steel_abaqus.subset.resolve_box(spec, shape, voxel_size=1.0, source_units=None)[source]
Voxel indices
(lo, hi)ofspecin a dataset ofshape.voxel_sizeis one voxel edge insource_units; physical entry is converted fromspec.units(default:source_units). Indices are rounded to the nearest voxel boundary.
- upxo.meshing.gbconformant.fm_steel_abaqus.subset.describe_box(lo, hi, shape, voxel_size=1.0, source_units=None, units=None)[source]
The same box in all three entry forms, for display and for mode switches.
- upxo.meshing.gbconformant.fm_steel_abaqus.subset.extract_labels(labels, lo, hi)[source]
Crop of
labelsas a new contiguous array.
- upxo.meshing.gbconformant.fm_steel_abaqus.subset.extract_subset(hierarchy, lo, hi)[source]
Hierarchy of the crop: same features, IDs and orientations, sizes recomputed.
- upxo.meshing.gbconformant.fm_steel_abaqus.subset.cut_statistics(parent_counts, crop_counts, small_threshold=4)[source]
What the box cuts: grains partly inside, and fragments below
small_threshold.
- upxo.meshing.gbconformant.fm_steel_abaqus.subset.hierarchy_counts(hierarchy, labels=None)[source]
How many PAGs, packets, blocks and sub-blocks the features hold (those of the level meshed), as
{name: count}.labelslimits the count to those features (the ones in a crop); a structure that names its own groups (twinned FCC) is counted as grains and host families.
- upxo.meshing.gbconformant.fm_steel_abaqus.subset.crop_adequacy(counts, minimums)[source]
Warnings for the levels whose count is below the minimum the person asked for (
Noneor 0: no minimum).
- upxo.meshing.gbconformant.fm_steel_abaqus.subset.subset_record(spec, lo, hi, shape, voxel_size=1.0, source_units=None, units=None, statistics=None)[source]
JSON-ready description of a crop (what was cut, in every entry form).
- upxo.meshing.gbconformant.fm_steel_abaqus.subset.write_subset_record(folder, record, name='subset.json')[source]