Skip to main content

Crate phasesmith_workflows

Crate phasesmith_workflows 

Source
Expand description

Application-neutral native refinement and project workflows.

This crate is the shared host boundary for Python adapters and future native application consumers. It contains no PyO3, Tauri, GUI, or file-format types.

Structs§

AffineConstraint
Define target = multiplier * source + offset.
AmorphousBackground
Sum of broad area-normalized Gaussian amorphous components.
AmorphousPeak
One area-normalized broad Gaussian component in degrees 2theta.
BackgroundBasis
Row-major sample-by-parameter analytical background derivatives.
CancellationToken
Thread-safe first-request-wins cooperative cancellation token.
ChebyshevBackground
Chebyshev series on one explicit closed degree domain.
CoincidentReflectionGroup
Numerically coincident profile columns and their matrix rank.
CompositeBackground
Ordered additive composition of analytical models.
ConstraintDerivativeMatrix
Row-major derivative d physical values / d scaled free values.
ConstraintTransform
Validated ordered mapping between free solver coordinates and all values.
CovarianceMatrix
Square row-major covariance over scaled free parameters.
CwLatticeGeometry
CW reflection geometry and independent lattice derivatives.
EvaluatedSamplePhysics
Evaluated contribution arrays plus stable provider derivative names.
FixedConstraint
Set one target parameter to a constant during expansion.
GeneratedLatticeDomain
Generated guarded reflection arrays and topology-transfer diagnostics.
IntensityExtractionResult
One non-negative multiplicative redistribution result.
JointRietveldCheckpoint
Complete accepted state for deterministic joint continuation.
JointRietveldGradient
Complete accepted-state value and gradient of a joint objective.
JointRietveldHistogram
One experiment in a joint native Rietveld objective.
JointRietveldIterationRecord
One accepted joint Gauss–Newton iteration.
JointRietveldLayout
Stable shared/local parameter packing for a joint objective.
JointRietveldMetrics
Aggregate powder residual metrics over all joint histograms.
JointRietveldProduct
One histogram’s profile and directional derivative.
JointRietveldRefinementOptions
Numerical and bounded-runtime controls for a joint native refinement.
JointRietveldRefinementResult
Final accepted joint native refinement result.
JointRietveldTopologyChange
One topology change owned by a specific histogram.
LatticeBounds
Finite box bounds in one lattice parameterization.
LatticeParameterization
Independent physical lattice variables for one exact crystallographic setting.
LatticeReflectionDomain
Bounded monochromatic reflection topology with stable intensity transfer.
LeBailCalculation
Native fixed-phase pattern result used by extraction and adapters.
LeBailCheckpoint
Complete immutable continuation state for the fixed-reflection workflow.
LeBailInput
Observations, instrument, and ordered fixed-reflection phases.
LeBailIterationRecord
One immutable accepted fixed-reflection iteration.
LeBailOptions
Deterministic controls for fixed-reflection extraction.
LeBailPhase
One fixed reflection phase whose integrated intensities are extracted.
LeBailResult
Complete native fixed-reflection Le Bail result.
LinearConstraint
Define target = offset + sum(coefficient * source).
LinearTerm
One source/coefficient pair in a linear constraint.
MonotonicClock
Process-local monotonic clock backed by Instant.
ParameterBounds
Closed lower and upper scalar bounds.
ParameterChange
One accepted physical profile-parameter change.
ParameterKey
Stable structured identity for one refinable scalar.
ParameterSet
Deterministically ordered immutable scalar specifications.
ParameterSpec
Value, unit, scale, bounds, and selection for one scalar.
PhasePatternComponent
One display-ready phase curve.
PhaseWeightFraction
One normalized crystalline weight fraction.
PointBackground
Linear interpolation through fixed knots with refinable values.
PolynomialBackground
Power series on the normalized input-grid coordinate [-1, 1].
PreparedGeneralFreeLinearization
Complete weighted Jacobian in scaled free-parameter coordinates.
PreparedGeneralRietveldObjective
Reusable complete physical objective for one accepted native state.
PreparedJointRietveldObjective
Prepared matrix-free sum of all histogram objectives.
PreparedRietveldLinearization
One reusable parameter-major physical structural Jacobian and its values.
PreparedRietveldObjective
Reusable structural values and derivative products for one accepted state.
QuantitativePhase
Metadata required by the Hill–Howard scale relation.
RefinementEvent
One immutable orchestration-boundary event.
RefinementLimits
Hard upper bounds independent of convergence criteria.
RefinementRuntime
Stateful method-independent refinement boundary guard.
RefinementStop
Normal cooperative/budget termination returned at a safe boundary.
ReflectionIntensity
Final stable reflection identity and intensity.
ResidualEvaluation
Full residual arrays and standard masked powder metrics.
ResidualOptions
Weighting and degrees-of-freedom controls for residual evaluation.
RietveldAnalysis
One complete runnable single-histogram native Rietveld analysis.
RietveldCalculation
Display-ready structural calculation and residual metrics.
RietveldCalculationOptions
Deterministic calculation controls shared by later native refinement.
RietveldCheckpoint
Complete accepted state for deterministic native continuation.
RietveldCovarianceMatrix
Square row-major covariance over the complete physical parameter order.
RietveldCovarianceOptions
Controls for the optional small parameter-space identifiability analysis.
RietveldGeneralCheckpoint
Complete accepted state for deterministic constrained continuation.
RietveldGeneralRefinementResult
Final complete native constrained-refinement result.
RietveldInput
Observations, experiment state, and ordered structural phases.
RietveldIterationRecord
One accepted native Rietveld Gauss–Newton iteration.
RietveldParameterCorrelation
One nearly collinear pair of scaled-free Jacobian columns.
RietveldParameterLayout
Ordered complete physical parameters and state transforms.
RietveldParameterSelection
Complete selected built-in parameter families for one native Rietveld run.
RietveldPhase
One owned monochromatic structural phase and its sample-physics inputs.
RietveldPhaseCalculation
One labeled phase contribution and its crystallographic intermediates.
RietveldProjectState
Revisioned native project plus zero or one runnable analysis per histogram.
RietveldRecipe
Auditable explicit or intelligent stage sequence.
RietveldRecipeSinks
Cloneable host observers shared across every stage runtime.
RietveldRefinementOptions
Numerical and bounded-runtime controls for native structural refinement.
RietveldRefinementResult
Final accepted native structural refinement result.
RietveldStage
One caller-visible active parameter set and acceptance policy.
RietveldStageResult
Auditable outcome from one attempted recipe stage.
RietveldStructuralLayout
Ordered physical parameters and exact transforms to/from engine layouts.
RietveldStructuralSelection
Structural parameter families selected for one native Rietveld layout.
RietveldTopologyChange
Reflection-topology change attached to an accepted structural step.
RietveldWorkflowResult
Complete or safely stopped native staged workflow.
SamplePhysicsParameter
One stable refinable built-in sample-physics scalar.
SiteCoordinateModel
Symmetry-allowed coordinate tangent basis for one asymmetric site.

