Skip to content

ENH: add a 'pixel-averaging' (default) option for SPH projections #4993

@nastasha-w

Description

@nastasha-w

Goal

Summary

The current (as of yt 4.3.1) method for generating projections from SPH datasets integrates the field to be projected along pencil-beam lines of sight through the center of each pixel in the grid. While this is a physically reasonable approach, and appropriate in some cases, averaging the quantity to be projected across the pixel (or the rectangular prism projected into that pixel) would be more consistent with the approach used for grid and AMR datasets, and would likely better match users' intuition. Therefore, as discussed in a telecon on September 13, 2024 with @matthewturk, @chummels, @neutrinoceros, and @nastasha-w, it would be a good idea to implement a pixel-averaging projection method for SPH datasets. This would be the default setting for SPH projections, and the pixel center line-of-sight method would be an option users can choose, based on what exactly there are trying to do.

Method

Our goal is to implement the pixel-averaging projection method described in this paper, by @JBorrow and @AshKelly. One possible improvement is that the current SPH projection back-end already has a fast way to compute the integral of the dimensionless part of the SPH kernel function at a given [impact parameter] / [smoothing length], so we could feasibly use the method in the paper to extend this to full three-dimensional integrals of the SPH kernels over the rectangular prism defining each pixel.

TODO

  • first draft of the backend function
  • add the new option to the frontend functions and pass the information through to the back-end call
  • write tests for the new back-end, and add the line-of-sight integral option selection to the tests for the older method
  • test and debug the new implementation
  • add documentation on the two SPH projection method options to the function/method docstrings and to the narrative docs

edit by @neutrinoceros : I added the current version number for posterity

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions