[yt-users] RadMC3DWriter and Ramses data

Andrew Myers atmyers2 at gmail.com
Tue Oct 6 14:38:18 PDT 2015


Hi Marc,

Thanks for testing that out for me. It looks like RAMSES datasets are
different from other frontends that use the tree writer, like Gadget and
Art, in a couple of ways. I can try to fix this using the sample RAMSES
data, but I probably won't get to this until next week.

Thanks,
Andrew

On Mon, Oct 5, 2015 at 7:01 PM, Marc Schartmann <mschartmann at swin.edu.au>
wrote:

> Thanks again. Now I am getting the following message:
>
>
> Traceback (most recent call last):
>   File
> "/home/mschartm/data/galnuc_ramses/yt/yt-x86_64/lib/python2.7/runpy.py",
> line 151, in _run_module_as_main
>     mod_name, loader, code, fname = _get_module_details(mod_name)
>   File
> "/home/mschartm/data/galnuc_ramses/yt/yt-x86_64/lib/python2.7/runpy.py",
> line 101, in _get_module_details
>     loader = get_loader(mod_name)
>   File
> "/home/mschartm/data/galnuc_ramses/yt/yt-x86_64/lib/python2.7/pkgutil.py",
> line 464, in get_loader
>     return find_loader(fullname)
>   File
> "/home/mschartm/data/galnuc_ramses/yt/yt-x86_64/lib/python2.7/pkgutil.py",
> line 474, in find_loader
>     for importer in iter_importers(fullname):
>   File
> "/home/mschartm/data/galnuc_ramses/yt/yt-x86_64/lib/python2.7/pkgutil.py",
> line 430, in iter_importers
>     __import__(pkg)
>   File "/home/mschartm/python_routines_galnuc/ramses_to_radmc3d.py", line
> 18, in <module>
>     writer = RadMC3DWriter(ds)
>   File
> "/lustre/projects/p054_swin/marc/galnuc_ramses/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/radmc3d_export/RadMC3DInterface.py",
> line 568, in RadMC3DWriter
>     raise YTException(message=message, ds=ds)
> yt.utilities.exceptions.YTException: Could not determine output style,
> Oct-Tree or Layer.
>
>
> and after choosing the RadMC3DTreeWriter(ds) option "by hand", I get the
> following:
>
>   File
> "/home/mschartm/data/galnuc_ramses/yt/yt-x86_64/lib/python2.7/runpy.py",
> line 151, in _run_module_as_main
>     mod_name, loader, code, fname = _get_module_details(mod_name)
>   File
> "/home/mschartm/data/galnuc_ramses/yt/yt-x86_64/lib/python2.7/runpy.py",
> line 101, in _get_module_details
>     loader = get_loader(mod_name)
>   File
> "/home/mschartm/data/galnuc_ramses/yt/yt-x86_64/lib/python2.7/pkgutil.py",
> line 464, in get_loader
>     return find_loader(fullname)
>   File
> "/home/mschartm/data/galnuc_ramses/yt/yt-x86_64/lib/python2.7/pkgutil.py",
> line 474, in find_loader
>     for importer in iter_importers(fullname):
>   File
> "/home/mschartm/data/galnuc_ramses/yt/yt-x86_64/lib/python2.7/pkgutil.py",
> line 430, in iter_importers
>     __import__(pkg)
>   File "/home/mschartm/python_routines_galnuc/ramses_to_radmc3d.py", line
> 18, in <module>
>     writer = RadMC3DWriter(ds)
>   File
> "/lustre/projects/p054_swin/marc/galnuc_ramses/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/radmc3d_export/RadMC3DInterface.py",
> line 565, in RadMC3DWriter
>     return RadMC3DTreeWriter(ds)
>   File
> "/lustre/projects/p054_swin/marc/galnuc_ramses/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/radmc3d_export/RadMC3DInterface.py",
> line 136, in __init__
>     self.tree = ds.index.oct_handler.save_octree()
> AttributeError: 'RAMSESIndex' object has no attribute 'oct_handler'
>
> Best,
>
> Marc
>
> On 6 Oct 2015, at 12:11 pm, Andrew Myers <atmyers2 at gmail.com> wrote:
>
> I did the merge and updated the pull request so that it has that bugfix.
> Now the revision hash is 0b2aab9
> <https://bitbucket.org/atmyers/yt/commits/0b2aab975b9e24b723bebc9df4fc9161b4342da9?at=yt>,
> but other than that you should be able to update to it using the same
> process as before.
>
> Best,
> Andrew
>
> On Mon, Oct 5, 2015 at 5:31 PM, Nathan Goldbaum <nathan12343 at gmail.com>
> wrote:
>
>> This is an issue that was fixed a while ago, but after Andrew opened his
>> pull request. Since you're updating to the PR head, you're updating to a
>> version before the fix was applied.
>>
>> You should be able to avoid the error by executing the clean.sh script at
>> the root of the yt repository:
>>
>> $ bash clean.sh
>>
>> And then rebuilding yt:
>>
>> $ python setup.py develop
>>
>> You could also temporarily merge Andrew's pull request with the latest
>> development version, but you might need to resolve some merge conflicts.
>> Andrew could also do the merge and update his PR.
>>
>> HTH,
>>
>> Nathan
>>
>> On Mon, Oct 5, 2015 at 7:26 PM, Marc Schartmann <mschartmann at swin.edu.au>
>> wrote:
>>
>>> Thanks!
>>> Unfortunately, it didn’t work out for me.
>>> After merging the PR locally into a new installation of yt (with the
>>> standard install script), I get the following
>>> error already after importing yt.
>>>
>>>
>>>
>>> Python 2.7.9 (default, Oct  6 2015, 10:48:03)
>>> [GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux2
>>> Type "help", "copyright", "credits" or "license" for more information.
>>> >>> import yt
>>> Traceback (most recent call last):
>>>   File "<stdin>", line 1, in <module>
>>>   File
>>> "/lustre/projects/p054_swin/marc/galnuc_ramses/yt/yt-x86_64/src/yt-hg/yt/__init__.py",
>>> line 132, in <module>
>>>     frontends = _frontend_container()
>>>   File
>>> "/lustre/projects/p054_swin/marc/galnuc_ramses/yt/yt-x86_64/src/yt-hg/yt/frontends/api.py",
>>> line 48, in __init__
>>>     setattr(self, frontend, importlib.import_module(_mod))
>>>   File
>>> "/home/mschartm/data/galnuc_ramses/yt/yt-x86_64/lib/python2.7/importlib/__init__.py",
>>> line 37, in import_module
>>>     __import__(name)
>>>   File
>>> "/lustre/projects/p054_swin/marc/galnuc_ramses/yt/yt-x86_64/src/yt-hg/yt/frontends/artio/api.py",
>>> line 17, in <module>
>>>     from .data_structures import \
>>>   File
>>> "/lustre/projects/p054_swin/marc/galnuc_ramses/yt/yt-x86_64/src/yt-hg/yt/frontends/artio/data_structures.py",
>>> line 22, in <module>
>>>     from ._artio_caller import \
>>>   File "yt/geometry/particle_deposit.pxd", line 98, in init
>>> yt.frontends.artio._artio_caller (yt/frontends/artio/_artio_caller.c:27347)
>>> ValueError: yt.geometry.particle_deposit.ParticleDepositOperation has
>>> the wrong size, try recompiling
>>>
>>>
>>>
>>>
>>>
>>> On 6 Oct 2015, at 5:42 am, Andrew Myers <atmyers2 at gmail.com> wrote:
>>>
>>> Hi Marc,
>>>
>>> In that case, you should be able to try out the PR by doing:
>>>
>>> 1. Make sure yt is activated
>>> 2. cd $YT_DEST/src/yt-hg/
>>> 3. hg pull -r 7674674 https://bitbucket.org/atmyers/
>>> 4. hg update -C 7674674
>>> 5. python setup.py develop
>>>
>>> The "-C" option to hg update will wipe any uncommited changes in your
>>> working copy, so be wary.
>>>
>>> -Andrew
>>>
>>> On Sun, Oct 4, 2015 at 10:57 PM, Marc Schartmann <
>>> mschartmann at swin.edu.au> wrote:
>>>
>>>> Thanks a lot.
>>>> I installed the Dev branch via the install script.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On 5 Oct 2015, at 2:41 pm, Nathan Goldbaum <nathan12343 at gmail.com>
>>>> wrote:
>>>>
>>>> There's an open pull request that adds support for actree style outputs
>>>> to the radmc3d exporter:
>>>>
>>>>
>>>> https://bitbucket.org/yt_analysis/yt/pull-requests/1688/wip-adding-support-for-octree-style-output
>>>>
>>>> If you merge that pull request in locally you could try it out. If you
>>>> share how you've set up your yt installation (install script? pip? from a
>>>> mercurial checkout? anaconda?) one of us could give instructions on how to
>>>> test out the PR.
>>>>
>>>> On Sun, Oct 4, 2015 at 10:30 PM, Marc Schartmann <
>>>> mschartmann at swin.edu.au> wrote:
>>>>
>>>>> Dear all,
>>>>>
>>>>> I am trying to export the density distribution from a RAMSES run to
>>>>> RADMC-3D using RadMC3DWriter.
>>>>> Whereas the example with the “StarParticle” data set works perfectly,
>>>>> it fails for any RAMSES data
>>>>> I tried (e.g. the “ramses_mhd_amr” one).
>>>>>
>>>>> Below is the output, complaining about a missing attribute in the
>>>>> RAMSES frontend.
>>>>> I am not a yt expert, any help with how to fix this would be
>>>>> appreciated.
>>>>>
>>>>> Thanks a lot.
>>>>>
>>>>> Best wishes,
>>>>>
>>>>> Marc
>>>>>
>>>>>
>>>>>
>>>>> >>> writer = RadMC3DWriter(ds)
>>>>> yt : [INFO     ] 2015-10-05 14:20:04,236 Loading field plugins.
>>>>> yt : [INFO     ] 2015-10-05 14:20:04,237 Loaded angular_momentum (8
>>>>> new fields)
>>>>> yt : [INFO     ] 2015-10-05 14:20:04,237 Loaded astro (15 new fields)
>>>>> yt : [INFO     ] 2015-10-05 14:20:04,237 Loaded cosmology (22 new
>>>>> fields)
>>>>> yt : [INFO     ] 2015-10-05 14:20:04,238 Loaded fluid (63 new fields)
>>>>> yt : [INFO     ] 2015-10-05 14:20:04,238 Loaded fluid_vector (95 new
>>>>> fields)
>>>>> yt : [INFO     ] 2015-10-05 14:20:04,239 Loaded geometric (111 new
>>>>> fields)
>>>>> yt : [INFO     ] 2015-10-05 14:20:04,239 Loaded local (111 new fields)
>>>>> yt : [INFO     ] 2015-10-05 14:20:04,239 Loaded magnetic_field (119
>>>>> new fields)
>>>>> yt : [INFO     ] 2015-10-05 14:20:04,239 Loaded my_plugins (119 new
>>>>> fields)
>>>>> yt : [INFO     ] 2015-10-05 14:20:04,239 Loaded species (121 new
>>>>> fields)
>>>>> Traceback (most recent call last):
>>>>>   File "<stdin>", line 1, in <module>
>>>>>   File
>>>>> "/lustre/projects/p054_swin/marc/galnuc_ramses/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/radmc3d_export/RadMC3DInterface.py",
>>>>> line 148, in __init__
>>>>>     sorted_grids = sorted(ds.index.grids, key=lambda x: x.Level)
>>>>> AttributeError: 'RAMSESIndex' object has no attribute 'grids'
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> yt-users mailing list
>>>>> yt-users at lists.spacepope.org
>>>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>>>
>>>>>
>>>> _______________________________________________
>>>> yt-users mailing list
>>>> yt-users at lists.spacepope.org
>>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> yt-users mailing list
>>>> yt-users at lists.spacepope.org
>>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>>
>>>>
>>> _______________________________________________
>>> yt-users mailing list
>>> yt-users at lists.spacepope.org
>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>
>>>
>>>
>>> _______________________________________________
>>> yt-users mailing list
>>> yt-users at lists.spacepope.org
>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>
>>>
>>
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
>
> _______________________________________________
> 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/20151006/876b5b43/attachment.htm>


More information about the yt-users mailing list