Hi, I have been messing around with the example light cone generator example for halos: http://yt-project.org/doc/cookbook/index.html#cookbook-light-cone-halo-mask and I have come across a few issues. My guess is that the various things the light cone uses (the halo profiler, FRB) have changed underneath the light cone. I think I've got it working with some changes, but at least one is not a good permanent solution, and I'd like Britton eyes on this since I don't really understand all the details of the LC and I'm not sure that these changes are good. 1. In the example above, the "add_redshift_label" keyword to "project_light_cone()" doesn't appear to exist any more. 2. I've made these changes to the yt source to get things to work: http://paste.yt-project.org/show/2466/ a. The changes to halo_mask.py are hacks. It appears that the halo profiler now adds the overdensity factor to "RadiusMpc" and "TotalMassMsun" (e.g. "RadiusMpc_200"). It seems to me that the correct way to fix this is to pass the halo profiler kwargs down to the _make_slice_halo_list() function where these lines appear so the overdensity factor can be included in these strings. What do you think? b. In light_cone.py I've changed the default of set_parameters to an empty dict, which dict.update() accepts to perform no action, when None makes it croak. c. frb.field_data[] doesn't appear to work. Thanks! -- Stephen Skory s@skory.us http://stephenskory.com/ 510.621.3687 (google voice)
Hi Stephen, Thanks for catching all this. Your changes all look good to me, with one suggestion. I recommend replacing set_parameters=None and then adding a line: if set_parameters is None: set_parameters={} When setting the empty dist in the kwarg, you can run into situations where things can get stuck in that dict from previous calls to that function, since it's a pointer. Other than that, it looks great. I'll accept the PR when you submit one. The add_redshift_label kwarg was removed when use of the PlotCollection to generate the projections was dropped. Thanks for catching that, too. Britton On Fri, Jun 15, 2012 at 12:00 PM, Stephen Skory <s@skory.us> wrote:
Hi,
I have been messing around with the example light cone generator example for halos:
http://yt-project.org/doc/cookbook/index.html#cookbook-light-cone-halo-mask
and I have come across a few issues. My guess is that the various things the light cone uses (the halo profiler, FRB) have changed underneath the light cone. I think I've got it working with some changes, but at least one is not a good permanent solution, and I'd like Britton eyes on this since I don't really understand all the details of the LC and I'm not sure that these changes are good.
1. In the example above, the "add_redshift_label" keyword to "project_light_cone()" doesn't appear to exist any more.
2. I've made these changes to the yt source to get things to work:
http://paste.yt-project.org/show/2466/
a. The changes to halo_mask.py are hacks. It appears that the halo profiler now adds the overdensity factor to "RadiusMpc" and "TotalMassMsun" (e.g. "RadiusMpc_200"). It seems to me that the correct way to fix this is to pass the halo profiler kwargs down to the _make_slice_halo_list() function where these lines appear so the overdensity factor can be included in these strings. What do you think?
b. In light_cone.py I've changed the default of set_parameters to an empty dict, which dict.update() accepts to perform no action, when None makes it croak.
c. frb.field_data[] doesn't appear to work.
Thanks!
-- Stephen Skory s@skory.us http://stephenskory.com/ 510.621.3687 (google voice) _______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
Additionally, the LightCone and LightRay will get a refactor in the near future to work with the new general SimulationTimeSeries class instead of being enzo specific. I hope to clean up some other things that may have picked up a little rust with time. Britton On Fri, Jun 15, 2012 at 2:04 PM, Britton Smith <brittonsmith@gmail.com>wrote:
Hi Stephen,
Thanks for catching all this. Your changes all look good to me, with one suggestion.
I recommend replacing set_parameters=None and then adding a line: if set_parameters is None: set_parameters={} When setting the empty dist in the kwarg, you can run into situations where things can get stuck in that dict from previous calls to that function, since it's a pointer. Other than that, it looks great. I'll accept the PR when you submit one. The add_redshift_label kwarg was removed when use of the PlotCollection to generate the projections was dropped. Thanks for catching that, too.
Britton
On Fri, Jun 15, 2012 at 12:00 PM, Stephen Skory <s@skory.us> wrote:
Hi,
I have been messing around with the example light cone generator example for halos:
http://yt-project.org/doc/cookbook/index.html#cookbook-light-cone-halo-mask
and I have come across a few issues. My guess is that the various things the light cone uses (the halo profiler, FRB) have changed underneath the light cone. I think I've got it working with some changes, but at least one is not a good permanent solution, and I'd like Britton eyes on this since I don't really understand all the details of the LC and I'm not sure that these changes are good.
1. In the example above, the "add_redshift_label" keyword to "project_light_cone()" doesn't appear to exist any more.
2. I've made these changes to the yt source to get things to work:
http://paste.yt-project.org/show/2466/
a. The changes to halo_mask.py are hacks. It appears that the halo profiler now adds the overdensity factor to "RadiusMpc" and "TotalMassMsun" (e.g. "RadiusMpc_200"). It seems to me that the correct way to fix this is to pass the halo profiler kwargs down to the _make_slice_halo_list() function where these lines appear so the overdensity factor can be included in these strings. What do you think?
b. In light_cone.py I've changed the default of set_parameters to an empty dict, which dict.update() accepts to perform no action, when None makes it croak.
c. frb.field_data[] doesn't appear to work.
Thanks!
-- Stephen Skory s@skory.us http://stephenskory.com/ 510.621.3687 (google voice) _______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
participants (2)
-
Britton Smith
-
Stephen Skory