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

Bias definition & measurement #43

Open
wants to merge 22 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
4f95d4e
Adding link to develop branch
EiffL Oct 19, 2020
a6dfb09
removed unused submodule
sfarrens Nov 27, 2020
600f362
created branch martin from develop
martinkilbinger Nov 29, 2020
64baaa6
Added notebook on measuring shear bias
martinkilbinger Nov 29, 2020
fb96325
added bias-definition notebook
martinkilbinger Nov 29, 2020
b3e5293
small changes to bias-definition notebook
martinkilbinger Nov 30, 2020
8ba9bdb
Adding python code to measuring-bias; need to install shear_bias
martinkilbinger Nov 30, 2020
66db4f9
measuring bias using galsim, images can be created using command line…
martinkilbinger Dec 1, 2020
47bed88
Some updates by hand from develop
martinkilbinger Jan 22, 2021
e8f281a
Merge remote-tracking branch 'upstream/develop' into martin
martinkilbinger Jan 22, 2021
719acd4
merge conflict solved
martinkilbinger Mar 13, 2021
e44b1fc
Merge branch 'CosmoStat-develop' into martin
martinkilbinger Mar 13, 2021
cd6df08
measuring bias: PSF and gal loop
martinkilbinger Mar 14, 2021
16ad417
measuring bias: image creation done
martinkilbinger Mar 26, 2021
6058c6f
measuring bias: create plot
martinkilbinger Mar 26, 2021
5e28666
env added shear_bias
martinkilbinger Mar 27, 2021
c8ecf08
bias-def updated
martinkilbinger Mar 29, 2021
7f3a2df
bias refs
martinkilbinger Mar 29, 2021
89fc683
Merge branch 'martin' of github.com:martinkilbinger/Shear-and-PSF-Rea…
martinkilbinger Mar 29, 2021
5a43d55
bias: test of mean and std of dg
martinkilbinger Mar 29, 2021
e4e5892
Update shearbook/bias/bias-definition.ipynb
martinkilbinger Mar 30, 2021
fd7126a
Update shearbook/_bibliography/z_bias.bib
martinkilbinger Mar 30, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ $ conda activate shear
## Install the `shrbk` library

`shrbk` is the library made for this book.
Install it ither in development mode
Install it either in development mode

