-
Notifications
You must be signed in to change notification settings - Fork 9
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
martinkilbinger
wants to merge
22
commits into
develop
Choose a base branch
from
martin
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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 a6dfb09
removed unused submodule
sfarrens 600f362
created branch martin from develop
martinkilbinger 64baaa6
Added notebook on measuring shear bias
martinkilbinger fb96325
added bias-definition notebook
martinkilbinger b3e5293
small changes to bias-definition notebook
martinkilbinger 8ba9bdb
Adding python code to measuring-bias; need to install shear_bias
martinkilbinger 66db4f9
measuring bias using galsim, images can be created using command line…
martinkilbinger 47bed88
Some updates by hand from develop
martinkilbinger e8f281a
Merge remote-tracking branch 'upstream/develop' into martin
martinkilbinger 719acd4
merge conflict solved
martinkilbinger e44b1fc
Merge branch 'CosmoStat-develop' into martin
martinkilbinger cd6df08
measuring bias: PSF and gal loop
martinkilbinger 16ad417
measuring bias: image creation done
martinkilbinger 6058c6f
measuring bias: create plot
martinkilbinger 5e28666
env added shear_bias
martinkilbinger c8ecf08
bias-def updated
martinkilbinger 7f3a2df
bias refs
martinkilbinger 89fc683
Merge branch 'martin' of github.com:martinkilbinger/Shear-and-PSF-Rea…
martinkilbinger 5a43d55
bias: test of mean and std of dg
martinkilbinger e4e5892
Update shearbook/bias/bias-definition.ipynb
martinkilbinger fd7126a
Update shearbook/_bibliography/z_bias.bib
martinkilbinger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ dependencies: | |
- galsim | ||
- pip: | ||
- jupyter-book | ||
- shear_bias |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
"\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 | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
My bad, there should have been two \ in the change I suggested