galsci / mapsims

Map based simulations software for CMB Experiments
BSD 2-Clause "Simplified" License
3 stars 1 forks source link

Noise simulation implementation #5

Closed zonca closed 5 years ago

zonca commented 5 years ago

Currently HEALPix only, will implement later support for CAR.

Please send feedback also on code structure, naming of variables, docstrings and usability.

See an example of using this: https://gist.github.com/zonca/71316ac921b44da77e415264667f0338

This is untested, it would be nice if somebody else prepares some test maps manually at low nside and fixed seed for testing this.

zonca commented 5 years ago

@damonge this is mostly based on your code, would you like to review it?

zonca commented 5 years ago

@damonge the file SO_Noise_Calculator_Public_20180822.py is the noise calculator that was released to the public, I made just a few changes to make it more usable (including your suggestion to remove prints), I won't make any other change.

The official copy of that file is in the private repo: https://github.com/simonsobs/V3_calc

There is a discussion at https://github.com/simonsobs/V3_calc/issues/2 to possibly make it public, at that point I will just import the file from there.

zonca commented 5 years ago

@damonge can you also please generate 2 low resolution (nside 16 or 32) test maps (1 SAT channel and 1 LAT channel) with a predefined random seed for unit testing at attach them to this Pull Request?

damonge commented 5 years ago

@damonge the file SO_Noise_Calculator_Public_20180822.py is the noise calculator that was released to the public, I made just a few changes to make it more usable (including your suggestion to remove prints), I won't make any other change.

Sure, I focused my review on those changes by comparing it line-by-line with the public calculator.

damonge commented 5 years ago

@damonge can you also please generate 2 low resolution (nside 16 or 32) test maps (1 SAT channel and 1 LAT channel) with a predefined random seed for unit testing at attach them to this Pull Request?

Sure, can do. How would you want me to do that exactly? There's significant overlap between the code we used for the paper and this code, so it should be no wonder if both agree exactly (if the point is to validate the current code).

zonca commented 5 years ago

@damonge can you also please generate 2 low resolution (nside 16 or 32) test maps (1 SAT channel and 1 LAT channel) with a predefined random seed for unit testing at attach them to this Pull Request?

Sure, can do. How would you want me to do that exactly? There's significant overlap between the code we used for the paper and this code, so it should be no wonder if both agree exactly (if the point is to validate the current code).

the plan is to validate this code and make it more difficult to break it unintentionally in the future. the easiest test would be 1 SAT channel and 1 LAT channel with all default parameters (or what you think is the most "standard" configuration as long as you specify it) at NSIDE 16 with a fixed numpy random seed.

zonca commented 5 years ago

@damonge can you also please generate 2 low resolution (nside 16 or 32) test maps (1 SAT channel and 1 LAT channel) with a predefined random seed for unit testing at attach them to this Pull Request?

Sure, can do. How would you want me to do that exactly? There's significant overlap between the code we used for the paper and this code, so it should be no wonder if both agree exactly (if the point is to validate the current code).

the plan is to validate this code and make it more difficult to break it unintentionally in the future. the easiest test would be 1 SAT channel and 1 LAT channel with all default parameters (or what you think is the most "standard" configuration as long as you specify it) at NSIDE 16 with a fixed numpy random seed.

as for scanning strategy, you can choose either classical or opportunistic

zonca commented 5 years ago

merging now, will improve unit tests, see #10