{"action":"created","issue":{"url":"https://api.github.com/repos/GalSim-developers/GalSim/issues/651","labels_url":"https://api.github.com/repos/GalSim-developers/GalSim/issues/651/labels{/name}","comments_url":"https://api.github.com/repos/GalSim-developers/GalSim/issues/651/comments","events_url":"https://api.github.com/repos/GalSim-developers/GalSim/issues/651/events","html_url":"https://github.com/GalSim-developers/GalSim/pull/651","id":59260005,"number":651,"title":"#590 - WFIRST module","user":{"login":"rmandelb","id":1454906,"avatar_url":"https://avatars.githubusercontent.com/u/1454906?v=3","gravatar_id":"","url":"https://api.github.com/users/rmandelb","html_url":"https://github.com/rmandelb","followers_url":"https://api.github.com/users/rmandelb/followers","following_url":"https://api.github.com/users/rmandelb/following{/other_user}","gists_url":"https://api.github.com/users/rmandelb/gists{/gist_id}","starred_url":"https://api.github.com/users/rmandelb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmandelb/subscriptions","organizations_url":"https://api.github.com/users/rmandelb/orgs","repos_url":"https://api.github.com/users/rmandelb/repos","events_url":"https://api.github.com/users/rmandelb/events{/privacy}","received_events_url":"https://api.github.com/users/rmandelb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":26,"created_at":"2015-02-27T16:37:06Z","updated_at":"2015-04-01T14:38:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/GalSim-developers/GalSim/pulls/651","html_url":"https://github.com/GalSim-developers/GalSim/pull/651","diff_url":"https://github.com/GalSim-developers/GalSim/pull/651.diff","patch_url":"https://github.com/GalSim-developers/GalSim/pull/651.patch"},"body":"This pull request is for the new WFIRST module (#590), though it also addressed #635 (partially) and #614.  It includes work mostly by @arunkannawadi and me, though with some small updates from @rmjarvis and @jmeyers314 as well.\r\n\r\nTo summarize, it includes:\r\n* All software for the WFIRST module, which knows a lot about WFIRST and can be used to simulate its images easily.\r\n* A demo (demo13.py) that demonstrates use of all routines in the WFIRST module, and steps through the image generation process in detail including IR detector effects.  I encourage those who are checking out this PR to run the demo, in addition to reviewing the code and running unit tests.\r\n* Some software to easily make images of galaxies from the COSMOS dataset in either a real (HST image-based) version or a parametric (Sersic-based) version.\r\n* Smaller updates to other routines, like how FITS headers are handled and some sign conventions in the CelestialCoord class.\r\n\r\nTo be honest, I feel the WFIRST module and the new COSMOS catalog routines do not have enough unit tests.  However, a lot of the routines are meant to do things like read in stored information and pass it to the user in some convenient form, so I had a hard time coming up with unit tests for those.  The demo itself should illustrate whether that functionality is still working, so I'm uncertain to what degree I should work harder to make up unit tests vs. planning to make sure demo13 still runs when evaluating future PRs.  Suggestions for useful unit tests would be very welcome, though!  At minimum, I suppose I could just put in unit tests making sure that all the keyword arguments do what they are supposed to.\r\n\r\n@jasondrhodes and @chazshapiro, take a look!"},"comment":{"url":"https://api.github.com/repos/GalSim-developers/GalSim/issues/comments/88508644","html_url":"https://github.com/GalSim-developers/GalSim/pull/651#issuecomment-88508644","issue_url":"https://api.github.com/repos/GalSim-developers/GalSim/issues/651","id":88508644,"user":{"login":"rmandelb","id":1454906,"avatar_url":"https://avatars.githubusercontent.com/u/1454906?v=3","gravatar_id":"","url":"https://api.github.com/users/rmandelb","html_url":"https://github.com/rmandelb","followers_url":"https://api.github.com/users/rmandelb/followers","following_url":"https://api.github.com/users/rmandelb/following{/other_user}","gists_url":"https://api.github.com/users/rmandelb/gists{/gist_id}","starred_url":"https://api.github.com/users/rmandelb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmandelb/subscriptions","organizations_url":"https://api.github.com/users/rmandelb/orgs","repos_url":"https://api.github.com/users/rmandelb/repos","events_url":"https://api.github.com/users/rmandelb/events{/privacy}","received_events_url":"https://api.github.com/users/rmandelb/received_events","type":"User","site_admin":false},"created_at":"2015-04-01T14:38:51Z","updated_at":"2015-04-01T14:38:51Z","body":"@rmjarvis - In the course of implementing your suggestion about the random rotations, I realized a pretty stunning bug in the demo: we have made ```final_image``` appropriately with the WCS, but then we draw the galaxy image into a postage stamp for which we haven't even specified a pixel scale (OY!), using\r\n```\r\nstamp = galsim.Image(stamp_size, stamp_size)\r\ngal_list[i_gal].drawImage(filter_, image=stamp)\r\n```\r\nThen we add that into ```final_image```.  So this makes no sense whatsoever.  I think we have two options:\r\n\r\n(1) If we want to retain the original advantage of only having to draw the galaxy once, then we need to set ```stamp``` to have the average WFIRST pixel scale, and comment that this is an approximation and really one needs to draw into ```final_image``` which has the full WCS if you want to get this right.\r\n\r\n(2) Scrap the idea of having many copies of the galaxies in the image, make a sparsely-populated image with a single copy of each galaxy, and draw the galaxies appropriately into ```final_image```.\r\n\r\n@arunkannawadi , @rmjarvis , any preferences?  I'm inclined to go with (1), and will shortly push a version that does that, but I could be persuaded to switch to (2) (and it would be easy)."}}