# Using the base\_Sdss\_shape measurements - errors missing?

**URL:** <https://www.rubin.community/t/using-the-base-sdss-shape-measurements-errors-missing/4306>\
**Category:** Support\
**Created:** [August 7, 2020, 6:31pm UTC](https://www.rubin.community/t/using-the-base-sdss-shape-measurements-errors-missing/4306 "2020-08-07T18:31:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![richardxdubois](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/richardxdubois/32/1171_2.png) [@richardxdubois](https://www.rubin.community/u/richardxdubois)\
**Post date:** [August 7, 2020, 6:31pm UTC](https://www.rubin.community/t/using-the-base-sdss-shape-measurements-errors-missing/4306/1 "2020-08-07T18:31:02Z")

</div>

In analyzing spot projector data, we’re using CharacterizeImageTask to do the source finding. I’d like to get the errors on the centroids (base\_Sdss\_shape\_x, \_y), but am finding that columns for base\_Sdss\_shape\_xErr and \_yErr are absent. Here is the code used (by Adam Snyder, in fact) to find the spots:

> <https://github.com/lsst-camera-dh/eotest/blob/master/python/lsst/eotest/sensor/spotTask.py>

I was thinking I could make do with the moments, \_xx and \_yy, and then use InstrFlux to estimate the centroid error. I imagine there must be some scale factor needed on InstrFlux to properly get the centroid error.

So, two questions - should we have expected the centroid errors to be produced; and if not, how to get them.

Thanks!

Richard

---

<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:** [August 9, 2020, 9:55pm UTC](https://www.rubin.community/t/using-the-base-sdss-shape-measurements-errors-missing/4306/2 "2020-08-09T21:55:08Z")

</div>

Computing a complete uncertain covariance matrix in `SdssShape` has been a known issue since we inherited from the code from SDSS before the start of construction; it’s just never been a high priority.

That’s mostly because we don’t use the centroid that comes out of `SdssShape` much; it’s mostly there as a diagnostic - the centroid the second moments were computed about. If you want a real centroid (with errors), use `SdssCentroid` instead.

In fact, you’re probably best off looking at the `slot_Centroid_*` fields, rather than depending explicitly on `SdssCentroid` - those are aliases that will always point to what we consider the best centroid measurement for that image (which is currently `SdssCentroid` in all single-epoch processing, but may not always be).

---

<div class="post-metadata">

**Author:** ![richardxdubois](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/richardxdubois/32/1171_2.png) [@richardxdubois](https://www.rubin.community/u/richardxdubois)\
**Post date:** [August 9, 2020, 10:24pm UTC](https://www.rubin.community/t/using-the-base-sdss-shape-measurements-errors-missing/4306/3 "2020-08-09T22:24:59Z")

</div>

Thanks, Jim. I do see SdssCentroid columns for x and y; the xErr and yErr columns are present, but are all zeroes. There are no moments or flux columns. Is there a setting to enable them?

Is there a writeup somewhere describing these various measurement types?

Richard

---

<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:** [August 10, 2020, 1:07am UTC](https://www.rubin.community/t/using-the-base-sdss-shape-measurements-errors-missing/4306/4 "2020-08-10T01:07:50Z")

</div>

> [@richardxdubois](#):
>
> I do see SdssCentroid columns for x and y; the xErr and yErr columns are present, but are all zeroes.

I think this probably means that your script is not setting the variance plane of the image before passing it off to `CharacterizeImageTask`. In our pipelines that’s the responsibility of `IsrTask`; if you’re not running that because you’ve got your own variant, you’ll need to add something that sets the variance according to the gains and pixel values.

> [@](#):
>
> There are no moments or flux columns. Is there a setting to enable them?

Different algorithms are responsible for different measurements. For second moments, you’ll probably want to continue to use `SdssShape` instead of `SdssCentroid` (or use the `slot_Shape` alias).

For photometry, it depends on what kind of photometry. `base_PsfFlux` and `base_CircularApertureFlux` are probably the simplest choices in that category. I _think_ all of these should be included in the default configuration of `CharacterizeImageTask`; they’re definitely included in the default configuration of `CalibrateTask`, so a config dump of that could be used to show a relatively complete set. The syntax for enabling algorithms is something like this:

```auto
# Assumes 'config' is an instance of CharacterizeImageTask.ConfigClass.
# The .names attribute behaves like a Python set.
config.measurement.names |= {"base_SdssShape", "base_PsfFlux"}

```

I’m afraid we don’t have any high-level docs that covers all algorithms. And the docs for individual algorithms are at best inconsistent in quality. Asking here is still probably the best way to get (and effectively add to) documentation.
