CLEAN Boxes

Clean boxes are used in the CLEAN image reconstruction algorithm to define the locations where we expect source(s) to be found. There are two ways to set clean boxes - using clean_box to define rectangular areas, or clean_cw_nop and clean_cw_list to define regions of any shape.

clean_cw_nop, clean_cw_list: This method can handle clean boxes that are any shape. clean_cw_list is a (2,n) array of x,y coordinates that define the vertices of each clean box. clean_cw_nop is a vector giving the number of elements in clean_cw_list that correspond to each clean box. For example, if cw_nop_list is a (2,9) and cw_nop = [4,5], then clean_cw_list[*,0:3] are the vertices for the first clean box (a triangle), and clean_cw_list[*,[4:8] are the vertices for the second clean box (a rectangle).

clean_box: clean_box can only be used to define rectangular clean boxes. clean_box is a (4,n) array, where the 4 elements of the first dimension are xlo, ylo, xhi, yhi, and the second dimension is the box number.

If clean_box, clean_cw_nop, and clean_cw_list are all defined, clean_cw_nop/clean_cw_list take priority.

Note: the graphical method for setting clean boxes (by setting clean_mark_box to 1) uses only clean_cw_nop/clean_cw_list. It does not know about any boxes set via the clean_box parameter.