original_docstring: 
      From a dictionary whose keys are redshift values
      Find the redshifts that are closest to those in zlist
      and return them. Use simple search to find minimum difference
      between desired and available redshifts
      
docstring: From a dictionary whose keys are redshift values
  Find the redshifts that are closest to those in zlist
  and return them. Use simple search to find minimum difference
  between desired and available redshifts
docstring_tokens: From a dictionary whose keys are redshift values Find the redshifts that are closest to those in zlist and return them . Use simple search to find minimum difference between desired and available redshifts
code: def find_redshifts(longdict, zlist = [6.0, 8.0]):
      """
      From a dictionary whose keys are redshift values
      Find the redshifts that are closest to those in zlist
      and return them. Use simple search to find minimum difference
      between desired and available redshifts
      """
  
      zmax = np.max(longdict.keys())
      zmin = np.min(longdict.keys())
  
      zuse = []
      for z in sorted(zlist):
          zold = 0.0
          if z > zmax:
              print "%0.3f exceeds max value of %0.3f" % (z, zmax)
              zuse.append(zmax)
          elif z < zmin:
              print "%0.3f lowers than min value of %0.3f" % (z, zmin)
              zuse.append(zmin)
          else:
              for ztest in sorted(longdict.keys()):
                  if abs(ztest - z) > abs(zold - z):
                      zuse.append(zold)
                      break
                  zold = ztest
              
      return zuse
code_tokens: def find_redshifts ( longdict , zlist = [ 6.0 , 8.0 ] ) : zmax = np . max ( longdict . keys ( ) ) zmin = np . min ( longdict . keys ( ) ) zuse = [ ] for z in sorted ( zlist ) : zold = 0.0 if z > zmax : print "%0.3f exceeds max value of %0.3f" % ( z , zmax ) zuse . append ( zmax ) elif z < zmin : print "%0.3f lowers than min value of %0.3f" % ( z , zmin ) zuse . append ( zmin ) else : for ztest in sorted ( longdict . keys ( ) ) : if abs ( ztest - z ) > abs ( zold - z ) : zuse . append ( zold ) break zold = ztest return zuse
short_docstring: From a dictionary whose keys are redshift values
  Find the redshifts that are closest to those in zlist
  and return them.
short_docstring_tokens: From a dictionary whose keys are redshift values Find the redshifts that are closest to those in zlist and return them .
comment: """
      From a dictionary whose keys are redshift values
      Find the redshifts that are closest to those in zlist
      and return them. Use simple search to find minimum difference
      between desired and available redshifts
      """