Hi Sam,

Great question.  There have been in the past methods of casting rays that
followed healpix-determined trajectories in yt.  These could then be used
as samples -- for instance, casting rays that traversed only an epsilon in
delta r, at each of the values.  Right now, because of licensing concerns,
these are not currently *directly* exposed in yt.  The stubs are still
there and can be uncommented out and linked against, but I haven't tried it
in a while.

The alternative I would suggest would be to use healpy to generate the r,
theta, phi values (or, better yet, directly compute the x', y', z' for
them) for your N pixels at some level of healpix refinement.  Use these to
compute the values at whatever radius from the center you want so that you
have an array of x, y, z points *in pixel indices*.  Then use the
find_field_values_at_points function to sample the values there.  This will
not conduct any interpolation, but with reasonable resolution this should
not be a terrible impediment.  There's some more info about this function
at
https://yt-project.org/doc/examining/low_level_inspection.html#finding-data-at-fixed-points

Does that help?  Additionally, two things -- it would *absolutely* be worth
exploring if this set of analysis operations could be abstracted and
upstreamed, and furthermore if we were able to utilize healpy instead of
HEALpix inside our cython volume rendering routines we'd likely be able to
utilize healpix-determined vectors in a standard installation of yt.

-Matt

On Wed, Mar 13, 2024 at 11:12 AM Samuel Patrick <[email protected]> wrote:

> Hi all,
>
> I would like to perform a spherical harmonic decomposition of the
> density within a spherical shell, essentially a Fourier transform of the
> density (or any scalar quantity) on the surface of a sphere object . I'm
> aware of python libraries like Healpy which have functions such as
> map2alm which take a healpix map and return the corresponding Alm
> coefficients; are there any utilities within yt that can either do this
> directly or return a healpix map from a sphere object?
>
> Thanks and best,
> Sam Patrick
>
> The University of Edinburgh is a charitable body, registered in Scotland,
> with registration number SC005336. Is e buidheann carthannais a th’ ann an
> Oilthigh Dhùn Èideann, clàraichte an Alba, àireamh clàraidh SC005336.
> _______________________________________________
> yt-users mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/yt-users.python.org/
> Member address: [email protected]
>
_______________________________________________
yt-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/yt-users.python.org/
Member address: [email protected]

Reply via email to