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
More configurable TXTwoPointFourier #341
Conversation
…ly on POS-POS so far). Computation of theory c_ell now also optional.
…easily applied globally.
…ing for masks that are not binary.
…sent in config file
…xample config file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. couple of very minor comments
Thanks a lot Tom. This looks good to me. Just a couple of questions/comments. |
Thanks for the comments @anicola. For some reason they're not showing up here but I saw them via email and have now replaced the hard-coded values in question with the user-provided ell_min and ell_max. |
txpipe/twopoint_fourier.py
Outdated
smooth=True, | ||
ell_values=theory_ell | ||
) | ||
theory_ell = np.unique(np.geomspace(1, 3000, 100).astype(int)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might it be safer to determine lmax based on the ell range specified to compute the spectra instead of having hard-coded values?
print(f"Loaded {nbin_source} lensing weight maps") | ||
|
||
# Using a flat mask as the clustering weight for now, since I need to know | ||
# how to turn the depth map into a weight |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this comment still valid?
if self.rank == 0: | ||
print("Loaded mask") | ||
|
||
cl_guess = nmt.compute_coupled_cell(field_i, field_j) / np.mean(mask * mask) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you calculate cl_guess in this way? Also, as far as I understand it, the previously computed theory cls are never used for computing the deprojection bias. Or am I wrong?
Users can now specify which components of 3x2pt analysis to run in TXTwoPointFourier. Computation of the theory power spectra has also been made optional. Certain inputs (fiducial_cosmology, source_noise_maps, lens_noise_maps, density_maps, source_maps) are now also optional depending on which analyses the user wants to run.
Treatment of the survey mask has also been modified to account for cases where the mask is not binary. Users can now also specify a global config parameter, "mask_threshold", so that whenever the mask is read all pixels less than or equal to this value are automatically set to zero.
Tested with example 'metacal' and 'metadetect' pipelines, using all possible combinations of POS-POS, SHEAR-POS and SHEAR-SHEAR.