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

Add CLI to plot basic control system quantities #5978

Merged
merged 1 commit into from
May 14, 2024

Conversation

knelli2
Copy link
Contributor

@knelli2 knelli2 commented May 9, 2024

Proposed changes

Example of output:

debug

Upgrade instructions

To use, build the CLI then run

spectre plot control-system -h

Code review checklist

  • The code is documented and the documentation renders correctly. Run
    make doc to generate the documentation locally into BUILD_DIR/docs/html.
    Then open index.html.
  • The code follows the stylistic and code quality guidelines listed in the
    code review guide.
  • The PR lists upgrade instructions and is labeled bugfix or
    new feature if appropriate.

Further comments

@knelli2 knelli2 added the cli/pybindings Command line interface & Python bindings label May 9, 2024
@knelli2 knelli2 requested a review from nilsvu May 9, 2024 22:44
Comment on lines 221 to 266
plt.title(title)
axes[1].legend(loc="center left", bbox_to_anchor=(1.01, 1.1))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Opinions on how to better represent the shape components are welcome. Just did the easiest thing for now to quickly get it in.

Copy link
Member

Choose a reason for hiding this comment

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

How about an L2 norm over all shape components

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it will be important to be able to distinguish which component is the one that's going bad, so I don't think lumping them together would be best.

Copy link
Member

@nilsvu nilsvu May 10, 2024

Choose a reason for hiding this comment

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

You could plot both the L2 norm and the highest mode then

Copy link
Member

@nilsvu nilsvu May 10, 2024

Choose a reason for hiding this comment

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

Or one plot where the components of each control system are lumped together so you have only one line each for expansion, rotation, shape, size. This tells you which control system is going bad. Plus one plot for each control system with all the components. This tells you which component is going bad. So you have a figure with 1+num_control_systems rows and 1 col.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe do L2 over each m for each l with an option to show all m modes for a specific l and nothing else?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Having 1+num_control_systems plots sounds a bit crowded and also hard to compare between control systems. I do like doing the L2 over all m of a given l by default and then having an option to show all m.

Copy link
Member

@nilsdeppe nilsdeppe left a comment

Choose a reason for hiding this comment

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

LGTM, please squash in the fixup or rename it depending on how you want to structure the PR

@knelli2
Copy link
Contributor Author

knelli2 commented May 14, 2024

@nilsdeppe Squashed and rebased

@knelli2
Copy link
Contributor Author

knelli2 commented May 14, 2024

Here are the updated plots without/with all of the m modes

no_m

all_m

@nilsdeppe nilsdeppe merged commit 041dfbd into sxs-collaboration:develop May 14, 2024
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli/pybindings Command line interface & Python bindings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants