Skip to content

Odd-looking slices for fields created using add_sph_fields #2415

Open
@jzuhone

Description

@jzuhone

Bug summary

The add_sph_fields functionality allows one to take non-gas particles and do visualizations with them in yt-4.0. Currently, the results are somewhat odd for SlicePlot objects (see linked notebook below for an example). I've tracked this down to the fact that by default there is a normalization step applied when creating a slice:

https://github.com/yt-project/yt/blob/yt-4.0/yt/geometry/coordinates/cartesian_coordinates.py#L343-L373

This appears to work fine for normal SPH fields, but not for fields created using add_sph_fields. If one sets ds.use_sph_normalization = False, then the results look more sensible, but I am not sure if this is what we really want to do.

I'm actually a bit lost on what the normalization is doing, so if someone could clear this up that'd be great. I think maybe @ngoldbaum or @qobilidop may know something about this?

Code for reproduction

A full example of what things look like when ds.use_sph_normalization = True and when ds.use_sph_normalization = False is shown here:

https://gist.github.com/11db3573f3bd589fd04ce970a02db94f

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions