rmjarvis / TreeCorr

Code for efficiently computing 2-point and 3-point correlation functions. For documentation, go to
http://rmjarvis.github.io/TreeCorr/
Other
99 stars 37 forks source link

Bootstrap2 is not an expected var_method #100

Closed enourbakhsh closed 4 years ago

enourbakhsh commented 4 years ago

I used treecorr in the jk2 branch and followed the guidelines as described:

gg = treecorr.GGCorrelation(bin_size=0.3, min_sep=10., max_sep=50.,
                            var_method='bootstrap2', num_bootstrap=10)

But it gives me this value error:

ValueError: Parameter var_method has invalid value bootstrap2. Valid values are ['shot', 'jackknife', 'sample', 'bootstrap', 'bootstrap2'].

I tried using bootstrap_2 instead of bootstrap2 and it was accepted as a keyword argument. It is probably just a typo.

enourbakhsh commented 4 years ago

It actually considers anything that starts with bootstrap (but just not with bootstrap2) as bootstrap.

GGCorrelation(config={'bin_size': 0.3, 'min_sep': 10.0, 'max_sep': 50.0, 'var_method': 'bootstrap', 'num_bootstrap': 10, 'brute': False, 'verbose': 1, 'split_method': 'mean', 'min_top': 3, 'max_top': 10, 'precision': 4, 'pairwise': False, 'm2_uform': 'Crittenden', 'metric': 'Euclidean', 'bin_type': 'Log'})

rmjarvis commented 4 years ago

Sorry about that. This should be fixed now on the jk2 branch. It's normally a feature to allow things to be shorter versions. So deg = degree = degrees for instance. But it messes things up here with bootstrap and bootstrap2. Now I check for an exact match first before allowing for possible short versions.