class_docstr: The frequency double side band class.
  
  The elements of the double-side-band type frequency band are the central
  frquency, the relative side band frequency (relative to the center - left
  and right) and their bandwidths, and optionally a unit (defaults to
  GHz). No clever unit conversion is done here, it's just used for checking
  that two ranges are comparable.
  
  Frequency Double Side Band is supposed to describe the special type of bands
  commonly used in humidty sounding from Passive Microwave Sensors. When the
  absorption band being observed is symmetrical it is advantageous (giving
  better NeDT) to sense in a band both right and left of the central
  absorption frequency.
class_docstr_tok: ["The","frequency","double","side","band","class",".","The","elements","of","the","double-side-band","type","frequency","band","are","the","central","frquency",",","the","relative","side","band","frequency","(","relative","to","the","center","-","left","and","right",")","and","their","bandwidths",",","and","optionally","a","unit","(","defaults","to","GHz",")",".","No","clever","unit","conversion","is","done","here",",","it","'s","just","used","for","checking","that","two","ranges","are","comparable",".","Frequency","Double","Side","Band","is","supposed","to","describe","the","special","type","of","bands","commonly","used","in","humidty","sounding","from","Passive","Microwave","Sensors",".","When","the","absorption","band","being","observed","is","symmetrical","it","is","advantageous","(","giving","better","NeDT",")","to","sense","in","a","band","both","right","and","left","of","the","central","absorption","frequency","."]
docstr: Get the distance to the double side band.
  
  Determining the distance in frequency space between two double side
  bands can be quite ambiguous, as such bands are in effect a set of 2
  narrow bands, one on each side of the absorption line. To keep it
  as simple as possible we have until further decided to set the
  distance between such two bands to infitiy if neither of them are
  contained in the other.
  
  If the frequency entered is a single value and this frequency falls
  inside one of the side bands, the distance will be the minimum of the
  distances to the two outermost sides of the double side band. However,
  is such a single frequency value falls outside one of the two side
  bands, the distance will be set to infitiy.
  
  If the frequency entered is a tuple the distance will either be 0 (if
  one is containde in the other) or infinity.
docstr_tok: ["Get","the","distance","to","the","double","side","band",".","Determining","the","distance","in","frequency","space","between","two","double","side","bands","can","be","quite","ambiguous",",","as","such","bands","are","in","effect","a","set","of","2","narrow","bands",",","one","on","each","side","of","the","absorption","line",".","To","keep","it","as","simple","as","possible","we","have","until","further","decided","to","set","the","distance","between","such","two","bands","to","infitiy","if","neither","of","them","are","contained","in","the","other",".","If","the","frequency","entered","is","a","single","value","and","this","frequency","falls","inside","one","of","the","side","bands",",","the","distance","will","be","the","minimum","of","the","distances","to","the","two","outermost","sides","of","the","double","side","band",".","However",",","is","such","a","single","frequency","value","falls","outside","one","of","the","two","side","bands",",","the","distance","will","be","set","to","infitiy",".","If","the","frequency","entered","is","a","tuple","the","distance","will","either","be","0","(","if","one","is","containde","in","the","other",")","or","infinity","."]
code: def distance(self, value):
      """Get the distance to the double side band.
  
      Determining the distance in frequency space between two double side
      bands can be quite ambiguous, as such bands are in effect a set of 2
      narrow bands, one on each side of the absorption line. To keep it
      as simple as possible we have until further decided to set the
      distance between such two bands to infitiy if neither of them are
      contained in the other.
  
      If the frequency entered is a single value and this frequency falls
      inside one of the side bands, the distance will be the minimum of the
      distances to the two outermost sides of the double side band. However,
      is such a single frequency value falls outside one of the two side
      bands, the distance will be set to infitiy.
  
      If the frequency entered is a tuple the distance will either be 0 (if
      one is containde in the other) or infinity.
      """
      if self == value:
          try:
              left_side_dist = abs(
                  value.central
                  - value.side
                  - (self.central - self.side)
              )
              right_side_dist = abs(
                  value.central
                  + value.side
                  - (self.central + self.side)
              )
          except AttributeError:
              if isinstance(value, (tuple, list)):
                  return abs(
                      (value[0] - value[1]) - (self.central - self.side)
                  )
  
              left_side_dist = abs(value - (self.central - self.side))
              right_side_dist = abs(value - (self.central + self.side))
  
          return min(left_side_dist, right_side_dist)
      else:
          return np.inf
  
imports: import numbers
  from contextlib import suppress
  from typing import NamedTuple
  import numpy
label_desc: Use image node_id 6 for calling the FrequencyDoubleSideBand obj's underlying member method code with example usage: obj.distance(value) and returns: min, np, abs