Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Update examples #262

Merged
merged 3 commits into from Feb 6, 2020
Merged

DOC: Update examples #262

merged 3 commits into from Feb 6, 2020

Conversation

@bocklund
Copy link
Collaborator

bocklund commented Feb 6, 2020

  • Binary examples updated
    • Fix bug in ax=ax and tielines=False for the newer binplot API.
    • More details at the top about where to get TDBs and how to make sure it's in the right directory for a user's calculation
    • Make all the binary examples (phase diagrams and energies) self contained in each cell for easier copy-pasting
    • Comment all the binary examples so copy-pasters have some explanation
    • Add Al-Mg example, since it's a more complicated diagram than Al-Zn, but is still relatively fast (~40s on my machine). Contrast this with the other non-trivial examples (Al-Ni, Al-Fe, Nb-Re) which are all relatively slow.
    • Add citations for papers that exist with assessments.
    • Add axes labels to Gibbs energy curves example
  • Add example for calculating and plotting along a specific internal degree of freedom
@bocklund bocklund force-pushed the doc-update-examples branch from 95ebeda to 8e66b8d Feb 6, 2020
@bocklund bocklund requested a review from richardotis Feb 6, 2020
@bocklund

This comment has been minimized.

Copy link
Collaborator Author

bocklund commented Feb 6, 2020

This is ready for review.

See the two updated docs here:

  1. BinaryExamples.ipynb
  2. ReferenceStateExamples.ipynb (only change is the new last cell and text)
@richardotis

This comment has been minimized.

Copy link
Collaborator

richardotis commented Feb 6, 2020

Minor things:

  1. The Thermodynamic DataBase DataBase (TDBDB) has index many available databases

indexed

  1. We still have a hard time with the really flat liquidus in the Nb-Re diagram. Not really in scope for this PR, but an observation.
  2. "Enthalpy of mixing" first example
ax.scatter(result.X.sel(component='RE'), result.HMR, marker='.', s=5, label='CHI_RENB')
ax.set_xlim((0, 1))
ax.set_xlabel('X(RE)')
ax.set_ylabel('HM_MIX')
ax.set_title('Nb-Re CHI Mixing Enthalpy')

I think both of these should be labeled liquid, not chi.

  1. The convex hull example is really cool because it shows off the power of the multi-dimensional representation of the calculation results.
  2. Last reference state example: result.Y.squeeze()[:, 2] - for a new person this syntax is confusing. A portion of the text explanation at the top (about the site fraction ordering) should be copied into a comment in the code example. Then something like Y_CHI_1_RE = result.Y.squeeze()[:,2] before using the new array in the plot.
@bocklund

This comment has been minimized.

Copy link
Collaborator Author

bocklund commented Feb 6, 2020

  1. Fixed
  2. Yeah. I think it could be improved for that particular diagram by increasing the point density when calculating the grid, so that the two phase regions would be picked up by the hyperplane. Not sure whether that would take away from the example (or if that example should be removed or moved somewhere else with those "advanced" API usage). A line following mapping approach might be a longer term fix.
  3. Fixed
  4. Thanks, I agree! I think whatever the solution for #154 looks like will help to make these even easier to create
  5. Comments added and Y_CHI_1_RE factored out.
@bocklund bocklund merged commit c5c9c99 into develop Feb 6, 2020
4 of 5 checks passed
4 of 5 checks passed
coverage/coveralls Coverage decreased (-0.08%) to 86.005%
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@bocklund bocklund deleted the doc-update-examples branch Feb 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.