{"action":"created","issue":{"url":"https://api.github.com/repos/desihub/desisim/issues/289","repository_url":"https://api.github.com/repos/desihub/desisim","labels_url":"https://api.github.com/repos/desihub/desisim/issues/289/labels{/name}","comments_url":"https://api.github.com/repos/desihub/desisim/issues/289/comments","events_url":"https://api.github.com/repos/desihub/desisim/issues/289/events","html_url":"https://github.com/desihub/desisim/issues/289","id":278292826,"number":289,"title":"fiber acceptance fraction for BGS targets should depend on redshift","user":{"login":"moustakas","id":1431820,"avatar_url":"https://avatars2.githubusercontent.com/u/1431820?v=4","gravatar_id":"","url":"https://api.github.com/users/moustakas","html_url":"https://github.com/moustakas","followers_url":"https://api.github.com/users/moustakas/followers","following_url":"https://api.github.com/users/moustakas/following{/other_user}","gists_url":"https://api.github.com/users/moustakas/gists{/gist_id}","starred_url":"https://api.github.com/users/moustakas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moustakas/subscriptions","organizations_url":"https://api.github.com/users/moustakas/orgs","repos_url":"https://api.github.com/users/moustakas/repos","events_url":"https://api.github.com/users/moustakas/events{/privacy}","received_events_url":"https://api.github.com/users/moustakas/received_events","type":"User","site_admin":false},"labels":[{"id":144319579,"url":"https://api.github.com/repos/desihub/desisim/labels/bug","name":"bug","color":"fc2929","default":true},{"id":144319581,"url":"https://api.github.com/repos/desihub/desisim/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-11-30T22:30:28Z","updated_at":"2018-02-16T17:42:27Z","closed_at":null,"author_association":"OWNER","body":"The \"fast\" fiber acceptance (or fiberloss) fraction for BGS targets coded up in `simexp.simulate_spectra` is currently a constant / fixed, but the redshift dependence is non-negligible (more than a factor of two) due to the cosmological dependence of the angular diameter distance.  We should fix this.\r\n\r\nThe relevant portion of the code is roughly\r\nhttps://github.com/desihub/desisim/blob/master/py/desisim/simexp.py#L473-L505\r\n\r\nAlso note that the correct link to the notebook from whence some of these numbers were derived is \r\nhttps://github.com/desihub/desitarget/blob/master/doc/nb/bgs-morphology-properties.ipynb\r\n(i.e., part of master not the long-gone branch)."},"comment":{"url":"https://api.github.com/repos/desihub/desisim/issues/comments/366306551","html_url":"https://github.com/desihub/desisim/issues/289#issuecomment-366306551","issue_url":"https://api.github.com/repos/desihub/desisim/issues/289","id":366306551,"user":{"login":"dkirkby","id":185007,"avatar_url":"https://avatars1.githubusercontent.com/u/185007?v=4","gravatar_id":"","url":"https://api.github.com/users/dkirkby","html_url":"https://github.com/dkirkby","followers_url":"https://api.github.com/users/dkirkby/followers","following_url":"https://api.github.com/users/dkirkby/following{/other_user}","gists_url":"https://api.github.com/users/dkirkby/gists{/gist_id}","starred_url":"https://api.github.com/users/dkirkby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkirkby/subscriptions","organizations_url":"https://api.github.com/users/dkirkby/orgs","repos_url":"https://api.github.com/users/dkirkby/repos","events_url":"https://api.github.com/users/dkirkby/events{/privacy}","received_events_url":"https://api.github.com/users/dkirkby/received_events","type":"User","site_admin":false},"created_at":"2018-02-16T17:42:27Z","updated_at":"2018-02-16T17:42:27Z","author_association":"OWNER","body":"It looks like the minimal fix required here is to replace these lines in simexp.py:\r\n```\r\n        source_half_light_radius[bgss,0]=4.7  # disk comp in BGS, arcsec\r\n        source_half_light_radius[bgss,1]=1.3  # bulge comp in BGS, arcsec\r\n```\r\nwith:\r\n```\r\n        LCDM = astropy.cosmology.Planck15\r\n        angscale = (\r\n            LCDM.angular_diameter_distance(0.1) /\r\n            LCDM.angular_diameter_distance(source_redshift[bgss]).to(1).value\r\n        source_half_light_radius[bgss,0]=4.7  * angscale\r\n        source_half_light_radius[bgss,1]=1.3  * angscale\r\n```\r\nI made up `source_redshift` here, but presumably that array is available somewhere.\r\n\r\nIf someone wants to rewrite `astropy.cosmology.angular_diameter_distance`, then please include a unit test that compares against the astropy values."}}
{"actor":{"display_login":"dkirkby"}}