Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requirements of Monitor #43

Open
rbiswas4 opened this issue Jul 12, 2016 · 2 comments
Open

Requirements of Monitor #43

rbiswas4 opened this issue Jul 12, 2016 · 2 comments

Comments

@rbiswas4
Copy link
Member

rbiswas4 commented Jul 12, 2016

I got a crash of desc.monitor.render_fits_images due to the lack of WCSAxes.

render_fits_image(test_open[1], title='post.fits')

The error message was clear about what needed to be done to fix this and is good enough for interactive use. But would it be good to add this in some kind of optional requirements document (This is actually invoked by astropy, so it must be an optional requirement of astropy)?
The error message I received was:

ImportError                               Traceback (most recent call last)
<ipython-input-100-b2932ff943e5> in <module>()
----> 1 render_fits_image(test_open[1], title='post.fits')

/Users/rbiswas/doc/projects/DESC/Monitor/python/desc/monitor/Display.pyc in render_fits_image(hdu, cmap, stretch, xlabel, ylabel, title, subplot, fig, norm)
     37     if fig is None:
     38         fig = plt.figure()
---> 39     axes = fig.add_subplot(subplot, projection=wcs)
     40 
     41     im = plt.imshow(hdu.data, norm=norm, cmap=cmap, origin='lower',

/usr/local/software/lib/python2.7/site-packages/matplotlib/figure.pyc in add_subplot(self, *args, **kwargs)
    985         else:
    986             projection_class, kwargs, key = process_projection_requirements(
--> 987                 self, *args, **kwargs)
    988 
    989             # try to find the axes with this key in the stack

/usr/local/software/lib/python2.7/site-packages/matplotlib/projections/__init__.pyc in process_projection_requirements(figure, *args, **kwargs)
     98         projection_class = get_projection_class(projection)
     99     elif hasattr(projection, '_as_mpl_axes'):
--> 100         projection_class, extra_kwargs = projection._as_mpl_axes()
    101         kwargs.update(**extra_kwargs)
    102     else:

/usr/local/software/lib/python2.7/site-packages/astropy/wcs/wcs.pyc in _as_mpl_axes(self)
   3045             from wcsaxes import WCSAxes
   3046         except ImportError:
-> 3047             raise ImportError("Using WCS instances as Matplotlib projections "
   3048                               "requires the WCSAxes package to be installed. "
   3049                               "See http://wcsaxes.readthedocs.io for more "

ImportError: Using WCS instances as Matplotlib projections requires the WCSAxes package to be installed. See http://wcsaxes.readthedocs.io for more details.
@jchiang87
Copy link
Contributor

jchiang87 commented Jul 12, 2016

Yes, we should have a requirements.txt file so that any additional dependencies can be easily installed. In addition to wcsaxes, it would be good to have iminuit for fitting with sncosmo.

@rbiswas4
Copy link
Member Author

Yes. That is a good one too. Maybe more SNCosmo dependencies as we explore more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants