[yt-users] Creating a projection for a derived particle field

Nathan Goldbaum nathan12343 at gmail.com
Tue Apr 18 11:59:54 PDT 2017


Hi Jose,

You are going to need to create a new deposited particle field using
ds.add_deposited_particle_field:

http://yt-project.org/doc/reference/api/generated/yt.frontends.stream.data_structures.StreamDataset.add_deposited_particle_field.html#yt.frontends.stream.data_structures.StreamDataset.add_deposited_particle_field

Alternatively you might find ParticlePlot to be useful, it will let you
directly visualize the particle field without creating a deposit field:

http://yt-project.org/doc/visualizing/plots.html#particle-plots
http://yt-project.org/doc/cookbook/simple_plots.html?highlight=particleplot#simple-particle-plot
http://yt-project.org/doc/reference/api/generated/yt.visualization.particle_plots.ParticlePlot.html

Best,

Nathan

On Tue, Apr 18, 2017 at 1:13 PM, José Mauricio Utreras <
jutreras at ug.uchile.cl> wrote:

> Hi yt users!
>
> Does anybody know how to create a projection for particles using another
> field rather than "particle_mass"?
>
> I was using this:
>
> proj = ds.proj('density', 2,data_source=disk_dd,method='sum')
> frb = proj.to_frb(width, res, center=[0.5,0.5,0.5])
> M_star=frb[('deposit', 'young_stars_mass')].in_units('Msun')
>
> But now I would like to do this with a particle mass field that depends on
> the characteristic timescales of the particles rather than the default
> field.
> Cheers!
>
> José Utreras
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20170418/3bcb35b4/attachment.htm>


More information about the yt-users mailing list