forked from yt-project/yt_idv
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move isolayers to dedicated component
- Loading branch information
1 parent
80612c0
commit f02a935
Showing
5 changed files
with
144 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
import yt | ||
|
||
import yt_idv | ||
from yt_idv.scene_components.isolayers import Isolayers | ||
|
||
ds = yt.load_sample("IsolatedGalaxy") | ||
|
||
rc = yt_idv.render_context(height=800, width=800, gui=True) | ||
sg = rc.add_scene(ds, "density", no_ghost=True) | ||
sg.components[0].render_method = "isocontours" | ||
|
||
iso = Isolayers(data=sg.components[0].data) | ||
sg.components.append(iso) | ||
|
||
|
||
# default behavior will treat these values as base-10 exponents | ||
sg.components[0].iso_layers[0] = -29.0 | ||
sg.components[0].iso_tolerance[0] = 1.0 # tolerance in percent | ||
sg.components[1].iso_layers[0] = -27.0 | ||
sg.components[1].iso_tolerance[0] = 1.2 # tolerance in percent | ||
|
||
rc.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters