parameters: (d, diamd, diamFCalcSq)
return_statement: return Fsq
docstring: % diamond reflections are identified according to their d-spacing
      % and corresponding calculated Fsq are returned
  
      % global sf111 sf220 sf311 sf400 sf331
docstring_summary: % diamond reflections are identified according to their d-spacing
      % and corresponding calculated Fsq are returned
docstring_tokens: % diamond reflections are identified according to their d - spacing % and corresponding calculated Fsq are returned
function: def Fsqcalc(d, diamd, diamFCalcSq):
      '''
      % diamond reflections are identified according to their d-spacing
      % and corresponding calculated Fsq are returned
  
      % global sf111 sf220 sf311 sf400 sf331
      '''
      # n = len(diamd) # unused variable
      ref = d
      dif = abs(diamd - ref)
      i = dif.argmin(0)  # i is index of diamd closest to d
      Fsq = diamFCalcSq[i]
      return Fsq
function_tokens: def Fsqcalc ( d , diamd , diamFCalcSq ) : # n = len(diamd) # unused variable ref = d dif = abs ( diamd - ref ) i = dif . argmin ( 0 ) # i is index of diamd closest to d Fsq = diamFCalcSq [ i ] return Fsq