{"action":"created","issue":{"url":"https://api.github.com/repos/mtazzari/galario/issues/132","repository_url":"https://api.github.com/repos/mtazzari/galario","labels_url":"https://api.github.com/repos/mtazzari/galario/issues/132/labels{/name}","comments_url":"https://api.github.com/repos/mtazzari/galario/issues/132/comments","events_url":"https://api.github.com/repos/mtazzari/galario/issues/132/events","html_url":"https://github.com/mtazzari/galario/pull/132","id":319225258,"number":132,"title":"Correcting wrong amplitudes from sampleImage","user":{"login":"lucadimascolo","id":18384197,"avatar_url":"https://avatars3.githubusercontent.com/u/18384197?v=4","gravatar_id":"","url":"https://api.github.com/users/lucadimascolo","html_url":"https://github.com/lucadimascolo","followers_url":"https://api.github.com/users/lucadimascolo/followers","following_url":"https://api.github.com/users/lucadimascolo/following{/other_user}","gists_url":"https://api.github.com/users/lucadimascolo/gists{/gist_id}","starred_url":"https://api.github.com/users/lucadimascolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucadimascolo/subscriptions","organizations_url":"https://api.github.com/users/lucadimascolo/orgs","repos_url":"https://api.github.com/users/lucadimascolo/repos","events_url":"https://api.github.com/users/lucadimascolo/events{/privacy}","received_events_url":"https://api.github.com/users/lucadimascolo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-05-01T15:08:52Z","updated_at":"2018-05-11T18:04:52Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/mtazzari/galario/pulls/132","html_url":"https://github.com/mtazzari/galario/pull/132","diff_url":"https://github.com/mtazzari/galario/pull/132.diff","patch_url":"https://github.com/mtazzari/galario/pull/132.patch"},"body":"I am running `sampleImage` on CPU, and I found that it may be possible that the amplitudes of the generated visibilities do not correctly reproduce the values of the input model. A comparison of the amplitudes from the FFT of the input image, CASA `ft` and `sampleImage` shows that galario is somehow downscaling their values by a factor between 1 and 2 systematically.\r\nIt is worth saying that this becomes significant only in the case of large offsets with respect to the phase center or for extended signals (being the comparison between models, I don't think it is a W-projection-related issue). On the other hand, this does not arise when `sampleImage` is used to create model visibilities with UV coordinates on the same regular grid of the FFT (from `fftfreq`, in the case of numpy), independently of the input model.\r\n\r\nThis change seems to solve (or at least mitigate) the issue, while producing same results in all the well-behaved cases."},"comment":{"url":"https://api.github.com/repos/mtazzari/galario/issues/comments/388441042","html_url":"https://github.com/mtazzari/galario/pull/132#issuecomment-388441042","issue_url":"https://api.github.com/repos/mtazzari/galario/issues/132","id":388441042,"user":{"login":"pavesiriccardo","id":16846092,"avatar_url":"https://avatars3.githubusercontent.com/u/16846092?v=4","gravatar_id":"","url":"https://api.github.com/users/pavesiriccardo","html_url":"https://github.com/pavesiriccardo","followers_url":"https://api.github.com/users/pavesiriccardo/followers","following_url":"https://api.github.com/users/pavesiriccardo/following{/other_user}","gists_url":"https://api.github.com/users/pavesiriccardo/gists{/gist_id}","starred_url":"https://api.github.com/users/pavesiriccardo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavesiriccardo/subscriptions","organizations_url":"https://api.github.com/users/pavesiriccardo/orgs","repos_url":"https://api.github.com/users/pavesiriccardo/repos","events_url":"https://api.github.com/users/pavesiriccardo/events{/privacy}","received_events_url":"https://api.github.com/users/pavesiriccardo/received_events","type":"User","site_admin":false},"created_at":"2018-05-11T18:04:52Z","updated_at":"2018-05-11T18:04:52Z","author_association":"NONE","body":"Ok,\r\nuu=uu.copy(order='C')\r\nvv=vv.copy(order='C')\r\nmodelimage=np.roll(np.flip(modelimage,axis=0),1,axis=0).copy(order='C')\r\nmodel_complex = sampleImage(modelimage, 4.8481368110957469e-07, uu, vv)\r\n\r\nwhere uu and vv where read from a UVFITS file, I've had to change to C-order for some reason, or it would complain. I doubt it's related though...\r\nMy minimum UVdist is 20690.7, and max is 412497.0  in wavelengths.\r\nLet me know what else I can help with! Did lucadimascolo fix this already, by any chance? Ive seen some commits, but I haven't tested the latest versions"}}
{"actor":{"display_login":"pavesiriccardo"}}