Quantities, hierarchy
Hi, all-- I've used set_field_parameter for computing quantities, but that works directly on a ExtractedRegions and whatnot. Is it possible to tie something directly to the hierarchy or pf so that any new objects I create can also see this value? Thanks, d. -- Sent from my Stone Tablet and carried by my Pterodactyl.
Hi Dave,
Unfortunately, I don't think there is. We could potentially set
something up, but as it stands I think both the method resolution
order of inherited Python objects as well as the name mangling for
"private" methods like __set_default_field_parameters (in
yt/lagos/BaseDataTypes.py:161) get in the way.
-Matt
On Tue, May 25, 2010 at 1:58 PM, david collins
Hi, all--
I've used set_field_parameter for computing quantities, but that works directly on a ExtractedRegions and whatnot. Is it possible to tie something directly to the hierarchy or pf so that any new objects I create can also see this value?
Thanks, d.
-- Sent from my Stone Tablet and carried by my Pterodactyl. _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Would something like what Britton suggested to Charles a while back work?
pf.parameters['temperature_threshold'] = 1.e7
data.pf.parameters['temperature_threshold'].
will
pf.h.sphere(whatever)
inherit my new thing?
d.
On Tue, May 25, 2010 at 2:02 PM, Matthew Turk
Hi Dave,
Unfortunately, I don't think there is. We could potentially set something up, but as it stands I think both the method resolution order of inherited Python objects as well as the name mangling for "private" methods like __set_default_field_parameters (in yt/lagos/BaseDataTypes.py:161) get in the way.
-Matt
On Tue, May 25, 2010 at 1:58 PM, david collins
wrote: Hi, all--
I've used set_field_parameter for computing quantities, but that works directly on a ExtractedRegions and whatnot. Is it possible to tie something directly to the hierarchy or pf so that any new objects I create can also see this value?
Thanks, d.
-- Sent from my Stone Tablet and carried by my Pterodactyl. _______________________________________________ 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
-- Sent from my Stone Tablet and carried by my Pterodactyl.
Hi Dave,
That won't inherit it, but because data.pf is guaranteed to exist
within the definition of a derived field, that should do what you
want.
-Matt
On Tue, May 25, 2010 at 2:26 PM, David Collins
Would something like what Britton suggested to Charles a while back work?
pf.parameters['temperature_threshold'] = 1.e7 data.pf.parameters['temperature_threshold'].
will pf.h.sphere(whatever)
inherit my new thing?
d.
On Tue, May 25, 2010 at 2:02 PM, Matthew Turk
wrote: Hi Dave,
Unfortunately, I don't think there is. We could potentially set something up, but as it stands I think both the method resolution order of inherited Python objects as well as the name mangling for "private" methods like __set_default_field_parameters (in yt/lagos/BaseDataTypes.py:161) get in the way.
-Matt
On Tue, May 25, 2010 at 1:58 PM, david collins
wrote: Hi, all--
I've used set_field_parameter for computing quantities, but that works directly on a ExtractedRegions and whatnot. Is it possible to tie something directly to the hierarchy or pf so that any new objects I create can also see this value?
Thanks, d.
-- Sent from my Stone Tablet and carried by my Pterodactyl. _______________________________________________ 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
-- Sent from my Stone Tablet and carried by my Pterodactyl. _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
On Tue, May 25, 2010 at 2:27 PM, Matthew Turk
Hi Dave,
That won't inherit it, but because data.pf is guaranteed to exist within the definition of a derived field, that should do what you want.
-Matt
Rad. Is there an easy way to cram something like into the .yt file. Thanks! d.
On Tue, May 25, 2010 at 2:26 PM, David Collins
wrote: Would something like what Britton suggested to Charles a while back work?
pf.parameters['temperature_threshold'] = 1.e7 data.pf.parameters['temperature_threshold'].
will pf.h.sphere(whatever)
inherit my new thing?
d.
On Tue, May 25, 2010 at 2:02 PM, Matthew Turk
wrote: Hi Dave,
Unfortunately, I don't think there is. We could potentially set something up, but as it stands I think both the method resolution order of inherited Python objects as well as the name mangling for "private" methods like __set_default_field_parameters (in yt/lagos/BaseDataTypes.py:161) get in the way.
-Matt
On Tue, May 25, 2010 at 1:58 PM, david collins
wrote: Hi, all--
I've used set_field_parameter for computing quantities, but that works directly on a ExtractedRegions and whatnot. Is it possible to tie something directly to the hierarchy or pf so that any new objects I create can also see this value?
Thanks, d.
-- Sent from my Stone Tablet and carried by my Pterodactyl. _______________________________________________ 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
-- Sent from my Stone Tablet and carried by my Pterodactyl. _______________________________________________ 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
-- Sent from my Stone Tablet and carried by my Pterodactyl.
Hi Dave,
As it stands, no, but if it's in your data's parameter file, you can
add something to your plugins file to have new parameters added when
yt parses the parameter file.
-Matt
On Tue, May 25, 2010 at 3:17 PM, David Collins
On Tue, May 25, 2010 at 2:27 PM, Matthew Turk
wrote: Hi Dave,
That won't inherit it, but because data.pf is guaranteed to exist within the definition of a derived field, that should do what you want.
-Matt
Rad.
Is there an easy way to cram something like into the .yt file.
Thanks! d.
On Tue, May 25, 2010 at 2:26 PM, David Collins
wrote: Would something like what Britton suggested to Charles a while back work?
pf.parameters['temperature_threshold'] = 1.e7 data.pf.parameters['temperature_threshold'].
will pf.h.sphere(whatever)
inherit my new thing?
d.
On Tue, May 25, 2010 at 2:02 PM, Matthew Turk
wrote: Hi Dave,
Unfortunately, I don't think there is. We could potentially set something up, but as it stands I think both the method resolution order of inherited Python objects as well as the name mangling for "private" methods like __set_default_field_parameters (in yt/lagos/BaseDataTypes.py:161) get in the way.
-Matt
On Tue, May 25, 2010 at 1:58 PM, david collins
wrote: Hi, all--
I've used set_field_parameter for computing quantities, but that works directly on a ExtractedRegions and whatnot. Is it possible to tie something directly to the hierarchy or pf so that any new objects I create can also see this value?
Thanks, d.
-- Sent from my Stone Tablet and carried by my Pterodactyl. _______________________________________________ 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
-- Sent from my Stone Tablet and carried by my Pterodactyl. _______________________________________________ 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
-- Sent from my Stone Tablet and carried by my Pterodactyl. _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (3)
-
david collins
-
David Collins
-
Matthew Turk