Monthly Archives: March 2009

PyCon 2009 Prize Winners

Enthought had two prize drawings this year for people who visited our booth at PyCon in Chicago and dropped their contact information with us. There were two jars to drop your name in. One jar offered a free seat at one of our upcoming Python training classes which demonstrates the power of using Python for scientific and technical computing.

The other jar offered a lucky winner a one-year silver-level subscription to our enterprise-class Python distribution for a group of up to 10 people. This distribution allows the promise of write once, run everywhere to really work across your organization without the hassle of binary maintenance of all the packages needed for scientific computing with Python.

Yesterday at our all-hands meeting, Vibha Srinivasan (the lucky developer sitting near the front) drew the winners’ names out of the jars. And the winners are…drumroll please…

Eric Floehr of Intellovations, LLC is the official winner of the free Python training class. He may select a class of his choice offered between now and the end of March 2010. Eric is involved in weather prediction and forecasting and is looking forward to doing more with NumPy and SciPy. Check out his sites: http://www.forecastwatch.com and http://www.forecastadvisor.com

If you are interested in taking one of Enthought’s Python training classes, you can look at the upcoming schedule or contact us to have us come on-site and train your whole team.

Minah Worley from WorleyWorks is the fortunate winner of the silver-level subscription to EPD for her company. Up to 10 people at her workplace will be able to enjoy all the benefits of silver-level subscription for a year (i.e. access to all the platforms we support, phone installation support, and update repository access). Check out the WorleyWorks website to see some impressive modern media projects.

Find out more about supported, enterprise-class Python with enough power to solve your most pressing technical programming problems. If you are interested in getting Python (with an entire suite of extra tools) working across multiple platforms to save you time and let you focus on getting your job done, contact us.

Congratulations to our winners and thank you to all who visited us at the Enthought booth at PyCon 2009 in Chicago. We are looking forward to next year in Atlanta.

Warmly,

Enthought, Inc.
515 Congress Ave
Austin, TX 78701

ETS 3.2.0 Released!

I’m pleased to announce that Enthought Tool Suite (ETS) version 3.2.0 has been tagged and released!

Source distributions (.tar.gz) have been uploaded to PyPi, and Windows binaries will be follow shortly. A full install of ETS can be done using Setuptools via a command like:

easy_install -U "ets[nonets] >= 3.2.0"

NOTE 1: Users of an old ETS release will need to first uninstall prior to installing the new ETS.

NOTE 2: If you get a ‘SandboxViolation’ error, simply re-run the command again — it may take multiple invocations to get everything installed. (This error appears to be a long-standing incompatibility between numpy.distutils and setuptools.)

Please see below for a list of what’s new in this release.

What Is ETS?

The Enthought Tool Suite (ETS) is a collection of components developed by Enthought and the open-source community, which we use every day to construct custom scientific applications. It includes a wide variety of components, including:

  • an extensible application framework
  • application building blocks
  • 2-D and 3-D graphics libraries
  • scientific and math libraries
  • developer tools

The cornerstone on which these tools rest is the Traits package, which provides explicit type declarations in Python; its features include initialization, validation, delegation, notification, and visualization of typed attributes.

More information on ETS is available from the development home page:
http://code.enthought.com/projects/index.php

Changelog

ETS 3.2.0 is a feature-added update to ETS 3.1.0, including numerous
bug-fixes. Some of the notable changes include:

Chaco
* Domain limits – Mappers now can declare the “limits” of their valid domain. PanTool and ZoomTool respect these limits. (pwang)

* Adding “hide_grids” parameter to Plot.img_plot() and Plot.contour_plot() so users can override the default behavior of hiding grids. (pwang)

* Refactored examples to declare a Demo object so they can be be run with the demo.py example launcher. (vibha)

* Adding chaco.overlays package with some canned SVG overlays. (bhendrix)

* DragZoom now can scale both X and Y axes independently corresponding to the mouse cursor motion along the X and Y axes (similar to the zoom behavior in Matplotlib). (pwang)

* New Examples:
* world map (bhendrix)
* more financial plots (pwang)
* scatter_toggle (pwang)
* stacked_axis (pwang)

* Fixing the chaco.scales TimeFormatter to use the built-in localtime() instead of the one in the safetime.py module due to Daylight Savings Time issues with timedelta. (r23231, pwang)

* Improved behavior of ScatterPlot when it doesn’t get the type of metadata it expects in its “selections” and “selection_masks” metadata keys (r23121, pwang)

* Setting the .range2d attribute on GridMapper now properly sets the two DataRange1D instances of its sub-mappers. (r23119, pwang)

* ScatterPlot.map_index() now respects the index_only flag (r23060, pwang)

