Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. import matplotlib.pyplot as plt
  2. import aplpy
  3. import numpy as np
  4.  
  5. fig = aplpy.FITSFigure('test.fits')
  6. fig.show_grayscale()
  7.  
  8. a=np.ndarray(shape=(2,2))
  9. a[0][0]=200
  10. a[0][1]=250
  11. a[1][0]=300
  12. a[1][1]=400
  13.  
  14. fig.show_lines(a)
  15.  
  16. plt.show()
  17.  
  18. Traceback (most recent call last):
  19. File "draw.py", line 16, in <module>
  20. fig.show_lines(a)
  21. File "<string>", line 2, in show_lines
  22. File "/home/swapnil/anaconda/lib/python2.7/site-packages/aplpy/decorators.py", line 25, in _auto_refresh
  23. return f(*args, **kwargs)
  24. File "/home/swapnil/anaconda/lib/python2.7/site-packages/aplpy/aplpy.py", line 1275, in show_lines
  25. xp, yp = wcs_util.world2pix(self._wcs, line[0, :], line[1, :])
  26. IndexError: too many indices
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement