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

More configurable TXTwoPointFourier #341

Merged
merged 19 commits into from May 17, 2024
Merged

More configurable TXTwoPointFourier #341

merged 19 commits into from May 17, 2024

Conversation

tmcornish
Copy link
Contributor

@tmcornish tmcornish commented Feb 27, 2024

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.

@tmcornish tmcornish marked this pull request as ready for review April 5, 2024 09:15
Copy link
Collaborator

@elvinpoole elvinpoole left a 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

examples/metacal/config.yml Outdated Show resolved Hide resolved
txpipe/twopoint_fourier.py Outdated Show resolved Hide resolved
@anicola
Copy link
Collaborator

anicola commented Apr 20, 2024

Thanks a lot Tom. This looks good to me. Just a couple of questions/comments.

@tmcornish
Copy link
Contributor Author

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.

smooth=True,
ell_values=theory_ell
)
theory_ell = np.unique(np.geomspace(1, 3000, 100).astype(int))
Copy link
Collaborator

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
Copy link
Collaborator

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)
Copy link
Collaborator

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?

@tmcornish tmcornish merged commit d4490e3 into master May 17, 2024
10 checks passed
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.

None yet

3 participants