jbmedian¶
- sofia_redux.instruments.forcast.jbclean.jbmedian(data, width=4, bar_spacing=16, mode='wrap')[source]¶
Remove jailbars using the median of correlated columns
Replace the jailbar pattern with the median of correlated columns (every 16). Large scale variations are removed by subtracting an image smoothed with a 16-pixel box.
- Parameters:
- datanumpy.ndarray
(nrow, ncol) input data array
- bar_spacingint, optional
known jailbar spacing between columns
- widthint, optional
median filtering will be applied along rows using a kernel width of
bar_spacing + width
. An additional pixel will be added to make the kernel odd sized if necessary.- modestr, optional
Specifies the edge handling mode for median filter.
- Returns:
- numpy.ndarray
(nrow, ncol) cleaned data array