[yt-users] How to calculate a field THEN plot a slice, not have SlicePlot recalculate the field
Nathan Goldbaum
nathan12343 at gmail.com
Mon Oct 17 06:33:52 PDT 2016
It is currently not possible to create a nonlocal field like you're looking
for. In the past when others have needed something like this they've used a
profile data object, which lets you accumulate values.
We have long term plans to add support for nonlocal fields, but that work
has not yet started.
Nathan
On Sunday, October 16, 2016, Rajika Kuruwita <rajikakuruwita at gmail.com>
wrote:
> Hi yt-users,
>
> I have created a field that calculates the enclosed mass in the simulation
> domain from a centre. This isn't a conventional field which can be
> calculated from one-to-one matrix multiplication like most fields, but
> needs to be aware of all the cells interior to the cell being calculated
> for.
>
> The field returns the correct values when I retrieve it using:
> dd = ds.all_data()
> dd['Enclosed_Mass'],
>
> But when creating a Slice plot it gives the wrong values.
>
> I realise this is because when creating a plot with one of those
> functions, yt calculates the field only for the cells used in the slice
> plot, hence severely underestimates the actual enclosed mass because it is
> ignoring all other cells.
>
> I know this is to make yt much faster and works for most fields, but I'm
> wondering if anyone else has encountered this issue, and figured out work
> arounds?
>
> Regards,
> Rajika
>
>
>
> --
> Rajika Kuruwita
> PhD Candidate at Australian National University
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20161017/153d7f19/attachment.html>
More information about the yt-users
mailing list