Background Weighted Image Centroid

Compute zero-based pixel-center weighted moments after constant background subtraction and nonnegative flux clipping; not a PSF fit.

Description

A flux-weighted centroid finds the center of supplied image samples after background correction.

A flux-weighted centroid finds the center of supplied image samples after background correction. Clipping negative corrected values makes the weights nonnegative but changes the estimator compared with signed-flux moments.1

Compute zero-based pixel-center weighted moments after constant background subtraction and nonnegative flux clipping; not a PSF fit.

When to use Background Weighted Image Centroid

Use this tool to compute zero-based pixel-center weighted moments after constant background subtraction and nonnegative flux clipping; not a PSF fit.

Prepare the source, detector or coordinate measurements. Confirm frame, epoch, angular units, axis directions and the stated RA proper-motion convention before entering values.

How to use Background Weighted Image Centroid and understand its results

  1. Prepare the source, detector or coordinate measurements. Confirm frame, epoch, angular units, axis directions and the stated RA proper-motion convention before entering values.
  2. Enter pixelValues, backgroundPerPixel using the field table and calculation rules, then run the tool.
  3. Read centroidX, centroidY, positiveFlux. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
Input fieldMeaningValue type; see rules belowRequirement
pixelValuesPixel valueslist of list of numberRequired
backgroundPerPixelBackground per pixelnumberRequired

Enter a rectangular nonnegative image from 1×1 through 128×128 and nonnegative constant background. The total positive corrected flux must be greater than zero. The tool returns centroid x/y using zero-based pixel-center indices, with x the column and y the row, plus the positive flux sum.

centroidX=Σx weight/Σweight; centroidY=Σy weight/Σweight; weight=max(0,pixel−background)

Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.

Output fieldMeaningValue type
centroidXCentroid xnumber
centroidYCentroid ynumber
positiveFluxPositive fluxnumber
json
{
  "input": {
    "pixelValues": [
      [
        1,
        1
      ],
      [
        1,
        5
      ]
    ],
    "backgroundPerPixel": 1
  },
  "output": {
    "centroidX": 1,
    "centroidY": 1,
    "positiveFlux": 4
  }
}

Limitations and assumptions

No PSF fit, source detection, spatial background model or centroid uncertainty is calculated. Multiple sources and clipping can bias the center; it operates on the supplied image patch only.

Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Matrices are limited to 128 rows and 128 entries per row; other lists are limited to 100,000 entries. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.

Alternative or Complementary methods

Use Astrometric Reduced Chi Square: Evaluate weighted astrometric residual chi-square and a supplied reduced-chi-square criterion; independent correctly estimated errors are assumed. For a complementary task, use Iterative Astrometric Sigma Clip: Iteratively clip residuals using recalculated sample standard deviation, retaining original indices and a bounded iteration count.

References

  1. Background Weighted Image Centroid — tool.io

Similar or alternative tools

  • Astrometric Reduced Chi Square

    Evaluate weighted astrometric residual chi-square and a supplied reduced-chi-square criterion; independent correctly estimated errors are assumed.

  • Iterative Astrometric Sigma Clip

    Iteratively clip residuals using recalculated sample standard deviation, retaining original indices and a bounded iteration count.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies