SimuBox.artist.phase module¶
- class SimuBox.artist.phase.PhaseDiagram(path: Path | str, xlabel: str, ylabel: str, colors: dict | None = None, labels: dict | None = None)¶
基类:
object
- boundary_detect(comp_res: PhaseCompareResult, mode: DetectionMode = DetectionMode.BOTH, ignore: list[str] | str | None = None, **kwargs)¶
- classmethod check_phase(point: Point, point_other: Point | None = None, ignore: list[str] | str | None = None)¶
- static checkin(phases: Sequence, candidates: Sequence)¶
检查相结构是否属于备选结构。
- 参数:
phases –
candidates –
- 返回:
- compare(path: Path | str, plot: bool = True, accuracy: int = 3, xlabel: str | None = None, ylabel: str | None = None, verbose: bool = True, operation: Operation | Sequence[Operation] | None = None, subset: str | Sequence[str] | None = ('phase', 'freeE'), figsize: Sequence[int] = (8, 6), interactive: bool = True, **kwargs)¶
- static cross_point(x1: int | float, y1: int | float, x2: int | float, y2: int | float, x3: int | float, y3: int | float, x4: int | float, y4: int | float)¶
两点确定直线,计算两条直线之间的交点。 (x1, y1), (x2, y2)为第一条直线的两点。 (x3, y3), (x4, y4)为第二条直线的两点。 y一般对应自由能的数值。
- 参数:
x1 –
y1 –
x2 –
y2 –
x3 –
y3 –
x4 –
y4 –
- 返回:
- static de_unknown(comp_res: PhaseCompareResult)¶
将相结构名称前缀中的unknown去掉。
- 参数:
comp_res –
- 返回:
- static draw_line(xys: ndarray, ax: Axes | None = None, annotation: dict | None = None, inverse: bool = False)¶
- extract_edge(mat: ndarray, mode: DetectionMode = DetectionMode.INTERP, factor: float = 0.5, axis: int = 1, ignore: list[str] | str | None = None, **kwargs)¶
- query(data: DataFrame | Path | str, x: float | str | int | None = None, y: float | str | int | None = None, **kwargs)¶
对表格数据进行快速筛选
- 参数:
data –
x –
y –
kwargs –
- 返回:
- scan(path: str | Path | None = None, filetype: Sequence[str] = '.csv', figsize: Sequence[int] = (8, 8), skip: Sequence[str] = (), extract: Sequence[str] = (), inverse: Sequence[str] = (), deunknown: Sequence[str] = (), annotation: dict | None = None, verbose: bool = True, **kwargs)¶