field parameters (you know I want to use them everywhere...)
Hi, Two small problems: 1. Another issue with field parameters. I can't pass them to a slice if the derived field also needs ValidateSpatial. i.e. def _EffectivePotential(field, data): center = na.array(data.get_field_parameter("disk_center")) h_vec = na.array(data.get_field_parameter("disk_vector")) omega = na.array(data.get_field_parameter("thiscore_omega")) . . blah . . add_field("EffectivePotential", function=_EffectivePotential, validators=[ValidateSpatial(1, ["x-velocity", "y-velocity", "z-velocity", "x", "y", "z"])]) p = pc.add_slice("EffectivePotential", 2, field_parameters={"disk_vector":disk_vector, "disk_center":disk_center, "thiscore_omega":core_omega[c]}) can't find its field parameters but if I change the end line of the function to: add_field("EffectivePotential", function=_EffectivePotential) everything is fine. It actually seems to work OK even without the ValidateSpatial (I have cross products in the function so pain has the potential to happen without the full data) so perhaps this isn't a problem, but I think it is a small bug? 2. For some reason, yt has decided to save all my image files in: /home/tasker/.yt/my_plugins.py_Slice_z_EffectivePotential.png This is less than intuitive. Does anyone know why and how I can stop it? Thanks! Elizabeth
Hi Elizabeth,
I can't reproduce your first error. I am using this script:
http://paste.yt-project.org/show/1973/
and I am using revision a519b8754ba8.
For your second error, it's a mystery to me; it's grabbing the path to
your plugins file for some reason. Can you maybe show a script that
you use that produces this error?
-Matt
On Wed, Nov 30, 2011 at 3:31 AM, Elizabeth Tasker
Hi,
Two small problems:
1. Another issue with field parameters. I can't pass them to a slice if the derived field also needs ValidateSpatial.
i.e.
def _EffectivePotential(field, data):
center = na.array(data.get_field_parameter("disk_center")) h_vec = na.array(data.get_field_parameter("disk_vector")) omega = na.array(data.get_field_parameter("thiscore_omega")) . . blah . . add_field("EffectivePotential", function=_EffectivePotential, validators=[ValidateSpatial(1, ["x-velocity", "y-velocity", "z-velocity", "x", "y", "z"])])
p = pc.add_slice("EffectivePotential", 2, field_parameters={"disk_vector":disk_vector, "disk_center":disk_center, "thiscore_omega":core_omega[c]})
can't find its field parameters but if I change the end line of the function to:
add_field("EffectivePotential", function=_EffectivePotential)
everything is fine.
It actually seems to work OK even without the ValidateSpatial (I have cross products in the function so pain has the potential to happen without the full data) so perhaps this isn't a problem, but I think it is a small bug?
2. For some reason, yt has decided to save all my image files in:
/home/tasker/.yt/my_plugins.py_Slice_z_EffectivePotential.png
This is less than intuitive. Does anyone know why and how I can stop it?
Thanks!
Elizabeth _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Matt, Calling it with dd is fine, it's when creating a slice I hit problems, i.e. pc.add_slice("EffectivePotential", 2, field_parameters={"disk_vector":disk_vector, "disk_center":disk_center, "thiscore_omega":core_omega[c]}) And.... this is the script that decides to save my images in a confusing place: http://paste.yt-project.org/show/1963/ It's a bit of an unhelpful beast, being long and using a non-default field of Enzo's (PotentialField). I can try making a smaller one that gives the same problem. Elizabeth On 2011-11-30, at 11:39 PM, Matthew Turk wrote:
Hi Elizabeth,
I can't reproduce your first error. I am using this script:
http://paste.yt-project.org/show/1973/
and I am using revision a519b8754ba8.
For your second error, it's a mystery to me; it's grabbing the path to your plugins file for some reason. Can you maybe show a script that you use that produces this error?
-Matt
On Wed, Nov 30, 2011 at 3:31 AM, Elizabeth Tasker
wrote: Hi,
Two small problems:
1. Another issue with field parameters. I can't pass them to a slice if the derived field also needs ValidateSpatial.
i.e.
def _EffectivePotential(field, data):
center = na.array(data.get_field_parameter("disk_center")) h_vec = na.array(data.get_field_parameter("disk_vector")) omega = na.array(data.get_field_parameter("thiscore_omega")) . . blah . . add_field("EffectivePotential", function=_EffectivePotential, validators=[ValidateSpatial(1, ["x-velocity", "y-velocity", "z-velocity", "x", "y", "z"])])
p = pc.add_slice("EffectivePotential", 2, field_parameters={"disk_vector":disk_vector, "disk_center":disk_center, "thiscore_omega":core_omega[c]})
can't find its field parameters but if I change the end line of the function to:
add_field("EffectivePotential", function=_EffectivePotential)
everything is fine.
It actually seems to work OK even without the ValidateSpatial (I have cross products in the function so pain has the potential to happen without the full data) so perhaps this isn't a problem, but I think it is a small bug?
2. For some reason, yt has decided to save all my image files in:
/home/tasker/.yt/my_plugins.py_Slice_z_EffectivePotential.png
This is less than intuitive. Does anyone know why and how I can stop it?
Thanks!
Elizabeth _______________________________________________ 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
Hi Elizabeth,
For the first bit, I have pushed a fix (all tests pass, but a new set
of tests that test this functionality would be *very* welcome!). What
was happening was that slicing did not behave the same as 3D data
objects for touching generated fields in grids.
For the second one, you have used the variable 'fn' when saving your
plotcollection, which you don't define. So, it uses 'fn' from yt.mods
(from which you have imported *) which is used in the determination of
the plugins filename. I have pushed a fix that also renames the
variable used in determining the plugin location to be _fn, so it
should not be a commonly found variable name.
These fixes are both in 5c9ac6b8e610.
-Matt
On Wed, Nov 30, 2011 at 9:48 AM, Elizabeth Tasker
Hi Matt,
Calling it with dd is fine, it's when creating a slice I hit problems, i.e.
pc.add_slice("EffectivePotential", 2, field_parameters={"disk_vector":disk_vector, "disk_center":disk_center, "thiscore_omega":core_omega[c]})
And.... this is the script that decides to save my images in a confusing place:
http://paste.yt-project.org/show/1963/
It's a bit of an unhelpful beast, being long and using a non-default field of Enzo's (PotentialField). I can try making a smaller one that gives the same problem.
Elizabeth
On 2011-11-30, at 11:39 PM, Matthew Turk wrote:
Hi Elizabeth,
I can't reproduce your first error. I am using this script:
http://paste.yt-project.org/show/1973/
and I am using revision a519b8754ba8.
For your second error, it's a mystery to me; it's grabbing the path to your plugins file for some reason. Can you maybe show a script that you use that produces this error?
-Matt
On Wed, Nov 30, 2011 at 3:31 AM, Elizabeth Tasker
wrote: Hi,
Two small problems:
1. Another issue with field parameters. I can't pass them to a slice if the derived field also needs ValidateSpatial.
i.e.
def _EffectivePotential(field, data):
center = na.array(data.get_field_parameter("disk_center")) h_vec = na.array(data.get_field_parameter("disk_vector")) omega = na.array(data.get_field_parameter("thiscore_omega")) . . blah . . add_field("EffectivePotential", function=_EffectivePotential, validators=[ValidateSpatial(1, ["x-velocity", "y-velocity", "z-velocity", "x", "y", "z"])])
p = pc.add_slice("EffectivePotential", 2, field_parameters={"disk_vector":disk_vector, "disk_center":disk_center, "thiscore_omega":core_omega[c]})
can't find its field parameters but if I change the end line of the function to:
add_field("EffectivePotential", function=_EffectivePotential)
everything is fine.
It actually seems to work OK even without the ValidateSpatial (I have cross products in the function so pain has the potential to happen without the full data) so perhaps this isn't a problem, but I think it is a small bug?
2. For some reason, yt has decided to save all my image files in:
/home/tasker/.yt/my_plugins.py_Slice_z_EffectivePotential.png
This is less than intuitive. Does anyone know why and how I can stop it?
Thanks!
Elizabeth _______________________________________________ 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
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
These both work great -- thank you!!
Elizabeth
On 1 December 2011 01:27, Matthew Turk
Hi Elizabeth,
For the first bit, I have pushed a fix (all tests pass, but a new set of tests that test this functionality would be *very* welcome!). What was happening was that slicing did not behave the same as 3D data objects for touching generated fields in grids.
For the second one, you have used the variable 'fn' when saving your plotcollection, which you don't define. So, it uses 'fn' from yt.mods (from which you have imported *) which is used in the determination of the plugins filename. I have pushed a fix that also renames the variable used in determining the plugin location to be _fn, so it should not be a commonly found variable name.
These fixes are both in 5c9ac6b8e610.
-Matt
On Wed, Nov 30, 2011 at 9:48 AM, Elizabeth Tasker
wrote: Hi Matt,
Calling it with dd is fine, it's when creating a slice I hit problems, i.e.
pc.add_slice("EffectivePotential", 2, field_parameters={"disk_vector":disk_vector, "disk_center":disk_center, "thiscore_omega":core_omega[c]})
And.... this is the script that decides to save my images in a confusing place:
http://paste.yt-project.org/show/1963/
It's a bit of an unhelpful beast, being long and using a non-default field of Enzo's (PotentialField). I can try making a smaller one that gives the same problem.
Elizabeth
On 2011-11-30, at 11:39 PM, Matthew Turk wrote:
Hi Elizabeth,
I can't reproduce your first error. I am using this script:
http://paste.yt-project.org/show/1973/
and I am using revision a519b8754ba8.
For your second error, it's a mystery to me; it's grabbing the path to your plugins file for some reason. Can you maybe show a script that you use that produces this error?
-Matt
On Wed, Nov 30, 2011 at 3:31 AM, Elizabeth Tasker
wrote: Hi,
Two small problems:
1. Another issue with field parameters. I can't pass them to a slice if the derived field also needs ValidateSpatial.
i.e.
def _EffectivePotential(field, data):
center = na.array(data.get_field_parameter("disk_center")) h_vec = na.array(data.get_field_parameter("disk_vector")) omega = na.array(data.get_field_parameter("thiscore_omega")) . . blah . . add_field("EffectivePotential", function=_EffectivePotential, validators=[ValidateSpatial(1, ["x-velocity", "y-velocity", "z-velocity", "x", "y", "z"])])
p = pc.add_slice("EffectivePotential", 2, field_parameters={"disk_vector":disk_vector, "disk_center":disk_center, "thiscore_omega":core_omega[c]})
can't find its field parameters but if I change the end line of the function to:
add_field("EffectivePotential", function=_EffectivePotential)
everything is fine.
It actually seems to work OK even without the ValidateSpatial (I have cross products in the function so pain has the potential to happen without the full data) so perhaps this isn't a problem, but I think it is a small bug?
2. For some reason, yt has decided to save all my image files in:
/home/tasker/.yt/my_plugins.py_Slice_z_EffectivePotential.png
This is less than intuitive. Does anyone know why and how I can stop it?
Thanks!
Elizabeth _______________________________________________ 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
_______________________________________________ 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)
-
Elizabeth Tasker
-
Matthew Turk