original_docstring: 
      waiting until elem finished ramping.
  
      - elem, single element object or list of objects
      - timeout, default 5 seconds.
      - wait, default 0 seconds. Minimal waiting.
      - stop, default 0, stop value. This is related to the ramping command PV.
  
      >>> cors = getElements("COR")
      >>> cors[0] = 0.0
      >>> waitRamping(cors[0])
      >>> correctOrbit()
      >>> waitRamping(cors)
  
      For EPICS, It looks at "ramping" field for the elements and wait until all
      of the values equal to *stop*.
      
docstring: waiting until elem finished ramping.
  elem, single element object or list of objects
  timeout, default 5 seconds.
  wait, default 0 seconds. Minimal waiting.
  stop, default 0, stop value. This is related to the ramping command PV.
  
  
  
  For EPICS, It looks at "ramping" field for the elements and wait until all
  of the values equal to *stop*.
docstring_tokens: waiting until elem finished ramping . elem single element object or list of objects timeout default 5 seconds . wait default 0 seconds . Minimal waiting . stop default 0 stop value . This is related to the ramping command PV . For EPICS It looks at " ramping " field for the elements and wait until all of the values equal to * stop * .
code: def waitRamping(elem, **kwargs):
      """
      waiting until elem finished ramping.
  
      - elem, single element object or list of objects
      - timeout, default 5 seconds.
      - wait, default 0 seconds. Minimal waiting.
      - stop, default 0, stop value. This is related to the ramping command PV.
  
      >>> cors = getElements("COR")
      >>> cors[0] = 0.0
      >>> waitRamping(cors[0])
      >>> correctOrbit()
      >>> waitRamping(cors)
  
      For EPICS, It looks at "ramping" field for the elements and wait until all
      of the values equal to *stop*.
      """
      t0 = datetime.now()
      wait = kwargs.get("wait", 0)
      stop = kwargs.get("stop", 0)
      timeout = kwargs.get("timeout", 5)
      dt = kwargs.get("dt", 0.2)
  
      if wait > 0:
          time.sleep(wait)
  
      if isinstance(elem, element.CaElement):
          elemlst = [elem]
          pvl = elem.pv(field="ramping")
      elif isinstance(elem, (list, tuple)) and \
              all([isinstance(e, element.CaElement) for e in elem]):
          pvl = reduce(lambda x,y: x + y,
                       [e.pv(field="ramping") for e in elem])
  
  
      wdt = caWait(pvl, stop = stop, timeout = timeout, dt = dt)
      if kwargs.get("verbose", 0) > 0:
          print(("waited for ", wdt, (datetime.now() - t0).total_seconds(), "seconds"))
code_tokens: def waitRamping ( elem , ** kwargs ) : t0 = datetime . now ( ) wait = kwargs . get ( "wait" , 0 ) stop = kwargs . get ( "stop" , 0 ) timeout = kwargs . get ( "timeout" , 5 ) dt = kwargs . get ( "dt" , 0.2 ) if wait > 0 : time . sleep ( wait ) if isinstance ( elem , element . CaElement ) : elemlst = [ elem ] pvl = elem . pv ( field = "ramping" ) elif isinstance ( elem , ( list , tuple ) ) and all ( [ isinstance ( e , element . CaElement ) for e in elem ] ) : pvl = reduce ( lambda x , y : x + y , [ e . pv ( field = "ramping" ) for e in elem ] ) wdt = caWait ( pvl , stop = stop , timeout = timeout , dt = dt ) if kwargs . get ( "verbose" , 0 ) > 0 : print ( ( "waited for " , wdt , ( datetime . now ( ) - t0 ) . total_seconds ( ) , "seconds" ) )
short_docstring: waiting until elem finished ramping.
short_docstring_tokens: waiting until elem finished ramping .
comment: """
      waiting until elem finished ramping.
  
      - elem, single element object or list of objects
      - timeout, default 5 seconds.
      - wait, default 0 seconds. Minimal waiting.
      - stop, default 0, stop value. This is related to the ramping command PV.
  
      >>> cors = getElements("COR")
      >>> cors[0] = 0.0
      >>> waitRamping(cors[0])
      >>> correctOrbit()
      >>> waitRamping(cors)
  
      For EPICS, It looks at "ramping" field for the elements and wait until all
      of the values equal to *stop*.
      """