class_docstr: Histogram equalized DNB composite.
  
  The logic for this code was taken from Polar2Grid and was originally developed by Eva Schiffer (SSEC).
  
  This composite separates the DNB data in to 3 main regions: Day, Night, and Mixed. Each region is
  equalized separately to bring out the most information from the region due to the high dynamic range
  of the DNB data. Optionally, the mixed region can be separated in to multiple smaller regions by
  using the `mixed_degree_step` keyword.
class_docstr_tok: ["Histogram","equalized","DNB","composite",".","The","logic","for","this","code","was","taken","from","Polar2Grid","and","was","originally","developed","by","Eva","Schiffer","(","SSEC",")",".","This","composite","separates","the","DNB","data","in","to","3","main","regions",":","Day",",","Night",",","and","Mixed",".","Each","region","is","equalized","separately","to","bring","out","the","most","information","from","the","region","due","to","the","high","dynamic","range","of","the","DNB","data",".","Optionally",",","the","mixed","region","can","be","separated","in","to","multiple","smaller","regions","by","using","the","`","mixed_degree_step","`","keyword","."]
docstr: Scale the DNB data using a histogram equalization method.
  
  Args:
      dnb_data (ndarray): Day/Night Band data array
      sza_data (ndarray): Solar Zenith Angle data array
docstr_tok: ["Scale","the","DNB","data","using","a","histogram","equalization","method",".","Args",":","dnb_data","(","ndarray",")",":","Day\/Night","Band","data","array","sza_data","(","ndarray",")",":","Solar","Zenith","Angle","data","array"]
code: def _run_dnb_normalization(self, dnb_data, sza_data):
      """Scale the DNB data using a histogram equalization method.
  
      Args:
          dnb_data (ndarray): Day/Night Band data array
          sza_data (ndarray): Solar Zenith Angle data array
  
      """
      # convert dask arrays to DataArray objects
      dnb_data = xr.DataArray(dnb_data, dims=("y", "x"))
      sza_data = xr.DataArray(sza_data, dims=("y", "x"))
  
      good_mask = ~(dnb_data.isnull() | sza_data.isnull())
      output_dataset = dnb_data.where(good_mask)
      # we only need the numpy array
      output_dataset = output_dataset.values.copy()
      dnb_data = dnb_data.values
      sza_data = sza_data.values
      self._normalize_dnb_for_mask(
          dnb_data, sza_data, good_mask, output_dataset
      )
      return output_dataset
  
imports: from __future__ import annotations
  import logging
  import math
  from datetime import datetime
  import dask
  import dask.array
  import numpy
  import xarray
  from satpy.composites import CompositeBase, GenericCompositor
  from satpy.dataset import combine_metadata
label_desc: Use image node_id 3 for calling the HistogramDNB obj's underlying member method code with example usage: obj._run_dnb_normalization(dnb_data, sza_data) and returns: output_dataset