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

Added tested bias validation test #87

Merged
merged 14 commits into from
Dec 2, 2020
Merged

Conversation

fjaviersanchez
Copy link
Contributor

@fjaviersanchez fjaviersanchez commented Mar 2, 2018

Validation test to compute galaxy bias in tomographic bins. I couldn't post the web interface because it needs CCL (currently not installed at the NERSC DESCQA shared install). I am attaching one plot for buzzard_test.

screen shot 2018-03-01 at 7 05 06 pm

The points are the measured correlation function and the lines are the theoretical prediction using the best fit bias and the input cosmological parameters (except for s8 and n_s since they are not in the cosmology astropy class).

Caveats: Fixed sigma8 and scalar index. Correlation function only. No validation criteria so far.

[Edited by @yymao: This PR fixes #75]

@yymao
Copy link
Member

yymao commented Mar 26, 2018

@morriscb has updated the code structure of the tcpf test (see #91) and I am thinking we can probably incorporate this bias test and also #73 into the new structure. What do you think, @fjaviersanchez @vvinuv? I will explore this path this week.

@vvinuv
Copy link
Contributor

vvinuv commented Mar 26, 2018

@yymao I think it is nice idea. @evevkovacs just send me message to measure the 2pt correlation from the catalogs

@morriscb
Copy link
Contributor

You should be able to spawn new tests against correlation function measurements by inheriting one of the Correlations classes and overwriting the score_and_test method of the class. You can do something similar with the plotting method. If you want an example you can look at https://github.com/LSSTDESC/descqa/pull/91 and check out the DEEP2StellarMassTwoPoint class as an example of doing this.

@yymao
Copy link
Member

yymao commented Mar 26, 2018

@morriscb thanks! I'll give it a try!

@vvinuv
Copy link
Contributor

vvinuv commented Mar 27, 2018 via email

@yymao
Copy link
Member

yymao commented Mar 27, 2018

@vvinuv I'm about to. Do you want me to wait?

@vvinuv
Copy link
Contributor

vvinuv commented Mar 27, 2018 via email

@fjaviersanchez
Copy link
Contributor Author

@yymao is there anything I can do to finish this PR? :)

@evevkovacs
Copy link
Contributor

@fjaviersanchez Could you please summarize the current status? Has the test incorporated the code developed by Chris Morrison (as suggested above)?

@fjaviersanchez
Copy link
Contributor Author

@evevkovacs not that I am aware of. Should I add that? It needs also a validation criteria that I think we decided to go with just to be an increasing function with redshift.

@evevkovacs
Copy link
Contributor

@fjaviersanchez I think it makes sense to re-use the existing code for computing the correlation functions. It has been vetted and tested by several people.
And yes, the validation criteria you mentioned is also what I recall.

@fjaviersanchez
Copy link
Contributor Author

Yes, I was using TreeCorr with @vvinuv's code. I'll switch to Chris'. Thanks!

@evevkovacs
Copy link
Contributor

@fjaviersanchez @yymao Has there been any further progress on this test? I gather that one issue is obtaining a theory prediction. Could we do something interim like generate a data file containing the theory prediction for the protoDC2 cosmology and use that? How close are we to having the test incorporated into DESCQA? Thanks.

@fjaviersanchez
Copy link
Contributor Author

@evevkovacs, Sorry for the delay! I started to change this last weekend to use Chris' code but I haven't been able to make it run properly. Yes, one issue is generating the theoretical prediction and that would require including CCL as a dependency. The approach that you suggest can be valid but then, we either have one set of redshift bins/redshift distributions that are valid or perform the integration of the power-spectra ourselves.

@evevkovacs
Copy link
Contributor

@fjaviersanchez How about doing the simplest thing for now and fixing the redshift bins?

@yymao
Copy link
Member

yymao commented May 25, 2018

In any case, CCL should be installed in the shared DESC Python environment. Let me check with Heather.

@fjaviersanchez
Copy link
Contributor Author

@yymao I updated the scripts but I don't get good results for the bias for protoDC2 nor buzzard_test. Could you please take a look at it? (the correlation function amplitudes are kind of low for some reason). Thanks!

@yymao
Copy link
Member

yymao commented Jun 6, 2018

@fjaviersanchez thanks for the update. I'm looking into this...

@yymao yymao added the paper label Dec 1, 2020
nz_data[sample_name] = (zcent, nz*1.0)

# Generate CCL tracer object to compute Cls -> w(theta)
tracer = ccl.ClTracerNumberCounts(cosmo, has_rsd=False, has_magnification=False,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ccl.ClTracerNumberCounts is no longer available in CCL.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @yymao! I'll update this tomorrow.

@fjaviersanchez
Copy link
Contributor Author

Alright, I updated the script to be able to run with the latest version of CCL. An example of the results can be found here: https://portal.nersc.gov/cfs/lsst/descqa/v2/?run=2020-12-02_5&test=bias_test

Copy link
Member

@yymao yymao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay! Thank you @fjaviersanchez

@yymao yymao merged commit cd3e1e2 into LSSTDESC:master Dec 2, 2020
@evevkovacs
Copy link
Contributor

@fjaviersanchez Can I try to run this on cosmoDC2? Will it work? Thanks

@fjaviersanchez
Copy link
Contributor Author

It runs. Results are here: https://portal.nersc.gov/cfs/lsst/descqa/v2/?run=2020-12-02_10

(Note the the bias values are pretty small. I think this is due to the super low mass galaxies that were added later on?)

@evevkovacs
Copy link
Contributor

OK, thanks. We can test this hypothesis by cutting those out. All you have to do is to filter on halo_id being positive. The ultra-faint galaxies all have negative halo_id's.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

redshift-dependent galaxy bias
5 participants