```bash
$ python -m pip install -e .
Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ dependencies:
- galsim
- pip:
- jupyter-book
- shear_bias
62 changes: 62 additions & 0 deletions shearbook/_bibliography/z_bias.bib
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,50 @@ @ARTICLE{2012MNRAS.424.2757M
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{PKSB17,
author = {{Pujol}, A. and {Kilbinger}, M. and {Sureau}, F. and {Bobin}, J.
},
title = "{A highly precise shape-noise-free shear bias estimator}",
journal = {\aap},
archivePrefix = "arXiv",
volume = {621},
pages = {A21},
keywords = {Astrophysics - Cosmology and Nongalactic Astrophysics},
year = 2019,
month = jan,
adsurl = {http://cdsads.u-strasbg.fr/abs/2018arXiv180610537P},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{2017arXiv170202600H,
author = {{Huff}, E. and {Mandelbaum}, R.},
title = "{Metacalibration: Direct Self-Calibration of Biases in Shear Measurement}",
journal = {arXiv},
archivePrefix = "arXiv",
volume = {1702.02600},
keywords = {Astrophysics - Cosmology and Nongalactic Astrophysics},
year = 2017,
month = feb,
adsurl = {http://adsabs.harvard.edu/abs/2017arXiv170202600H},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{SH17,
author = {{Sheldon}, E.~S. and {Huff}, E.~M.},
title = "{Practical Weak-lensing Shear Measurement with Metacalibration}",
journal = {\apj},
archivePrefix = "arXiv",
eprint = {1702.02601},
keywords = {cosmology: observations, gravitational lensing: weak, methods: observational},
year = 2017,
month = may,
volume = 841,
eid = {24},
pages = {24},
doi = {10.3847/1538-4357/aa704b},
adsurl = {http://adsabs.harvard.edu/abs/2017ApJ...841...24S},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
@ARTICLE{Bosch2018,
author = {{Bosch}, James and {Armstrong}, Robert and {Bickerton}, Steven and {Furusawa}, Hisanori and {Ikeda}, Hiroyuki and {Koike}, Michitaro and {Lupton}, Robert and {Mineo}, Sogo and {Price}, Paul and {Takata}, Tadafumi and {Tanaka}, Masayuki and {Yasuda}, Naoki and {AlSayyad}, Yusra and {Becker}, Andrew C. and {Coulton}, William and {Coupon}, Jean and {Garmilla}, Jose and {Huang}, Song and {Krughoff}, K. Simon and {Lang}, Dustin and {Leauthaud}, Alexie and {Lim}, Kian-Tat and {Lust}, Nate B. and {MacArthur}, Lauren A. and {Mandelbaum}, Rachel and {Miyatake}, Hironao and {Miyazaki}, Satoshi and {Murata}, Ryoma and {More}, Surhud and {Okura}, Yuki and {Owen}, Russell and {Swinbank}, John D. and {Strauss}, Michael A. and {Yamada}, Yoshihiko and {Yamanoi}, Hitomi},
title = "{The Hyper Suprime-Cam software pipeline}",
Expand Down Expand Up @@ -151,3 +195,21 @@ @article{Barbary2016
title = {SEP: Source Extractor as a library},
journal = {Journal of Open Source Software}
}

@ARTICLE{pujol_shear_bias_20,
author = {{Pujol}, Arnau and {Bobin}, Jerome and {Sureau}, Florent and {Guinot}, Axel and {Kilbinger}, Martin},
title = "{Shear measurement bias. II. A fast machine-learning calibration method}",
journal = {\aap},
keywords = {gravitational lensing: weak, methods: numerical, methods: data analysis, methods: observational, methods: statistical, cosmology: observations, Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - Instrumentation and Methods for Astrophysics},
year = 2020,
month = nov,
volume = {643},
eid = {A158},
pages = {A158},
doi = {10.1051/0004-6361/202038658},
archivePrefix = {arXiv},
eprint = {2006.07011},
primaryClass = {astro-ph.CO},
adsurl = {https://ui.adsabs.harvard.edu/abs/2020A&A...643A.158P},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
2 changes: 2 additions & 0 deletions shearbook/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@
chapters:
- file: bias/bias-intro
sections:
- file: bias/bias-definition
- file: bias/model-bias
- file: bias/noise-bias
- file: bias/measuring-bias
- file: bias/blending-bias
- file: bias/bias-ref
- file: calibration/calibration-intro
Expand Down
76 changes: 76 additions & 0 deletions shearbook/bias/bias-definition.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
" (sec:bias-definition)=\n",
"# Shear bias definition\n",
"\n",
"In most cases, shear bias can be decomposed in a multiplicative and an additive part.\n",
"\n",
"## Population shear bias\n",
"\n",
"First, we define the shear bias for a population of galaxies. Let us recall the equation that,\n",
"in the weak-lensing regime, relates observed and intrincic ellipticity to reduced shear,\n",
"\n",
"$$\\varepsilon^{\\textrm{obs}}_\\alpha = \\varepsilon^{\\textrm{I}}_\\alpha + g_\\alpha,$$\n",
"\n",
"for components $\\alpha = 1, 2$. If the mean intrinsic ellipticity is zero, $\\langle \\varepsilon^{\\textrm{I}}_\\alpha \\rangle = 0$, the observed ellipticity is an unbiased estimator of the shear, $\\langle \\varepsilon^{\\textrm{obs}}_\\alpha \\rangle = g_\\alpha$ in this basic case.\n",
"\n",
"Next, we introduce the ensemble-average additive bias $c_\\alpha$, and multiplicative bias $m_\\alpha$, and write\n",
"\n",
"$$\n",
"\\langle \\varepsilon^{\\textrm{obs}}_\\alpha \\rangle \\equiv g^{\\textrm{obs}} = c_\\alpha + (1 + m_\\alpha) g_\\alpha.\n",
"$$ (shear-estim-biased)\n",
"\n",
"A common calibration method is to estimate the population biases $c_\\alpha$, $m_\\alpha$, by simulating a large number of galaxy images with different properties and shear. These measured values are then applied to the observed galaxy ellipticities. The quantity $(\\varepsilon^{\\textrm{obs}}_\\alpha - c_\\alpha) / (1 + m_\\alpha)$ is then an unbiased estimator of the reduced shear.\n",
"\n",
"## Individual galaxy shear bias\n",
"\n",
"We now define the shear bias for an individual galaxy, and show that the ensemble average of this individual bias\n",
"can be identified with the population shear bias defined above.\n",
"\n",
"The multiplicative bias in {eq}`shear-estim-biased` can be interpreted as derivative, or response, of the average observed ellipticity with respect to the shear. Instead of using the average ellipticity however, we instead compute this derivative of the ellipticity of an individual galaxy. In addition, we generalise this derivative and \n",
"account for the two-component nature of ellipticity. This defines the response matrix $R$ ({cite}`2017arXiv170202600H`, {cite}`SH17`) by\n",
"\n",
"$$\n",
"R_{\\alpha\\beta} = \\frac{\\partial \\varepsilon^{\\textrm{obs}}_\\alpha}{\\partial g_\\beta} .\n",
"$$ (R)\n",
"\n",
"The additive shear bias for an individual galaxy can be defined as well,\n",
"\n",
"$$a_\\alpha = \\varepsilon^{\\textrm{obs}}_\\alpha - R_{\\alpha\\alpha} g_\\alpha - \\varepsilon^{\\textrm{I}}_\\alpha .$$\n",
"\n",
"This quantity can be computed in the case of image simulations where the intrinsic ellipticity $\varepsilon^{\\textrm{I}}$ is known.\n",
Copy link

Choose a reason for hiding this comment

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

Suggested change
"This quantity can be computed in the case of image simulations where the intrinsic ellipticity $\varepsilon^{\\textrm{I}}$ is known.\n",
"This quantity can be computed in the case of image simulations where the intrinsic ellipticity $\\varepsilon^{\\textrm{I}}$ is known.\n",

My bad, there should have been two \ in the change I suggested

"\n",
"By applying the ensemble average to {eq}`R` and comparing to {eq}`shear-estim-biased`, we find the equalities\n",
"$\\langle R_{\\alpha\\alpha} \\rangle = m_\\alpha$, and $\\langle a_\\alpha \\rangle = c_\\alpha$.\n",
"\n",
"With calibration schemes where individual shear bias are measured, for example using metacalibration ({cite}`2017arXiv170202600H`), or deep learning ({cite}`pujol_shear_bias_20`), one applies the ensemble-averaged response matrix and additive shear vector o the observed galaxy ellipticities as\n",
"$\\langle R \\rangle^{-1} \\left( \\vec \\varepsilon^{\\textrm{obs}} - \\langle \\vec a \\rangle \\right)$."
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.2"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
Loading