{"action":"created","issue":{"url":"https://api.github.com/repos/astropy/astropy/issues/4661","repository_url":"https://api.github.com/repos/astropy/astropy","labels_url":"https://api.github.com/repos/astropy/astropy/issues/4661/labels{/name}","comments_url":"https://api.github.com/repos/astropy/astropy/issues/4661/comments","events_url":"https://api.github.com/repos/astropy/astropy/issues/4661/events","html_url":"https://github.com/astropy/astropy/issues/4661","id":137836644,"number":4661,"title":"Angular diameter distance between redshifts and negative curvature","user":{"login":"joergdietrich","id":1462921,"avatar_url":"https://avatars.githubusercontent.com/u/1462921?v=3","gravatar_id":"","url":"https://api.github.com/users/joergdietrich","html_url":"https://github.com/joergdietrich","followers_url":"https://api.github.com/users/joergdietrich/followers","following_url":"https://api.github.com/users/joergdietrich/following{/other_user}","gists_url":"https://api.github.com/users/joergdietrich/gists{/gist_id}","starred_url":"https://api.github.com/users/joergdietrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joergdietrich/subscriptions","organizations_url":"https://api.github.com/users/joergdietrich/orgs","repos_url":"https://api.github.com/users/joergdietrich/repos","events_url":"https://api.github.com/users/joergdietrich/events{/privacy}","received_events_url":"https://api.github.com/users/joergdietrich/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/astropy/astropy/labels/cosmology","name":"cosmology","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-02T10:38:32Z","updated_at":"2016-03-02T11:43:50Z","closed_at":null,"body":"`angular_diameter_distance_z1z2` contains\r\n\r\n```\r\n        # does not work for negative curvature\r\n        Ok0 = self._Ok0\r\n        if Ok0 < 0:\r\n            raise CosmologyError('Ok0 must be >= 0 to use this method.')\r\n```\r\n\r\npresumably because \r\n\r\n```\r\n            out = ((dm2 * np.sqrt(1. + Ok0 * dm1 ** 2 / dh_2) -\r\n                    dm1 * np.sqrt(1. + Ok0 * dm2 ** 2 / dh_2)) /\r\n                   (1. + z2))\r\n```\r\n\r\ncomes from Hogg (1999, arXiv:astro-ph/9905116), which claims \"Unfortunately,\r\nthe above formula is not correct for Ωk < 0 (Phillip Helbig, 1998, private communication).\" However, the derivation in Peebles (1993, p. 336) seems to indicate that this result is independent of the sign of curvature. \r\n\r\nThere is no numeric problem because Ok0 * (dm/dh)**2 evaluates to -sin^2[sqrt(|Ok0| dc/dm], which has a lower bound of -1.\r\nUsing the expression above and comparing it to Dm(z1, z2)/(1+z2), where Dm(z1, z2) is computed by performing the integral over 1/E(z) from z1 to z2, gives numerically identical results. \r\n\r\n@nhmc  Am I missing something or is the claim in Hogg (1999) wrong and the code should allow negative Ok0?"},"comment":{"url":"https://api.github.com/repos/astropy/astropy/issues/comments/191202587","html_url":"https://github.com/astropy/astropy/issues/4661#issuecomment-191202587","issue_url":"https://api.github.com/repos/astropy/astropy/issues/4661","id":191202587,"user":{"login":"nhmc","id":174640,"avatar_url":"https://avatars.githubusercontent.com/u/174640?v=3","gravatar_id":"","url":"https://api.github.com/users/nhmc","html_url":"https://github.com/nhmc","followers_url":"https://api.github.com/users/nhmc/followers","following_url":"https://api.github.com/users/nhmc/following{/other_user}","gists_url":"https://api.github.com/users/nhmc/gists{/gist_id}","starred_url":"https://api.github.com/users/nhmc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhmc/subscriptions","organizations_url":"https://api.github.com/users/nhmc/orgs","repos_url":"https://api.github.com/users/nhmc/repos","events_url":"https://api.github.com/users/nhmc/events{/privacy}","received_events_url":"https://api.github.com/users/nhmc/received_events","type":"User","site_admin":false},"created_at":"2016-03-02T11:43:50Z","updated_at":"2016-03-02T11:43:50Z","body":"I just copied the result from Hogg et al. So it sounds likely that the expression is indeed valid for Omega_k < 0, but it would be nice to have an independent check. I won't have time to check for the next couple of days though - maybe @aconley can take a look sooner?"}}