{"action":"created","issue":{"url":"https://api.github.com/repos/HERA-Team/pyuvdata/issues/311","repository_url":"https://api.github.com/repos/HERA-Team/pyuvdata","labels_url":"https://api.github.com/repos/HERA-Team/pyuvdata/issues/311/labels{/name}","comments_url":"https://api.github.com/repos/HERA-Team/pyuvdata/issues/311/comments","events_url":"https://api.github.com/repos/HERA-Team/pyuvdata/issues/311/events","html_url":"https://github.com/HERA-Team/pyuvdata/issues/311","id":303185152,"number":311,"title":"write_calfits introduces small error in time array","user":{"login":"adampbeardsley","id":4752917,"avatar_url":"https://avatars0.githubusercontent.com/u/4752917?v=4","gravatar_id":"","url":"https://api.github.com/users/adampbeardsley","html_url":"https://github.com/adampbeardsley","followers_url":"https://api.github.com/users/adampbeardsley/followers","following_url":"https://api.github.com/users/adampbeardsley/following{/other_user}","gists_url":"https://api.github.com/users/adampbeardsley/gists{/gist_id}","starred_url":"https://api.github.com/users/adampbeardsley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adampbeardsley/subscriptions","organizations_url":"https://api.github.com/users/adampbeardsley/orgs","repos_url":"https://api.github.com/users/adampbeardsley/repos","events_url":"https://api.github.com/users/adampbeardsley/events{/privacy}","received_events_url":"https://api.github.com/users/adampbeardsley/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-07T17:15:03Z","updated_at":"2018-03-09T20:43:23Z","closed_at":"2018-03-09T20:43:23Z","author_association":"OWNER","body":"We noticed this when creating unittests in hera_cal (see HERA-Team/hera_cal#204). There are two problems that I see with the code below.\r\n\r\nhttps://github.com/HERA-Team/pyuvdata/blob/b4bc89c01860985a571bd6d187be5f5a9943f5f8/pyuvdata/calfits.py#L79-L83\r\n\r\n1) Line 79 is checking the closeness of two numbers that are in different units (time_spacing is in days, integration_time is in seconds)\r\n2) The rounded_spacing is not quite achieving the precision needed. While it gives a rounded spacing within the tolerance of the time array, the error compounded over Ntimes is too large. I think the tolerance should be divided by Ntimes, and maybe add an extra digit to be on the safe side. In fact, it's not clear to me why this rounding is happening in the first place."},"comment":{"url":"https://api.github.com/repos/HERA-Team/pyuvdata/issues/comments/371939738","html_url":"https://github.com/HERA-Team/pyuvdata/issues/311#issuecomment-371939738","issue_url":"https://api.github.com/repos/HERA-Team/pyuvdata/issues/311","id":371939738,"user":{"login":"adampbeardsley","id":4752917,"avatar_url":"https://avatars0.githubusercontent.com/u/4752917?v=4","gravatar_id":"","url":"https://api.github.com/users/adampbeardsley","html_url":"https://github.com/adampbeardsley","followers_url":"https://api.github.com/users/adampbeardsley/followers","following_url":"https://api.github.com/users/adampbeardsley/following{/other_user}","gists_url":"https://api.github.com/users/adampbeardsley/gists{/gist_id}","starred_url":"https://api.github.com/users/adampbeardsley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adampbeardsley/subscriptions","organizations_url":"https://api.github.com/users/adampbeardsley/orgs","repos_url":"https://api.github.com/users/adampbeardsley/repos","events_url":"https://api.github.com/users/adampbeardsley/events{/privacy}","received_events_url":"https://api.github.com/users/adampbeardsley/received_events","type":"User","site_admin":false},"created_at":"2018-03-09T20:43:23Z","updated_at":"2018-03-09T20:43:23Z","author_association":"OWNER","body":"This was addressed in PR #312 "}}
{"actor":{"display_login":"adampbeardsley"}}