collapse - collapses Ultracam frames

collapse collapses an Ultracam frame in either the X or Y direction by summing or averaging over a specified range of X or Y. The window structure is retained, such that a window of nx by ny will become 1 by ny if collapsed in the X direction, or 0 by ny if collapsed in the X direction over an X range that does not overlap. This allows later use of the command expand. A simple operation such as a collapse becomes complex for multiple windows. One may in some cases want to treat each window separately but in others combine results. collapse has various options to make this possible. The lower-left corner coordinates of the windows are left untouched by this routine.

Invocation

collapse input dirn method bridge (x1 x2)/(y1 y2) medfilt output

Arguments

input---Input frame
dirn---Direction to collapse in, 'X' or 'Y'. dirn='X' means summing columns for instance.
method---'S' for sum, 'A' for average.
bridge---true if the profile is to cross adjacent windows, false if the collapse is only on a per window basis. The meaning of this is as follows. Say there are two windows of 100x100, one of which has a lower Y limit of 11 and the other 31, and you collapse in the X direction. If you don't bridge then each window ends up with an X dimension of 1, and a profile equal to the sum or average of its 2D equivalent. If you do bridge, the profiles will be summed or averaged in their region of overlap and this part will end up being the same for each window. In this case a window must have all its pixels covered by the combined profile to end up with a non-zero dimension in the collapse direction.
x1---If dirn='X', this is the first X value to include. Unbinned pixels. In the case of binning, a pixel must be wholly included in the range to contribute.
x2---If dirn='X', this is the last X value to include. Unbinned pixels. In the case of binning, a pixel must be wholly included in the range to contribute.
y1---If dirn='Y', this is the first Y value to include. Unbinned pixels. In the case of binning, a pixel must be wholly included in the range to contribute.
y2---If dirn='Y', this is the last Y value to include. Unbinned pixels. In the case of binning, a pixel must be wholly included in the range to contribute.
medfilt---half-width of median filter, 0 for none at all
output---Output, a frame in which one of the dimensions of the windows is collapsed to 1.

See also expand

Classes

This command is a member of the classes: Arithematic, Manipulation, Programs, Spectra.

Author: T.R. Marsh
Created: 07 November 2006
Revised: 02 December 2006


Page generated Fri Jul 5 12:23:42 2013