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

Fix field parameters not working with off axis projections #3147

Merged
merged 2 commits into from
Mar 26, 2021

Conversation

jzuhone
Copy link
Contributor

@jzuhone jzuhone commented Mar 25, 2021

PR Summary

This is an attempt to fix issue #3126 to ensure that field parameters can be used with off-axis projections. This is a work in progress.

I think that I only need to restore the underscore that was removed in this commit:

cde25a8#diff-2d1d24ee7df2e3b516614aad6fa0d7bd09a0268684a1c6b748eee75c1b823002

which is here, in line 57:

def invalidate_volume(f):
@wraps(f)
def wrapper(*args, **kwargs):
ret = f(*args, **kwargs)
obj = args[0]
if isinstance(obj.transfer_function, ProjectionTransferFunction):
obj.sampler_type = "projection"
obj._log_field = False
obj._use_ghost_zones = False
del obj.volume
obj._volume_valid = False
return ret
return wrapper

but it sounds like with it in there other things were broken, so we're going to see what happens with the tests.

EDIT: All tests pass with just this one commit.

PR Checklist

  • New features are documented, with docstrings and narrative docs
  • Adds a test for any bugs fixed. Adds tests for new features.

@jzuhone jzuhone added the bug label Mar 25, 2021
@jzuhone jzuhone changed the title [WIP] Fix field parameters not working with off axis projections Fix field parameters not working with off axis projections Mar 25, 2021
@jzuhone
Copy link
Contributor Author

jzuhone commented Mar 25, 2021

This is ready to go. I see no reason why this change isn't the right one.

@neutrinoceros neutrinoceros merged commit 9f49964 into yt-project:main Mar 26, 2021
@jzuhone jzuhone deleted the fix_vr_field_params branch March 29, 2021 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants