# VIIRS Day/Night Band--Correcting Striping and Nonuniformity over a Very Large Dynamic Range
## 4 Discussion
### Histogram Matching Method Computational Considerations  
The DNB produces about three tera-pixels of imagery per day, presenting an onerous computational task if implemented operationally. There are two parts of destriping:  
1. Collecting the ensemble of pixel radiances, filtering the ensemble, producing histograms, and computing correction tables from the histograms.
2. Applying the correction tables to the DNB radiances.  
In considering computational costs, one fact to note is that the ensemble of radiances used to compute the correction does not need to come from the set of radiances that are being corrected. There are advantages in using current data, however, because the statistics in the ensemble closely match the statistics of the radiances being corrected. The problem with doing so is that if the ensemble is too small, then it may not have enough data to be statistically robust. We have found that one 5 min granule is large enough to provide a statistically robust ensemble.  
There are, however, many cases where one granule is not enough and we must combine several granules together to produce a valid ensemble. This is especially true for the twilight because we separate the twilight into four ensembles equally spaced by solar zenith angle from 85\({}^{\circ}\) to 105\({}^{\circ}\). These ensemble must be combined with the corresponding ensembles from other orbit's twilight crossing.  
Because the creation of histograms requires a sorting of the radiances, the computational time to process an ensemble is proportional to the square of the number of elements in it. As such, ensembles must be limited to only a few granules. Processing the twilight corrections require the largest ensembles, and producing the correction tables can take several hours.  
The process of applying the corrections is not as computationally intensive as construction of the correction tables, and the computation time is only linearly proportional to the number of pixels being corrected. Therefore there is an advantage to computing the correction tables from a limited sample (e.g., one orbit of nighttime data) and then applying that correction to many other granules (e.g., all the nighttime granules for that date). What we were uncertain of is how stable these corrections are. Are they valid for 6 h, 24 h or 48 h? Surprisingly, we found that they are valid for at least a month, implying that the response drift discussed in Sections 3.2.1 and 3.2.2 are not as significant as has been previously thought.  
We used tables created from the night of 7 October 2014 and applied them to 9 September 2014, and the tables corrected as well as tables produced from the same day. It is important to note here that for both dates the moon was full, and we believe that it is necessary to use tables from dates with similar illumination. However, for the day and the twilight this should not be as important, since the illumination changes slowly with season.  
We continue to experiment with the best techniques to use to optimize the HMM destriping. Ideally, these techniques would be incorporated into the operational process directly so that all end-users would have access to the highest quality imagery. If that were to happen, then the computational considerations discussed here would be vitally important to streamlining this process.  
HMM in its current instantiation cannot fix all of the nonuniformities in the DNB imagery. For example the zigzag patterns in Figure 17 are not removed by HMM. The 72-scan banding artifact shown in Figure 4 may be correctable with HMM if it were to be treated as a separate ensemble. This hypothesis is currently being investigated. The mirror side modulation shown in Figure 12 could be fixed by treating the detectors on each side as independent, effectively treating the DNB as if it were a 32 detector sensor.  
Striping caused by stray light correction residuals can only be removed through improvements to the stray light correction algorithm itself, and some of those proposed changes have been discussed herein.