HELP · SEE_ALSO
fixdiodes -- Fix FOS spectra for dead or noisy diodes.
fixdiodes images pixels mode
The fixdiodes task corrects the pixel values in FOS spectra for effects due to noisy diodes or the use of inappropriate dead diode tables during the pipeline calibration process. Pixels values affected by dead diodes are simply scaled by an appropriate factor to account for the lack of detected counts from the dead diode. Pixels affected by noisy diodes are assigned new values by linear interpolation from the nearest "good" pixels on either side.
The user specifies the desired correction mode (either scaling or interpolation) via the dmode parameter, setting it to either "dead" or "noisy". The pixels to be operated on are specified as a list via the parameter pixels. This list must contain the starting pixel index for each range of bad pixels within the spectrum. For example, if you have a spectrum where pixels 1709 through 1728 are affected by a noisy diode (each diode contributes to a total of NXSTEPS * OVERSCAN pixels), simply set pixels = 1709, the index of the first pixel in the range. The task will compute the total number of pixels affected by each diode based on the values of the NXSTEPS and OVERSCAN image header keywords. Similarly, if you have a spectrum where two dead diodes have affected pixels 877-896 and 1885-1904, respectively, set pixels = 877,1885.
When correcting for noisy diodes, the task calculates the mean value of a total of boxsize pixels on either side of the range of bad pixels and assigns new values to the affected pixels by linear interpolation between the two mean values on either side.
- images [file name template]
- Input image name or list. Images are operated on "in-place", i.e. a new output image is NOT created. Therefore you may want to work with a copy of the original image while experimenting.
- pixels [string]
- List of starting pixel index(es) for each range of pixel values to be corrected.
- dmode [string, allowed values: dead | noisy]
- Desired correction mode. "Dead" will cause the task to calculate appropriate scale factors for the affected pixels based on the relative fractions of "live" and "dead" diodes that contribute to each pixel, while "noisy" mode computes new pixel values based on linear interpolation from surrounding regions of good pixels.
- (boxsize = 3) [integer, min=1, max=999]
- Boxsize (in pixels) of the region on either side of each bad pixel range used to perform linear interpolation when dmode = noisy. The mean pixel value within each box is computed and used as the basis for the linear interpolation. This parameter is ignored when dmode = dead.
- (verbose = yes) [boolean]
- Print information about pixels being operated on?
1. Interpolate across pixels 1709-1728 in the image y1jm0107t.c1h which have been affected by a noisy diode. Use the default boxsize of 3 pixels for computing the mean values of the surrounding good pixels.
fo> fixdiodes y1jm0107t.c1h 1709 noisy
2. Fix pixels 877-896 and 1885-1904 in the image y0cy0108t.c1h which was processed using the wrong dead diode table.
fo> fixdiodes y0cy0108t.c1h 877,1885 dead
Author: Howard Bushouse, STSDAS
For assistance using this or any other tasks, please contact email@example.com or call the help desk at 410-338-1082.