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 reflect in z axis option #18

Merged
merged 5 commits into from
Feb 29, 2024

Conversation

rlbarker
Copy link
Contributor

I have added an option to plot rz slices reflected in the z axis, so that it is easier to visualise the entire cylindrical geometry. You can turn this functionality on/off my making reflect_in_z True or False, but it defaults to False. This fixes issue #11.

I have also added to one example to demonstrate this functionality. It changes the rz ring source plot from:

rz_ring_source_1_orig

to:

rz_ring_source_reflected_1

The only problem is that the colorbar is not resized in the reflected plot, so it is larger than the image. Does anyone know how to fix this?

There may be a better way to implement this, so feedback is appreciated!

I have run the tests and they passed but there were several warnings - were these present before? I have also checked that all the examples still run.

@shimwell
Copy link
Member

shimwell commented Feb 28, 2024

Thanks very much this is nice.

Could we add a little test that checks the x axis range doubles when the flag is set to True

perhaps something like this

# plot does not have mirro enabled
assert plot.get_xlim()[0] == 0
assert plot.get_xlim()[0] == 100

# plot has mirror enabled
assert plot.get_xlim()[0] == -100
assert plot.get_xlim()[0] == 100

@shimwell shimwell merged commit b49b8a8 into fusion-energy:main Feb 29, 2024
1 check passed
@shimwell
Copy link
Member

super, tests are passing. merged in and I shall make a release now

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.

2 participants