upxo.xtal.mcgrain2d_definitions module

class upxo.xtal.mcgrain2d_definitions.grain2d[source]

Bases: object

pxt.gs[2].g[1][‘grain’]

ATTRIBUTES AND THEIR ACCESS

loc:

Grain pixel loca5tions. pxt.gs[t].g[gid][‘grain’].loc, pxt.gs[t].g[gid][‘grain’].coords

npixels:

Number of pixels in the grain pxt.gs[t].g[gid][‘grain’].npixels

position:

Grain relative poistioning in the poly-crystal. pxt.gs[t].g[gid][‘grain’].position initial 2 values provide x and y coord of the centroid last string value provides the relative positioning of the grain

coords:

Explanation here

gbloc:

grain boundary pixel locations

bbox_bounds:

Bounds of the bounding box pxt.gs[t].g[gid][‘grain’].bbox_bounds

bbox_ex_bounds:

Bounds of the extended bounding box. Extended by unit pixels on all sides. If grain is a boundary grain, only possible directions will be extended by unit pixel. pxt.gs[t].g[gid][‘grain’].bbox_ex_bounds

bbox:

Mask on bounding box. pxt.gs[t].g[gid][‘grain’].bbox

bbox_ex:

Mask on extended bouning box. pxt.gs[t].g[gid][‘grain’].bbox_ex

skprop:

Scikit image property generator pxt.gs[t].g[gid][‘grain’].skprop

_px_area:

Area of a single pixel pxt.gs[t].g[gid][‘grain’]._px_area

gid:

This grain ID. Same as the lgi number of this grain. pxt.gs[t].g[gid][‘grain’].gid

gind:

Indices of grain pixel in the parent state matrix pxt.gs[t].g[gid][‘grain’].gind

gbid:

Grain boundary ID pxt.gs[t].g[gid][‘grain’].gbid

gbind:

Indices of grain boundary pixel in the parent state matrix pxt.gs[t].g[gid][‘grain’].gbind

gbvert:

Grain boundary vertices pxt.gs[t].g[gid][‘grain’].gbvert

gbsegs:

grain boundary segments pxt.gs[t].g[gid][‘grain’].gbsegs

gbsegs_geo:

grain boundary segments: dict with below keys: ‘info’: OPTIONS:

‘spg.menp’: Single Pixel Grain. Multi-edge not possible ‘slg.menp’: Straight line Grain. Multi-edge not possible

‘me’: Multi-edge pxt.gs[t].g[gid][‘grain’].gbsegs_geo

s:

Monte-Car;o State value of the current grain pxt.gs[t].g[gid][‘grain’].s

sn:

pxt.gs[t].g[gid][‘grain’].sn

neigh:

GIDs of the neighbouring grains pxt.gs[t].g[gid][‘grain’].neigh

grain_core:

Grain core region pxt.gs[t].g[gid][‘grain’].grain_core

gb_zone:

Grain boundary zone pxt.gs[t].g[gid][‘grain’].gb_zone

subgrains:

sub-grains inside grain. It shall also encompass any island_grains pxt.gs[t].g[gid][‘grain’].subgrains

paps:

prior-austenite packats pxt.gs[t].g[gid][‘grain’].paps

blocks:

block structuers in paps pxt.gs[t].g[gid][‘grain’].blocks

laths:

Lath structures inside blocks pxt.gs[t].g[gid][‘grain’].laths

xstruc: Crystal Structure: ‘fcc’, ‘bcc’, ‘hcp’

xmin, xmax, ymin, ymax:

pxt.gs[t].g[gid][‘grain’].(xmin, xmax, ymin, ymax)

control_points_mesh:

Points places at strategic locations inside the grain to control mesh density of a conformal mesh pxt.gs[t].g[gid][‘grain’].control_points_mesh

ea_pixels:

Euler snagles of all pixels

quats_pixels:

Quaternions of all the pixesl int he grain

ref_quat:

Reference quaternion value of the all pixes in the grain

ref_ea:

Referecne Euler angle of all the pixesl in the grain

texcomp:

T3exture component name to which the pixel would belong to. Defined at each of the pixesl in the grain

glb_pert_min_ea1, glb_pert_max_ea1:

Global minimum and maximum allowed perturbation to euler angle 1

glb_pert_min_ea2, glb_pert_max_ea2:

Global minimum and maximum allowed perturbation to euler angle 2

glb_pert_min_ea3, glb_pert_max_ea3

Global minimum and maximum allowed perturbation to euler angle 3

lcl_pert_min_ea1, lcl_pert_max_ea1:

Local minimum and maximum allowed perturbation to euler angle 1

lcl_pert_min_ea2, lcl_pert_max_ea2:

Local minimum and maximum allowed perturbation to euler angle 2

lcl_pert_min_ea3, lcl_pert_max_ea3:

Local minimum and maximum allowed perturbation to euler angle 3

_xgr_incr_: Increment value of the xgr of the parent grain structure

_ygr_min_: Minimum value of the ygr of the parent grain structure _ygr_max_: Maximum value of the ygr of the parent grain structure _xgr_incr_: Increment value of the ygr of the parent grain structure

rtol = 1e-06
loc
position
coords
gbloc
xmin
xmax
ymin
ymax
brec
bbox_bounds
bbox_ex_bounds
loctree
coordtree
bbox
bbox_ex
neigh
npixels
skprop
s
sn
gid
gind
gbid
gbind
grain_core
gb_zone
ea

Default values of non-grain boundary segment coordinates inside the bounding box. You may change this value np.nan if necessary. refer to demos/neighOps/neighOps-1.ipynb for usage example. use the appropriate setter and getter methods to operate on this attribute.

Type:

lfi_gbseg_empties

property lfi_gbseg_empties

Lfi gbseg empties.

property lfi_gbsegs

Convert the sparse storage into a full grain boundary segment lfi array.

set_quat()[source]

Set or update quat.

find_misori(angles)[source]

Find misori.

set_glb_ea_pert(pert_ea1, pert_ea2, pert_ea3)[source]

Set or update glb ea pert.

make_loctree()[source]

Build and return loctree.

property mean_ea

Mean ea.

make_coordtree()[source]

Build and return coordtree.

set_skprop()[source]

Set or update skprop.

make_prop(generator, skprop=True)[source]

Build and return prop.

property centroid

Centroid.

m
gbvert
gbsegs
gbsegs_geo
xgid
bbox_bz
bbox_core
plot(hold_on=False)[source]

Plot.

plotgb(hold_on=False)[source]

Plotgb.

plotgbseg(hold_on=False)[source]

Plotgbseg.