upxo.pxtal.twinned_simple_3d.steps.steps_transformations module

Transformations – Part G of the Twinned FCC walkthrough (OPTIONAL).

Rescales then stretches the selected temporal slice’s base grain structure to introduce non-equiaxiality before Host Allocation. All factors default to 1.0 (identity – no change), so this stage is genuinely optional: if you never call apply_transform, just use TwinnedSimple3DBase.from_mcgs(pxt, tslice_key) directly and Host Allocation gets the unmodified structure.

upxo.pxtal.twinned_simple_3d.steps.steps_transformations.apply_transform(pxt, tslice_key, scale_factor=1.0, sf_x=1.0, sf_y=1.0, sf_z=1.0)[source]

Rescales (isotropic scale_factor) then stretches (per-axis sf_x/sf_y/sf_z) the base grain structure at tslice_key, always composed FROM THE ORIGINAL structure (never chained onto a previous transform) so re-calling this with new factors replaces, rather than compounds, the previous result.

Returns:

(new_base, original_base)

Return type:

both TwinnedSimple3DBase instances.