# VIIRS Day/Night Band--Correcting Striping and Nonuniformity over a Very Large Dynamic Range
## 2 Materials and Methods
### Histogram Matching Method Destriping Algorithm Description  
We have tested three techniques for removing striping, and have presented some of these results previously [5]. These techniques are:  
1. Offset correction for night scenes similar to what is described in the On-Orbit DNB Calibration section above. 2. Gain correction for moonlit scenes using the Moment Matching (MM) technique. 3. Complete correction over the entire dynamic range using the Histogram Matching Method (HMM). Several other destriping techniques have been used for MODIS and other instruments [26] and we considered these, but have found that histogram matching is the most versatile. It is also the only technique capable of handling the large dynamic range of the DNB [27]. It is important to emphasize that the destriping techniques described here can be completely automated and thus embedded as a post-processing step in the operational production of DNB SDR and the Near Constant Contrast (NCC) product. Scenes are not selected manually and no geographic criteria are used to select data. Only solar and lunar illumination criteria are used. With our software we were able to process ensembles of DNB scene radiance data collected over three 24 h periods in a short time on one desktop computer with no manual intervention. The gain and offset adjustments from these processes could be directly applied to the calibration coefficients and filtered as they now are in the RSBAutoCal process. HMM was originally designed for Landsat [28], and equalizes cumulative histograms of radiance distributions per detector in order to correct offset, gain and nonlinearity. We believe that HMM is better than MM because it is able to correct nonlinearity, whereas MM cannot. It is also capable of dealing with distributions for detectors that saturate or have a lower limit. In this regard MGS is the most challenging of the three gain stages because it is limited at both ends of its dynamic range, and the available scenes are limited to a small fraction of each orbit. Also, the methods described so far involve selectively processing uniform parts of scenes, but by nature the twilight region is not uniform. The NCC imagery produced from DNB produces a pseudo-albedo for day, twilight and night in such a way as to eliminate the orders-of-magnitude changes in radiance over the twilight transition region [29]. Therefore, any striping in the MGS becomes much more visible in the NCC. Because of this, it is important to correct for all non-uniformity in all scenes, including in the twilight. There are variations of the HMM destriping, so our particular algorithm will be described here. The process is applied to radiances that have already been calibrated rather than using digital counts. For the DNB it is important that each aggregation zone be processed separately, and we do not make the assumption that the two symmetric aggregation zones that use the same aggregation mode would have the same striping. Several filters are applied before collecting the radiances into the ensemble. It is important that for every filter that is applied, the criteria does not skew the statistics. For example, the calibrated radiances, even in a perfectly uniform scene, will have variable levels because of striping. Therefore, if a filter selects radiances only within a certain range using the calibrated radiance, then the true ensemble will have variability in the true range. For all radiance testing, we impose a rule that if any of the radiances for any of the detectors have a radiance in the same sample below a threshold, then they are all excluded from the ensemble. Given the problems with filtering, it is tempting to do no filtering at all and simply allow all values into the ensemble. This creates problems, however, because then the ensemble would become too large, and also, too many histogram levels would be required to cover the entire seven orders of magnitude of possible radiance values. One filter that we often use is a uniformity filter.