GalSim-developers / GalSim

The modular galaxy image simulation toolkit. Documentation:
http://galsim-developers.github.io/GalSim/
Other
228 stars 107 forks source link

HSM ShapeData #646

Closed dkirkby closed 9 years ago

dkirkby commented 9 years ago

The hsm.ShapeData returned by hsm.EstimateShear() seems to always have corrected_g1,2 == -10. and corrected_shape_err == 0.. The ShapeData docs refer to a meas_type parameter that would switch between e1,2 and g1,2 but I don't see this parameter in the EstimateShear arg list or in HSMParams. Is there no way to estimate g1,2 from the python layer? Is it possible to enable the shape error calculation?

rmandelb commented 9 years ago

Hi David - if you're using re-Gaussianization, which is the default shear estimation method, then it returns PSF-corrected distortions and uncertainties (e-type shear, not g-type shear). If you want a method that returns a g-type shear, your only option is KSB, which you can select using the shear_est='KSB' option to EstimateShearHSM.

meas_type is not a kwarg, it's actually an entry in the ShapeData object that tells you, for the chosen measurement type (re-Gaussianization, linear, KSB, etc.), what type of measurement was done (e- or g-type shape).

rmandelb commented 9 years ago

BTW if you want a shape uncertainty, you have to give EstimateShearHSM a variance for the noise in the image. If you're not doing that, it'll always return 0, since it uses a formula for shape uncertainty that is linearly proportional to the square root of the sky variance.

rmandelb commented 9 years ago

Sorry, I should have said: if you read Hirata & Seljak (2003) you'll see that re-Gaussianization and two of the other methods are literally only defined for distortions, not shears. So that's why you can't choose to switch between them.

dkirkby commented 9 years ago

Thanks for the clarifications!

On Wed Feb 11 2015 at 4:07:49 PM Rachel Mandelbaum notifications@github.com wrote:

Sorry, I should have said: if you read Hirata & Seljak (2003) you'll see that re-Gaussianization and two of the other methods are literally only defined for distortions, not shears. So that's why you can't choose to switch between them.

— Reply to this email directly or view it on GitHub https://github.com/GalSim-developers/GalSim/issues/646#issuecomment-73992345 .

rmandelb commented 9 years ago

No problem. I just pushed a commit to the master branch that clarifies the docstrings, https://github.com/GalSim-developers/GalSim/commit/d31076af787c447dfeee662ec59c9f1575eb22b2, but please let me know if you think it would be helpful to add anything else. Otherwise I will close this issue.

dkirkby commented 9 years ago

Looks great!

On Wed Feb 11 2015 at 4:25:51 PM Rachel Mandelbaum notifications@github.com wrote:

No problem. I just pushed a commit to the master branch that clarifies the docstrings, d31076a https://github.com/GalSim-developers/GalSim/commit/d31076af787c447dfeee662ec59c9f1575eb22b2, but please let me know if you think it would be helpful to add anything else. Otherwise I will close this issue.

— Reply to this email directly or view it on GitHub https://github.com/GalSim-developers/GalSim/issues/646#issuecomment-73994405 .

rmandelb commented 9 years ago

Glad to hear it.

Closing #646.