enzo-mrp-music/get_halo_initial_extent.py not working with yt 4.0.1
Dear yt users, I just updated yt to 4.0.1 and now I get this error message when trying to run enzo-mrp-music.py from John Wise on https://github.com/jwise77/enzo-mrp-music. Traceback (most recent call last): File "enzo-mrp-music/enzo-mrp-music.py", line 264, in <module> params = find_lagrangian_region(params) File "enzo-mrp-music/enzo-mrp-music.py", line 177, in find_lagrangian_region get_center_and_extent(params["halo_info"], File "enzo-mrp-music/get_halo_initial_extent.py", line 147, in get_center_and_extent halo_indices, halo_com, shifted = get_halo_indices(my_halo, final_dataset, File "enzo-mrp-music/get_halo_initial_extent.py", line 119, in get_halo_indices get_halo_sphere_particles(my_halo, dataset, radius_factor=radius_factor) File "enzo-mrp-music/get_halo_initial_extent.py", line 73, in get_halo_sphere_particles my_sphere = pf.h.sphere(my_halo_data['center'], radius_factor * r_200) AttributeError: 'EnzoDataset' object has no attribute 'h' I am honestly not sure what the attribute 'h' does in this case, so I didn't know what to try to adjust. Any suggestions for getting around this? Or how can I go back to yt 3? Kind regards, -- Carla Bernhardt PhD Student Universität Heidelberg ZAH Institut für Theoretische Astrophysik
Hi Carla, The pf.h.sphere is old yt syntax for creating spheres. You can change the pf.h.sphere to pf.sphere. Britton On Mon, Jul 26, 2021 at 3:07 PM C Bernhardt <bernhardt.phd@gmail.com> wrote:
Dear yt users,
I just updated yt to 4.0.1 and now I get this error message when trying to run enzo-mrp-music.py from John Wise on https://github.com/jwise77/enzo-mrp-music.
Traceback (most recent call last):
File "enzo-mrp-music/enzo-mrp-music.py", line 264, in <module>
params = find_lagrangian_region(params)
File "enzo-mrp-music/enzo-mrp-music.py", line 177, in find_lagrangian_region
get_center_and_extent(params["halo_info"],
File "enzo-mrp-music/get_halo_initial_extent.py", line 147, in get_center_and_extent
halo_indices, halo_com, shifted = get_halo_indices(my_halo, final_dataset,
File "enzo-mrp-music/get_halo_initial_extent.py", line 119, in get_halo_indices
get_halo_sphere_particles(my_halo, dataset, radius_factor=radius_factor)
File "enzo-mrp-music/get_halo_initial_extent.py", line 73, in get_halo_sphere_particles
my_sphere = pf.h.sphere(my_halo_data['center'], radius_factor * r_200)
AttributeError: 'EnzoDataset' object has no attribute 'h'
I am honestly not sure what the attribute 'h' does in this case, so I didn't know what to try to adjust. Any suggestions for getting around this? Or how can I go back to yt 3?
Kind regards, -- Carla Bernhardt PhD Student Universität Heidelberg ZAH Institut für Theoretische Astrophysik _______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org https://mail.python.org/mailman3/lists/yt-users.python.org/ Member address: brittonsmith@gmail.com
Hi Britton, Thanks! That worked great. Seems obvious now, I appreciate the quick response. Best, Carla Am Mo., 26. Juli 2021 um 16:21 Uhr schrieb Britton Smith < brittonsmith@gmail.com>:
Hi Carla,
The pf.h.sphere is old yt syntax for creating spheres. You can change the pf.h.sphere to pf.sphere.
Britton
On Mon, Jul 26, 2021 at 3:07 PM C Bernhardt <bernhardt.phd@gmail.com> wrote:
Dear yt users,
I just updated yt to 4.0.1 and now I get this error message when trying to run enzo-mrp-music.py from John Wise on https://github.com/jwise77/enzo-mrp-music.
Traceback (most recent call last):
File "enzo-mrp-music/enzo-mrp-music.py", line 264, in <module>
params = find_lagrangian_region(params)
File "enzo-mrp-music/enzo-mrp-music.py", line 177, in find_lagrangian_region
get_center_and_extent(params["halo_info"],
File "enzo-mrp-music/get_halo_initial_extent.py", line 147, in get_center_and_extent
halo_indices, halo_com, shifted = get_halo_indices(my_halo, final_dataset,
File "enzo-mrp-music/get_halo_initial_extent.py", line 119, in get_halo_indices
get_halo_sphere_particles(my_halo, dataset, radius_factor=radius_factor)
File "enzo-mrp-music/get_halo_initial_extent.py", line 73, in get_halo_sphere_particles
my_sphere = pf.h.sphere(my_halo_data['center'], radius_factor * r_200)
AttributeError: 'EnzoDataset' object has no attribute 'h'
I am honestly not sure what the attribute 'h' does in this case, so I didn't know what to try to adjust. Any suggestions for getting around this? Or how can I go back to yt 3?
Kind regards, -- Carla Bernhardt PhD Student Universität Heidelberg ZAH Institut für Theoretische Astrophysik _______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org https://mail.python.org/mailman3/lists/yt-users.python.org/ Member address: brittonsmith@gmail.com
_______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org https://mail.python.org/mailman3/lists/yt-users.python.org/ Member address: bernhardt.phd@gmail.com
-- Carla Bernhardt PhD Student Universität Heidelberg ZAH Institut für Theoretische Astrophysik
Pense no tipo de música, som ou gênero que você mais gosta. Escolha um contato de ressonância com suas preferências e represente seu estilo único.
participants (3)
-
Britton Smith
-
C Bernhardt
-
lwnsvsjjehs5@gmail.com