Project

General

Profile

Actions

Bug #7942

open

local GCTF fails with a matplotlib error

Added by Scott Stagg over 5 years ago. Updated over 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
08/15/2019
Due date:
% Done:

0%

Estimated time:
Affected Version:
Appion/Leginon 3.4
Show in known bugs:
No
Workaround:

Description

I think this is a matplotlib version

 ... writing JPEG: 19may24g_b_032gr_08sq_010hl_04ex-a-pow.jpg
/gpfs/research/stagg/software/myami_pythonconda/lib/python2.7/site-packages/numpy/ma/core.py:6461: MaskedArrayFutureWarning: In the future the default for ma.maximum.reduce will be axis=0, not the current None, to match np.maximum.reduce. Explicitly pass 0 or None to silence this warning.
  return self.reduce(a)
/gpfs/research/stagg/software/myami_pythonconda/lib/python2.7/site-packages/numpy/ma/core.py:6461: MaskedArrayFutureWarning: In the future the default for ma.minimum.reduce will be axis=0, not the current None, to match np.minimum.reduce. Explicitly pass 0 or None to silence this warning.
  return self.reduce(a)
/gpfs/research/stagg/software/myami_pythonconda/lib/python2.7/site-packages/matplotlib/collections.py:608: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if self._edgecolors_original != 'face':
Traceback (most recent call last):
  File "/gpfs/research/stagg/software/myamidev/appion/bin/gctf.py", line 707, in <module>
    imgLoop.run()
  File "/gpfs/research/stagg/software/myamidev/appion/appionlib/appionLoop2.py", line 89, in run
    results = self.loopProcessImage(imgdata)
  File "/gpfs/research/stagg/software/myamidev/appion/appionlib/appionLoop2.py", line 147, in loopProcessImage
    return self.processImage(imgdata)
  File "/gpfs/research/stagg/software/myamidev/appion/bin/gctf.py", line 452, in processImage
    self.generateLocalCTFmap(apDisplay.short(imgdata['filename']),dimx,dimy)
  File "/gpfs/research/stagg/software/myamidev/appion/bin/gctf.py", line 468, in generateLocalCTFmap
    self.plotGridContour(map_array,fbase)
  File "/gpfs/research/stagg/software/myamidev/appion/bin/gctf.py", line 581, in plotGridContour
    plt.clabel(CS, fontsize=9, inline=1)
  File "/gpfs/research/stagg/software/myami_pythonconda/lib/python2.7/site-packages/matplotlib/pyplot.py", line 2614, in clabel
    ret = ax.clabel(CS, *args, **kwargs)
  File "/gpfs/research/stagg/software/myami_pythonconda/lib/python2.7/site-packages/matplotlib/axes.py", line 7987, in clabel
    return CS.clabel(*args, **kwargs)
  File "/gpfs/research/stagg/software/myami_pythonconda/lib/python2.7/site-packages/matplotlib/contour.py", line 220, in clabel
    self.labels(inline, inline_spacing)
  File "/gpfs/research/stagg/software/myami_pythonconda/lib/python2.7/site-packages/matplotlib/contour.py", line 668, in labels
    inline_spacing)
  File "/gpfs/research/stagg/software/myami_pythonconda/lib/python2.7/site-packages/matplotlib/contour.py", line 483, in calc_label_rot_and_inline
    nlc.append(np.r_[lc[:I[0] + 1], xy1])
TypeError: slice indices must be integers or None or have an __index__ method

I think this is a problem with the matplotlib version. I'm on:

import numpy
numpy.__version__

'1.16.4'

import matplotlib
matplotlib.__version__

'1.3.1'

Actions #1

Updated by Anchi Cheng over 5 years ago

A test script is written to test this.

Works on numpy 1.7.1 and matplotlib 1.2.1

Actions #2

Updated by Scott Stagg over 5 years ago

Works now. Here is a dump of my python packages:

 [sstagg@hpc-login-vm3 test]$ conda list
