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

Streamlit/UI #81

Merged
merged 2 commits into from
Sep 15, 2024
Merged

Streamlit/UI #81

merged 2 commits into from
Sep 15, 2024

Conversation

LemurPwned
Copy link
Owner

@LemurPwned LemurPwned commented Sep 15, 2024

Summary by Sourcery

Enhance the Streamlit UI for domain fitting by adding new features for displaying domain magnetization in polar angles and improving the layout and user guidance. Update the rendering functions to support individual domain plots in both Cartesian and polar coordinates. Revise the README to include updated information about the Streamlit app and its capabilities.

New Features:

  • Introduce the ability to display individual domain magnetization in polar angles with a new checkbox option.
  • Add support for rendering individual domain plots in both Cartesian and polar coordinates.
  • Implement new input fields for polar and azimuthal angles of the anisotropy axis in the domain and layer parameters.

Enhancements:

  • Refactor the domain fitting UI to include an expander for explanations and improve the layout of domain parameters.
  • Enhance the simulation UI by adding help tooltips to various input fields for better user guidance.
  • Improve the rendering function to include a title for the mixed domain model plot and individual domain plots.

Documentation:

  • Update the README to reflect the new Streamlit app URL and provide additional details on the simulation capabilities.

Copy link

sourcery-ai bot commented Sep 15, 2024

Reviewer's Guide by Sourcery

This pull request implements significant changes to the Streamlit UI for a CMTJ (Coupled Magnetic Tunnel Junction) simulator. The changes focus on improving the user interface, adding new features, and enhancing the overall functionality of the application.

File-Level Changes

Change Details Files
Expanded and improved the domain fitting functionality
  • Added an explanation expander for the domain fitting process
  • Implemented a checkbox to toggle between showing domains in polar angles or Cartesian coordinates
  • Added input fields for polar (θ) and azimuthal (φ) angles of the anisotropy axis
  • Improved the rendering of individual domains with separate plots
view/domain.py
Restructured the main Streamlit app layout and improved user guidance
  • Moved the file uploader to the sidebar
  • Added help text to various input fields
  • Created expandable sections for different simulation parameters
  • Improved the layout of the optimization tab
view/streamlit_app.py
Updated the layer and domain creation functions to use polar and azimuthal angles
  • Modified create_single_domain and create_single_layer functions to use θ and φ angles instead of axis selection
  • Implemented FieldScan.angle2vector for converting angles to vectors
view/simulation_fns.py
Updated the README with new information about the web GUI
  • Added information about the new domain fitting functionality
  • Updated the Streamlit app URL
README.md
Added utility functions for angle initialization
  • Created a list of pre-generated angle values
  • Implemented a get_init_kval function to retrieve initial angle values
view/utils.py

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

@LemurPwned LemurPwned merged commit 58f58a2 into master Sep 15, 2024
6 checks passed
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @LemurPwned - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 2 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟡 Documentation: 1 issue found

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

view/domain.py Show resolved Hide resolved
view/domain.py Show resolved Hide resolved
README.md Show resolved Hide resolved
view/domain.py Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant