{"action":"created","issue":{"url":"https://api.github.com/repos/astropy/photutils/issues/558","repository_url":"https://api.github.com/repos/astropy/photutils","labels_url":"https://api.github.com/repos/astropy/photutils/issues/558/labels{/name}","comments_url":"https://api.github.com/repos/astropy/photutils/issues/558/comments","events_url":"https://api.github.com/repos/astropy/photutils/issues/558/events","html_url":"https://github.com/astropy/photutils/issues/558","id":240761898,"node_id":"MDU6SXNzdWUyNDA3NjE4OTg=","number":558,"title":"Using a Moffat PSF","user":{"login":"saimn","id":311639,"node_id":"MDQ6VXNlcjMxMTYzOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/311639?v=4","gravatar_id":"","url":"https://api.github.com/users/saimn","html_url":"https://github.com/saimn","followers_url":"https://api.github.com/users/saimn/followers","following_url":"https://api.github.com/users/saimn/following{/other_user}","gists_url":"https://api.github.com/users/saimn/gists{/gist_id}","starred_url":"https://api.github.com/users/saimn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saimn/subscriptions","organizations_url":"https://api.github.com/users/saimn/orgs","repos_url":"https://api.github.com/users/saimn/repos","events_url":"https://api.github.com/users/saimn/events{/privacy}","received_events_url":"https://api.github.com/users/saimn/received_events","type":"User","site_admin":false},"labels":[{"id":100230801,"node_id":"MDU6TGFiZWwxMDAyMzA4MDE=","url":"https://api.github.com/repos/astropy/photutils/labels/psf","name":"psf","color":"c5def5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-07-05T20:08:55Z","updated_at":"2018-06-15T14:08:09Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Using `IterativelySubtractedPSFPhotometry` with a `Moffat2D` from Astropy (master) does not work:\r\n```python\r\n---------------------------------------------------------------------------\r\nAttributeError                            Traceback (most recent call last)\r\n<ipython-input-47-57afc0e78197> in <module>()\r\n      5                                                 fitter=LevMarLSQFitter(),\r\n      6                                                 niters=2, fitshape=(11,11))\r\n----> 7 result_tab = photometry(imsub.data)\r\n      8 residual_image = photometry.get_residual_image()\r\n\r\n~/dev/astropy/astropy/utils/decorators.py in wrapper(*args, **kwargs)\r\n    505                         # one with the name of the new argument to the function\r\n    506                         kwargs[new_name[i]] = value\r\n--> 507             return function(*args, **kwargs)\r\n    508 \r\n    509         return wrapper\r\n\r\n~/dev/photutils/photutils/psf/photometry.py in __call__(self, image, init_guesses)\r\n    194         \"\"\"\r\n    195 \r\n--> 196         return self.do_photometry(image, init_guesses)\r\n    197 \r\n    198     @deprecated_renamed_argument('positions', 'init_guesses', '0.4')\r\n\r\n~/dev/astropy/astropy/utils/decorators.py in wrapper(*args, **kwargs)\r\n    505                         # one with the name of the new argument to the function\r\n    506                         kwargs[new_name[i]] = value\r\n--> 507             return function(*args, **kwargs)\r\n    508 \r\n    509         return wrapper\r\n\r\n~/dev/photutils/photutils/psf/photometry.py in do_photometry(self, image, init_guesses)\r\n    660             if self.aperture_radius is None:\r\n    661                 if hasattr(self.psf_model, 'fwhm'):\r\n--> 662                     self.aperture_radius = self.psf_model.fwhm.value\r\n    663                 elif hasattr(self.psf_model, 'sigma'):\r\n    664                     self.aperture_radius = (self.psf_model.sigma.value *\r\n\r\nAttributeError: 'numpy.float64' object has no attribute 'value'\r\n```\r\nMaybe related to https://github.com/astropy/astropy/pull/6027 which added a `fwhm` attribute which is a scalar (so no `.value` attribute) ?\r\n"},"comment":{"url":"https://api.github.com/repos/astropy/photutils/issues/comments/397632564","html_url":"https://github.com/astropy/photutils/issues/558#issuecomment-397632564","issue_url":"https://api.github.com/repos/astropy/photutils/issues/558","id":397632564,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzYzMjU2NA==","user":{"login":"conornally","id":37117054,"node_id":"MDQ6VXNlcjM3MTE3MDU0","avatar_url":"https://avatars0.githubusercontent.com/u/37117054?v=4","gravatar_id":"","url":"https://api.github.com/users/conornally","html_url":"https://github.com/conornally","followers_url":"https://api.github.com/users/conornally/followers","following_url":"https://api.github.com/users/conornally/following{/other_user}","gists_url":"https://api.github.com/users/conornally/gists{/gist_id}","starred_url":"https://api.github.com/users/conornally/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/conornally/subscriptions","organizations_url":"https://api.github.com/users/conornally/orgs","repos_url":"https://api.github.com/users/conornally/repos","events_url":"https://api.github.com/users/conornally/events{/privacy}","received_events_url":"https://api.github.com/users/conornally/received_events","type":"User","site_admin":false},"created_at":"2018-06-15T14:08:09Z","updated_at":"2018-06-15T14:08:09Z","author_association":"NONE","body":"I have a different error using Moffat2D that i was hoping someone could give me some insight as to its origin or repair.\r\nInitialising the fitter with:\r\n`fitter = Moffat(alpha=2.5)`\r\n\r\nAnd i have created a DiscretePRF instance (from images) to use as a psfmodel.\r\nI get this error straight:\r\n[log.txt](https://github.com/astropy/photutils/files/2106290/log.txt)\r\n\r\nWhen using the default fitter, i dont seem to get it, however the moffat fitter is quite important to the work im trying to do.\r\nThanks in advance!\r\n"}}
{"actor":{"display_login":"conornally"}}