diff --git a/pymatgen/analysis/defects/plotting/optics.py b/pymatgen/analysis/defects/plotting/optics.py index a364417c..95fcc61f 100644 --- a/pymatgen/analysis/defects/plotting/optics.py +++ b/pymatgen/analysis/defects/plotting/optics.py @@ -316,7 +316,24 @@ def _plot_matrix_elements( def _get_dataframe(d_eigs: dict, me_plot_data: list[tuple]) -> pd.DataFrame: - """Convert the eigenvalue and matrix element data into a pandas dataframe.""" + """Convert the eigenvalue and matrix element data into a pandas dataframe. + + Args: + d_eigs: + The dictionary of eigenvalues for the defect state. In the format of + (iband, ikpt, ispin) -> eigenvalue + me_plot_data: + A list of tuples in the format of (iband, ikpt, ispin, eigenvalue, matrix element) + + Returns: + A pandas dataframe with the following columns: + ib: The band index of the state the arrow is pointing to. + jb: The band index of the defect state. + kpt: The kpoint index of the state the arrow is pointing to. + spin: The spin index of the state the arrow is pointing to. + eig: The eigenvalue of the state the arrow is pointing to. + M.E.: The matrix element of the transition. + """ _, ikpt, ispin = next(iter(d_eigs.keys())) df = pd.DataFrame( me_plot_data, diff --git a/pymatgen/analysis/defects/plotting/phases.py b/pymatgen/analysis/defects/plotting/phases.py index 9a6a3a55..a97c0664 100644 --- a/pymatgen/analysis/defects/plotting/phases.py +++ b/pymatgen/analysis/defects/plotting/phases.py @@ -102,7 +102,6 @@ def _convex_hull_2d( points: list[dict], x_element: Element, y_element: Element, - tol: float = 0.001, competing_phases: list = None, ) -> list[dict]: """Compute the convex hull of a set of points in 2D.