Add noise map input for covariance calculation#15
Open
mmccrackan wants to merge 1 commit into
Open
Conversation
Collaborator
Author
|
I think the test failure is related from the python version. I ran on 3.12.12 successfully, but just tested on 3.12.13 and reproduced the failure. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the following:
pipeline.pycalled get_noise_realizationthat will return an estimate of the full-depth noise map by doing a sign-flip inverse variance weighted coadd of the residual between the individual split map and the full-depth map (equation 6 of 2303.04180). The full depth maps can be passed in or they will be calculated from the splits. This adds a new required function for passing in inverse variance maps.needlet_coaddfunction inpipeline.pyto do the following:noise_map_fname_funcas an input to the function which is similar tomap_fname_funcbut returns the path to the full depth noise map for that tag.noise_map_fname_funcis notNone.noise_map_fname_funcis notNone. It still uses thedeltaprefix to save the maps if the noise maps are used.cov_smoothfunction.Testing:
I generated a simulated CMB realization and some even number of noise realizations for two different bands (
aandb) to represent each split. I coadd the splits (using constant inverse variance maps from the split noise maps) for each band to ge the input maps forcoberusand build the coadded noise realization from that usingget_noise_realization. I then pass these throughcoberuswith and without the noise maps and with a deliberately poor choice for the ILC bias tolerance (Gaussian smoothing) to compare outputs.Without noise maps:
With noise maps:
To-do:
Check if I need to do something different when handling masked maps.
I've confirmed that the variance of a full depth noise map largely converges to that of the true coadded noise map (from simulations), but there is more deviation when the number of splits is low. I need to work out if we can do a correction like equation 8. of 2303.04180, since the variance of the sign flipped coadded difference maps should be the variance of the true noise map minus some term as in equation 7.
I think we might want to change the way the signs are chosen for small numbers of splits to minimize the leakage term (i.e. do not randomize them entirely but instead make sure we have an equal number of +1s and -1s if we assume splits have roughly equal noise). This is reduced with more splits or when using block smoothing. For example, when comparing the ratio of the standard approach auto spectrum to the noise map approach auto spectrum for 4 splits and 16 splits (Gaussian smoothing with reasonable ILC bias tolerance), we see: