Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signal + noise composition interface #31

Open
msyriac opened this issue Jan 13, 2020 · 10 comments
Open

Signal + noise composition interface #31

msyriac opened this issue Jan 13, 2020 · 10 comments

Comments

@msyriac
Copy link
Collaborator

msyriac commented Jan 13, 2020

What is the recommended code interface to make a joint signal + noise sim?
I would strongly advocate that the default noise sim is not beam deconvolved. Rather, a composite sim of signal and noise should look like:
beam(signal) + noise.
This makes the result look like what is in a real data map, and makes the noise map well behaved.

So, it would be good to have a signal + noise composition interface that does the following:

bandpass_integrate(beam(cmb + galactic + extragalactic)) + noise

e.g.

sgen = SOSim()
sgen.get_sim(band,bandpass_integrate=True,beam=True,include_noise=True,include_galactic=True,include_extragalactic=True)

This probably exists somewhere already?

@ajvanengelen
Copy link
Contributor

ajvanengelen commented Jan 13, 2020 via email

@zonca
Copy link
Member

zonca commented Jan 14, 2020

this is what MapSim does: https://mapsims.readthedocs.io/en/latest/api/mapsims.MapSim.html#mapsims.MapSim

it can start from a configuration file or from classes, and also has a command line tool, see https://mapsims.readthedocs.io/en/latest/usage.html

@msyriac
Copy link
Collaborator Author

msyriac commented Jan 29, 2020

Couple of things I see here:

  1. We need to add CAR support
  2. It doesn't look like beam convolution is ever done anywhere, instead the noise needs to be obtained with "beam_correction=True"

Is (2) correct?

@zonca
Copy link
Member

zonca commented Feb 5, 2020

We ran the last set of noise simulations with no beam correction, see https://github.com/simonsobs/map_based_simulations/blob/master/201906_noise_no_lowell/noise.toml

The next set should instead have it included? simonsobs/map_based_simulations#21

@msyriac
Copy link
Collaborator Author

msyriac commented Feb 5, 2020

I think it always makes sense to save or return noise simulations with no beam deconvolution. And similarly signal sims should always be beam convolved. This makes the outputs well behaved / sane. The user can then simply treat:
signal + noise
as a representation of the kind of map SO mapmakers will provide us.

@zonca
Copy link
Member

zonca commented Feb 5, 2020

so we will run also the new sims with beam_correction=False?

@msyriac
Copy link
Collaborator Author

msyriac commented Feb 5, 2020

Yes, but are you also separately running and saving signal sims? Will you apply beam convolution to those?

@zonca
Copy link
Member

zonca commented Feb 5, 2020

this release will be only noise, but previous and next signal releases all have beam convolution.

@zonca
Copy link
Member

zonca commented Feb 19, 2020

@msyriac @ajvanengelen here is how it works now:

https://gist.github.com/zonca/5cc4e2d27cbd8422f16e1af3e5e29bfd

It would be nicer to have sim.execute(seed) but I wouldn't want to make too many changes to the pipeline. So I think this is easy enough to use, suggestions?

@zonca
Copy link
Member

zonca commented Feb 19, 2020

After this release I'll work on the foreground simulations again, I think at that point it will be easier to test maps+noise simulations and work on improving the interface. I would like to check if I can initialize all the foreground and noise classes without providing NSIDE, channel, and num, then call:

sim.execute(channel="ST0", nside=64, num=10)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants