Skip to content

Commit

Permalink
Merge pull request #132 from pmrv/tangent
Browse files Browse the repository at this point in the history
Return phase strings from get_common_tangets
  • Loading branch information
srmnitc authored Jun 11, 2024
2 parents 678f570 + 0bf9b5b commit 631c0c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion calphy/phase_diagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ def get_common_tangents(dict_list,
tangents = []
energies = []
tangent_colors = []
phases = []

for d in dist:
t = [convex_x[sargs][d], convex_x[sargs][d+1]]
Expand All @@ -339,6 +340,7 @@ def get_common_tangents(dict_list,
tangents.append(t)
energies.append(e)
tangent_colors.append(color_dict[phase_str])
phases.append(phase_str.split("-"))

if plot:
for d in dict_list:
Expand All @@ -347,7 +349,7 @@ def get_common_tangents(dict_list,
plt.plot(t, e, color="black", ls="dashed")
plt.ylim(top=0.0)

return np.array(tangents), np.array(energies), np.array(tangent_colors), color_dict
return np.array(tangents), np.array(energies), np.array(tangent_colors), color_dict, np.array(phases)


def plot_phase_diagram(tangents, temperature,
Expand Down

0 comments on commit 631c0c7

Please sign in to comment.