phase_fractions — DRIVE pxrd op

• 数据种类:signal × signal × table → table

• 调用: import fullseye as fs; fs.ledger.phase_fractions(two_theta, intensity, dictionary, background_order=4, sigma=None, lattice_tolerance=0.0, phases=None)(要直接调用实现,import pxrd; pxrd.phase_fractions(two_theta, intensity, dictionary, background_order=4, sigma=None, lattice_tolerance=0.0, phases=None);从台账取用则 opsdrive.get("phase_fractions"))

用法

用非负最小二乘(NNLS)求混合物的物相分数(背景用 Chebyshev 多项式同时拟合)。

y ≈ Σ sₚ Rₚ(2θ) + Σ cₖ Tₖ(2θ)、sₚ >= 0、cₖ 符号自由(scipy.optimize.lsq_linear 的 BVLS)。体积分数 vₚ ∝ sₚ、重量分数 Wₚ ∝ sₚ ρₚ(见 module 的 docstring)。传入 sigma 时以 1/σ 加权。lattice_tolerance > 0 时,对每个相在 1 ± tolerance 内用黄金分割的坐标下降精修格子的倍率(参考的晶格常数与试样的晶格常数有偏差时,峰错开一半的参考会倍率下降、分数偏倚 —— 见陷阱的门)。phases 仅使用字典中的部分名称。

返回值(dict): names、scale、volume_fraction、weight_fraction、lattice_scale、fit、background、residual、rwp(加权相对残差)、two_theta、wavelength。

Raises ValueError: 长度不一致、字典的格子与 2θ 不一致、背景阶数为负、未知的相名称。

参考(示例数据、文献)

• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。

• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。

• 算法的正典(作者、年份)与用途见上面的族使用指南。

可运行的示例(实际调用该算子并已验证的样例)

• poc_pxrd_phase_peel — py -3.11 examples/poc_pxrd_phase_peel.py

类型可衔接的下一个算子(可接受 table 作为输入)

course_layout · course_occupancy · course_contains · world_build · world_camera · world_move · lidar_scan · rss_longitudinal_same

同类别(pxrd)

cif_read · cubic_prototype · powder_reflections · scherrer_size · debye_ring_image · detector_two_theta · detector_calibrate · azimuthal_integrate


*Provenance: pxrd.py — DRIVE 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.