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

[bugfix] Fixes OAP unit mismatch issue in OAPs. Fixes #1906 #1961

Merged
merged 1 commit into from
Aug 10, 2018

Conversation

chummels
Copy link
Member

@chummels chummels commented Aug 9, 2018

PR Summary

Issue #1906 demonstrates how OffAxisProjections in demeshening project with weird units. This PR fixes that issue by assuring that the path length unit is in the default length units for that dataset.

This script demonstrates this solution (note how the zlims and units are the same for each on-axis/off-axis pair now):

import yt
ds = yt.load('FIRE_M12i_ref11/snapshot_600.hdf5')
yt.ProjectionPlot(ds, 'z', ('gas', 'density')).save('on.png')
yt.ProjectionPlot(ds, 'z', ('gas', 'temperature'), weight_field=('gas', 'density')).save('on_temp.png')
yt.OffAxisProjectionPlot(ds, [0,0,1], ('gas', 'density'), north_vector=[0,1,0]).save('off.png')
yt.OffAxisProjectionPlot(ds, [0,0,1], ('gas', 'temperature'), weight_field=('gas', 'density'), north_vector=[0,1,0]).save('off_temp.png')

On Axis Projection in density:
on

Off Axis Projection in density (identical):
off

On Axis Projection in density-weighted temperature:
on_temp

Off Axis Projection in density-weighted temperature:
off_temp

@chummels chummels added the demeshening Removing the global mesh for particles label Aug 9, 2018
@chummels chummels added this to the 4.0 milestone Aug 9, 2018
@ngoldbaum
Copy link
Member

Looks great, thanks for the fix Cameron!

@ngoldbaum
Copy link
Member

The travis failure is just a timeout. Merging.

@ngoldbaum ngoldbaum merged commit d6dbd34 into yt-project:yt-4.0 Aug 10, 2018
@chummels chummels deleted the off-axis-units branch August 25, 2022 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
demeshening Removing the global mesh for particles
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants