lsst-camera-visualization / frontend

Frontend
0 stars 0 forks source link

Validate backend commands #12

Closed jbpagliuco closed 7 years ago

jbpagliuco commented 7 years ago

Make sure noise and average pixel output the correct values

jbpagliuco commented 7 years ago

@jonthaler What's the formula for the second moment for an image?

jonthaler commented 7 years ago

The second moment, x2, is the mean of the square of the deviation of a set of numbers, {xi}, from their mean, xav.

That is, x2 = Sum((xi-xav)2)/N. To avoid scanning over the data twice, it can be rewritten, using xav =Sum(xi)/N, as x2 = Sum(xi2)/N - (Sum(xi))/N)2. However this is more susceptible to numerical errors when x2 << xav2.

You want to display the standard deviation (usually denoted by greek sigma) which is Sqrt(x2).

Jon

On May 15, 2017, at 12:54, Joe Pagliuco notifications@github.com wrote:

@jonthaler https://github.com/jonthaler What's the formula for the second moment for an image?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lsst-camera-visualization/frontend/issues/12#issuecomment-301553029, or mute the thread https://github.com/notifications/unsubscribe-auth/AOH15Xfq_nDSdnj5odY3k2toBnR8YLhoks5r6JFbgaJpZM4NGjMO.