parameters: (wd, hd, wf, idet, dd)
return_statement: return delta, sigd, sigdz, sigdd, effic
docstring: ! Calculates the detector time widths for either a single He tube or several tubes grouped together
docstring_summary: ! Calculates the detector time widths for either a single He tube or several tubes grouped together
docstring_tokens: ! Calculates the detector time widths for either a single He tube or several tubes grouped together
function: def detect2(wd, hd, wf, idet, dd):
      """
      ! Calculates the detector time widths for either a single He tube or several tubes grouped together
      """
      if idet == 1:
          # Davidson type scintillator detector
          raise ValueError('Li detector not supported in Pychop')
      elif idet == 2:
          # He cylindrical detectors binned together
          rad = dd/2.0
          atms = 10.0
          t2rad = 0.063
          effic, delta, ddsqr, v_dd, v_d = detect_he(wf, rad, atms, t2rad)
          sigd = wd / np.sqrt(12.0)
          sigdz = hd / np.sqrt(12.0)
          sigdd = np.sqrt(v_dd)
      else:
          # He cylindrical detector
          rad = dd/2.0
          atms = 10.0
          t2rad = 0.063
          effic, delta, ddsqr, v_dd, v_d = detect_he(wf, rad, atms, t2rad)
          ndet = max(int(wd/dd), 1.)
          space = 2.0*rad
          v_d = v_d + (space**2) * (ndet**2 -1)/12.0
          sigd = np.sqrt(v_d)
          sigdz = hd / np.sqrt(12.0)
          sigdd = np.sqrt(v_dd)
      return delta, sigd, sigdz, sigdd, effic
function_tokens: def detect2 ( wd , hd , wf , idet , dd ) : if idet == 1 : # Davidson type scintillator detector raise ValueError ( 'Li detector not supported in Pychop' ) elif idet == 2 : # He cylindrical detectors binned together rad = dd / 2.0 atms = 10.0 t2rad = 0.063 effic , delta , ddsqr , v_dd , v_d = detect_he ( wf , rad , atms , t2rad ) sigd = wd / np . sqrt ( 12.0 ) sigdz = hd / np . sqrt ( 12.0 ) sigdd = np . sqrt ( v_dd ) else : # He cylindrical detector rad = dd / 2.0 atms = 10.0 t2rad = 0.063 effic , delta , ddsqr , v_dd , v_d = detect_he ( wf , rad , atms , t2rad ) ndet = max ( int ( wd / dd ) , 1. ) space = 2.0 * rad v_d = v_d + ( space ** 2 ) * ( ndet ** 2 - 1 ) / 12.0 sigd = np . sqrt ( v_d ) sigdz = hd / np . sqrt ( 12.0 ) sigdd = np . sqrt ( v_dd ) return delta , sigd , sigdz , sigdd , effic