# Run KSB in multiband processing

**URL:** <https://www.rubin.community/t/run-ksb-in-multiband-processing/1388>\
**Category:** Support\
**Created:** [November 9, 2016, 5:15pm UTC](https://www.rubin.community/t/run-ksb-in-multiband-processing/1388 "2016-11-09T17:15:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nchotard](https://avatars.discourse-cdn.com/v4/letter/n/dfb087/32.png) [@nchotard](https://www.rubin.community/u/nchotard)\
**Post date:** [November 9, 2016, 5:15pm UTC](https://www.rubin.community/t/run-ksb-in-multiband-processing/1388/1 "2016-11-09T17:15:57Z")

</div>

Hello,

We would like to run KSB along with other shape measurements code in the multiband processing step. What is the configuration to be used in order to do that? The idea would be to have all these results in the same catalog for a given multi band processing.

Thanks,

Nicolas

---

<div class="post-metadata">

**Author:** ![jbosch](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/jbosch/32/12_2.png) [@jbosch](https://www.rubin.community/u/jbosch)\
**Post date:** [November 9, 2016, 6:43pm UTC](https://www.rubin.community/t/run-ksb-in-multiband-processing/1388/2 "2016-11-09T18:43:40Z")

</div>

The config snippet below will enable all of the shear estimation algorithms in the HSM package when running `multiBandDriver.py`. If you’re instead running `measureCoaddSources.py` directly, adjust the last line to remove that part of the option name.

The first four plugins generate PSF-corrected ellipticities of some sort, and I believe they all rely on the latter two, which compute the raw moments of the source and the PSF model at that position. Note that only Regaussianization has received much testing, and the ellipticities returned by different methods cannot all be interpreted the same way.

```
import lsst.meas.extensions.shapeHSM
hsm_plugins = set([
    "ext_shapeHSM_HsmShapeBj", # Bernstein & Jarvis 2002
    "ext_shapeHSM_HsmShapeLinear", # Hirata & Seljak 2003
    "ext_shapeHSM_HsmShapeKsb", # KSB 1995
    "ext_shapeHSM_HsmShapeRegauss", # Hirata & Seljak 2003
    "ext_shapeHSM_HsmSourceMoments",# Not PSF corrected; used by all of the above
    "ext_shapeHSM_HsmPsfMoments", # Moments of the PSF, used by all of the above
])
config.measureCoaddSources.measurement.plugins.names |= hsm_plugins
```
