Skip to content

Add noise map input for covariance calculation#15

Open
mmccrackan wants to merge 1 commit into
mainfrom
noise_coadd
Open

Add noise map input for covariance calculation#15
mmccrackan wants to merge 1 commit into
mainfrom
noise_coadd

Conversation

@mmccrackan

Copy link
Copy Markdown
Collaborator

Adds the following:

  • A standalone function in pipeline.py called ‎get_noise_realization that 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.
  • Updates the needlet_coadd function in pipeline.py to do the following:
    • Adds noise_map_fname_func as an input to the function which is similar to map_fname_func but returns the path to the full depth noise map for that tag.
    • Calculates and saves the wavelet maps for the noise maps if noise_map_fname_func is not None.
    • Runs the smooth pre-calculation with the noise maps instead if noise_map_fname_func is not None. It still uses the delta prefix to save the maps if the noise maps are used.
    • Passes the noise maps into the cov_smooth function.

Testing:

I generated a simulated CMB realization and some even number of noise realizations for two different bands (a and b) 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 for coberus and build the coadded noise realization from that using get_noise_realization. I then pass these through coberus with and without the noise maps and with a deliberately poor choice for the ILC bias tolerance (Gaussian smoothing) to compare outputs.

Without noise maps:

image

With noise maps:

image

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:

image image

@mmccrackan

Copy link
Copy Markdown
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.

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

Successfully merging this pull request may close these issues.

1 participant