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

Shear validation test: high-z bug fixes and mag cut implemented #149

Merged
merged 22 commits into from
Jan 23, 2019

Conversation

patricialarsen
Copy link
Contributor

The updates for the test are as follows:

  • catch for missing cosmology
  • bug fix for high redshift theory
  • magnitude cut to speed up test

There was a bug stopping the theory correlations being computed above redshift 2, I've also added a magnitude cut for a magnitude quantity and limit defined in the yaml file (note that current default is for umachine set-up) to let the test run in a more reasonable time-frame.

The portal link should be: https://portal.nersc.gov/project/lsst/descqa/v2/?run=2018-08-24_15

@patricialarsen
Copy link
Contributor Author

summary
(as portal is currently down)

@evevkovacs
Copy link
Contributor

@cwwalter @patricialarsen Please see the plot above in answer to you question about the level of agreement between the theory and catalog over the full range of redshifts provided in the catalog. (The plot we showed this morning was only for z=0.6) Thanks Patricia for updating this 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.

@patricialarsen thanks for the PR. I made several comments. Also, n_s and sigma_8 are available in the cosmology attribute for most catalogs. What's the purpose of f1?

descqa/shear_test.py Outdated Show resolved Hide resolved
descqa/shear_test.py Outdated Show resolved Hide resolved
descqa/shear_test.py Outdated Show resolved Hide resolved
descqa/shear_test.py Outdated Show resolved Hide resolved
descqa/shear_test.py Outdated Show resolved Hide resolved
descqa/shear_test.py Outdated Show resolved Hide resolved
descqa/shear_test.py Outdated Show resolved Hide resolved
descqa/shear_test.py Outdated Show resolved Hide resolved
descqa/shear_test.py Outdated Show resolved Hide resolved
descqa/shear_test.py Outdated Show resolved Hide resolved
@patricialarsen
Copy link
Contributor Author

@yymao thanks for the comments, I've addressed these all. f1 was just for my own debugging - this has been removed. I don't see an ns or sigma8 value in the cosmology instance - how do I access these?

@patricialarsen patricialarsen changed the title high-z bug fixes and mag cut implemented Shear validation test: high-z bug fixes and mag cut implemented Aug 24, 2018
@yymao
Copy link
Member

yymao commented Aug 24, 2018

@patricialarsen Here's an example of accessing n_s and sigma8 of cosmoDC2

cat = GCRCatalogs.load_catalog('cosmoDC2_v0.1')
cat.cosmology.n_s
cat.cosmology.sigma8

If you didn't find n_s and sigma8 in the catalog that you are using, you can open an issue in https://github.com/LSSTDESC/gcr-catalogs

@yymao
Copy link
Member

yymao commented Aug 26, 2018

@patricialarsen also, I think the adding the native quantity mag name in the test config is also not ideal. We should really be using the mag name in the schema.

@patricialarsen
Copy link
Contributor Author

Just pushing an update now - magnitude cut is now on the proper schema value in the config file as well as the test default. I have also included the n_s and sigma_8 values properly when available.

