PetroFit / petrofit

Python package for calculating Petrosian properties and fitting galaxy light profiles
https://petrofit.readthedocs.io
28 stars 7 forks source link

Error if Convolution Window is Larger than the Image #170

Open robelgeda opened 1 year ago

robelgeda commented 1 year ago

If convolution window is larger than the image, there is an error about broadcasting arrays of different sizes. The two options to fixing this is are:

  1. Raise an exception when the model is declared. This is probably not good because the model can be fit to multiple image data with different sizes.
  2. Crop the window to fit image space.

It seems like option 2 is the option that makes the most sense.

Bhavesh012 commented 1 year ago

I passed this error by keeping the size as an odd no. while making the cutouts. And my psf image size is also in odd no.s.