[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Focus indication



Well, my real question was:  when you start talking
real-time, I assume you are adding features to Tom's
observing code which is written in Qbasic.  Now I guess
what you are doing is letting Tom spawn off to a C-code
program similar to what you are doing with the fits
file writer.
  So some basic information:
    (a) you do need to locate some star.  The obvious
        way is for Tom to use the cursor and select
        a star on some image display.  The less obvious
        way is to find a star in the central 200x200 region.
        That second method is not always easy; you have
        to be able to reject saturated stars,
        non-stars (such as cosmic rays or satellites),
        and stars that are contaminated by neighbors.
        Good luck -- this is the hard part.  The star you
        want has peak intensity about half-well and no
        neighbors within ~8 pixels in any direction.
    (b) once a star is located, you form a 'box' around
        the star, usually about 16x16 pixels.  In the
        x direction, you add up all pixels inside the box
        at each y position; that gives you a 16-element
        vector, which is called the y marginal sum vector
        (marginal comes from the 'margins' of the box).
        Similarly, for the y direction, you add up all pixels
        inside the box at each x position; this forms a
        16-element vector that is orthogonal to the first
        vector.  Once the vectors are formed, you can
        find the star's centroid in each vector (direction),
        and then the half-intensity points from that centroid
        by interpolation.  This centroiding method is described
        in any text that talks about centroiding, such as AIP
        or Ron Stone's 1970's AJ centroiding article.  It is
        quicker than fitting a full 2-D function and is adequate
        for Tom's needs.
Arne