Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script:
- from yt.mods import *
- pf = load('DD0018/output_0018')
- N = 512 # Pixels (1024^2)
- v, c = pf.h.find_max("Density")
- radius = 150/pf['kpc']
- #c = (pf.domain_right_edge + pf.domain_left_edge)/2. # Center
- #radius = (pf.domain_right_edge - pf.domain_left_edge)/2.
- fov = 180.0
- field='Density'
- mi,ma = pf.h.all_data().quantities['Extrema']('Density')[0]
- mi,ma = na.log10(mi), na.log10(ma)
- # You may want to comment out the above lines and manually set the min and max
- # of the log of the Density field. For example:
- # mi,ma = -30.5,-26.5
- # Another good place to center the camera is close to the maximum density.
- # v,c = pf.h.find_max('Density')
- # c -= 0.1*radius
- # Construct transfer function
- tf = ColorTransferFunction((mi-1, ma+1),nbins=1024)
- # Sample transfer function with Nc gaussians. Use col_bounds keyword to limit
- # the color range to the min and max values, rather than the transfer function
- # bounds.
- Nc = 5
- tf.add_layers(Nc,w=0.005, col_bounds = (mi,ma), alpha=na.logspace(-2,0,Nc),
- colormap='RdBu_r')
- # Create the camera object. Use the keyword: no_ghost=True if a lot of time is
- # spent creating vertex-centered data. In this case I'm running with 8
- # processors, and am splitting the image plane into 4 pieces and using 2
- # processors on each piece.
- cam = MosaicFisheyeCamera(c, radius, fov, N,
- transfer_function = tf,
- sub_samples = 5,
- pf=pf,
- nimx=2,nimy=2,procs_per_wg=4)
- # Take a snapshot
- im = cam.snapshot()
- # Save the image
- cam.save_image('fisheye_mosaic.png')
- error:
- P001 yt : [INFO ] 2012-01-24 12:29:47,562 Starting 'Ray casting'
- P013 yt : [INFO ] 2012-01-24 12:29:47,569 Rendering fisheye of 512^2
- P013 yt : [INFO ] 2012-01-24 12:29:47,570 Starting 'Ray casting'
- mpispawn.c:303 Unexpected exit status
- Traceback (most recent call last):
- Traceback (most recent call last):
- File "fisheye_example.py", line 50, in <module>
- File "fisheye_example.py", line 50, in <module>
- Traceback (most recent call last):
- File "fisheye_example.py", line 50, in <module>
- Traceback (most recent call last):
- File "fisheye_example.py", line 50, in <module>
- Traceback (most recent call last):
- File "fisheye_example.py", line 50, in <module>
- im = cam.snapshot()
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/visualization/volume_rendering/camera.py", line 1095, in snapshot
- im = cam.snapshot()
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/visualization/volume_rendering/camera.py", line 1102, in snapshot
- im = cam.snapshot()
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/visualization/volume_rendering/camera.py", line 1095, in snapshot
- im = cam.snapshot()
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/visualization/volume_rendering/camera.py", line 1095, in snapshot
- im = cam.snapshot()
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/visualization/volume_rendering/camera.py", line 1095, in snapshot
- self.volume.initialize_source()
- brick.cast_plane(tfp, vector_plane)
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/utilities/amr_kdtree/amr_kdtree.py", line 668, in initialize_source
- KeyboardInterrupt
- self.volume.initialize_source()
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/utilities/amr_kdtree/amr_kdtree.py", line 668, in initialize_source
- Traceback (most recent call last):
- File "fisheye_example.py", line 50, in <module>
- self.volume.initialize_source()
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/utilities/amr_kdtree/amr_kdtree.py", line 668, in initialize_source
- self.volume.initialize_source()
- im = cam.snapshot()
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/utilities/amr_kdtree/amr_kdtree.py", line 668, in initialize_source
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/visualization/volume_rendering/camera.py", line 1102, in snapshot
- brick.cast_plane(tfp, vector_plane)
- KeyboardInterrupt
- Traceback (most recent call last):
- File "fisheye_example.py", line 50, in <module>
- im = cam.snapshot()
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/visualization/volume_rendering/camera.py", line 1102, in snapshot
- brick.cast_plane(tfp, vector_plane)
- KeyboardInterrupt
- Traceback (most recent call last):
- File "fisheye_example.py", line 50, in <module>
- im = cam.snapshot()
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/visualization/volume_rendering/camera.py", line 1102, in snapshot
- Traceback (most recent call last):
- File "fisheye_example.py", line 50, in <module>
- brick.cast_plane(tfp, vector_plane)
- KeyboardInterrupt
- im = cam.snapshot()
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/visualization/volume_rendering/camera.py", line 1102, in snapshot
- brick.cast_plane(tfp, vector_plane)
- KeyboardInterrupt
- Traceback (most recent call last):
- File "fisheye_example.py", line 50, in <module>
- im = cam.snapshot()
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/visualization/volume_rendering/camera.py", line 1102, in snapshot
- brick.cast_plane(tfp, vector_plane)
- KeyboardInterrupt
- Traceback (most recent call last):
- File "fisheye_example.py", line 50, in <module>
- im = cam.snapshot()
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/visualization/volume_rendering/camera.py", line 1102, in snapshot
- brick.cast_plane(tfp, vector_plane)
- KeyboardInterrupt
- vcd = current_node.grid.get_vertex_centered_data(field,smoothed=True,no_ghost=self.no_ghost).astype('float64')
- vcd = current_node.grid.get_vertex_centered_data(field,smoothed=True,no_ghost=self.no_ghost).astype('float64')
- vcd = current_node.grid.get_vertex_centered_data(field,smoothed=True,no_ghost=self.no_ghost).astype('float64')
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/grid_patch.py", line 491, in get_vertex_centered_data
- vcd = current_node.grid.get_vertex_centered_data(field,smoothed=True,no_ghost=self.no_ghost).astype('float64')
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/grid_patch.py", line 491, in get_vertex_centered_data
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/grid_patch.py", line 491, in get_vertex_centered_data
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/grid_patch.py", line 491, in get_vertex_centered_data
- cg = self.retrieve_ghost_zones(1, field, smoothed=smoothed)
- cg = self.retrieve_ghost_zones(1, field, smoothed=smoothed)
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/grid_patch.py", line 458, in retrieve_ghost_zones
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/grid_patch.py", line 458, in retrieve_ghost_zones
- cg = self.retrieve_ghost_zones(1, field, smoothed=smoothed)
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/grid_patch.py", line 458, in retrieve_ghost_zones
- cg = self.retrieve_ghost_zones(1, field, smoothed=smoothed)
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/grid_patch.py", line 458, in retrieve_ghost_zones
- level, new_left_edge, **kwargs)
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3490, in __init__
- level, new_left_edge, **kwargs)
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3490, in __init__
- level, new_left_edge, **kwargs)
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3490, in __init__
- level, new_left_edge, **kwargs)
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3490, in __init__
- AMRCoveringGridBase.__init__(self, *args, **kwargs)
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3346, in __init__
- AMRCoveringGridBase.__init__(self, *args, **kwargs)
- AMRCoveringGridBase.__init__(self, *args, **kwargs)
- AMRCoveringGridBase.__init__(self, *args, **kwargs)
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3346, in __init__
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3346, in __init__
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3346, in __init__
- self._refresh_data()
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3365, in _refresh_data
- self._refresh_data()
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3365, in _refresh_data
- self._refresh_data()
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3365, in _refresh_data
- self._refresh_data()
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3365, in _refresh_data
- AMR3DData._refresh_data(self)
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 309, in _refresh_data
- AMR3DData._refresh_data(self)
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 309, in _refresh_data
- self.get_data()
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3537, in get_data
- AMR3DData._refresh_data(self)
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 309, in _refresh_data
- self.get_data()
- AMR3DData._refresh_data(self)
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3562, in get_data
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 309, in _refresh_data
- self.get_data()
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3537, in get_data
- self._get_list_of_grids()
- self.get_data()
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3537, in get_data
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3511, in _get_list_of_grids
- self._get_data_from_grid(grid, fields_to_get)
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 102, in save_state
- tr = func(self, grid, field, *args, **kwargs)
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3618, in _get_data_from_grid
- self._get_list_of_grids()
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3511, in _get_list_of_grids
- self._get_list_of_grids()
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3515, in _get_list_of_grids
- self.left_edge - buf, self.ActiveDimensions + nz)
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3338, in __init__
- g_fields = [grid[field].astype("float64") for field in fields]
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/grid_patch.py", line 157, in __getitem__
- self.get_data(key)
- self.left_edge - buf, self.ActiveDimensions + nz)
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/grid_patch.py", line 190, in get_data
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3338, in __init__
- temp = self.hierarchy.io.pop(self, field)
- count -= cg._get_data_from_grid(g, [])
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 87, in save_state
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/utilities/io_handler.py", line 61, in pop
- self.dds = self.pf.h.select_grids(self.level)[0].dds.copy()
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/hierarchy.py", line 103, in select_grids
- tr = func(self, grid, field, *args, **kwargs)
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3439, in _get_data_from_grid
- self.dds = self.pf.h.select_grids(self.level)[0].dds.copy()
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/data_objects/hierarchy.py", line 103, in select_grids
- grid.child_mask, self.domain_width, ll, 0)
- KeyboardInterrupt
- return self.grids[self.grid_levels.flat == level]
- return self.grids[self.grid_levels.flat == level]
- KeyboardInterrupt
- KeyboardInterrupt
- return self._read_data_set(grid, field)
- File "/share/home/01112/tg803911/yt_17May2011/yt-x86_64/src/yt-hg/yt/frontends/enzo/io.py", line 185, in _read_data_set
- "/Grid%08i/%s" % (grid.id, field)))
- KeyboardInterrupt
- Child exited abnormally!
- Killing remote processes...DONE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement