LSSTDESC / BremertonRoundTrip

A hack project for the Bremerton meeting
MIT License
3 stars 0 forks source link

Use PhoSim to draw postage stamp galaxy images #4

Open cwwalter opened 9 years ago

cwwalter commented 9 years ago

Same inputs as Issue #2.

Inputs (ruthlessly simple)

We want to produce PhoSim images but to extract postage stamps of the deblended galaxies to pass to the HSM algorithm. We need approximately a full focal plane. So, we can try to separately generate the sky background and each galaxy and then cut out postage stamps of the each galaxy + the added background.

cwwalter commented 9 years ago

@slosar For the most part, the galaxies in the catalog you gave me are dim for simulating one exposure. I've manually decreased the magnitude for my tests so I can see what is going on. We should probably make things look as if we are looking at the full co-added depth (perhaps by shifting the magnitude for the effective number of exposures over the 10 year survey). Should we do this at the fastcat level?

slosar commented 9 years ago

Uhm, that is a tricky one. Because on one hand, many systematics will cancle in full depth, so one should simulate many and average, but then again we don't even have a multiepoch shear-fitting code. So, I'd just go with making galaxies Nexp brigher and do it once for the time being. I can put in a mag multiplier into my code...

Soon,

anže

On Mon, 24 Aug 2015, Chris Walter wrote:

@slosar For the most part, the galaxies in the catalog you gave me are dim for simulating one exposure. I've manually increased the magnitude for my tests so I can see what is going on. We should probably make things look as if we are looking at the full co-added depth (perhaps by shifting the magnitude for the effective number of exposures over the 10 year survey). Should we do this at the fastcat level?


Reply to this email directly or view it on GitHub: https://github.com/DarkEnergyScienceCollaboration/BremertonRoundTrip/issues/4#issuecomment-134255685

cwwalter commented 9 years ago

OK, I agree. For now lets put a Nexp brightness factor into fastcat.

cwwalter commented 9 years ago

Moving some info here from email.


This fits file is an automatically extracted fits postageStamp file.

pastedgraphic-1
cwwalter commented 9 years ago

@dkirkby asked:

Found the chip that the source fell on.

Were you able to identify the chip that the galaxy falls on without pulling in the whole DM stack? How will you handle galaxies that have a significant fraction of their flux hitting a second chip?

I was able to do this just using PhoSim and not relying on the stack. PhoSim trims the chips from the focal plane that don't have sources. So, in this case there was only one chip with a source on it. Right now the code is hardcoded to grab that file. For sources that span chips, both chips will be there but we need to think about what we want. Do we want a source to pass to HSM that has a gap in it?

It might be worth having an option to add Poisson sky in your postageStamp.py, as an alternative to generating a full PhoSim background image.

Currently, my plan was to do the sky first once and then add it in for each galaxy. I can do it at the same time as the source easily, but even with a quick background it will add a lot of time. Since we need to make each galaxy one-by-one to have perfect deblending potential that is a lot of repeated run time. If we were doing all of the galaxies together on the focal plane this wouldn't be an issue.

OTOH if there is some coupling between the background sky and the position dependent PSF I guess we will have to do it when we switch to the real PSF.

One good long term solution would be to make PhoSim produce an output file which tracked what fraction of the light from every pixel came from the background and each source. Then we could produce what we wanted as needed with whatever level of blending we desired.

cwwalter commented 8 years ago

I'm working on implementing the scheme in the last comment. So, for a multiple galaxy image on a chip like this:

screen shot 2015-10-30 at 12 16 56 pm

I am trying to produce an eventFile in PhoSim and put the photons in from each galaxy into its own plane of a 3d fits cube.