ValueError: too many values to unpack (expected 2)
Closed this issue · 2 comments
T0T4R4 commented
Just tested your example script and got the following error :
Traceback (most recent call last):
File ".\test.py", line 13, in <module>
ntiles=32)
File "C:\Users\totara\AppData\Local\Programs\Python\Python37-32\lib\site-packages\donuts\donuts.py", line 72, in __init__
self.reference_image = self.construct_object(self.refimage_filename)
File "C:\Users\totara\AppData\Local\Programs\Python\Python37-32\lib\site-packages\donuts\donuts.py", line 102, in construct_object
border=self.border
File "C:\Users\totara\AppData\Local\Programs\Python\Python37-32\lib\site-packages\donuts\image.py", line 120, in trim
dy, dx = image_section.shape
ValueError: too many values to unpack (expected 2)
Not too sure where it comes from, but the image_section.shape value for this image is :
(3, 579, 765)
T0T4R4 commented
I re-exported the fits in grayscale. Problem gone.
jmccormac01 commented
Thanks for reporting this issue. I assume you were analysing a coloured image (Bayer filter or similar)? This is something I overlooked initially with donuts as all the astronomical test data I used was 'black and white'.
I should add a check for this. I'll reopen a new issue to prompt this.