Comments (4)
note: thanks to @y-samuel-lu for raising the issue on slack!
from yt.
I believe you're right. My recollection is that for on-axis projections, axis aligned bounding boxes (AABB) are used, but this was not implemented here. I think that it would be the appropriate thing to do to use the transformed z coordinates.
from yt.
Hi, I'm pretty new to YT, but I have been looking into SPH data projections for a different issue (#4788) that involves the pixelize_sph_kernel_projection
function. The approach sounds reasonable enough to me. I'd suggest doing a simple cut on SPH particle positions in the z direction; the kernel interpolation table won't work for integrating through only partway through the smoothing-length-diameter sphere, and I figure this is one of those things that's good enough.
One issue I do want to point out involves periodic datasets. Now, I think we can reasonably get away with ignoring cases (or raising errors) if someone analyzing a periodic volume wants to make a slice through the whole volume that wraps back around, where the slice width is larger than the box size (e.g. ASCII sketch below).
+--------------------+
| \. \ |
|. \. \ |
|. \. \ |
|. \ \ |
|. \ \ |
+--------------------+
However, I can imagine a case where someone analyzing e.g., a cosmological volume wants to make an image of a galaxy overlapping the periodic boundary, aligned with the galaxy edge-on/face-on direction. To handle that, I'd suggest re-centering the output coordinates on zero, or half the box size, then applying any periodicity adjustments in the output arrays, before rotating them. (It would probably make the most sense to do that in the same loop as the rotation.) We can then output the rotated bounds as (0.5 * boxsize -0.5 * width, 0.5 * boxsize + 0.5* width, etc.)
to match the adjusted coordinates. (This is possible in numpy using float modulo division, but I don't know how efficient that is.)
from yt.
Thanks for the suggestions! I need to look back at where my PR stalled...
One issue I do want to point out involves periodic datasets.
If I remember right, the current state does not handle periodcitiy at all for off-axis projections and particles but I may be remembering incorrectly. In any case, yes, it'd be good to properly handle periodicity.
from yt.
Related Issues (20)
- possible bug in Ray objects: calculation of projected lengths dl for non-grid/SPH data HOT 12
- TST: `yt/visualization/volume_rendering/tests/test_scene.py::test_annotations` is failing in CI HOT 28
- yt code_length unit inconsistent with Ramses unit_l HOT 4
- suspected bug in Projection Plots for SPH datasets HOT 2
- BUG: defect in polar coordinate handler breaks fixed-resolution buffer HOT 2
- BUG: accessing data in re-loaded sphere object errors HOT 1
- BUG: Order of Cylindrical Coordinates for Athena++ Incorrect HOT 6
- TST: `yt/tests/test_load_archive.py::test_load_archive` is failing HOT 1
- Possible bug: eps_writer doesn't retain formatting of SlicePlot object HOT 6
- Error while rendering SpectralCube with non-square face: IndexError while reading fields HOT 1
- pooch HOT 2
- TST: GAMER answer tests are failing HOT 6
- DOC/DEPR: eps_writer's documentation is misleading
- octree total gas masses improperly inversely scaling with nref HOT 11
- Off axis Slice Plot breaks when using derived field and default center HOT 1
- DOCS: adding/updating a list of external frontends (and extensions) HOT 3
- (not a BUG): flip_horizontal and flip_vertical with multipanel plots not working HOT 1
- TST: Upcoming dependency test failures HOT 3
- Question: expected behavior of center argument in slices of spherical datasets? HOT 3
- TST: Upcoming dependency test failures HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yt.