# packages in environment at /gpfs/research/stagg/software/myami_pythonconda2:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
asn1crypto                0.24.0                   py27_0  
backports                 1.0                        py_2  
backports.functools_lru_cache 1.5                        py_2  
backports_abc             0.5                      py27_0  
blas                      1.0                         mkl  
bzip2                     1.0.8                h7b6447c_0  
ca-certificates           2019.5.15                     1  
certifi                   2019.6.16                py27_1  
cffi                      1.12.3           py27h2e261b9_0  
chardet                   3.0.4                    py27_1  
conda                     4.7.11                   py27_0  
conda-package-handling    1.3.11                   py27_0  
cryptography              2.7              py27h1ba5d50_0  
cycler                    0.10.0                   py27_0  
dbus                      1.13.6               h746ee38_0  
enum34                    1.1.6                    py27_1  
expat                     2.2.6                he6710b0_0  
fontconfig                2.13.0               h9420a91_0  
freetype                  2.9.1                h8a8886c_1  
functools32               3.2.3.2                  py27_1  
futures                   3.3.0                    py27_0  
glib                      2.56.2               hd408876_0  
gst-plugins-base          1.14.0               hbbd80ab_1  
gstreamer                 1.14.0               hb453b48_1  
icu                       58.2                 h9c2bf20_1  
idna                      2.8                      py27_0  
intel-openmp              2019.4                      243  
ipaddress                 1.0.22                   py27_0  
joblib                    0.13.2                   py27_0  
jpeg                      9b                   h024ee3a_2  
kiwisolver                1.1.0            py27he6710b0_0  
libarchive                3.3.3                h5d8350f_5  
libedit                   3.1.20181209         hc058e9b_0  
libffi                    3.2.1                hd88cf55_4  
libgcc-ng                 9.1.0                hdf63c60_0  
libgfortran-ng            7.3.0                hdf63c60_0  
libpng                    1.6.37               hbc83047_0  
libstdcxx-ng              9.1.0                hdf63c60_0  
libtiff                   4.0.10               h2733197_2  
libuuid                   1.0.3                h1bed415_2  
libxcb                    1.13                 h1bed415_1  
libxml2                   2.9.9                hea5a465_1  
lz4-c                     1.8.1.2              h14c3975_0  
lzo                       2.10                 h49e0be7_2  
matplotlib                2.2.3            py27hb69df0a_0  
mkl                       2019.4                      243  
mkl_fft                   1.0.12           py27ha843d7b_0  
mkl_random                1.0.2            py27hd81dba3_0  
mysql-connector-c         6.1.11               h597af5e_0  
mysql-python              1.2.5            py27h7b6447c_0  
ncurses                   6.1                  he6710b0_1  
numpy                     1.16.4           py27h7e9f1db_0  
numpy-base                1.16.4           py27hde5b4d6_0  
olefile                   0.46                     py27_0  
openssl                   1.1.1c               h7b6447c_1  
pandas                    0.24.2           py27he6710b0_0  
pcre                      8.43                 he6710b0_0  
pillow                    6.1.0            py27h34e0f95_0  
pip                       19.1.1                   py27_0  
pycosat                   0.6.3            py27h14c3975_0  
pycparser                 2.19                     py27_0  
pyopenssl                 19.0.0                   py27_0  
pyparsing                 2.4.0                      py_0  
pyqt                      5.9.2            py27h05f1152_2  
pysocks                   1.7.0                    py27_0  
python                    2.7.16               h9bab390_0  
python-dateutil           2.8.0                    py27_0  
python-libarchive-c       2.8                     py27_11  
pytz                      2019.1                     py_0  
qt                        5.9.7                h5867ecd_1  
readline                  7.0                  h7b6447c_5  
requests                  2.22.0                   py27_0  
ruamel_yaml               0.15.46          py27h14c3975_0  
scipy                     1.2.1            py27h7c811a0_0  
setuptools                41.0.1                   py27_0  
singledispatch            3.4.0.3                  py27_0  
sip                       4.19.8           py27hf484d3e_0  
six                       1.12.0                   py27_0  
sqlite                    3.29.0               h7b6447c_0  
subprocess32              3.5.4            py27h7b6447c_0  
tk                        8.6.8                hbc83047_0  
tornado                   5.1.1            py27h7b6447c_0  
tqdm                      4.32.1                     py_0  
urllib3                   1.24.2                   py27_0  
wheel                     0.33.4                   py27_0  
xz                        5.2.4                h14c3975_4  
yaml                      0.1.7                had09818_2  
zlib                      1.2.11               h7b6447c_3  
zstd                      1.3.7                h0b5b093_0  

Actions

Also available in: Atom PDF