The test runs fine on cosmoDC2_v0.2 when a maximum redshift value of 1 is used.
(the link to this is https://portal.nersc.gov/project/lsst/descqa/v2/?run=2018-08-27_7, but I'm having troubles with the portal again - I've looked at the plot on nersc and it looks fine).

Note though that the default redshift range of this test has been extended up to 3, which will cause issues if you're using a protoDC2 catalog. So before the proper base cosmoDC2 is out you probably want to cut the maximum redshift in the config file to 1 for testing..

@patricialarsen
Copy link
Contributor Author

summary
@yymao here's the summary figure for cosmoDC2_v0.2 (showing that it works by default on the catalog format) since the portal is timing out. I think I've covered all your suggestions, unless there's anything else you'd like changed?

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.

I added some inline comments, but I have some other comments that are coming in a bit.

descqa/shear_test.py Outdated Show resolved Hide resolved
descqa/shear_test.py Outdated Show resolved Hide resolved
descqa/shear_test.py Outdated Show resolved Hide resolved
descqa/shear_test.py Outdated Show resolved Hide resolved
@yymao
Copy link
Member

yymao commented Aug 27, 2018

  • Remove Line 51: obsolete comment
  • Remove Line 53: do not import within function
  • Change Line 54 to plt.rcParams['font.size'] = 9

@yymao
Copy link
Member

yymao commented Aug 27, 2018

Lines 94-95: use astropy's unit conversion like in Lines 102-104

@yymao
Copy link
Member

yymao commented Aug 27, 2018

Lines 134-136:
remove unused code/comments (or leave an explanation of why they should be preserved).

@yymao
Copy link
Member

yymao commented Aug 27, 2018

Line 142:
remove unused code/comments (or leave an explanation of why they should be preserved).

@yymao
Copy link
Member

yymao commented Aug 27, 2018

Lines 185-188: Store the mask labs != i for repeated use.

@yymao
Copy link
Member

yymao commented Aug 27, 2018

@patricialarsen sorry for my unorganized review comments. Most of them came to me after I reading a bit more into the code.

You mentioned about the redshift range won't work for protoDC2. Is that mostly due to how the tomographic bins are set up (i.e., https://github.com/LSSTDESC/descqa/blob/22b4001/descqa/shear_test.py#L303)? Can we check the max redshift (:= z_max) in the catalog, and if less then self.zhi, replace self.zhi with z_max?

@patricialarsen
Copy link
Contributor Author

@yymao sorry for the delay in this - in the latest commit I fixed the maximum redshift as suggested and think I fixed all the other minor issues you mentioned but that was a week or two back so I should probably recheck and make sure I didn't miss any.

Patricia Larsen and others added 5 commits September 11, 2018 15:52
Required as time has passed since the pull request, need to update several tests
…into shear_fixes

These differ presumably due to update from other clone or web server, need to merge to update
@patricialarsen
Copy link
Contributor Author

@yymao I have double-checked the corrections mentioned in your review, updated with respect to the master, and verified that this still runs. The travis build doesn't complete seemingly due to an issue with the camb installation. To remind you of the changes here:

  • maximum redshift gets corrected to maximum survey redshift to prevent crash on prototype catalog

  • cosmological parameters and unit corrections updated

  • magnitude cuts implemented (to reduce compute time)

  • catch for missing cosmology

There's one new change, which is to incorporate the redshift and magnitude cuts properly into the jackknife part of the code so that it's consistent with the other updates. At least on my end I think this pull request is ready to be merged.

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.

Thanks @patricialarsen. I made some minor linter/style suggestions. Otherwise this looks good!

descqa/shear_test.py Show resolved Hide resolved
descqa/shear_test.py Show resolved Hide resolved
descqa/shear_test.py Outdated Show resolved Hide resolved
descqa/shear_test.py Outdated Show resolved Hide resolved
descqa/shear_test.py Outdated Show resolved Hide resolved
descqa/shear_test.py Outdated Show resolved Hide resolved
descqa/shear_test.py Outdated Show resolved Hide resolved
descqa/shear_test.py Outdated Show resolved Hide resolved
yymao and others added 8 commits January 22, 2019 10:13
Co-Authored-By: patricialarsen <tricia340@gmail.com>
Co-Authored-By: patricialarsen <tricia340@gmail.com>
Co-Authored-By: patricialarsen <tricia340@gmail.com>
Co-Authored-By: patricialarsen <tricia340@gmail.com>
Co-Authored-By: patricialarsen <tricia340@gmail.com>
Co-Authored-By: patricialarsen <tricia340@gmail.com>
Co-Authored-By: patricialarsen <tricia340@gmail.com>
Co-Authored-By: patricialarsen <tricia340@gmail.com>
@patricialarsen
Copy link
Contributor Author

@yymao thanks for the suggestions! I've committed them all, and have run the test again to double check everything is still working.

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.

Thanks @patricialarsen. Once it passes the CI test we can merge this.

@yymao yymao merged commit 0de793f into LSSTDESC:master Jan 23, 2019
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.

3 participants