Class BoundaryAverage

java.lang.Object
skyview.process.Processor
skyview.process.deedger.BoundaryAverage
All Implemented Interfaces:
java.io.Serializable, Component

public class BoundaryAverage
extends Processor
This class adjusts the 0 point for data taken from multiple images to try to minize edge effects. The alogithm used in this version is as follows:
  1. Find all of the 'edge' pixels in the image and compute the jump over the edge.
    • We determine the edge pixels by looking at the source images of pixels which differ by one in the x or y dimension. We sweep in both directions
    • The jump is simply the change in value between the two pixels.
  2. Add the jump at each edge pixel to the any previous jumps for these two source images. When we finish we have a matrix of the total deltas along the edges shared by each pair of images. We compute the delta's in both directions, so that deltas[a][b] = - deltas[b][a] Also keep track of the number of edge pixels for each pair of images. [Note that many of the candidate images will not have been used in any pixels in the output image. This will simply correspond to empty rows and columsn in the deltas and counts matrices.]
  3. Create an offset array with a NaN offset for each input image.
  4. Find the source image which has the maximum number of pixels in the output image. Make this the base image with an offset of 0.
  5. Consider the source images in two sets: the set for which an offset has been defined, and a set for which it has not. Initially only the base image is in the first set and all others are in the undefined set.
  6. Find the largest entry in the counts matrix where the row corresponds to an image with a defined offset, and the column corresponds to an image with an undefined offset.
  7. Assign an offset to the image associcated with the column such that the total delta along the edge should become 0. Remember that the defined image will change too.
  8. Iterate until all images have an offset defined.
See Also:
Serialized Form
  • Constructor Summary

    Constructors 
    Constructor Description
    BoundaryAverage()  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getDescription()
    Get a description of this object
    java.lang.String getName()
    Get a name for this object
    void process​(Image[] inputs, Image output, int[] source, Sampler samp, DepthSampler dsamp)
    Initialized the de-edger.
    void updateHeader​(nom.tam.fits.Header h)
    Update a FITS header with the processing done here.
    boolean updatesOutput()
    Does this processor actually modify the output array?

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • updatesOutput

      public boolean updatesOutput()
      Description copied from class: Processor
      Does this processor actually modify the output array?
      Specified by:
      updatesOutput in class Processor
    • getName

      public java.lang.String getName()
      Get a name for this object
    • getDescription

      public java.lang.String getDescription()
      Get a description of this object
    • process

      public void process​(Image[] inputs, Image output, int[] source, Sampler samp, DepthSampler dsamp)
      Initialized the de-edger.
      Specified by:
      process in class Processor
      Parameters:
      inputs - The input images.
      output - The output user image
      source - The index array
      samp - The spatial sampler (not used)
      dsamp - The energy sampler (not used)
    • updateHeader

      public void updateHeader​(nom.tam.fits.Header h)
      Update a FITS header with the processing done here.
      Specified by:
      updateHeader in class Processor