PaulHancock / Aegean

The Aegean source finding program and associated tools
http://aegeantools.rtfd.io/
Other
47 stars 14 forks source link

AeRes: Using option --frac causes a crash #127

Closed PaulHancock closed 4 years ago

PaulHancock commented 4 years ago

Using AeRes with the option --frac=0.1 causes a crash, for any value of frac that is given.

Example failure output:

$> AeRes -c dlme_comp.vot -f tests/test_files/1904-66_SIN.fits -r masked.fits --mask --frac 0.1
9685:INFO This is AeRes v0.2.5-(2017-05-12)
9685:INFO Using tests/test_files/1904-66_SIN.fits and dlme_comp.vot to make masked.fits
9685:INFO Reading file dlme_comp.vot
9685:INFO read 47 sources from dlme_comp.vot
WARNING: FITSFixedWarning: 'datfix' made the change 'Set DATE-REF to '1858-11-17' from MJD-REF'. [astropy.wcs.wcs]
9685:WARNING FITSFixedWarning: 'datfix' made the change 'Set DATE-REF to '1858-11-17' from MJD-REF'.
Traceback (most recent call last):
  File "/home/paulhancock/py3-aegean/bin/AeRes", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "/home/paulhancock/Aegean-master/scripts/AeRes", line 67, in <module>
    mfile=options.mfile, add=options.add, mask=options.mask, frac=options.frac, sigma=options.sigma)
  File "/home/paulhancock/Aegean-master/AegeanTools/AeRes.py", line 130, in make_residual
    model = make_model(source_list, data.shape, wcshelper, mask, frac, sigma)
  File "/home/paulhancock/Aegean-master/AegeanTools/AeRes.py", line 98, in make_model
    indices = np.where(model >= (frac*src.peak_flux))
TypeError: can't multiply sequence by non-int of type 'numpy.float64'
PaulHancock commented 4 years ago

Fixed as of 3c5f168