Skip to content

Commit

Permalink
reset colorbounds, set camera for new tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishavlin committed Dec 10, 2024
1 parent 1c55a86 commit e948c30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/amr_spherical_volume_rendering.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,6 @@ def _r_rev(field, data):
sg = rc.add_scene(ds, field, no_ghost=True)
rc.scene.components[0].sample_factor = 20.0
rc.scene.components[0].cmap_log = False
rc.scene.components[0]._reset_cmap_bounds()

rc.run()
2 changes: 2 additions & 0 deletions yt_idv/tests/test_spherical_vol_rendering.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def osmesa_empty_rc():
"partial": {
"bbox": np.array([[0.5, 1.0], [0.0, np.pi / 3], [np.pi / 4, np.pi / 2]]),
"field": ("index", "r"),
"camera": [-0.5, -1, 2.5],
},
"whole": {
"bbox": np.array([[0.0, 1.0], [0.0, 2 * np.pi], [0, np.pi]]),
Expand Down Expand Up @@ -83,6 +84,7 @@ def test_spherical_nprocs(osmesa_empty_rc, image_store, nprocs):
osmesa_empty_rc.add_scene(dd, field, no_ghost=True)
osmesa_empty_rc.scene.components[0].sample_factor = 20.0
osmesa_empty_rc.scene.components[0].cmap_log = False
osmesa_empty_rc.scene.components[0]._reset_cmap_bounds()
cpos = bbox_options[bbox_option].get("camera_position", None)
if cpos:
osmesa_empty_rc.scene.camera.position = cpos
Expand Down

0 comments on commit e948c30

Please sign in to comment.