SAGES-UCSC / Photometry

Photometry pipeline for SAGES
MIT License
3 stars 4 forks source link

Error handling #11

Open AlexaVillaume opened 10 years ago

AlexaVillaume commented 10 years ago

Basically none of the code thus far has any error handling, I'd like to make more checks on reasonable input, add informative error messages, and bail out of the program in clean manner.

vincepota-zz commented 10 years ago

Hi Alexa. I ran getPhotometry.py . It ran for about 10 minutes. Then it crashed here:

Traceback (most recent call last):
  File "getPhotometry.py", line 79, in <module>
    sys.exit(main())
  File "getPhotometry.py", line 60, in main
    ap = findBestAperture.findBestAperture(img, satur, seeing)
  File "/home/vincenzo/Science/Phot/findBestAperture.py", line 68, in findBestAperture
    ssources = q.Quadtree(0, 0, 12000, 10000, coord='pix')
TypeError: __init__() got an unexpected keyword argument 'coord'
AlexaVillaume commented 10 years ago

Hi Vince -

That's because you're using an old findBestAperture.py, I had to change some function calls when I updated the way the Quadtree works.

You need to pull findBestAperture.py again and then rerun

vincepota-zz commented 10 years ago

Ok. So I re-downloaded the whole repository. This is where it stops.

Traceback (most recent call last):
  File "getPhotometry.py", line 79, in <module>
    sys.exit(main())
  File "getPhotometry.py", line 60, in main
    ap = findBestAperture.findBestAperture(img, satur, seeing)
  File "/home/vincenzo/Science/Photometry/findBestAperture.py", line 78, in findBestAperture
    flux = map(lambda f: f.flux_aper, bkgddetections)
  File "/home/vincenzo/Science/Photometry/findBestAperture.py", line 78, in <lambda>
    flux = map(lambda f: f.flux_aper, bkgddetections)
AttributeError: SCAMSource instance has no attribute 'flux_aper'

Also, am I using the right section of the wiki for these errors?

AlexaVillaume commented 10 years ago

Okay, this is my bad now, I had forgotten to updated Sources.py in the repo. I fixed that and just pushed everything I have just to make sure it's all up-to-date.

AlexaVillaume commented 10 years ago

Also, no, this isn't the right way to report bugs. Just open a new issue for every problem you have.