{"action":"closed","issue":{"url":"https://api.github.com/repos/GalSim-developers/GalSim/issues/983","repository_url":"https://api.github.com/repos/GalSim-developers/GalSim","labels_url":"https://api.github.com/repos/GalSim-developers/GalSim/issues/983/labels{/name}","comments_url":"https://api.github.com/repos/GalSim-developers/GalSim/issues/983/comments","events_url":"https://api.github.com/repos/GalSim-developers/GalSim/issues/983/events","html_url":"https://github.com/GalSim-developers/GalSim/issues/983","id":354513868,"node_id":"MDU6SXNzdWUzNTQ1MTM4Njg=","number":983,"title":"Floating Point Bug","user":{"login":"dannygoldstein","id":2769632,"node_id":"MDQ6VXNlcjI3Njk2MzI=","avatar_url":"https://avatars2.githubusercontent.com/u/2769632?v=4","gravatar_id":"","url":"https://api.github.com/users/dannygoldstein","html_url":"https://github.com/dannygoldstein","followers_url":"https://api.github.com/users/dannygoldstein/followers","following_url":"https://api.github.com/users/dannygoldstein/following{/other_user}","gists_url":"https://api.github.com/users/dannygoldstein/gists{/gist_id}","starred_url":"https://api.github.com/users/dannygoldstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dannygoldstein/subscriptions","organizations_url":"https://api.github.com/users/dannygoldstein/orgs","repos_url":"https://api.github.com/users/dannygoldstein/repos","events_url":"https://api.github.com/users/dannygoldstein/events{/privacy}","received_events_url":"https://api.github.com/users/dannygoldstein/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-08-27T23:26:15Z","updated_at":"2018-08-28T11:20:01Z","closed_at":"2018-08-28T11:20:01Z","author_association":"NONE","body":"If one creates a DeltaFunction with a flux below the smallest single precision number, then modifies it using withFlux to be above single precision, drawImage fails with all nans:\r\n\r\n```\r\nipdb> df = galsim.DeltaFunction(1e-60)\r\nipdb> df2 = df.withFlux(1e-10)\r\nipdb> psf = galsim.Gaussian(0.2).withFlux(1.)\r\nipdb> conv = galsim.Convolve([df2 ,psf])\r\nipdb> conv.drawImage(scale=0.2)\r\ngalsim.Image(bounds=galsim.BoundsI(xmin=1, xmax=12, ymin=1, ymax=12), array=\r\narray([[nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan],\r\n       [nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan],\r\n       [nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan],\r\n       [nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan],\r\n       [nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan],\r\n       [nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan],\r\n       [nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan],\r\n       [nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan],\r\n       [nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan],\r\n       [nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan],\r\n       [nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan],\r\n       [nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan]],\r\n      dtype=float32), wcs=galsim.PixelScale(0.2))\r\nipdb> conv = galsim.Convolve([df ,psf])\r\nipdb> conv.drawImage(scale=0.2)\r\ngalsim.Image(bounds=galsim.BoundsI(xmin=1, xmax=12, ymin=1, ymax=12), array=\r\narray([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\r\n       [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\r\n       [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\r\n       [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\r\n       [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\r\n       [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\r\n       [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\r\n       [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\r\n       [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\r\n       [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\r\n       [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\r\n       [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]], dtype=float32), wcs=galsim.PixelScale(0.2))\r\n```"}}
{"actor":{"display_login":"rmjarvis"}}