photutils icon indicating copy to clipboard operation
photutils copied to clipboard

Ellipse method with geometry argument just getting stuck and not loading all of a sudden in Jupyter notebook

Open shruti-ramaiya opened this issue 5 months ago • 4 comments

I am doing an analysis that involves using fitting elliptical isophotes around galaxy images for which I am using photutils

For a galaxy image, I first begin by using the Ellipse class, as the galaxy is centered in the image and this works as expected

The code for which is,

`ellipse = Ellipse(my_image)

isolist = ellipse.fit_image()

isolist.to_table() #displaying results using astropy table method `

Now, for most of my data, the galaxy is NOT centered in the image, so using the same galaxy image example, I do the same process but this time passing the geometry argument into the instance of the Ellipse class. For the geometry object I input the same centre coordinates and this was all working fine. Doing so gave me the exact same results as when I omitted the geometry argument, which is what was expected.

The code for which is,

`

geometry = EllipseGeometry(x0=150,y0=150,sma=0.,eps=0.,pa=0.)

ellipse = Ellipse(my_image,geometry=geometry)

isolist = ellipse.fit_image()

isolist.to_table() #displaying results using astropy table method `

For the last couple days this was working perfectly and running extremely quickly.

Now all of a sudden, the code block where I input the geometry object is just not loading in my jupyter notebook. It is getting stuck on the fit_image() portion of the code and just failing to load at all, its just getting stuck on *. I have changed nothing and I am not sure why all of a sudden this is happening. It loads very quick when I remove the geometry argument but it was running quick before even with this argument and nothing has changed

I thought perhaps a memory issue? Something due to me rerunning that code block multiple times but even after clearing jupyter notebook memory and trying again the same issue persists.

I am only confused as it was running very quick prior to this and then now won't load at all.

If anyone has any ideas or suggestions as to why this is happening I would be most grateful

shruti-ramaiya avatar Jan 17 '24 20:01 shruti-ramaiya