{"action":"created","issue":{"url":"https://api.github.com/repos/PaulHancock/Aegean/issues/21","labels_url":"https://api.github.com/repos/PaulHancock/Aegean/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/PaulHancock/Aegean/issues/21/comments","events_url":"https://api.github.com/repos/PaulHancock/Aegean/issues/21/events","html_url":"https://github.com/PaulHancock/Aegean/issues/21","id":111559860,"number":21,"title":"AttributeError when running aegean.py and select.poll() in BANE.py","user":{"login":"Sharkkie","id":15028936,"avatar_url":"https://avatars.githubusercontent.com/u/15028936?v=3","gravatar_id":"","url":"https://api.github.com/users/Sharkkie","html_url":"https://github.com/Sharkkie","followers_url":"https://api.github.com/users/Sharkkie/followers","following_url":"https://api.github.com/users/Sharkkie/following{/other_user}","gists_url":"https://api.github.com/users/Sharkkie/gists{/gist_id}","starred_url":"https://api.github.com/users/Sharkkie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sharkkie/subscriptions","organizations_url":"https://api.github.com/users/Sharkkie/orgs","repos_url":"https://api.github.com/users/Sharkkie/repos","events_url":"https://api.github.com/users/Sharkkie/events{/privacy}","received_events_url":"https://api.github.com/users/Sharkkie/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PaulHancock/Aegean/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"PaulHancock","id":8219382,"avatar_url":"https://avatars.githubusercontent.com/u/8219382?v=3","gravatar_id":"","url":"https://api.github.com/users/PaulHancock","html_url":"https://github.com/PaulHancock","followers_url":"https://api.github.com/users/PaulHancock/followers","following_url":"https://api.github.com/users/PaulHancock/following{/other_user}","gists_url":"https://api.github.com/users/PaulHancock/gists{/gist_id}","starred_url":"https://api.github.com/users/PaulHancock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaulHancock/subscriptions","organizations_url":"https://api.github.com/users/PaulHancock/orgs","repos_url":"https://api.github.com/users/PaulHancock/repos","events_url":"https://api.github.com/users/PaulHancock/events{/privacy}","received_events_url":"https://api.github.com/users/PaulHancock/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-10-15T07:26:26Z","updated_at":"2015-10-15T08:48:14Z","closed_at":null,"body":"Hi, I've been trying aegean.py according to the wiki.\r\nHowever it always return error as follows:\r\n\r\n>python aegean.py Test/Images/1904-66_SIN.fits\r\naegean:INFO This is Aegean v1.9.6-127-g088562b-(2015-10-02)\r\naegean:INFO Found 4 cores\r\naegean:WARNING Your O/S doesn't support select.poll(): Reverting to cores=1\r\naegean:INFO Using 1 cores\r\naegean:INFO Finding sources.\r\naegean:INFO Calculating curvature csigma\r\naegean:INFO Calculating background and rms data\r\naegean:INFO beam = 864.00'' x 864.00'' at  0.00deg\r\naegean:INFO seedclip=5\r\naegean:INFO floodclip=4\r\n#Aegean version v1.9.6-127-g088562b-(2015-10-02)\r\n#on dataset: Test/Images/1904-66_SIN.fits\r\n#isl,src   bkg       rms         RA           DEC         RA         err         DEC        err         Peak      err     S_int     err        a    err    b    err     pa   err   flags\r\n#Jy/beam   Jy/beam                               deg        deg         deg        deg       Jy/beam   Jy/beam    Jy       Jy         ''    ''    ''    ''    deg   deg   WNCPES\r\n#===========================================================================================================================================================================================\r\nTraceback (most recent call last):\r\n  File \"aegean.py\", line 2270, in <module>\r\n    mask=options.region, lat=lat, imgpsf=options.imgpsf)\r\n  File \"aegean.py\", line 1501, in find_sources_in_image\r\n    res = fit_island(island_data)\r\n  File \"aegean.py\", line 1373, in fit_island\r\n    result, model = do_lmfit(idata, params, B=B)\r\n  File \"/Users/yw_astro/Software/Astro_Soft/Aegean-master/AegeanTools/fitting.py\", line 383, in do_lmfit\r\n    result = lmfit.minimize(residual, params, kws={'x':mask[0],'y':mask[1],'B':B,'errs':errs}, Dfun = jacobian)\r\n  File \"/Library/Python/2.7/site-packages/lmfit/minimizer.py\", line 773, in minimize\r\n    return fitter.minimize(method=method)\r\n  File \"/Library/Python/2.7/site-packages/lmfit/minimizer.py\", line 705, in minimize\r\n    return function(**kwargs)\r\n  File \"/Library/Python/2.7/site-packages/lmfit/minimizer.py\", line 546, in leastsq\r\n    lsout = scipy_leastsq(self.__residual, vars, **lskws)\r\n  File \"/Library/Python/2.7/site-packages/scipy/optimize/minpack.py\", line 371, in leastsq\r\n    shape, dtype = _check_func('leastsq', 'func', func, x0, args, n)\r\n  File \"/Library/Python/2.7/site-packages/scipy/optimize/minpack.py\", line 20, in _check_func\r\n    res = atleast_1d(thefunc(*((x0[:numinputs],) + args)))\r\n  File \"/Library/Python/2.7/site-packages/lmfit/minimizer.py\", line 257, in __residual\r\n    out = self.userfcn(params, *self.userargs, **self.userkws)\r\n  File \"/Users/yw_astro/Software/Astro_Soft/Aegean-master/AegeanTools/fitting.py\", line 376, in residual\r\n    model = f(*mask)  # The actual model\r\n  File \"/Users/yw_astro/Software/Astro_Soft/Aegean-master/AegeanTools/fitting.py\", line 343, in rfunc\r\n    for i in range(params.components):\r\nAttributeError: 'Parameters' object has no attribute 'components'\r\n\r\nI'm not sure whether it's a problem of lmfit, but I've already tried to reinstall it both from the source code or by pip for many times...\r\nAnother problem is that the select.poll() in BANE.py seems to be failed on my mac( osx 10.11), is this a general problem for python on Mac or sth. wrong with mine?\r\n\r\nThank you."},"comment":{"url":"https://api.github.com/repos/PaulHancock/Aegean/issues/comments/148321072","html_url":"https://github.com/PaulHancock/Aegean/issues/21#issuecomment-148321072","issue_url":"https://api.github.com/repos/PaulHancock/Aegean/issues/21","id":148321072,"user":{"login":"PaulHancock","id":8219382,"avatar_url":"https://avatars.githubusercontent.com/u/8219382?v=3","gravatar_id":"","url":"https://api.github.com/users/PaulHancock","html_url":"https://github.com/PaulHancock","followers_url":"https://api.github.com/users/PaulHancock/followers","following_url":"https://api.github.com/users/PaulHancock/following{/other_user}","gists_url":"https://api.github.com/users/PaulHancock/gists{/gist_id}","starred_url":"https://api.github.com/users/PaulHancock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaulHancock/subscriptions","organizations_url":"https://api.github.com/users/PaulHancock/orgs","repos_url":"https://api.github.com/users/PaulHancock/repos","events_url":"https://api.github.com/users/PaulHancock/events{/privacy}","received_events_url":"https://api.github.com/users/PaulHancock/received_events","type":"User","site_admin":false},"created_at":"2015-10-15T08:48:14Z","updated_at":"2015-10-15T08:48:14Z","body":"Sharkkie,\r\n\r\nThe AttributeError that you encounter is likely due to your version of lmfit (see issue #19). The issue is resolved in the dev branch of Aegean v1.9.6-107-geb1c4e6-(2015-10-06), and will be pushed to the master branch soon.\r\n\r\nThe problem with select.poll() is likely an OSX problem, however I have tried to catch the error and work around it when it occurs. If BANE is crashing on you then I have some more work to do. If you could include a trace of the BANE error then I can track down the problem and get a fix on the way.\r\n\r\nPaul."}}