upxo.texOps package

Submodules

Module contents

Texture Operations (texOps) package for UPXO. Exposes advanced texture generation tools.

class upxo.texOps.FCCTexture(tc_fractions: Dict[str, float], spread: float | Dict[str, float] = 5.0, apply_sample_symmetries: bool = True, use_rd: bool = True, use_td: bool = True, use_nd: bool = True, custom_components: Dict[str, Tuple[float, float, float]] | None = None)[source]

Bases: object

Synthetic FCC crystallographic texture from named ideal components.

Samples orientations around ideal Bunge Euler positions (copper, brass, Goss, cube, …) with per-component volume fractions and angular spreads. Remainder of the volume fraction is random background. Optional sample symmetries (RD/TD/ND 180° rotations) for rolling-style ODFs. Complements tops and registry TextureComponentProfile.

generate_euler(N: int) → numpy.ndarray[source]

Generate N orientations as Bunge Euler angles in degrees (phi1, Phi, phi2).

generate_detailed(N: int, convention: str = 'euler') → Dict[str, Any][source]

Generate detailed texture orientations, organized by component and variant clusters.

Parameters:
  • N (int) – Total number of orientations to generate.

  • convention (str) – Output orientation convention: ‘euler’ (Bunge ZXZ degrees), ‘quaternion’ (w, x, y, z), or ‘matrix’ (3x3).

Returns:

Structured dictionary of generated orientations.

Return type:

dict

generate_quaternions(N: int) → numpy.ndarray[source]

Generate N orientations as unit quaternions [w, x, y, z].

generate_matrices(N: int) → numpy.ndarray[source]

Generate N orientations as 3x3 rotation matrices.