Enums§

BackgroundError
Invalid analytical background definition, grid, or replacement.
BackgroundModel
Closed native union used by application-neutral request records.
CancellationError
Invalid cancellation token operation.
Constraint
Supported native scalar constraint records.
ConstraintError
Invalid native scalar constraint or transform input.
DiagnosticValue
Finite JSON-scalar diagnostic value.
JointRietveldError
Invalid joint native Rietveld parameter or objective state.
JointRietveldRefinementError
Invalid joint constrained-refinement state.
LatticeError
Invalid lattice parameterization, bounds, geometry, or domain generation.
LeBailError
Invalid native fixed-reflection Le Bail state or operation.
ParameterError
Invalid native parameter identity or scalar specification.
QuantitativeError
Invalid quantitative-phase input.
RefinementEventKind
Stable machine-readable event categories.
ResidualError
Invalid input to native residual evaluation.
RietveldError
Invalid owned native Rietveld calculation state.
RietveldGeneralObjectiveError
Invalid complete native Rietveld objective state.
RietveldGeneralParameterError
Invalid complete native Rietveld parameter state.
RietveldGeneralRefinementError
Invalid complete constrained Rietveld refinement state.
RietveldInstrumentParameter
Supported built-in monochromatic instrument and position parameters.
RietveldObjectiveError
Invalid prepared Rietveld objective state.
RietveldParameterError
Invalid native Rietveld parameter-layout state.
RietveldProjectError
Invalid project-level native Rietveld state.
RietveldRecipeError
Invalid staged Rietveld workflow state.
RietveldRecipeMode
Origin of a staged Rietveld recipe.
RietveldRefinementError
Invalid native structural refinement state.
RietveldSamplePhysicsModel
One closed built-in sample-physics model.
RuntimeError
Invalid runtime configuration, event, control order, or host callback.
SamplePhysicsError
Invalid built-in sample-physics state.
TerminationReason
Stable refinement termination categories shared by every method.

