Sandro Tosi, on 2011-01-18 19:29,  wrote:
> Hi,
> 
> On Tue, Jan 18, 2011 at 15:00, Michael Droettboom <md...@stsci.edu> wrote:
> > I'm not sure PIL enters into it -- there shouldn't be any code path
> > involving PIL in that case.
> >
> > I think this a case where the image comparison tolerance needs to be
> > increased.  You would do this be passing a "tol" parameter to the
> > image_comparison decorator on the pcolormesh test.  The default is 1e-3,
> > but it should be conservatively increased until the test passes.  You
> > can perform this experiment yourself, or attach the result image for the
> > test to this list and I can experiment to find a correct value.
> 
> I'm attaching the images, just for reference; as you can see, the
> difference is very tiny and with a tolerance of 0.02 I was able to
> pass the test (RMS Value: 0.0116511801977).

I just wanted to chime in that there *is* structure in the
differences between the images - which don't show up on screens
which don't have linearized gamma (the difference between 0 and 1
are much smaller in brightness than the difference between 127
and 128, for example).

A quick way to get around this is to just invert the colors.

in X11, I do this with 'xcalib -a -i' which toggles back to
normal if you run the command twice (Compiz also has it's own
version of this via some keyboard shortcut, IIRC, but I don't use
it). ImageMagick's convert can do this with the -negate flag. On
OS X, there's something like command-F8 to do this.  

For completeness, if you're interested in doing this in
matplotlib, ;) just subtract your (floating point 0.0-1.0) color
from (1.,1.,1.) to get the new color.

I'm attaching the difference image, with its colors inverted.

best,
-- 
Paul Ivanov
314 address only used for lists,  off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 

<<attachment: failed-diff-expected-pcolormesh-inverted.png>>

Attachment: signature.asc
Description: Digital signature

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to