planetarypy / pdsview

Python PDS Image Viewer
BSD 3-Clause "New" or "Revised" License
13 stars 7 forks source link

What version of Ginga does this work with? #33

Closed godber closed 7 years ago

godber commented 7 years ago

@pbvarga1 I was trying to use this today and was delighted to see it install easily and the window pop up with little fuss on Ubuntu 16.04. However it explodes when trying to open an image with the current ginga. Maybe that's not the issue, but it's a place to start.

Traceback (most recent call last):
  File "/home/godber/.virtualenvs/newpdsview/local/lib/python2.7/site-packages/pdsview/pdsview.py", line 927, in open_file
    self.display_image()
  File "/home/godber/.virtualenvs/newpdsview/local/lib/python2.7/site-packages/pdsview/pdsview.py", line 990, in display_image
    self.restore()
  File "/home/godber/.virtualenvs/newpdsview/local/lib/python2.7/site-packages/pdsview/pdsview.py", line 1082, in restore
    self.pds_view.auto_levels()
  File "/home/godber/.virtualenvs/newpdsview/local/lib/python2.7/site-packages/ginga/ImageView.py", line 2334, in auto_levels
    loval, hival = autocuts.calc_cut_levels(image)
  File "/home/godber/.virtualenvs/newpdsview/local/lib/python2.7/site-packages/ginga/AutoCuts.py", line 402, in calc_cut_levels
    num_points=self.num_points)
  File "/home/godber/.virtualenvs/newpdsview/local/lib/python2.7/site-packages/ginga/AutoCuts.py", line 421, in calc_zscale
    loval, hival = zscale.zscale_samples(samples, contrast=contrast)
  File "/home/godber/.virtualenvs/newpdsview/local/lib/python2.7/site-packages/ginga/util/zscale.py", line 76, in zscale_samples
    zmin = samples[0]
IndexError: index 0 is out of bounds for axis 0 with size 0

Exactly what version of ginga are you using?

Though I suspect that's not the issue.

No rush either.

percurnicus commented 7 years ago

From the setup.py I believe I was using version 2.5 but I will have to double check.

godber commented 7 years ago

Yeah, setup.py says >=2.5 but the version numbers are like: ginga==2.5.20150904004510, many of which satisfy the requirement.

percurnicus commented 7 years ago

ginga==2.5.20160222004742

Here is my full environment:

alabaster==0.7.6
astropy==1.0.3
Babel==2.1.1
backports.ssl-match-hostname==3.4.0.2
certifi==2015.4.28
docutils==0.12
flake8==2.4.1
functools32==3.2.3.post2
ginga==2.5.20160222004742
gnureadline==6.3.3
ipython==3.2.1
Jinja2==2.8
jsonschema==2.5.1
MarkupSafe==0.23
mccabe==0.3.1
mistune==0.7
numpy==1.9.2
-e git+git@github.com:pbvarga1/pdsview.git@e1780d9b14574a1fcb637521328b130c218d1ef9#egg=pdsview
pep8==1.5.7
planetary-test-data==0.3.3
planetaryimage==0.2.0
pluggy==0.3.0
ptyprocess==0.5
pvl==0.1.1
py==1.4.30
pyflakes==0.8.1
Pygments==2.0.2
PySide==1.2.2
-e git+https://github.com/pbvarga1/pystamps.git@8b3b8d1835c551159a144449addc146bef2b0178#egg=pystamps
pytest==2.7.2
pytest-qt==1.5.0
pytz==2015.4
pyzmq==14.7.0
six==1.9.0
snowballstemmer==1.2.0
Sphinx==1.3.1
sphinx-rtd-theme==0.1.9
terminado==0.5
tornado==4.2.1
tox==2.1.1
virtualenv==13.1.0
wheel==0.23.0
percurnicus commented 7 years ago

I think I should specify this version in setup.py rather than ginga>= 2.5, agree?