This is for older versions of astropy. For astropy<=3, we have the code and error:
>>> from spalipy import spalipy
>>> s= spalipy.Spalipy("r0204859_UT4-median.cat", "r0204805_UT4-median.cat", "r0204859_UT4-median.fits", output_filename='r0204859_UT4-median-aligned.fits')
>>> s.main()
Matched 8429 detections within 5 pixels with affine transformation
Affine alignment pixel residuals [median (stddev)]: x = 0.047 (0.402), y = -0.035 (0.461)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/dist-packages/spalipy/spalipy.py", line 180, in main
self.align()
File "/usr/local/lib/python3.5/dist-packages/spalipy/spalipy.py", line 394, in align
self.source_fits.writeto(output_filename,
AttributeError: 'list' object has no attribute 'writeto'
where r0204859_UT4-median.fits should be read in as an HDUList but is read in instead as a "regular" list.
I think a simple fix would be to add the lines
if type(self.source_fits) is list:
self.source_fits = fits.HDUList(self.source_fits)
This is for older versions of astropy. For astropy<=3, we have the code and error:
where
r0204859_UT4-median.fits
should be read in as an HDUList but is read in instead as a "regular" list.I think a simple fix would be to add the lines
at 393 prior to