[yt-users] creating sunrise files from RAMSES snapshot
Matthew Turk
matthewturk at gmail.com
Sun Aug 21 07:24:55 PDT 2011
Hi Robert,
On Sun, Aug 21, 2011 at 10:10 AM, Matthew Turk <matthewturk at gmail.com> wrote:
> Hi Robert,
>
> On Sun, Aug 21, 2011 at 1:40 AM, Robert Feldmann <feldmann at fnal.gov> wrote:
>> Hi,
>>
>> I am trying to create SUNRISE files for a RAMSES snapshot.
>> I am using the latest stable version of YT ("2.1stable"). I can read the RAMSES snapshot, but the sunrise_exporter routine fails.
>> The reason, it seems, is that it wants to access a field "InitialTime" that actually does not exist (see below).
>>
>> Is there somewhere some additional information about how to convert RAMSES to SUNRISE using YT?
>> I could not find much (that includes searching the mailing lists).
>
> I've fixed the bug you have reported, but in the unstable (2.2-dev)
> version, which also includes a large number of performance
> improvements for the RAMSES code. (We hope to have a 2.2 release this
> week.) There seem to be a few lingering bugs with the RAMSES reader
> which I am going to work on tomorrow; it seems that something I did
> recently broke the reader.
Apologies for the rapid self-reply, but I believe I have identified
and fixed the main issue I was seeing with the RAMSES reader, and as
of changeset hash 677ae185471f (in the "development" branch) it should
actually be performing up to specification, and I was able to project
and slice data successfully. Tomorrow I will dive deeper and ensure
that the second-tier tests are working up to specification.
RAMSES tests will be added to the automated test runner tomorrow
morning, to be run on a daily basis, to ensure such a regression does
not happen again. As always, please let us know if you run into
problems.
Best,
Matt
>
> However, the bigger issue arises in that right now the particle
> reading capabilities for RAMSES datasets are extremely limited, and
> will not support generating stellar populations, which are necessary
> to get useful information out of Sunrise. If you are looking for an
> output that contains only gas, then it should work fine (once I have
> had a chance to properly fix the item I mentioned above, as I am
> taking today off) to export, as long as "Temperature" exists in the
> output, although the result from Sunrise may not be as interesting.
> Oddly enough, it looks like from the output you have sent, yours is in
> fact reading particles. Have you made modifications?
>
> I'd be happy to talk with you about how to improve particle reading
> support for RAMSES to this end, however -- I think this particular
> problem could be solved by a small amount of special purpose code.
> Contact me off-list or on yt-dev and we can go from there. There has
> been a lot of interest in improving RAMSES support lately, which is
> also one of my goals for the near/medium future.
>
> -Matt
>
>>
>> Thanks
>> Robert
>>
>>>>> pf = load("output_00105/info_00105.txt")
>> output_00105/amr_00105.out00001
>> yt : [INFO ] 2011-08-21 00:09:47,343 Parameters: current_time = -1.23236270587e+17
>> yt : [INFO ] 2011-08-21 00:09:47,343 Parameters: domain_dimensions = [2 2 2]
>> yt : [INFO ] 2011-08-21 00:09:47,344 Parameters: domain_left_edge = [ 0. 0. 0.]
>> yt : [INFO ] 2011-08-21 00:09:47,344 Parameters: domain_right_edge = [ 1. 1. 1.]
>> yt : [INFO ] 2011-08-21 00:09:47,344 Parameters: cosmological_simulation = 1
>> yt : [INFO ] 2011-08-21 00:09:47,345 Parameters: current_redshift = 1.00027409463
>> yt : [INFO ] 2011-08-21 00:09:47,345 Parameters: omega_lambda = 0.759999990463
>> yt : [INFO ] 2011-08-21 00:09:47,345 Parameters: omega_matter = 0.239999994636
>> yt : [INFO ] 2011-08-21 00:09:47,345 Parameters: hubble_constant = 73.0
>>
>> Now, when I try the following I get an error
>>>>> from yt.analysis_modules.sunrise_export import sunrise_exporter
>>>>> sunrise_exporter.export_to_sunrise(pf,"analysis/yt/HYDRO_L2_18_GF_epsstar0d1")
>> yt : [INFO ] 2011-08-21 00:11:30,744 Re-gridding level 0: 1 octree grids
>> Re-gridding 100% ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| Time: 00:00:00
>> ...
>> Re-gridding 100% ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| Time: 00:00:0
>> yt : [INFO ] 2011-08-21 00:11:46,711 Final grid count: 302
>> yt : [INFO ] 2011-08-21 00:11:46,775 Re-gridding level 16: 59069 octree grids
>> Re-gridding 100% ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| Time: 00:00:0
>> yt : [INFO ] 2011-08-21 00:11:47,093 Final grid count: 153
>> yt : [INFO ] 2011-08-21 00:11:52,568 Getting field particle_type from 2894
>> yt : [INFO ] 2011-08-21 00:11:52,760 Getting field particle_position_x from 2894
>> yt : [INFO ] 2011-08-21 00:11:52,951 Getting field particle_position_y from 2894
>> yt : [INFO ] 2011-08-21 00:11:53,141 Getting field particle_position_z from 2894
>> yt : [INFO ] 2011-08-21 00:11:53,344 Getting field particle_velocity_x from 2894
>> yt : [INFO ] 2011-08-21 00:11:53,542 Getting field particle_velocity_y from 2894
>> yt : [INFO ] 2011-08-21 00:11:53,739 Getting field particle_velocity_z from 2894
>> ---------------------------------------------------------------------------
>> KeyError Traceback (most recent call last)
>>
>> /d/scratch39/feldmann/local/yt/yt-x86_64/src/yt-hg/scripts/iyt in <module>()
>> ----> 1
>> 2
>> 3
>> 4
>> 5
>>
>> /d/scratch39/feldmann/local/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/sunrise_export/sunrise_exporter.pyc in export_to_sunrise(pf, fn, write_particles, sub gion_bounds, particle_mass, particle_pos, particle_age, particle_metal)
>> 110 # Velocity is cm/s, we want it to be kpc/yr
>>
>> 111 vel *= (pf["kpc"]/pf["cm"]) / (365*24*3400.)
>> --> 112 age = pf["years"] * (pf["InitialTime"] - reg["creation_time"][pi])
>> 113 creation_time = reg["creation_time"][pi] * pf["years"]
>> 114
>>
>> /d/scratch39/feldmann/local/yt/yt-x86_64/src/yt-hg/yt/data_objects/static_output.pyc in __getitem__(self, key)
>> 117 self.conversion_factors]:
>> 118 if key in d: return d[key]
>> --> 119 raise KeyError(key)
>> 120
>> 121 def keys(self):
>>
>> KeyError: 'InitialTime'
>>
>> ---
>>
>> These are the available fields in pf
>>
>> pf._StaticOutput__hierarchy pf.__repr__ pf._setup_nounits_units pf.has_key
>> pf.__class__ pf.__setattr__ pf.basename pf.hierarchy
>> pf.__delattr__ pf.__sizeof__ pf.conversion_factors pf.hubble_constant
>> pf.__dict__ pf.__str__ pf.cosmological_simulation pf.keys
>> pf.__doc__ pf.__subclasshook__ pf.current_redshift pf.omega_lambda
>> pf.__format__ pf.__weakref__ pf.current_time pf.omega_matter
>> pf.__getattribute__ pf._fieldinfo_class pf.data_style pf.parameter_filename
>> pf.__getitem__ pf._get_hierarchy pf.dimensionality pf.parameters
>> pf.__hash__ pf._handle pf.directory pf.print_key_parameters
>> pf.__init__ pf._hash pf.domain_dimensions pf.ramses_tree
>> pf.__iter__ pf._hierarchy_class pf.domain_left_edge pf.refine_by
>> pf.__metaclass__ pf._instantiated pf.domain_right_edge pf.storage_filename
>> pf.__module__ pf._is_valid pf.field_info pf.time_units
>> pf.__new__ pf._parse_parameter_file pf.fullpath pf.unique_identifier
>> pf.__reduce__ pf._set_hierarchy pf.get_smallest_appropriate_unit pf.units
>> pf.__reduce_ex__ pf._set_units pf.h
>>
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>
More information about the yt-users
mailing list