Created
July 11, 2019 14:28
-
-
Save eschnett/f64d4683ebcdf12552d24b961fb05653 to your computer and use it in GitHub Desktop.
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
In [1]: | |
pwd() | |
Out[1]: | |
'/Users/eschnett/Camrex' | |
In [2]: | |
import yt | |
In [3]: | |
ds = yt.load("wavetoy000000") | |
yt : [INFO ] 2019-07-11 10:25:48,784 Parameters: current_time = 0.0 | |
yt : [INFO ] 2019-07-11 10:25:48,785 Parameters: domain_dimensions = [100 100 100] | |
yt : [INFO ] 2019-07-11 10:25:48,786 Parameters: domain_left_edge = [-1. -1. -1.] | |
yt : [INFO ] 2019-07-11 10:25:48,786 Parameters: domain_right_edge = [1. 1. 1.] | |
In [4]: | |
ds.field_list | |
Out[4]: | |
[('boxlib', 'phi')] | |
In [5]: | |
slc = yt.SlicePlot(ds, "z", "phi") | |
yt : [INFO ] 2019-07-11 10:26:06,279 xlim = -1.000000 1.000000 | |
yt : [INFO ] 2019-07-11 10:26:06,279 ylim = -1.000000 1.000000 | |
yt : [INFO ] 2019-07-11 10:26:06,280 xlim = -1.000000 1.000000 | |
yt : [INFO ] 2019-07-11 10:26:06,281 ylim = -1.000000 1.000000 | |
yt : [INFO ] 2019-07-11 10:26:06,288 Making a fixed resolution buffer of (('boxlib', 'phi')) 800 by 800 | |
yt : [INFO ] 2019-07-11 10:26:06,303 Making a fixed resolution buffer of (phi) 800 by 800 | |
In [6]: | |
slc.show() | |
--------------------------------------------------------------------------- | |
IndexError Traceback (most recent call last) | |
<ipython-input-6-39bc8240494a> in <module> | |
----> 1 slc.show() | |
~/anaconda3/lib/python3.7/site-packages/yt/visualization/plot_container.py in newfunc(*args, **kwargs) | |
91 # call args[0].run_callbacks() | |
92 args[0]._setup_plots() | |
---> 93 rv = f(*args, **kwargs) | |
94 return rv | |
95 return newfunc | |
~/anaconda3/lib/python3.7/site-packages/yt/visualization/plot_container.py in show(self) | |
528 | |
529 """ | |
--> 530 interactivity = self.plots[list(self.plots.keys())[0]].interactivity | |
531 if interactivity: | |
532 for k,v in sorted(iteritems(self.plots)): | |
IndexError: list index out of range | |
In [ ]: | |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment