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

Alias projection plots to particle projection plots #2628

Open
matthewturk opened this issue Jun 9, 2020 · 4 comments
Open

Alias projection plots to particle projection plots #2628

matthewturk opened this issue Jun 9, 2020 · 4 comments
Labels
enhancement Making something better help wanted Contributions from external projects' maintainers is particularly appreciated ! new contributor friendly Good for new contributors! viz: 2D

Comments

@matthewturk
Copy link
Member

yt is able to recognize when you probably want a ParticleProjectionPlot instead of a ProjectionPlot. Maybe we should have it automatically redirect, if you use ProjectionPlot with a particle field.

@matthewturk matthewturk added enhancement Making something better help wanted Contributions from external projects' maintainers is particularly appreciated ! new contributor friendly Good for new contributors! labels Jun 9, 2020
@chummels
Copy link
Member

chummels commented Jun 9, 2020

Isn't this complicated by the fact that particle fields can have SPH smoothing kernels and be turned into true projection plots? Or with the work that @qobilidop did a year or so ago, that even non-SPH particle fields can get smoothing kernels applied to them to make projection plots? Maybe there's still a way to tell what the user wants, but it seems like this might make it a bit more challenging to tell automatically.

@matthewturk
Copy link
Member Author

So the difference in behavior I want to somehow get around is this -- if you do yt.ProjectionPlot(ds, "x", "density") on an SPH field, it does what you probably want. If you do this with any field that isn't SPH, it doesn't, but instead suggests "Why not use a particle plot?" Before, we were able to do deposition fields; now, the viz task requires a call to a different wrapper object.

@chummels
Copy link
Member

Oh, that makes sense. I think the only trick here is for it to recognize if a particle based dataset has the appropriate SPH fields, even if it isn't a native SPH dataset, but it may have had those relevant fields added with add_sph_fields() as per PR #2186 . But you probably already considered that.

@munkm munkm added the yt-4.0 feature targeted for the yt-4.0 release label Jun 12, 2020
@munkm munkm removed the yt-4.0 feature targeted for the yt-4.0 release label Nov 13, 2020
@neutrinoceros
Copy link
Member

Incidentally, I believe that #3489 paves the road to do this in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Making something better help wanted Contributions from external projects' maintainers is particularly appreciated ! new contributor friendly Good for new contributors! viz: 2D
Projects
None yet
Development

No branches or pull requests

4 participants