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
DM-43959: Add npatch field to BinnedCorr2Config #240
Conversation
I'll just mention that the term BinnedCorr2 isn't a thing in TreeCorr anymore (as of v5.0). Probably should just use Corr2Config to avoid confusion going forward. |
We're still on |
3d20760
to
c34bc14
Compare
ra_units=raUnits, | ||
dec_units=decUnits, | ||
logger=_LOG, | ||
patch_centers=catA.patch_centers, |
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.
I tried swapping npatch
from the config with patch_centers
after they are first computed. But the config only supports filenames and not arrays directly. I suppose we don't care if we get different patches for different cross-correlations but that we have the same patches for both the catalogs that we are doing cross-correlations, correct?
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.
Yes. If there is a catB, it needs to have the same patches as catA. But it's ok if other correlations use different patches in this context. It would matter if you ever wanted covariances of derived quantities that come from multiple 2pt correlation functions, but I don't think you are planning to do that.
|
||
# Swap rng_seed with an rng instance in treecorr config. | ||
rng = np.random.RandomState(treecorr_config_dict.pop("rng_seed")) | ||
treecorr_config_dict["rng"] = rng |
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.
The rng_seed
remains the same for all the runs for now, but a new rng
is generated for each tract, patch, band
combo. I suppose the actual patches themselves depends on the data (since it uses kmeans) and it's not the case where we get the same patch every single run, right?
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.
Yes. That should be ok.
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.
Code looks fine to me. Should there be some new tests though? Or is this just a functionality preserving change for now?
|
||
# Swap rng_seed with an rng instance in treecorr config. | ||
rng = np.random.RandomState(treecorr_config_dict.pop("rng_seed")) | ||
treecorr_config_dict["rng"] = rng |
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.
Yes. That should be ok.
Keyword arguments to be passed to `treecorr.KKCorrelation`. | ||
treecorr_config_dict: `dict`, optional | ||
Config dictionary to be passed to `treecorr` | ||
()`treecorr.KKCorrelation` or `treecorr.Catalog`). |
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.
I believe the first closing paren here a typo.
ra_units=raUnits, | ||
dec_units=decUnits, | ||
logger=_LOG, | ||
patch_centers=catA.patch_centers, |
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.
Yes. If there is a catB, it needs to have the same patches as catA. But it's ok if other correlations use different patches in this context. It would matter if you ever wanted covariances of derived quantities that come from multiple 2pt correlation functions, but I don't think you are planning to do that.
c34bc14
to
00d0feb
Compare
We have tests for PSF residual calculations, but nothing for RhoStatistics now. In general, this has a lot less test coverage than many of the other DM repos, since it's mostly plot oriented. The plot I produced with the changes here (and activating them) is on the Jira ticket. |
No description provided.