FitStarHist:

Path: SpacecraftEstimation/StarProcessing

% Fit a 2D gaussian to a star image

 Calculate a histogram  of the pixels and fit a 2D Gaussian. The height of the
 marginal distributions, that is the sum along each coordinate, is related to
 the height of the circular distribution by 1/sqrt(2*pi).

--------------------------------------------------------------------------
   Form:
   [xfit,sigma,height,iter] = FitStarHist( pixels, x0, doPlot )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   pixels  (:,:) Pixels
   x0      (2,1) Center
   doPlot  (1,1) If true, plot

   ------
   Outputs
   ------
   xfit    (2,1)  Gaussian center
   sigma   (2,1)  Standard deviation
   height  (2,1)  Height
   iter    (1,1)	Number of iterations in the Newton-Gauss method

--------------------------------------------------------------------------
   Copyright (c) 2018 Princeton Satellite Systems, Inc.
   All rights reserved.
--------------------------------------------------------------------------
   Since 2018.1
--------------------------------------------------------------------------

Children:

Common: General/DispWithTitle

Back to the SpacecraftEstimation Module page