flall -- Do all steps needed to make a uniform detector efficiency (UNI) file.
flall input input2 intable output
This script takes as input a list of flat fields and produces one image in RSDP UNI file format. Optional inputs are an external flat field (for filling in a corner of an f/48 internal flat) and a mask table (for interpolating along vertical strips over fingers, etc.)
Both the images and the focutility packages must be loaded before running this task.
All input images are assumed to be 512 x 1024 in size. If there is more than one input image, they will be added together using the imcombine task. If an external flat (i.e., the input2 parameter) was specified, then the flcorner task will be run to splice in a corner of that image. A portion of the border will be trimmed off using flborder. If a mask table (i.e., the intable parameter) was specified, then the flvmask task will be run to fill in the masked regions. The median and gauss tasks can then be run to smooth the image. The blkrep task is then used to "dezoom" the image. The reciprocal is taken using rsdpunix, which also converts to proper UNI file format. Finally, the result is normalized to unit average within a central region.
Note that median filtering and Gaussian smoothing can be very time consuming. Median filtering can be turned off by setting medfilt=no, and you have a choice of Gaussian, boxcar, or no smoothing.
- input = "" [file name template]
- Names of the input images. If more than one image is specified, they will be added together using the imcombine task.
- input= "" [string]
- Name of the f/48 external flat file. If a name is specified, the upper right hand corner (large X, large Y) will be spliced into the input image to correct for nonillumination at the corner. The y1, y2, and slope parameters define a pair of parallel lines with Y intercepts y1 and y2. Below these lines only input will be used; above these lines only input2 will be used; between them the result is a linear combination of the two.
- intable = "" [string]
- Name of mask table. If a name is specified, the masked regions will be filled in by interpolating (in the vertical direction) between adjacent unmasked pixels. The flmakev task creates a mask table from a mask image (where non-zero is "bad").
- output = "" [string]
- Name of the output UNI file.
- (y= 1708.8) [real]
- Y intercept of lower line. y1, y2, and slope are only used if input2 is not null.
- (y= 1908.8) [real]
- Y intercept of upper line.
- (slope = -2.446) [real]
- Slope of lines.
- (left_b = 18) [integer, min=0, max=INDEF]
- Size of left border. The four border parameters are used by flborder, which fills in each border with values from the nearest pixels.
- (right_b = 5) [integer, min=0, max=INDEF]
- Size of right border.
- (top_b = 6) [integer, min=0, max=INDEF]
- Size of top border.
- (bottom_b = 6) [integer, min=0, max=INDEF]
- Size of bottom border.
- (medfilt = yes) [boolean]
- Perform median filtering?
- (width = 7) [integer, min=1, max=INDEF]
- Width in X for median filter.
- (sm_option = "gauss") [string, Allowed values: gauss | boxcar | none]
Type of smoothing to be performed; options are to perform Gaussian smoothing, boxcar smoothing, or neither. Smoothing, especially using a Gaussian filter, can take a very long time. This option should be set to "gauss" to prepare the final UNI files, but for testing boxcar smoothing may be sufficient. If either Gaussian or boxcar smoothing is selected, the image will first be reduced to 512 x 512 using the blkavg task to save time during the smoothing.
- (box = 9) [integer, min=1, max=INDEF]
- A square box of the specified size will be used for boxcar smoothing.
- (sigma = 7.6439) [real]
- Sigma for the Gaussian filter. The default value corresponds to a FWHM of 9 pixels.
- (nsigma = 2.75) [real]
- Width of Gaussian filter--the units are sigmna. The default value should give a kernel size of 21 x 21 pixels.
- (threshold = 1.e10) [real]
- The rsdpunix task takes the reciprocal of an image. If the quotient for xome pixel exceeds this value, then the result will be replaced by the value passed to the fillval parameter.
- (fillval = 1.e10) [real]
- Replacement value if threshold is exceeded.
- (norm= 31) [integer]
- The flnorm task normalizes an image so that the average in the central norm1 x norm2 region is unity.
- (norm= 31) [int]
- Y size of box for normalizing.
- (verbose = yes) [boolean]
- Print names of tasks during operation?
- (unitmpl = "focutility$tmplrsdpunix.hhh") [string]
- UNI template header used by the rsdpunix task.
This task was written by Phil Hodge.