* Fixed occasional traceback/bug in LinePlot that occurred when data was completely outside the visible range (r23059, pwang)

* Implementing is_in() on legends to account for padding and alignment (caused by tools that move the legend) (r23052, bhendrix)

* Legend behaves properly when there are no plots to display (r23012, judah)

* Fixed LogScale in the chaco.scales package to correctly handle the case when the length of the interval is less than a decade (r22907, warren.weckesser)

* Fixed traceback when calling copy_traits() on a DataView (r22894, vibha)

* Scatter plots generated by Plot.plot() now properly use the “auto” coloring feature of Plot. (r22727, pwang)

* Reduced the size of screenshots in the user manual. (r22720, rkern)

Mayavi

* 17, 18 March, 2009 (PR):
* NEW: A simple example to show how one can use TVTKs visual module with mlab. [23250]
* BUG: The size trait was being overridden and was different from the parent causing a bug with resizing the viewer. [23243]

* 15 March, 2009 (GV):
* ENH: Add a volume factory to mlab that knows how to set color, vmin and vmax for the volume module [23221].

* 14 March, 2009 (PR):
* API/TEST: Added a new testing entry point: mayavi -t now runs tests in separate process, for isolation. Added enthought.mayavi.api.test to allow for simple testing from the interpreter [23195]…[23200], [23213], [23214], [23223].
* BUG: The volume module was directly importing the wx_gradient_editor leading to an import error when no wxPython is available. This has been tested and fixed. Thanks to Christoph Bohme for reporting this issue. [23191]

* 14 March, 2009 (GV):
* BUG: [mlab]: fix positioning for titles [23194], and opacity for titles and text [23193].
* ENH: Add the mlab_source attribute on all objects created by mlab, when possible [23201], [23209].
* ENH: Add a message to help the first-time user, using the new banner feature of the IPython shell view [23208].

* 13 March, 2009 (PR):
* NEW/API: Adding a powerful TCP/UDP server for scripting mayavi via the network. This is available in enthought.mayavi.tools.server and is fully documented. It uses twisted and currently only works with wxPython. It is completely insecure though since it allows a remote user to do practically anything from mayavi.

* 13 March, 2009 (GV)
* API: rename mlab.orientationaxes to mlab.orientation_axes [23184]

* 11 March, 2009 (GV)
* API: Expose traverse in mlab.pipeline [23181]

* 10 March, 2009 (PR)
* BUG: Fixed a subtle bug that affected the ImagePlaneWidget. This happened because the scalar_type of the output data from the VTKDataSource was not being set correctly. Getting the range of any input scalars also seems to silence warnings from VTK. This should hopefully fix issues with the use of the IPW with multiple scalars. Ive added two tests for this, one is an integration test since those errors really show up only when the display is used. The other is a traditional unittest. [23166]

* 08 March, 2009 (GV)
* ENH: Raises an error when the user passes to mlab an array with infinite values [23150]

* 07 March, 2009 (PR)
* BUG: A subtle bug with a really gross error in the GridPlane component, I was using the extents when I should really have been looking at the dimensions. The extract grid filter was also not flushing the data changes downstream leading to errors that are also fixed now. These errors would manifest when you use an ExtractGrid to select a VOI or a sample rate and then used a grid plane down stream causing very wierd and incorrect rendering of the grid plane (thanks to conflation of extents and dimensions). This bug was seen at NAL for a while and also reported by Fred with a nice CME. The CME was then converted to a nice unittest by Suyog and then improved. Thanks to them all. [23146]

* 28 February, 2009 (PR)
* BUG: Fixed some issues reported by Ondrej Certik regarding the use Of mlab.options.offscreen, mlab.options.backend = test, removed cruft from earlier null backend, fixed bug with incorrect imports, add_dataset set no longer adds one new null engine each time figure=False is passed, added test case for the options.backend test. [23088]

* 23 February, 2009 (PR)
* ENH: Updating show so that it supports a stop keyword argument that pops up a little UI that lets the user stop the mainloop temporarily and continue using Python [23049]

* 21 February, 2009 (GV)
* ENH: Add a richer view for the pipeline to the MayaviScene [23035]
* ENH: Add safegards to capture wrong triangle array sizes in mlab.triangular_mesh_source. [23037]

* 21 February, 2009 (PR)
* ENH: Making the transform data filter recordable. [23033]
* NEW: A simple animator class to make it relatively to create animations. [23036] [23039]

