Hi yt-users!
I have a simulation run on Enzo that has a best resolution cell size of ~40 pc. I would like to be able to compare my run to observations that are at a resolution of ~200 pc. I want to save a bunch of data in a fits file with that resolution. It looks like the way to do this is to create an arbitrary_grid object. If someone has a better method, please tell me!
So I have my artbitrary_grid object, and I am making arrays of fields:
xp = arbgridobj['x'] ...etc....
xp = np.array(xp) ...etc...
my code keeps crashing when I try to get a user-defined field for my arbitrary_grid object. If I try to get the field for a cut_region my code runs just fine. Is user-defined fields + arbitrary_grid objects just something that yt can't do or is there some different way to make this happen than in a cut_region?
Thanks!!
Best, Stephanie
-- Dr. Stephanie Tonnesen Alvin E. Nashman Postdoctoral Fellow Carnegie Observatories, Pasadena, CA stonnes@gmail.com
Hi Stephanie,
I've not heard of this bug, but I've had some difficulty with arbitrary_grids in the past. You might try using a covering_grid instead of an arbitrary_grid object since it is designed with grid-based datasets in mind whereas arbitrary_grids are more suited to particle-based datasets. This will give you a uniform grid at whatever resolution you desire (200 pc). If that doesn't work, perhaps it is a problem with your user-defined fields? But given that it works with cut_regions, I think it's unlikely to be your field definition.
http://yt-project.org/docs/dev/examining/low_level_inspection.html#examining...
Hope this helps!
Cameron
On Mon, Aug 7, 2017 at 10:14 PM, Stephanie Tonnesen stonnes@gmail.com wrote:
Hi yt-users!
I have a simulation run on Enzo that has a best resolution cell size of ~40 pc. I would like to be able to compare my run to observations that are at a resolution of ~200 pc. I want to save a bunch of data in a fits file with that resolution. It looks like the way to do this is to create an arbitrary_grid object. If someone has a better method, please tell me!
So I have my artbitrary_grid object, and I am making arrays of fields:
xp = arbgridobj['x'] ...etc....
xp = np.array(xp) ...etc...
my code keeps crashing when I try to get a user-defined field for my arbitrary_grid object. If I try to get the field for a cut_region my code runs just fine. Is user-defined fields + arbitrary_grid objects just something that yt can't do or is there some different way to make this happen than in a cut_region?
Thanks!!
Best, Stephanie
-- Dr. Stephanie Tonnesen Alvin E. Nashman Postdoctoral Fellow Carnegie Observatories, Pasadena, CA stonnes@gmail.com
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Stephanie,
What's the error you get?
Matt
On Aug 8, 2017 12:15 AM, "Stephanie Tonnesen" stonnes@gmail.com wrote:
Hi yt-users!
I have a simulation run on Enzo that has a best resolution cell size of ~40 pc. I would like to be able to compare my run to observations that are at a resolution of ~200 pc. I want to save a bunch of data in a fits file with that resolution. It looks like the way to do this is to create an arbitrary_grid object. If someone has a better method, please tell me!
So I have my artbitrary_grid object, and I am making arrays of fields:
xp = arbgridobj['x'] ...etc....
xp = np.array(xp) ...etc...
my code keeps crashing when I try to get a user-defined field for my arbitrary_grid object. If I try to get the field for a cut_region my code runs just fine. Is user-defined fields + arbitrary_grid objects just something that yt can't do or is there some different way to make this happen than in a cut_region?
Thanks!!
Best, Stephanie
-- Dr. Stephanie Tonnesen Alvin E. Nashman Postdoctoral Fellow Carnegie Observatories, Pasadena, CA stonnes@gmail.com
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Echoing Matt here, can you make a test script that triggers the issue you're seeing, preferably using one of the public test datasets on yt-project.org/data?
On Tue, Aug 8, 2017 at 6:05 AM Matthew Turk matthewturk@gmail.com wrote:
Hi Stephanie,
What's the error you get?
Matt
On Aug 8, 2017 12:15 AM, "Stephanie Tonnesen" stonnes@gmail.com wrote:
Hi yt-users!
I have a simulation run on Enzo that has a best resolution cell size of ~40 pc. I would like to be able to compare my run to observations that are at a resolution of ~200 pc. I want to save a bunch of data in a fits file with that resolution. It looks like the way to do this is to create an arbitrary_grid object. If someone has a better method, please tell me!
So I have my artbitrary_grid object, and I am making arrays of fields:
xp = arbgridobj['x'] ...etc....
xp = np.array(xp) ...etc...
my code keeps crashing when I try to get a user-defined field for my arbitrary_grid object. If I try to get the field for a cut_region my code runs just fine. Is user-defined fields + arbitrary_grid objects just something that yt can't do or is there some different way to make this happen than in a cut_region?
Thanks!!
Best, Stephanie
-- Dr. Stephanie Tonnesen Alvin E. Nashman Postdoctoral Fellow Carnegie Observatories, Pasadena, CA stonnes@gmail.com
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 all,
Thanks for the responses! Okay, before I jump to trying Cameron's solution, here is my problem. The error message:
Traceback (most recent call last): File "yt_arbgridtest.py", line 36, in <module> tracerp = galgas['tracerf'] File "/home/stonnes/yt/yt/data_objects/data_containers.py", line 272, in __getitem__ self.get_data(f) File "/home/stonnes/yt/yt/data_objects/construction_data_containers.py", line 627, in get_data if len(fill) > 0: self._fill_fields(fill) File "/home/stonnes/yt/yt/data_objects/construction_data_containers.py", line 816, in _fill_fields assert(len(fields) == 1) AssertionError
Attached is a test run showing the problem with the IsolatedGalaxy dataset. I also make a cut region with the exact same variables as the user defined field, so I think it is pretty clearly something off with the arbitrary grid functionality.
Best, Stephanie
-- Dr. Stephanie Tonnesen Alvin E. Nashman Postdoctoral Fellow Carnegie Observatories, Pasadena, CA stonnes@gmail.com
On Tue, Aug 8, 2017 at 5:41 AM, Nathan Goldbaum nathan12343@gmail.com wrote:
Echoing Matt here, can you make a test script that triggers the issue you're seeing, preferably using one of the public test datasets on yt-project.org/data?
On Tue, Aug 8, 2017 at 6:05 AM Matthew Turk matthewturk@gmail.com wrote:
Hi Stephanie,
What's the error you get?
Matt
On Aug 8, 2017 12:15 AM, "Stephanie Tonnesen" stonnes@gmail.com wrote:
Hi yt-users!
I have a simulation run on Enzo that has a best resolution cell size of ~40 pc. I would like to be able to compare my run to observations that are at a resolution of ~200 pc. I want to save a bunch of data in a fits file with that resolution. It looks like the way to do this is to create an arbitrary_grid object. If someone has a better method, please tell me!
So I have my artbitrary_grid object, and I am making arrays of fields:
xp = arbgridobj['x'] ...etc....
xp = np.array(xp) ...etc...
my code keeps crashing when I try to get a user-defined field for my arbitrary_grid object. If I try to get the field for a cut_region my code runs just fine. Is user-defined fields + arbitrary_grid objects just something that yt can't do or is there some different way to make this happen than in a cut_region?
Thanks!!
Best, Stephanie
-- Dr. Stephanie Tonnesen Alvin E. Nashman Postdoctoral Fellow Carnegie Observatories, Pasadena, CA stonnes@gmail.com
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
Hi Stephanie,
I can reproduce your issue. I've created a github issue to track this:
https://github.com/yt-project/yt/issues/1527
Let's move discussion over there. If you click the "subscribe" button you will get e-mail updates.
-Nathan
On Tue, Aug 8, 2017 at 1:47 PM, Stephanie Tonnesen stonnes@gmail.com wrote:
Hi all,
Thanks for the responses! Okay, before I jump to trying Cameron's solution, here is my problem. The error message:
Traceback (most recent call last): File "yt_arbgridtest.py", line 36, in <module> tracerp = galgas['tracerf'] File "/home/stonnes/yt/yt/data_objects/data_containers.py", line 272, in __getitem__ self.get_data(f) File "/home/stonnes/yt/yt/data_objects/construction_data_containers.py", line 627, in get_data if len(fill) > 0: self._fill_fields(fill) File "/home/stonnes/yt/yt/data_objects/construction_data_containers.py", line 816, in _fill_fields assert(len(fields) == 1) AssertionError
Attached is a test run showing the problem with the IsolatedGalaxy dataset. I also make a cut region with the exact same variables as the user defined field, so I think it is pretty clearly something off with the arbitrary grid functionality.
Best, Stephanie
-- Dr. Stephanie Tonnesen Alvin E. Nashman Postdoctoral Fellow Carnegie Observatories, Pasadena, CA stonnes@gmail.com
On Tue, Aug 8, 2017 at 5:41 AM, Nathan Goldbaum nathan12343@gmail.com wrote:
Echoing Matt here, can you make a test script that triggers the issue you're seeing, preferably using one of the public test datasets on yt-project.org/data?
On Tue, Aug 8, 2017 at 6:05 AM Matthew Turk matthewturk@gmail.com wrote:
Hi Stephanie,
What's the error you get?
Matt
On Aug 8, 2017 12:15 AM, "Stephanie Tonnesen" stonnes@gmail.com wrote:
Hi yt-users!
I have a simulation run on Enzo that has a best resolution cell size of ~40 pc. I would like to be able to compare my run to observations that are at a resolution of ~200 pc. I want to save a bunch of data in a fits file with that resolution. It looks like the way to do this is to create an arbitrary_grid object. If someone has a better method, please tell me!
So I have my artbitrary_grid object, and I am making arrays of fields:
xp = arbgridobj['x'] ...etc....
xp = np.array(xp) ...etc...
my code keeps crashing when I try to get a user-defined field for my arbitrary_grid object. If I try to get the field for a cut_region my code runs just fine. Is user-defined fields + arbitrary_grid objects just something that yt can't do or is there some different way to make this happen than in a cut_region?
Thanks!!
Best, Stephanie
-- Dr. Stephanie Tonnesen Alvin E. Nashman Postdoctoral Fellow Carnegie Observatories, Pasadena, CA stonnes@gmail.com
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