upxo.pxtal.img_essentials_01 module

Dataclass helpers for 3D IMAGE / RVE feature bookkeeping.

class upxo.pxtal.img_essentials_01.part_cntr_CLS(connectivity: int)[source]

Bases: object

Partitioning controls: connectivity and binary structuring element.

connectivity: int
bstruct: any
class upxo.pxtal.img_essentials_01.ids_counts_CLS(f: str)[source]

Bases: object

Guidance to set-up the feature names. <<< Please restrict featuire names to only from below options: grain, subgrain,ptwin i.e. primary twin, stwin i.e. secondary twin, pag for prior austenitic grain, pck for packets in Martensitic steels (FMS), blk for blocks in FMS, sblk for sub blocks in FMS, l for laths in FMS >>>

f: str

Cells (C)

c: numpy.array
n_c: int
v_c: dict
nv_c: dict

CB

Type:

Cell boundaries

cb: numpy.array
n_cb: int
v_cb: dict
nv_cb: dict

CB segments (CBS)

cbs: dict
n_cbs: dict
v_cbs: dict
nv_cbs: dict

CBS edges (CBSE)

cbse: dict
n_cbse: dict
v_cbse: dict
nv_cbse: dict

CBSE points (CBSEP)

cbsep: dict
n_cbsep: dict
v_cbsep: dict
nv_cbsep: dict

CBSE inflection vert (CBSEV)

cbsev: dict
n_cbsev: dict
v_cbsev: dict
nv_cbsev: dict

CBSE junc. pnts (CBSEJ)

cbsej: dict
n_cbsej: dict
v_cbsej: dict
nv_cbsej: dict
class upxo.pxtal.img_essentials_01.ids_CLS[source]

Bases: object

Feature ID stores for voxels, cells, and GB hierarchy (global numbering).

Holds global CBS / edge / junction-point ID arrays used with ids_counts_CLS hierarchical counts.

v: numpy.array
cbsG: numpy.array
cbseG: numpy.array
cbsejG: numpy.array
class upxo.pxtal.img_essentials_01.vox_CLS(l: float)[source]

Bases: object

Single-voxel geometry for an RVE (edge length l in micrometres).

vol is l³ in cubic micrometres.

l: float
property vol: float

Voxel volume (l³) in cubic micrometres.

class upxo.pxtal.img_essentials_01.rve_CLS(nx: int, ny: int, nz: int, vox: any)[source]

Bases: object

Rectangular voxel RVE: nx``×``ny``×``nz and attached vox_CLS.

After init, n is total voxels and vol is physical domain volume.

nx: int
ny: int
nz: int
vox: any
n: int
vol: float
set_n() → float[source]

Return total number of voxels (nx * ny * nz).

set_vol() → float[source]

Return total domain volume in cubic micrometres.