Constants§

DEFAULT_MAX_LINEARIZATION_ELEMENTS
Default upper bound for reusable native structural Jacobians.

Traits§

CheckpointSink
Application-owned durable sink for one typed accepted-state checkpoint.
DifferentiableBackground
Shared immutable analytical-background contract.
RefinementEventSink
Synchronous event consumer called only at orchestration boundaries.
RuntimeClock
Monotonic second source injectable for deterministic tests.

Functions§

build_lebail_parameter_set
Build bounded typed specifications for selected fixed-geometry parameters.
build_lebail_parameter_set_with_lattice
Build bounded typed specifications including optional lattice variables.
calculate_lebail_pattern
Calculate all fixed phases through one native fused accumulation.
calculate_rietveld_pattern
Calculate a complete built-in monochromatic structural pattern.
cw_lattice_geometry
Calculate d-spacings, CW positions, and analytical independent-variable chains.
evaluate_residuals
Evaluate masked residual arrays and standard powder residual metrics.
extract_lebail_intensities
Perform one non-negative multiplicative redistribution step.
initialize_lebail_intensities
Return deterministic positive starting intensities in phase order.
intelligent_rietveld_recipe
Propose transparent cumulative stages from caller-authorized families.
iterate_lebail_once
Advance exactly one accepted Le Bail iteration for custom orchestration.
lebail_instrument_parameter_key
Return the stable key for one supported CW profile coefficient.
lebail_lattice_parameter_key
Return the stable key for one symmetry-independent lattice variable.
lebail_phase_scale_key
Return the stable key for a phase scale.
lebail_reflection_position_key
Return the stable key for one independent reflection position.
quantitative_phase_analysis
Calculate Hill–Howard crystalline weight fractions in input order.
refine_general_rietveld
Refine the complete native layout with a process-local runtime.
refine_general_rietveld_with_runtime
Refine the complete native layout through a caller-owned runtime.
refine_joint_rietveld
Refine a joint objective through a process-local runtime.
refine_joint_rietveld_with_runtime
Refine a joint objective through a caller-owned runtime.
refine_lebail
Run fixed-reflection Le Bail extraction with a workflow-owned runtime.
refine_lebail_with_runtime
Run fixed-reflection extraction with host-owned cancellation/events/checkpoints.
refine_rietveld
Refine with a process-local runtime and optional cancellation token.
refine_rietveld_with_runtime
Refine through a caller-owned runtime for events and durable checkpoints.
run_rietveld_recipe
Execute explicit stages while promoting only accepted physical states.
run_rietveld_recipe_with_sinks
Execute a recipe with optional shared event and checkpoint consumers.