Re: [yt-users] [FLASH-USERS] ANN: yt-3.2 released
Dear John, I just tried the new version of yt. Installation worked! But going through the demo notebooks, already "3)_Simple_Visualization" fails on the first plot. Error trace below. I ma not really sure why the first error occurs as the font is installed, but the second error is a bug with trying to decode a string (you can decode bytes type and encode strings in python3), the last one seems strange why it would look for a font in the current directory. I also note that the notebook is still python 2 - so all the print statements don't work. I am happy to share my notebooks with these fixed if I can get them to run. -Alexander --------------------------------------------------------------------------- KeyError Traceback (most recent call last) /home/alex/Python/lib/python3.4/site-packages/matplotlib/dviread.py in __getitem__(self, texname) 706 try: --> 707 result = self._font[texname] 708 except KeyError: KeyError: 'cmsy10' During handling of the above exception, another exception occurred: AttributeError Traceback (most recent call last) /home/alex/Python/lib/python3.4/site-packages/matplotlib/backends/backend_pdf.py in print_pdf(self, filename, **kwargs) 2484 bbox_inches_restore=_bbox_inches_restore) -> 2485 self.figure.draw(renderer) 2486 renderer.finalize() /home/alex/Python/lib/python3.4/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs) 58 before(artist, renderer) ---> 59 draw(artist, renderer, *args, **kwargs) 60 after(artist, renderer) /home/alex/Python/lib/python3.4/site-packages/matplotlib/figure.py in draw(self, renderer) 1084 for zorder, a, func, args in dsu: -> 1085 func(*args) 1086 /home/alex/Python/lib/python3.4/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs) 58 before(artist, renderer) ---> 59 draw(artist, renderer, *args, **kwargs) 60 after(artist, renderer) /home/alex/Python/lib/python3.4/site-packages/matplotlib/axes/_base.py in draw(self, renderer, inframe) 2109 for zorder, a in dsu: -> 2110 a.draw(renderer) 2111 /home/alex/Python/lib/python3.4/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs) 58 before(artist, renderer) ---> 59 draw(artist, renderer, *args, **kwargs) 60 after(artist, renderer) /home/alex/Python/lib/python3.4/site-packages/matplotlib/axis.py in draw(self, renderer, *args, **kwargs) 1118 for tick in ticks_to_draw: -> 1119 tick.draw(renderer) 1120 /home/alex/Python/lib/python3.4/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs) 58 before(artist, renderer) ---> 59 draw(artist, renderer, *args, **kwargs) 60 after(artist, renderer) /home/alex/Python/lib/python3.4/site-packages/matplotlib/axis.py in draw(self, renderer) 248 if self.label1On: --> 249 self.label1.draw(renderer) 250 if self.label2On: /home/alex/Python/lib/python3.4/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs) 58 before(artist, renderer) ---> 59 draw(artist, renderer, *args, **kwargs) 60 after(artist, renderer) /home/alex/Python/lib/python3.4/site-packages/matplotlib/text.py in draw(self, renderer) 637 renderer.draw_tex(gc, x, y, clean_line, --> 638 self._fontproperties, angle, mtext=mtext) 639 else: /home/alex/Python/lib/python3.4/site-packages/matplotlib/backends/backend_pdf.py in draw_tex(self, gc, x, y, s, prop, angle, ismath, mtext) 1823 if dvifont.texname not in self.file.dviFontInfo: -> 1824 psfont = self.tex_font_mapping(dvifont.texname) 1825 self.file.dviFontInfo[dvifont.texname] = Bunch( /home/alex/Python/lib/python3.4/site-packages/matplotlib/backends/backend_pdf.py in tex_font_mapping(self, texfont) 1530 dviread.PsfontsMap(dviread.find_tex_file('pdftex.map')) -> 1531 return self.tex_font_map[texfont] 1532 /home/alex/Python/lib/python3.4/site-packages/matplotlib/dviread.py in __getitem__(self, texname) 708 except KeyError: --> 709 result = self._font[texname.decode('ascii')] 710 fn, enc = result.filename, result.encoding AttributeError: 'str' object has no attribute 'decode' During handling of the above exception, another exception occurred: FileNotFoundError Traceback (most recent call last) /home/alex/Python/lib/python3.4/site-packages/IPython/core/formatters.py in __call__(self, obj) 339 method = _safe_get_formatter_method(obj, self.print_method) 340 if method is not None: --> 341 return method() 342 return None 343 else: /home/alex/Python/lib/python3.4/site-packages/yt/visualization/plot_container.py in newfunc(*args, **kwargs) 75 if hasattr(args[0], 'run_callbacks'): 76 args[0].run_callbacks() ---> 77 rv = f(*args, **kwargs) 78 return rv 79 return newfunc /home/alex/Python/lib/python3.4/site-packages/yt/visualization/plot_container.py in _repr_html_(self) 642 ret = '' 643 for field in self.plots: --> 644 img = base64.b64encode(self.plots[field]._repr_png_()).decode() 645 ret += r'<img style="max-width:100%%;max-height:100%%;" ' \ 646 r'src="data:image/png;base64,{0}"><br>'.format(img) /home/alex/Python/lib/python3.4/site-packages/yt/visualization/base_plot_types.py in _repr_png_(self) 165 canvas = FigureCanvasAgg(self.figure) 166 f = BytesIO() --> 167 canvas.print_figure(f) 168 f.seek(0) 169 return f.read() /home/alex/Python/lib/python3.4/site-packages/matplotlib/backend_bases.py in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, **kwargs) 2209 orientation=orientation, 2210 bbox_inches_restore=_bbox_inches_restore, -> 2211 **kwargs) 2212 finally: 2213 if bbox_inches and restore_bbox: /home/alex/Python/lib/python3.4/site-packages/matplotlib/backends/backend_pdf.py in print_pdf(self, filename, **kwargs) 2489 file.endStream() 2490 else: # we opened the file above; now finish it off -> 2491 file.close() 2492 2493 /home/alex/Python/lib/python3.4/site-packages/matplotlib/backends/backend_pdf.py in close(self) 523 self.endStream() 524 # Write out the various deferred objects --> 525 self.writeFonts() 526 self.writeObject(self.alphaStateObject, 527 dict([(val[0], val[1]) /home/alex/Python/lib/python3.4/site-packages/matplotlib/backends/backend_pdf.py in writeFonts(self) 623 # a normal TrueType font 624 matplotlib.verbose.report('Writing TrueType font', 'debug') --> 625 realpath, stat_key = get_realpath_and_stat(filename) 626 chars = self.used_characters.get(stat_key) 627 if chars is not None and len(chars[1]): /home/alex/Python/lib/python3.4/site-packages/matplotlib/cbook.py in __call__(self, path) 1020 stat_key = realpath 1021 else: -> 1022 stat = os.stat(realpath) 1023 stat_key = (stat.st_ino, stat.st_dev) 1024 result = realpath, stat_key FileNotFoundError: [Errno 2] No such file or directory: '/home/alex/yt/doc/source/quickstart/cmsy10' <yt.visualization.plot_window.ProjectionPlot at 0x7fb8225470b8> On 25 July 2015 at 05:48, John ZuHone <jzuhone@space.mit.edu> wrote:
We are proud to announce the release of yt 3.2!
yt (http://yt-project.org) is an open source, community-developed toolkit for analysis and visualization of volumetric data of all types, with a particular emphasis on astrophysical simulations and nuclear engineering simulations.
Major enhancements
Particle-Only Plots - a series of new plotting functions for visualizing particle data. See here for more information. Late-stage beta support for Python 3 - unit tests and answer tests pass for all the major frontends under python 3.4, and yt should now be mostly if not fully usable. Because many of the yt developers are still on Python 2 at this point, this should be considered a “late stage beta” as there may be remaining issues yet to be identified or worked out. Now supporting Gadget Friend-of-Friends/Subfind catalogs - see here to learn how to load halo catalogs as regular yt datasets. Custom colormaps can now be easily defined and added - see here to learn how! Now supporting Fargo3D data Performance improvements throughout the code base for memory and speed
Minor enhancements
Various updates to the following frontends: ART, Athena, Castro, Chombo, Gadget, GDF, Maestro, Pluto, RAMSES, Rockstar, SDF, Tipsy Numerous documentation updates Generic hexahedral mesh pixelizer Adding annotate_ray() callback for plots AbsorptionSpectrum returned to full functionality and now using faster SciPy Voigt profile Add a color_field argument to annotate_streamline Smoothing lengths auto-calculated for Tipsy Datasets Adding SimulationTimeSeries support for Gadget and OWLS. Generalizing derived quantity outputs to all be YTArrays or lists of YTArrays as appropriate Star analysis returned to full functionality FITS image writing refactor Adding gradient fields on the fly Adding support for Gadget Nx4 metallicity fields Updating value of solar metal mass fraction to be consistent with Cloudy. Gadget raw binary snapshot handling & non-cosmological simulation units Adding support for LightRay class to work with Gadget+Tipsy Add support for subclasses of frontends Dependencies updated Serialization for projections using minimal representation Adding Grid visitors in Cython Improved semantics for derived field units Add a yaw() method for the PerspectiveCamera + switch back to LHS Adding annotate_clear() function to remove previous callbacks from a plot Added documentation for hexahedral mesh on website Speed up nearest neighbor evaluation Add a convenience method to create deposited particle fields UI and docs updates for 3D streamlines Ensure particle fields are tested in the field unit tests Allow a suffix to be specified to save() Add profiling using airspeed velocity Various plotting enhancements and bugfixes Use hglib to update Various minor updates to halo_analysis toolkit Docker-based tests for install_script.sh Adding support for single and non-cosmological datasets to LightRay Adding the Pascal unit Add weight_field to PPVCube FITS reader: allow HDU in auxiliary Fixing electromagnetic units Specific Angular Momentum [xyz] computed relative to a normal vector
Bugfixes
Adding ability to create union fields from alias fields Small fix to allow enzo AP datasets to load in parallel when no APs present Use proper cell dimension in gradient function. Minor memory optimization for smoothed particle fields Fix thermal_energy for Enzo HydroMethod==6 Make sure annotate_particles handles unitful widths properly Improvements for add_particle_filter and particle_filter Specify registry in off_axis_projection's image finalization Apply fix for particle momentum units to the boxlib frontend Avoid traceback in "yt version" when python-hglib is not installed Expose no_ghost from export_sketchfab down to _extract_isocontours_from_grid Fix broken magnetic_unit attribute Fixing an off-by-one error in the set x/y lim methods for profile plots Providing better error messages to PlotWindow callbacks Updating annotate_timestamp to avoid auto-override Updating callbacks to consistently define coordinate system Fixing species fields for OWLS and tipsy Fix extrapolation for vertex-centered data Fix periodicity check in FRBs Rewrote project_to_plane() in PerspectiveCamera for draw_domain() Fix intermittent failure in test_add_deposited_particle_field Improve minorticks for a symlog plot with one-sided data Fix smoothed covering grid cell computation Absorption spectrum generator now 3.0 compliant Fix off-by-one-or-more in particle smallest dx Fix dimensionality mismatch error in covering grid Fix curvature term in cosmology calculator Fix geographic axes and pixelization Ensure axes aspect ratios respect the user-selected plot aspect ratio Avoid clobbering field_map when calling profile.add_fields Fixing the arbitrary grid deposit code Fix spherical plotting centering Make the behavior of to_frb consistent with the docstring Ensure projected units are initialized when there are no chunks. Removing "field already exists" warnings from the Owls and Gadget frontends Various photon simulator bugs Fixed use of LaTeX math mode Fix upload_image Enforce plot width in CSS when displayed in a notebook Fix cStringIO.StringIO -> cStringIO in png_writer Add some input sanitizing and error checking to covering_grid initializer Fix for geographic plotting Use the correct filename template for single-file OWLS datasets. Fix Enzo IO performance for 32 bit datasets Adding a number density field for Enzo MultiSpecies=0 datasets. Fix RAMSES block ordering Fix ART star particle masses to correctly reflect current and initial mass Updating ragged array tests for NumPy 1.9.1 Force returning lists for HDF5FileHandler
Coming Soon!
The next major release of yt will be version 3.3, which is slated to include an overhaul of the volume rendering system and support for analyzing and visualizing unstructured mesh data.
Standard Installation Methods
As with previous releases, you can install yt from source using one of the following methods.
1) From the install script (http://yt-project.org/#getyt ):
Note, many of the dependencies have been updated since version 3.1. If you previously installed yt from the install script, it is advised that you re-install yt from scratch.
# Installation
$ wget http://bitbucket.org/yt_analysis/yt/raw/stable/doc/install_script.sh $ bash install_script.sh
# Update
$ yt update
2) From pip (source or binary wheel, see below for more details):
# Installation
$ pip install yt
# Update
$ pip install -U yt
3) From the Anaconda Python Distribution (https://store.continuum.io/cshop/anaconda/):
# Installation
$ conda install yt
# Update
$ conda update yt
Note that it might take a day or two for the conda package to be updated.
If you are on the “stable” branch, updating will bring you from yt 3.1 to 3.2, incorporating all changes since 3.1, whereas if you are on the “dev” or “yt” branch, only the changes since your last update should be incorporated.
Installing Binary Packages via pip
New to this release is the ability to install binary packages (“wheels”) using pip on Windows and Mac OS X (64-bit only for both). This has the advantage of not needing to install yt from source using a proper compiler setup, which has caused occasional problems on both of these platforms and prevented us from installing yt easily on other Python distributions.
We have so far been able to install and run the binary distribution via pip on the following platforms and Python stacks:
Note that it might take a day or two for the pip wheels to be updated.
Windows x86_64:
Enthought Canopy Python (https://www.enthought.com/products/canopy/) WinPython (http://winpython.sourceforge.net/)
Mac OS X x86_64:
Enthought Canopy Python (https://www.enthought.com/products/canopy/) Homebrew Python (http://brew.sh/) Python.org Python Mac OS X’s system Python MacPorts Python (https://www.macports.org/)
This is somewhat experimental, so other distributions may work (or not), please submit bug reports or successes to the mailing list or to the Bitbucket issues page (http://bitbucket.org/yt_analysis/yt/issues).
All distributions are recommended to be Python v. 2.7, although with yt 3.2 there is late-stage beta support for Python 3.4. The requirements for installing yt via this method are the same as from source:
NumPy h5py HDF5 SymPy Matplotlib IPython (not required, but strongly recommended)
To install a new version of yt on one of these platforms, simply do
$ pip install yt
and you should get the binary distribution automatically. Also, if your python installation is system-wide (e.g., the Mac system Python) you might need to run pip with administrator privileges.
For more information, including more installation instructions, links to community resources, and information on contributing to yt’s development, please see the yt homepage at http://yt-project.org and the documentation for yt-3.2 at http://yt-project.org/docs/3.2.
yt is the product of a large community of developers and users and we are extraordinarily grateful for and proud of their contributions. Please forward this announcement on to any interested parties.
As always, if you have any questions, concerns, or run into any trouble updating please don't hesitate to send a message to the mailing list or stop by our IRC channel.
All the best, The yt development team
participants (1)
-
Alexander Heger