* 20 February, 2009 (PR)
* ENH: Added readers for various image file formats, poly data readers and unstructured grid readers. These include DICOM, GESigna, DEM, MetaImage (mha,mhd) MINC, AVSucd, GAMBIT, Exodus, STL, Points, Particle, PLY, PDB, SLC, OBJ, Facet and BYU files. Also added several tests for most of this functionality along with small data files. These are additions from PRs project staff, Suyog Jain and Sreekanth Ravindran. [23013]
* ENH: We now change the default so the ImagePlaneWidget does not control the LUT. Also made the IPW recordable. [23011]

* 18 February, 2009 (GV)
* ENH: Add a preference manager view for editing preferences outside envisage [22998]

* 08 February, 2009 (GV)
* ENH: Center the glyphs created by barchart on the data points, as mentioned by Rauli Ruohonen [22906]

* 29 January, 2009 (GV)
* ENH: Make it possible to avoid redraws with mlab by using mlab.gcf().scene.disable_render = True [22869]

* 28 January, 2009 (PR and GV)
* ENH: Make the mlab.pipeline.user_defined factory function usable to add arbitrary filters on the pipeline. [22867], [22865]

* 11 January, 2009 (GV)
* ENH: Make mlab.imshow use the ImageActor. Enhance the ImageActor to map scalars to colors when needed. [22816]

Traits

* Fixed a bug whereby faulty error handling in the PyProtocols Pyrex speedup code keeps references to tracebacks that have been handled. In so doing, clean up the same code such that it can be used with a modern Pyrex release (a bare raise can no longer be used outside of an except: clause).

* RangeEditor factory now supports a ‘logslider’ mode: Thanks to Matthew Turk for the patch

* TabularEditor factory now supports editing of all columns: Thanks to Didrik Pinte for the patch

* DateEditor factory in ‘custom’ style now supports multi-select feature.

* DateEditor and TimeEditor now support the ‘readonly’ style.

* Fixed a bug in the ArrayEditor factory that was causing multiple trait change events to get fired when the underlying array is changed externally to the editor: Thanks to Matthew Turk for he patch.

* Fixed a circular import error in Color, Font and RGBColor traits

* Fixed a bug in the factory for ArrayViewEditor so it now calls the toolkit backend-specific editor

TraitsBackendWX

* RangeEditor now supports a ‘logslider’ mode: Thanks to Matthew Turk for the patch

* TabularEditor now supports editing of all columns: Thanks to Didrik Pinte for the patch

* DateEditor in ‘custom’ style now supports multi-select feature.

* DateEditor and TimeEditor now support the ‘readonly’ style.

* Added a trait to the wx pyface workbench View to indicate if the view dock window should be closeable.

* Fixed the DirectoryEditor to popup the correct file dialog (thanks to Luca Fasano and Phil Thompson)

* Fixed a circular import error in Color, Font and RGBColor traits

* Fixed a bug in the ColorEditor that was causing the revert action to not work correctly.

* Fixed a bug that caused a traceback when trying to undock a pyface dock window

* Fixed a bug in the ‘livemodal’ view that caused the UI to become unresponsive if the ‘updated’ event was fired on the contained view.

* Fixed bugs in ListEditor (notebook style) that caused a loss of sync between the ‘selected’ trait and the activated dock window.

TraitsBackendQt
* RangeEditor now supports a ‘logslider’ mode: Thanks to Matthew Turk for the patch

* Fixed the DirectoryEditor to popup the correct file dialog (thanks to Luca Fasano and Phil Thompson)

Plotting and status indicators

A while ago I was working on an app, where I often got empty plots. It was completely valid for the plot to be empty, though often an empty plot was the result of an error in the code. Unfortunately, there was no easy way to indicate which condition was causing the empty plot without watching the console.

There were a couple of methods I could use:

  1. Show the log file in the UI
  2. Add a status indicator to the UI

There are a number of problems showing the log file: it takes up a lot of screen real estate, it is not obvious any particular log entry is the cause, and the log entry may require knowledge of the application internals to decipher.

So once I decided that I wanted a status indicator in the IU, the follow up question is, where? I started looking at some of the apps I use most frequently: how does Firefox indicate an error? It shows a little icon in the bottom right corner. I had never noticed it until I started looking for it, which makes it a bad example to me. In comparison, Google Chrome gives you a nice image and error message right where your eyes are focused (in the document pane). Right away the user knows there is an error.

I started thinking about how to display status indicators on Chaco plots. All of the framework was already in place, all that was needed was an Overlay class which could display an image. I decided to use SVG images rather than PNG’s so they can be scaled depending on the size of the plot, though I might be convinced to allow other image formats as well as text.

This screenshot is from the status_overlay.py example. The code (and images) should be considered a work in progress, though it is stable enough to begin using. For those that try it out, there is a nice fade effect too.


chaco erroroverlay