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

get_spec_from_ellipse_params crashing. #72

Open
TrystanScottLambert opened this issue May 3, 2023 · 1 comment
Open

get_spec_from_ellipse_params crashing. #72

TrystanScottLambert opened this issue May 3, 2023 · 1 comment

Comments

@TrystanScottLambert
Copy link

Hi. sorry to add another issue but we seem to have a problem with get_spec_from_ellipse_params not working. When we run it we get a IndexError in the draw_pyregion function.

I think that is because eventually the function:

draw_pyregion()

is called.

Where the function is defined you have

   fig = plt.figure(self.n)
   ax = fig.axes[0]

In lines 647 and 648. fig.axes[0] is always going to result in an IndexError in this case because fig.axes is empty. Am I missing something?

Thanks.

-TSL

@ismaelpessa
Copy link
Owner

When you load the cube, PyMUSE open an figure that shows the white image. Do not close that figure when you extract an spectrum. The error seems to occur because PyMUSE wants to draw the aperture in that figure, but the figure is close, so there are no axes. You can also reopen it using cube.reload_canvas()

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