Hi, http://yt-project.org/doc/cookbook/complex_plots.html#thin-slice-projections Is it possible to create a thin slice projection of particles (instead of density)? I tried the following three methods but get errors: 1. p = yt.ParticlePlot(ds, 2, ['particle_mass'], data_source=region) TypeError: __init__() got multiple values for keyword argument 'data_source' 2. p = yt.ParticleProjectionPlot(ds, 2, ['particle_mass'], data_source=region) finfo = self.ds._get_field_info("unknown", fname) 3. p = yt.ProjectionPlot(ds, 2, ['particle_mass'], data_source=region) File "/home/sagarwal/codes/yt/yt-x86_64/src/yt-hg/yt/visualization/plot_window.py", line 1429, in __init__ field_parameters = field_parameters, method = method) File "/home/sagarwal/codes/yt/yt-x86_64/src/yt-hg/yt/data_objects/construction_data_containers.py", line 253, in __init__ field = self._determine_fields(ensure_list(field)) File "/home/sagarwal/codes/yt/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 518, in _determine_fields finfo = self.ds._get_field_info("unknown", fname) Shankar
Hi Shankar, Yes, that is possible. I think your second example should work, but it's hard to tell without seeing the complete script. This script works for me: http://paste.yt-project.org/show/5797/ Could you try following that and see if it solves your problem? Best, Andrew On Thu, Aug 6, 2015 at 6:38 AM, Shankar Agarwal <agarwalshankar@gmail.com> wrote:
Hi,
http://yt-project.org/doc/cookbook/complex_plots.html#thin-slice-projections
Is it possible to create a thin slice projection of particles (instead of density)?
I tried the following three methods but get errors:
1. p = yt.ParticlePlot(ds, 2, ['particle_mass'], data_source=region)
TypeError: __init__() got multiple values for keyword argument 'data_source'
2. p = yt.ParticleProjectionPlot(ds, 2, ['particle_mass'], data_source=region)
finfo = self.ds._get_field_info("unknown", fname)
3. p = yt.ProjectionPlot(ds, 2, ['particle_mass'], data_source=region)
File "/home/sagarwal/codes/yt/yt-x86_64/src/yt-hg/yt/visualization/plot_window.py", line 1429, in __init__ field_parameters = field_parameters, method = method) File "/home/sagarwal/codes/yt/yt-x86_64/src/yt-hg/yt/data_objects/construction_data_containers.py", line 253, in __init__ field = self._determine_fields(ensure_list(field)) File "/home/sagarwal/codes/yt/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 518, in _determine_fields finfo = self.ds._get_field_info("unknown", fname)
Shankar
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Many thanks Andrew, that worked very well !! I was not setting the "region" properly. Regards, Shankar On Thu, Aug 6, 2015 at 7:08 PM, Andrew Myers <atmyers2@gmail.com> wrote:
Hi Shankar,
Yes, that is possible. I think your second example should work, but it's hard to tell without seeing the complete script. This script works for me: http://paste.yt-project.org/show/5797/
Could you try following that and see if it solves your problem?
Best, Andrew
On Thu, Aug 6, 2015 at 6:38 AM, Shankar Agarwal <agarwalshankar@gmail.com> wrote:
Hi,
http://yt-project.org/doc/cookbook/complex_plots.html#thin-slice-projections
Is it possible to create a thin slice projection of particles (instead of density)?
I tried the following three methods but get errors:
1. p = yt.ParticlePlot(ds, 2, ['particle_mass'], data_source=region)
TypeError: __init__() got multiple values for keyword argument 'data_source'
2. p = yt.ParticleProjectionPlot(ds, 2, ['particle_mass'], data_source=region)
finfo = self.ds._get_field_info("unknown", fname)
3. p = yt.ProjectionPlot(ds, 2, ['particle_mass'], data_source=region)
File "/home/sagarwal/codes/yt/yt-x86_64/src/yt-hg/yt/visualization/plot_window.py", line 1429, in __init__ field_parameters = field_parameters, method = method) File "/home/sagarwal/codes/yt/yt-x86_64/src/yt-hg/yt/data_objects/construction_data_containers.py", line 253, in __init__ field = self._determine_fields(ensure_list(field)) File "/home/sagarwal/codes/yt/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 518, in _determine_fields finfo = self.ds._get_field_info("unknown", fname)
Shankar
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (2)
-
Andrew Myers
-
Shankar Agarwal